cancel
Showing results for 
Search instead for 
Did you mean: 

Question about function EXIT_SAPLMEREQ_010 in user exit MEREQ001 for Purchase Requisition

former_member607412
Participant
0 Kudos
Hi All,

I'm trying to implement this user exit, with a customer tab with one ZZ field in the CI_EBANDB structure. Now there'll be a change to this field when a specific condition fails during 'Check' function in PR. Thus I figured the function EXIT_SAPLMEREQ_010 gets called when Checking or Posting the PR.

So I call the following code in this function:

DATA(lt_req_items) = im_req_header->get_items( ).

LOOP AT lt_req_items ASSIGNING FIELD-SYMBOL(<fs_req_item>).
     DATA(l_req_item) = <fs_req_item>-item.
     DATA(l_mereq_item) = l_req_item->get_data( ).
.
.
.

    l_mereq_item-zzfield = 'X'.
    CALL METHOD l_req_item->set_data( l_mereq_item ).
ENDLOOP.

And in the PBO function for the customer data tab, EXIT_SAPLMEREQ_001, I want to show this result with a checkbox:

* read item data from system
  DATA(ls_mereq_item) = im_req_item->get_data( ).

* fill customer field with old values
  ci_ebandb-zzfield = ls_mereq_item-zzfield.

ci_ebandb-zzfield is the field I've put in the dynpro 0111 as required. I've also written appropriate code in the PAI function EXIT_SAPLMEREQ_003.

The issue is, the get_data in EXIT_SAPLMEREQ_001 doesn't retrieve the changed value of zzfield as I've supposedly 'saved' using the set_data in EXIT_SAPLMEREQ_010. When debugging, it does go through this code without any errors, but then not sure where does it get lost.

Any ideas, what might be going wrong here?

Accepted Solutions (0)

Answers (1)

Answers (1)

pataselano
Active Contributor
former_member607412
Participant
0 Kudos

Thanks Andy,

But your blog doesn't answer my question at all.

  1. The SMOD documentation does not mention anything about the 'new' function EXIT_SAPLMEREQ_010.
  2. The rest of the code you've mentioned in your blog are the basics of using this user exit, which I've done already, as mentioned in my question above.
pataselano
Active Contributor

Base on SAP note 310154, EXIT_SAPLMEREQ_010 is available to create your own messages.

If you want change z-field value base on specific condition, please use BAdI ME_PROCESS_REQ_CUST-PROCESS_ITEM.