Monday, October 31, 2016

Receiving IDOC in Business Objects Data Services (BODS) from SAP

Document Purpose

This document provides steps required to load data in BODS from SAP using IDOC interface. This document will be used at the time of proof of concept to demonstrate the ability of Business Objects Data Services (BODS) Real-Time job to receive data using IDOC interface from SAP.
The main objectives are:
·         Loading data in BODS from SAP using IDOC
·         Demonstrate how BODS can be used to receive data using IDOC
·         Display required configurations step-by-step & invocation
·         Demonstrate actual sample load using BODS Real-Time 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.
  

SAP [ECC 6.0] Configuration for Outbound IDOC Communication


1.   Display IMG [/nsale]

Connect to SAP System using SAP [ECC 6.0] GUI
Use Transaction Code (TCODE) /nsale to “Display IMG”
/wp-content/uploads/2012/07/1_119096.png
                                                  1.0 Display IMG

2.   Defining Logical System

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

/wp-content/uploads/2012/07/2_119097.png
                                   2.0 Logical Systems: overview
Click on the “New Entries” Button
For SAP Outbound IDOC, two Logical Systems are required
First Logical System for SAP (ID4CLNT100)
Second Logical System for BODS (ID100CBODS)
Create these two Logical System as shown below
/wp-content/uploads/2012/07/3_119098.png
                    2.1 New Entries for Logical System
Click on the “SAVE” Button to save both the Logical Systems.
Confirmation message “Data was Saved” will be displayed as shown below.
/wp-content/uploads/2012/07/4_119101.png
                                   2.2 Data Saved Conformation
Verify two (2)  Logical Systems are present in the SAP
/wp-content/uploads/2012/07/5_119103.png
               2.3 Verifying Logical System

3.   Configure RFC Connection [/nsm59]

Use TCODE “/nsm59” to configure RFC Connection
/wp-content/uploads/2012/07/6_119104.png
                                        3.0 Configurations of RFC Connection

Select TCP/IP Connection as shown above & click on the Create Button to configure new RFC Connection.
/wp-content/uploads/2012/07/7_119107.png
                                  3.1  Creation of New RFC Destination: Technical Settings
Provide required information as shown above
Note: We are using registered Program ID as “DI_RFC_Client”. This could be any simple name, but the same name should be used while configuring “RFC Clients” using BODS Administrator. (Ref: 2.Client Interfaces, page no 21)
Click on the MDMP & Unicode tab
/wp-content/uploads/2012/07/8_119111.png
                      3.2 Creation of New RFC Destination: MDMP & Unicode
Note: We have selected “Unicode” radio button because BODS Target RFC Client is Unicode.
Important: There are two buttons “Connection Test” and “Unicode Test” we will test RFC Connection after “Configuring RFC Client” using BODS Administrator in Steps provided later in this document.  (Ref3. Testing RFC Client from SAP, page no 23)

4.   Create Transactional RFC Port [/nwe21]

Use TCODE “/nwe21” to configure the RFC Port
Expand Ports tree to go to “Transactional RFC”
/wp-content/uploads/2012/07/9_119112.png
                                        4.0 Creation of New Transactional RFC Port
Select Transactional RFC and click on “Create” Button.
/wp-content/uploads/2012/07/10_119117.png
   4.1 Transactional RFC Port Name
Provide Name “DI_PORT” as shown above.
Click on Continue button 
  
Port Name “DI_PORT” will appear in the list as shown below.
/wp-content/uploads/2012/07/11_119118.png
                        4.2 Transactional RFC Ports Overview
Click on the DI_PORT to provide Description & RFC destination (“DI_RFC_DESTINATION” ) that we have created in earlier section (Ref3.Configure RFC Connection, page no 7)

5.   Create Partner Profile [/nwe20]

Use TCODE “/nwe20” to configure Partner Profile.
/wp-content/uploads/2012/07/12_119121.png
                                               5.0 Creation of New Partner Profile
