I would like to know the general user exit or BAdI (irrespective of message type) to make some changes in IDoc_data(EDID4) and control record (EDIDC) information before creating an IDoc in the database. Basically I am trying to find one user exit or BAdI in the function module master_idoc_distribute.
Hope I am trying in right way. Thanks in advance and looking forward to hearing the positive answer!
MASTER_IDOC_DISTRIBUTE is a very central routine and you should be aware that any change you make there has an impact on all master data transfers as they use the function to send the data. Hence it is advisable to make any changes to the IDoc to send within the procedure that creates the IDoc (usually the function IDOC_OUT…).
The MASTER_IDOC_DISTRIBUTE has some common user exits to manipulate the resulting IDocs, however they are not designed for your purpose and are called only conditionally depending on the context.
Do you want to know how I find user-exits or BAdIs?
Finding user-exits: Search for CUSTOMER-FUNCTION gloablly within the function group or module pool that you are intersted in. In your case, edit the function with SE37 and search globally.
Finding BAdIs: Basically the same as customer-functions, however they make a dynamic call to a special class method. The exit is determined with a call to method get_instance of class CL_EXITHANDLER.
Dig Deeper on SAP ABAP
Related Q&A from Axel Angeli
An SAP user is receiving an error message while integrating SAP iDoc PORDCR1 for a purchase order. Continue Reading
SAP expert Axel Angeli explains how to update the "further dates" tab information in am SAP transaction through an SAP IDoc. Continue Reading
An SAP R/3 4.7 user wants looking to post a document entry using different trading partner fields for credit and debit for function FB01. Continue Reading