Skip to Content
0
Jun 07, 2011 at 02:31 PM

How to obtain the IDOC number after creation

138 Views

Hello everyone,

for our master data distribution via report RHALEINI (triggered via a custom report), we have some additional code in BAdI HRALE00OUTBOUND_IDOC, method IDOC_DATA_FOR_RECEIVER_MODIFY.

Everything is working fine so far. Now I need to know the Idoc number after it was created to store it in a customer table together with some additional data. Since the Idoc was not yet created when we're in the method mentioned above, I have to put my coding somewhere else.

Any that's exactly my question: Were could I put my coding? It needs to be executed after MASTER_DATA_DISTRIBUTE since this function creates the idoc in the database.

I though about the following:

- Since RHALEINI is called by a custom report, I might be able to read the idoc number from memory id COMM_HRMD_A (see RHALEINI, line 418).

- Maybe BAdI IDOC_DATA_INSERT could be used for this purpose?

What would be your approach for this?

Thank you in advance.