Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Modify header ith method IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER .

Former Member
0 Likes
1,152

Hi guys,

i have to set 'X' default on field ekko-kufix (that is 'Exch. rate fixed' on transaction me21n).

I have implemented the definition ME_PROCESS_PO_CUST.

What i have to do in that method?

And how can i try to debug it in the transaction? I don't know how activate bapi..

Thanks!

1 ACCEPTED SOLUTION
Read only

Manohar2u
Active Contributor
0 Likes
1,021

We can use set_data method to set the fields - like example below.

DATA:ls_poheader TYPE mepoheader,

lm_poheader TYPE REF TO if_purchase_order_mm, wa_item TYPE mepoitem.

lm_poheader = im_item->get_header( ).

ls_poheader = lm_poheader->get_data( ).

wa_item = im_item->get_data( ).

IF ls_poheader-bsart = 'UB' .

wa_item-matnr = '100-100'.

CALL METHOD im_item->set_data

EXPORTING

im_data = WA_ITEM.

endif.

Only fields which are not in structure are allowed MEPOITEM_TECH (as per my research)

5 REPLIES 5
Read only

Manohar2u
Active Contributor
0 Likes
1,022

We can use set_data method to set the fields - like example below.

DATA:ls_poheader TYPE mepoheader,

lm_poheader TYPE REF TO if_purchase_order_mm, wa_item TYPE mepoitem.

lm_poheader = im_item->get_header( ).

ls_poheader = lm_poheader->get_data( ).

wa_item = im_item->get_data( ).

IF ls_poheader-bsart = 'UB' .

wa_item-matnr = '100-100'.

CALL METHOD im_item->set_data

EXPORTING

im_data = WA_ITEM.

endif.

Only fields which are not in structure are allowed MEPOITEM_TECH (as per my research)

Read only

Former Member
0 Likes
1,021

Do i have to write that in the method?

So i will write ls_poheader-kufix = 'X' befor the set_data method. Right?

Read only

Former Member
0 Likes
1,021

Yes correct.

Regards

Abhii

Read only

Former Member
0 Likes
1,021

I have error here:

lm_poheader = im_item->get_header( ).

ls_poheader = lm_poheader->get_data( ).

wa_item = im_item->get_data( ).

IM_ITEM is unknown..

Please help

I think i have to do other declarations..or not?

Read only

Manohar2u
Active Contributor
0 Likes
1,021

write in im_header method. You will have im_header as input.

Above example was to change item field. As you need to change header try in header method.

Edited by: Manohar Reddy Kallem on Dec 2, 2009 2:33 PM