Skip to Content
0
Former Member
Feb 11, 2010 at 05:04 AM

Problem with IF_PURCHASE_ORDER_MM-GET_ITEMS-SET_DATA

419 Views

HI,

I'm trying to set a field in EKPO in POST method of BADI ME_PROCESS_PO_CUST. But it's not being saved in EKPO table.. The code i've written as below:

DATA: t_item TYPE purchase_order_items.

DATA: wa_previtem TYPE mepoitem .

DATA: wa_item LIKE LINE OF t_item.

CALL METHOD im_header->get_items

RECEIVING

re_items = t_item.

LOOP AT t_item INTO wa_item.

CALL METHOD wa_item-item->get_data

RECEIVING

re_data = wa_previtem.

wa_previtem-inco1 = 'FOB'.

wa_previtem-inco2 = 'Free On Board'.

CALL METHOD wa_item-item->set_data

EXPORTING

im_data = wa_previtem.

ENDLOOP.

Please suggest if I need to do some other things as well.

Anupam