Skip to Content

Document Purpose

This document provides steps required to load data in SAP using one of the SAP interfaces. This document will be used at the time of proof of concept to demonstrate the ability of Business Objects Data Services (BODS) to invoke IDOC interface to load data in SAP.

The main objectives are:

  • Loading data in SAP using IDOC
  • Demonstrate how BODS can be used to load data using IDOC
  • Display required configurations step-by-step & invocation
  • Demonstrate actual sample load using BODS job

Overview:

This document provides systematic approach for the data load in three sections:

  1. Configuration Required at SAP Side:
  2. Configuration Required at BODS Side:
  3. Demonstration Sample Load using BODS Job:

Each of above sections provide information as in how to configure the specific parameters required to get both SAP & BODS ready to communicate with each other. Screen shots provided for better understanding of the parameters & their configuration.

 

Configuration Required On SAP (ECC 6.0) Side

Following is the required configuration on SAP side.

1.Display IMG [ /nsale ]

Connect to SAP System using SAP GUI

Use Transaction Code (TCODE) /nsale to “Display IMG”

/wp-content/uploads/2012/07/1_119425.png

                                                                                1: Display IMG screen


Expand Logical Systems tree & click on the Clock icon in front of “Define Logical System

2.     Defining Logical System

/wp-content/uploads/2012/07/2_119441.png

                            2: Defining Logical System screen

Click on the “New Entry” Button

 
For SAP Inbound IDOC One Logical system (FRMDICL100) is required

Create a Logical system as shown below

/wp-content/uploads/2012/07/3_119442.png

                 3. Overview of added entries

Click on the SAVE Button to save both the Logical System.

Verify that the LS FRMDICL100 is present in the SAP system

/wp-content/uploads/2012/07/4_119443.png

                              4. Overview of Logical Systems

3.     Create Partner Profile [ /nwe20 ]

Use TCODE /nwe20 to configure partner profile.

/wp-content/uploads/2012/07/5_119447.png

                                        5. Partner Profile screen


Click on Create button to create new partner profile

Create partner profile as shown below

Note :     

  1. Provide partner no.  “FRMDICL100 “ i.e same as BODS Logical System.
  2. Agent  50010120 “EDI Department”  is necessary for communication with non-SAP systems like BODS. Without this agent IDOC communication will not be successful. 

/wp-content/uploads/2012/07/6_119448.png

                                        6. Partner Profile deatil screen

Click on the Save button to save the partner profile

After saving; the “Create Inbound parameter” will be activated in “Inbound paramtrs”

/wp-content/uploads/2012/07/7_119449.png

                                   7. Partner Profile create Inbound paramtrs screen

Click on “Create Inbound parameter”   in “Inbound paramtrs” section

/wp-content/uploads/2012/07/8_119456.png

                                                      8. Partner Profile Inbound parameters screen

Note :      

In Inbound options tab, select appropriate process code relevant to message type.

(In this case; for MATMAS message type, process code is MATM)

/wp-content/uploads/2012/07/9_119457.png

In “Post processing : permitted agent” tab provide details as shown above.

Save “Partner profile: Inbound parameters” using Save button

After saving verify Partner Profile & Inbound Parameter added.

/wp-content/uploads/2012/07/10_119458.png

                    Configuration Required On BODS Side

Following is the required configuration on BODS side

1.   Create SAP Datastores

  Create SAP Datastore by providing required SAP Application Server Information & creadentials

/wp-content/uploads/2012/07/11_119462.png

                                             11. SAP Datastore in BODS

Right click on IDOCs and select “Import By Name…”

/wp-content/uploads/2012/07/12_119463.png

                         12. IDOC list under SAP datastore in BODS

/wp-content/uploads/2012/07/13_119464.png

                              13. Import IDOC screen

Provide Type and Name as shown above and click on “Import” to import IDOC in data store

2.   Generating input XML schema

To create the input XML structure with the correct datatypes quickly drop the IDOC as message source onto the dataflow, go into this object and right click the schema. There, you can ask the Designer to generate the entire structure as XML schema, thus you get all columns, schemas including the datatypes.

