Triggering IDOC using BTE when Material is changed in MM02 Transaction

By Bishnu Dash, Bristlecone India

Introduction:  This tutorial gives a hands-on practice for triggering IDOC when a material is changed in MM02 transaction. Even there are few User Exits and BADI which triggers after pressing “SAVE” button in MM02, but we cannot use them for triggering IDOC as those Exits/BADIs are triggered before the DB COMMIT occurred. Hence IDOC will be generated with old material data rather generating newly changed Material data. In this scenario we are sending whole IDOC structure for Material (MATMAS) in MM02 transaction.

By using BTE we can suffice the above scenario.

Pre-requisites: ALE connection should be set up between receiver and sender system, IDOC message type is MATMAS and IDOC Basic type is MATMAS05

1.   Run the TCODE FIBF to find the appropriate BTE


2.    Go to Environment -> Click on Info system (P/S)

3.     Below screen would appear, then press the Execute button to see list of BTEs

4.       The BTE 00001250 is the right one and it triggers when material is changed in MM02 after pressing SAVE button.


5.   Select the BTE 00001250 and then click on “Sample function module”


6.     After pressing “ Sample function module” it will take you to SE37 transaction and show a SAP standard FM i.e. SAMPLE_INTERFACE_00001250


So here we need to copy this standard FM to a “ Z “ one and within that Z FM we can write our custom code to trigger IDOCs. This FM has all the required Material data for triggering IDOCs.  

7.                   Copy the standard FM to a Z name space.

Click here to continue....

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image