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: 

Share Data Between User Exists - EXIT_SAPLMRMH_014 and EXIT_SAPLMRMH_015 - Incoming Invoice IDOC

0 Kudos

Hi Everyone,

I am having some trouble trying to figure out this process.

To explain, we have incoming IDOCS for invoices.

We utilize EXIT_SAPLMRMH_015 to capture a GL and add it to the MIRO line.

I currently have user exit EXIT_SAPLMRMH_015 implemented and it's working fine.

We have it implemented to pass the GL line details to export table T_CO, which is then posted on the MIRO.

However, EXIT_SAPLMRMH_015 is limited in that it does not have access to the incoming IDOC data for the invoice.

I have found that EXIT_SAPLMRMH_014 contains the IDOC data (I_IDOC_DATA).

Is there a way for the IDOC data from EXIT_SAPLMRMH_014 to be accessible in EXIT_SAPLMRMH_015? Even just the number would do.

I have considered several options but each has caveats:

- Use a memory ID between the two user exists. This is problematic as we have several servers and could be multiple IDOCs coming in at the same time.

- Save the IDOC number in export structure E_RBKPV, in a unused field, which is common between both user exists. However, this is not the intended use.

Can anyone help on what to do?

1 REPLY 1

DominikTylczyn
Active Contributor
0 Kudos

Hello sap_slider11

Both EXIT_SAPLMRMH_014 and EXIT_SAPLMRMH_015 are implemented in the XM08 function group. Therefore you can exchange the data between the two via the function group global data. Define global data in the ZXM08TOP (you need to create the include first) and the data will be accessible in both user exits.

Best regards

Dominik Tylczynski