Skip to Content
Author's profile photo shankar singh

Config.Import of data using IDOC

The propose of this post is to give the details steps how to configure the Import sceniro mention in the SAP doc and it will help to answer some of the question ask frequently.

Data Transfer:

Setting up Data Transfer i.e. Export and import configuration.

  1. The first step of a data transfer is the export of the master data to an
    IDoc-XML file, which you can save locally or on your application server.
  2. In the second step, you import the data into your central MDG system.

Data Export from the source
System, configure the logical system
for IDoc-XML export to the application server file system

  1. Create an XML-file port: Use transaction WE21 to create an XML-file
    port for IDoc processing. Ensure that you have network access from your local
    client to the directory configured in the XML-file port.


Enter the function module EDI_PATH_CREATE_CLIENT_DOCNUM. On the Outbound Trigger tab enter the RFC


2.Create Logical System

Open transaction SALE and then go to
Basic Settings -> Logical->Systems->to create a new logical system.


3. Maintain Distribution Model
Open transaction SALE and then go to->Modeling and Implementing Business Processes->Maintain Distribution Model and Distribute Views->You can also use transaction BD64 for this.

a. Switch to change mode and choose Create Model View to create a new entry. Enter a short text and a technical identifier.
b. Choose Add Message Type for the newly created model. Enter a logical source system name and a destination system name and choose the message types MATMAS and CLFMAS


4.Create Partner Profile

Run transaction SALE and then go to->Partner Profiles->Generate Partner Profiles

>Alternatively you can use transaction BD82.

a.Select the newly created model using the input help for the technical name and then select the logical destination system.

b.Enter the authorized user and the following values:

 Version: 3

 Pack.Size: 100

 Output Mode: Immediate Transfer

 Inbound. Processing: Immediately

c.Choose Execute. You can ignore the port error that appears.


5.Call transaction WE20 and make the following settings:

a.Open the Partner Type LS folder and select the partner profile you created above.

b.Update the message types MATMAS and CLFMAS in the Outbound Parameters section. The Receiver Port is the XML-file port from the first step above. In the Basic Type field enter MATMAS05 for MATMAS and CLFMAS02 for CLFMAS.


6.The Receiver Port is the XML-file port from the first step above. In the Basic Type
field enter


7.Test creation of IDOC XML

  1. a.Generate the
    IDoc-XML for material using the transaction BD10.



8.Check the newly generated IDocs using transaction WE02 or BD87. You can use the
receiver port as the filter criteria in the Partner Port field.


9.Use transaction AL11 to find the XML files on the directory of your XML-file


10.To download the file for analysis purposes to local directory use transaction CG3Y.


Data Import into Target System (MDG Hub)

1. To be able to import IDoc-XML files the following set up activities need to be carried out:

a.Use transaction IDX1 to create two ports in the IDoc adapter, one for sending and the other for receiving. Enter the port, client, description, and RFC destination for each port. Both ports should have the RFC destination of the MDG hub. Check that the port names match the names in your IDoc-XML file for the SNDPOR and RCVPOR.

Note:That the sender and receiver Port Name should match the incoming XML file,otherwise the
file will not be picked up(shown in XML File below).



2.In transaction WE21 enter the receiver XML port using the same name as in step 1 above.
Enter the port name under the folder XML File, and enter a description and a
physical directory. In the function module field enter
EDI_PATH_CREATE_CLIENT_DOCNUM. On the Outbound:Trigger tab, in
the RFC destination field, enter


3.In transaction FILE create the logical file path name. Enter a Logical
and a Name. In the Physical File field enter
<PARAM_1>. In the data format field enter BIN. In the Application Area field
CA. In the Logical Path field enter the logical file path.

Note:Physical File field some is not reconize due which the file will not be picked up so check properly.


4.Open the Configuration activity  General Settings->Data Transfer->Define File Source and Archive Directories for Data Transferand assign your new logical file path name as a directory for data transfer.



5.In transaction AL11 make sure that the IDoc-XML files are stored under the logical path and that there are no other files stored in that directory. Double-click on the path to view the existing IDoc-XML file. You can use transaction CG3Z to copy a local IDoc-XML file to the path


6.Open the MDG workcenter and provide the details with CR if you want to govern the data as shown below.


select the Show Directory Content to see the file has come in the path.


check the logs to see whether the files are picked up or not.


go back to MDG workcenter and see the you can see the CR if the file is picked Up


click on the CR and activate


check the status of CR it should Final check approved and go MM03 to check the material


Hope this will help…….

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Shankar,

      Many thanks for the post. I am able to setup Material import but when I try bulk import of IDOCS it gives me error:

      You cannot proceed; you have not created a key mapping for material 2558

      Despite the fact that I am already done with the Key Mapping.

      Please guide me on this.

      Many thanks again.

      Author's profile photo shankar singh
      shankar singh
      Blog Post Author

      Dear Mansoor,

      Please let me know what excatly your are trying to do ,your are customizing the Key mapping or using the standard one.

      Author's profile photo Former Member
      Former Member

      Hi Shankar

      Thanks for sharing such a useful blog

      If we created XML files from IDOC which is generated in BD10 in target system and it is already uploaded in surce directory system. But it seems that source system in DTIMPORT it gets the correct message type like MATRMAS05 we are getting XML file with all segment , but while mapping into MDG UI it skips accounting view fields
      but it is taking another views values correctly.

      Do you know any class or BADI where this IDOC segment fields mapping to MDG UI fields are done?

      Author's profile photo suresh pernati c
      suresh pernati c

      Hi Shankar,

      My requirement is to create CR's for each inbound idoc with out manual intervention.


      Suresh PC