IDoc’s are extensively used for different data transfer between SAP systems. Once we do all the IDoc configurations, the outbound IDoc’s generated in the sender side and flows to the target system.
But many times we need to control the generation of the Outbound IDoc on certain conditions.
SAP has supplied such a BAdI – IDOC_CREATION_CEHCK which can be used to control the creation of IDocs.
Let’s see the BAdI in Tx- SE20
Let’s see the BAdI interface.
Interface has one method- IDOC_DATA_CHECK , lets check the method signature.
Well it has IDoc Control structure and DATA records which helps to determine if we want to create the IDoc or not.
If IDoc to be created set the flag variable- CREATE_IDOC to ‘X’ else set as BLANK with a new BAdI implementation and then we are done-