Click on Create button to create new partner profile
Create partner profile as shown below 
Note : 
1. Provide partner no.  “ID100CBODS “ i.e same as BODS Logical System.
2. Agent  50010120 “EDI Department”  is necessary to communicate with non-SAP systems like BODS. Without this agent IDOC communication will not be successful.
/wp-content/uploads/2012/07/13_119122.png
                                      5.1 Partner Profile Permitted Agent
Click on the Save button to save the partner profile
After saving the “Create outbound parameter” will be activated in “Outbound paramtrs”
/wp-content/uploads/2012/07/14_119123.png
                                      5.2 Create outbound paramtrs.
Click on “Create outbound parameter”   button in “Outbound paramtrs” section.
/wp-content/uploads/2012/07/15_119124.png
                                       5.3 Partner Profile: Outbound parameters
Provide the Message Type “MATMAS” & IDoc Basic type “MATMAS01″
Save “Partner profile: Outbound parameters” using Save button
Confirm Partner Profile & Outbound Parameters added.
/wp-content/uploads/2012/07/16_119125.png
                                                          5.4 Outbound Parameters Overview

6.   Change Distribution Model [/nbd64]


Use TCODE “/nbd64” to configure Change Distribution Model
/wp-content/uploads/2012/07/17_119129.png
                                                       Screen Shot 6.0 Change Distribution Model
Click on the “Create Model View”
Note: If this button is inactive then select the Model View in left hand tree and click on Edit button to enable “Create Model View” button & active.
/wp-content/uploads/2012/07/18_119130.png
                       6.1 Create Model View
Provide Short text & Technical name as follows:
Tech name same as short text.Click continue button
The DI_MODEL will be added to the list as shown below
/wp-content/uploads/2012/07/19_119131.png
                                        6.2 Distribution Model Changed overview
Select DI_MODEL and click on “Add Message Type” button
/wp-content/uploads/2012/07/20_119135.png
               6.3 Add Message Type for Changed Distribution Model
Sender is SAP Logical System & Receiver is BODS Logical System.
Provide all information as shown above and click on continue button.
The Distribution Model created is shown below.
/wp-content/uploads/2012/07/21_119136.png
                            6.4 over View of Distribution Model
Check if IDOC distribution is turned on.
Run transaction “/nbd61” and make sure the checkbox is set.
/wp-content/uploads/2012/07/22_119137.png
                  6.5 Activation Status

Create Real Time Job in BODS


1.   Create SAP Data store

Go to Data stores tab in BODS Designer, right click on blank area to create “NEW”.
Create SAP Datastore by providing required SAP Application Server Information & creadentials
/wp-content/uploads/2012/07/image026_119152.jpg
                      1.0 Creation of SAP Data Store
Expand the “SAP_TTL_Client100_DS” datastore
Select the IDOCs and Right click , click on “Import By Name…”
/wp-content/uploads/2012/07/image027_119170.jpg
                    1.1 IDOC’S importing
/wp-content/uploads/2012/07/image028_119068.jpg
               1.2 IDOC Import by Name
Provide Type & Name as shown above & click on “Import” to import IDOC in data-store

2.   Build Real Time Job

Build a Real Time Job with a DataFlow inside…
/wp-content/uploads/2012/07/image029_119174.jpg
                    2.0 Real Time Job Overview.
Data Flow is as Follows
/wp-content/uploads/2012/07/image030_119175.jpg
                           2.1 Data Flow

Query is used to Unnest  as follows
/wp-content/uploads/2012/07/image031_119188.jpg
                              2.2 Query Unnest
Note: You can unnest by right clicking on MATMAS01 as shown below
/wp-content/uploads/2012/07/image032_119234.jpg
          2.3 Unnest Option
The Target XML file configuration is a follows :
/wp-content/uploads/2012/07/image033_119235.jpg
         2.4 Target XML file Configuration

Note: Make sure “Make Port” checkbox is checked.
  
 

Configuring RT Services and RFC for IDOC through Web Administrator


1.   Configuring Real Time Service & Service Provider

Open BODS Web Administrator
Expand Real-Time tree and select Real-Time Services to do Real-Time Service Configuration
Provide required information as shown below:
/wp-content/uploads/2012/07/image034_119236.jpg
                    1.0 Web Administrator: Real Time Services Configuration
