10-31-2013 9:26 AM
Dear Members,
I have implemented the BADI MB_DOCUMENT_BADI for MIGO.
And in the method: MB_DOCUMENT_BEFORE_UPDATE, I am retrieving all the GR posting and reversal related information from EKBE. Based on either the first GR posting scenario or the last reversal scenario, I need to trigger a proxy for sending the GR information to a PI system in the method MB_DOCUMENT_UPDATE. The challenge which I am facing when I am implementing the entire logic of data retrieval and proxy triggering in the first method MB_DOCUMENT_BEFORE_UPDATE is, the BADI is getting triggered twice. As a result, I am finding two records of outbound data per MIGO execution in SXMB_MONI.
And when I am incorporating the data retrieval logic in MB_DOCUMENT_BEFORE_UPDATE and proxy triggering logic in MB_DOCUMENT_UPDATE, I am encountering challenges in transferring the GR related data from MB_DOCUMENT_BEFORE_UPDATE to MB_DOCUMENT_UPDATE. I have tried using ABAP memory for the same but in vain.
Please suggest further. Is there any OSS for fixing the repeated execution of the method MB_DOCUMENT_BEFORE_UPDATE during MIGO execution.
Will appreciate your inputs.
Warm Regards,
Ram.
10-31-2013 9:28 AM
10-31-2013 9:28 AM
10-31-2013 9:38 AM
Dear Abhinab,
Thanks for the info!
Yes, the multiple implementation of this BADI is checked in SE19 by default.
I have referred your link which suggests this. How do I uncheck this multiple implementation so that the BADI will be called only once.
Thanks!
Ram.
10-31-2013 9:31 AM
Hi Ram,
I think The Badi you are implementing has already implemented.Please check and if it already implement then put your logic there.
Regards
Ajit
10-31-2013 9:37 AM
Keep a break point in the Badi method and check global variables as well as system variables like sy-ucomm in run time.
Then you can keep a condition in your logic using those variables such that your code gets triggered only once.
Regards,
Gautham.
10-31-2013 9:47 AM
Dears,
Thanks for all your responses!
Please suggest me what would the best solution to this can be.
Regards,
Ram.