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.

Untitled.png

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

Untitled1.png

2.Create Logical System

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

Untitled3.png

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

Untitled4.png

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.

Untitled5.png

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.

Untitled6.png

6.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.

Untitled7.png

7.Test creation of IDOC XML

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

Untitled8.png

Untitled9.png

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.

Untitled10.png

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

port.

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

Untitled11.png

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).

Untitled12.png

Untitled13.png

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
LOCAL_EXEC.

Untitled14.png

3.In transaction FILE create the logical file path name. Enter a Logical
File
and a Name. In the Physical File field enter
<PARAM_1>. In the data format field enter BIN. In the Application Area field
enter
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.

Untitled15.png

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.

Untitled16.png

Untitled17.png

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

Untitled11.png

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

Untitled18.png

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

Untitled19.png

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

Untitled19.png

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

Untitled20.png

click on the CR and activate

Untitled21.png

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

Untitled22.png

Hope this will help…….

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Mansoor Ahmed

    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.

    (0) 
  2. Sanjay Shah

    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?

    (0) 

Leave a Reply