Application Development 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: 

IF_EX_ME_PROCESS_REQ_CUST~POST

Former Member
0 Kudos

Hi everyone,

in the method post of this BADI (creation of a PR), I try to update the afnam-field with another value (in my example it's hard-coded just to test it). The code is executed, but the change is not done in the DB. Anyone knows why ?

Any help will be much appreciated

DATA: i_items TYPE mmpur_requisition_items.

DATA: wa_item LIKE LINE OF i_items,

lv_if_item TYPE REF TO if_purchase_requisition_item,

lt_itm_data TYPE mereq_item,

lx_itm_data TYPE mereq_itemx.

break-point.

CALL METHOD im_header->get_items

RECEIVING

re_items = i_items.

break-point.

LOOP AT i_items INTO wa_item.

lv_if_item = wa_item-item.

CALL METHOD lv_if_item->get_data

RECEIVING

re_data = lt_itm_data.

CALL METHOD lv_if_item->get_datax

RECEIVING

re_datax = lx_itm_data.

lt_itm_data-afnam = '1'.

lx_itm_data-afnam = 'X'.

CALL METHOD lv_if_item->set_datax

EXPORTING

im_datax = lx_itm_data.

CALL METHOD lv_if_item->set_data

EXPORTING

im_data = lt_itm_data.

ENDLOOP.

5 REPLIES 5

former_member223537
Active Contributor
0 Kudos

Hi,

Please use method PROCESS_ITEM instead of method POST.

Best regards,

Prashant

0 Kudos

Hi,

sadly enough, the processitem is not called when you change something on a subscreen and clicks on save without pressing on enter.

Let me explain the situation : I activated the subscreen from the user exit MEREQ001 where the user fills in a value. When he clicks directly on save (and not enter first), he won 't update the value, even not when I put the update-code in user exit EXIT_SAPLMEREQ_003

. So : HELP !

Former Member

solved, there was another field needed to be updated

0 Kudos

Hi

I am having the same issue.

Can you please let me know which other field needs to be updated to achieve this??

Regards

Prasad

0 Kudos

Bjorn..which is that other field.Would appreciate if you can point it out to me..