12-21-2007 11:40 AM
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.
12-21-2007 11:54 AM
Hi,
Please use method PROCESS_ITEM instead of method POST.
Best regards,
Prashant
12-21-2007 12:33 PM
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 !
01-03-2008 10:15 AM
solved, there was another field needed to be updated
01-10-2008 9:42 PM
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
01-20-2012 7:23 PM
Bjorn..which is that other field.Would appreciate if you can point it out to me..