/wp-content/uploads/2012/07/14_119465.png

                                             14. MATMAS01 IDOC screen

“MATMAS01_OUT” this XML file source is created using generated schema in“File Format” tab.

/wp-content/uploads/2012/07/15_119466.png

               15. XML Schema screen

3. Build Batch Job

Build a Batch Job with a DataFlow inside…

Data Flow is as Follows

/wp-content/uploads/2012/07/16_119467.png

                    16: Batch Job screen

Double click on source XML File Source configure it as shown below.

Note: For demonstration purpose we have used XML file that was output of the Real-Time Job designed in article Receiving IDOC In BODS from SAP”.

/wp-content/uploads/2012/07/17_119471.png

Important : Make sure that in XML file Sending Partner setting i.e. <SNDPRN> should be same as BODS logical system name. (FRMIDCL100) as shown below.

/wp-content/uploads/2012/07/18_119472.png

                              18: IDOC out XML file strucutre screen

  Un-nest by right clicking on MATMAS01_OUT schema in  “Query” as shown below

/wp-content/uploads/2012/07/19_119473.png

                                                  19: IDOC structre screen

Drag the IDOC MATMAS01 from SAP DataStore as shown

/wp-content/uploads/2012/07/20_119477.png

                                   20. IDOC in SAP Datastore

Note: Make sure to select option “Make IDOC Message Target

Configure “IDOC Message Target

/wp-content/uploads/2012/07/21_119478.png

                                      21. BODS side IDOC configuration



To report this post you need to login first.

16 Comments

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

  1. Sri V

    Hi,

    I am new to SAP BODS and follow above scenario steps but got an error when “Generate input XML Schema”.

    “The column name </CWM/TOLGM> contains an invalid first character”


    Can you please help me how do I fix this error?


    Thanks in advance

    (0) 
      1. Sri V

        Thanks Selvaraj for sharing info but I want to keep those fields instead removing in xml  document.

        As per your recommendation, as I am getting following error when generate XML Schema and cannot able to generated XML Schema due to this error.

        I believe those fields referencing from SAP ECC in different location? i.e., /CWM/

        PFA screen shots for reference.

        Error.jpg

        SAP ECC fields.jpg

        (0) 
          1. Sri V

            Can you please guide me where can I see for above fields i.e., /CWM/TOLGR, TARA, TARLM?

            FYI, I followed steps mentioned above.

            (0) 
            1. Navin Chandar

              Can you please tell me what type of data it is. to be exact can you please take a screen shot of the data and send me. mainly the data under the column /CWM/TOLGR, TARA, TARLM?

              (0) 
  2. Raghavendra (Raghu) Gandhe

    Hi All,

    I tried the above steps and when i run the job it throws me error.

    The file name is missing for the IDoc or XML file source. To restart, restart its job server.


    and also when i try to generate the XML schema i am getting the same error.


    Thanks

    (0) 
  3. Antara Roy

    Hi Roshan,

    Thanks for the article. Its really useful.

    I am working in same kind of scenario. But in my case the Source XML file is not exactly in the same format of thr Target IDOC XML .

    I am using XML_MAP transformation . After mapping the corresponding fields in XML_MAP transformation , if I unnest the structure its giving below error :

    The input ports <Query> are not used in the XML_Map transform whose output schema is <XML_Map>. Please remove them, otherwise the transform will not run.

    My data flow is attached in the image.

    Please suggest me if my approach is wrong .

    Thanks,
    Antara

    (0) 
    1. Jerry Liu

      Hi Raja,

      ID 500100120 is only created in author’s system but not in your own system. you can use any user id with proper privileges as post processing agent while choosing Ty(agent type) as US(User).

      Regards,

      Jerry

      (0) 
  4. vamsi ch

    Hi ,

    I have a doubt regarding IDOC load process.

    For ex I forwarded 50 records from BODS to SAP system using Idoc.Now I will i check if they are loaded sucessfully or not?

    Can Idoc have automatic/manual load by using some codes?

    Could you help me with steps and screenshots? how to load data,test data etc? How to handle error records?

     

    Thanks in Advance

     

    (0) 

Leave a Reply