Job Name is Real Time Job name that you have created in earlier stage in designer (Ref2.Build Real Time Job, page no 18)
Browse the Job and select Job name
In service provider settings – Click on Add button to add Job Server and make it enabled.
         Once the Service is configured you can start the service by selecting the service & click on start button.
/wp-content/uploads/2012/07/image035_119240.jpg
                                   1.1 Real Time Services Status

2.   Client Interfaces


Using BODS Web Administrator
Expand Real-Time tree and select Client Interfaces to do RFC Client Configuration
Provide required information as shown below
/wp-content/uploads/2012/07/image036_119241.jpg
                                       2.0 RFC Client Configurations
Click on Apply button
Note: RFC Program ID must be same as register Program ID given while configuring RFC Connection. (Ref3.Configure RFC Connection, page no 7)
Go to “List of Supported IDOC” tab & then click on “Add” button to add IDOC.
/wp-content/uploads/2012/07/image037_119242.jpg
                                             2.1 Supported IDOC
Provide IDOC Type which is BASIC IDOC TYPE in SAP. (Ref: Screen Shot 5.3 Partner Profile: Outbound parameters, page no 13)
Service Name must be same as Real Time Service we have created & click on Apply button to get the IDoc Information registered.
List of Supported IDOC will be displayed as shown below
/wp-content/uploads/2012/07/image038_119243.jpg
                              2.2 Lists of Supported IDOC’s
Note: You may add more than one iDOC type per RFC Client
Once the RFC Client configured you can start RFC Client.
Make sure RFC Client is started  & status is “Waiting for Idoc” as shown below:
/wp-content/uploads/2012/07/image040_119244.jpg
                            Shot 2.3 RFC Client Interface Status

3.   Testing RFC Client from SAP

Use TCODE “/nsm59” to go to Configuration of RFC Connections
Open TCP/IP Connections & locate DI_RFC_DESTINATION
Double click & open DI_RFC_DESTINATION
Click on “Connection Test” button
/wp-content/uploads/2012/07/image041_119245.jpg
                    3.0 Testing RFC Client from SAP
If everything configured properly, you will see success message as shown below.
/wp-content/uploads/2012/07/image042_119246.jpg
                       3.1 Connection Test Success

Note: If Connection test failed, make sure that the RFC client on BODS side started properly with green icon.

Sending Material from SAP [/nbd10]

1.    Sending Material MATMAS from SAP

  Use TCODE “/nbd10” to “Send Material
/wp-content/uploads/2012/07/image043_119247.jpg
                                   1.0 Sending Material from SAP

  Click on the match code button
/wp-content/uploads/2012/07/image045_119248.jpg
                    1.1 Material Numbers / Material Description

Click on “Start Search “button   for finding the entries for material numbers.
/wp-content/uploads/2012/07/image047_119249.jpg
                   1.2 Selections of Material and Material Description
Select any Material number from the list displayed above and click on OK button.
Selected material number will appear in front of “Material” on Send Material screen.
Provide required fields as shown below & make sure the “Logical system” is BODS Logical System ID100CBODS
/wp-content/uploads/2012/07/image048_119250.jpg
                        1.3 Send Material

Click on Execute button. We will get couple of following messages.
/wp-content/uploads/2012/07/image050_119251.jpg
1.4 IDOC Information after material sent
Click on “OK”
/wp-content/uploads/2012/07/image051_119252.jpg

2. Check Received MATMAS IDOC in BODS Using BODS Web Admin

Go to BODS Web Admin, click on Real Time Services to check that one IDOC request received as shown below

/wp-content/uploads/2012/07/image052_119254.jpg
                    2.0 Received Requests in Web Administrator: Real Time Services
  
 

1. Checking the output data in XML File

Go to BODS Designer
Open the Real-Time Job Dataflow
Go to the target MATMAS01_OUT.xml & click on view data to confirm the data received
Generated output XML file data as follows
/wp-content/uploads/2012/07/image053_119256.jpg