Trigger MATMAS IDoc using BTE Function

Trigger MATMAS IDoc using BTE Function: this is a sample ABAP Program to generate a MATMAS IDoc for a Material Change using BTE event when a SAP Material is saved in MM02 / MM01.

Trigger MATMAS IDoc using BTE Function ABAP

First Step is to generate IDoc Control Record : EDIDC
The Second Step is to generate IDOC Data Table : EDIDD
The last step is to call the MASTER_IDOC_DISTRIBUTE to generate the IDoc

This sample ABAP function code is a little particular to generate MATMAS IDoc using BTE Function ABAP. This is a enhanced copy of the standard Function SAMPLE_INTERFACE_00001250.

Find more resource about the Most important Idocs Tcodes and Idocs Tables and also .

The second step is to fill some Data into MATMAS Idoc such

  • E1MARAM : MARA
  • E1MAKTM : MAKT : Material Description Table
  • E1MARCM : MARC : Material Plant Data
  • E1MARDM : MARD : Material Storage Location Data
  • E1MARMM : MARM : Material Alternative Unit Table
  • E1MLANM : MLAN : Tax Classification for Material
Check also   SAP Invoice IDoc INVOIC2 - Structure, Enhancement (exit and BADI)

The Last step is to generate the IDoc as following using MASTER_IDOC_DISTRIBUTE BAPI

Check also   Manage SAP SLG1 - Application Log in ABAP with samples

Here it is the Idoc MATMAS should be created when a material is Saved ( if the ALE configuration is already set-up)

Check also   SAP CRM WebUI: How To Enhance a Web UI Component

Sab125

Hi. I have been working as SAP Technical and functional for a decade. Through this blog, I am trying to share with you my experience. Hopefull, it makes your ways easier path ... Sab

Leave a Reply

Your email address will not be published. Required fields are marked *