Skip to Content
author's profile photo Former Member
Former Member


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.


CALL METHOD im_header->get_items


re_items = i_items.


LOOP AT i_items INTO wa_item.

lv_if_item = wa_item-item.

CALL METHOD lv_if_item->get_data


re_data = lt_itm_data.

CALL METHOD lv_if_item->get_datax


re_datax = lx_itm_data.

lt_itm_data-afnam = '1'.

lx_itm_data-afnam = 'X'.

CALL METHOD lv_if_item->set_datax


im_datax = lx_itm_data.

CALL METHOD lv_if_item->set_data


im_data = lt_itm_data.


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Dec 21, 2007 at 11:54 AM


    Please use method PROCESS_ITEM instead of method POST.

    Best regards,


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member


      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 ! 😊

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2008 at 10:15 AM

    solved, there was another field needed to be updated

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.