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

Problem with IF_PURCHASE_ORDER_MM-GET_ITEMS-SET_DATA

Former Member
0 Likes
2,378

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

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

7 REPLIES 7
Read only

former_member188827
Active Contributor
0 Likes
1,592

instead of writing your code in method "POST" write it in method "PROCESS_ITEM".

Read only

0 Likes
1,592

Hi,

According to our requirement it'll not work on PROCESS_ITEM method.

I tried it on CHECK method.. it is behaving mysteriously, The change is reflecting on screen after check. but not reflecting on table after saving.

Please suggest.

Anupam

Read only

0 Likes
1,592

Hi,

It does works in PROCESS_ITEM method.


  CALL METHOD im_item->get_data
    RECEIVING
      re_data = lwa_item.

   lwa_item-loekz = lc_s.

    CALL METHOD im_item->set_data
      EXPORTING
       im_data = lwa_item.

Changes will be reflected in screen and in tables after saving the PO.

Thanks,

Vinod.

Read only

0 Likes
1,592

HI,

PROCESS_ITEM would not serve my purpose. Because it's not triggered after CHECK method.

We are taking some action in CHECK method, and after this the PO items need to be modified.

Anupam

Read only

Former Member
0 Likes
1,592

Done by myself using an enhancement point..

Read only

0 Likes
1,592

Hello,

I am facing the same problem . coud you please tell me how you solved it.

Which enhancement point did you use ?

Thanks

Matthias

Read only

0 Likes
1,592

Hi!! Í have got the same problem; could you tell me which is the enchancement poit you have used?

Thanks in advance.