Download docx - Idoc to Idoc

Transcript
Page 1: Idoc to Idoc

XI - IDoc to IDoc ScenarioBy Raghava Vakada, Mouri Tech Solutions

Description: 

In this scenario we are sending an IDOC from an R/3 system to the IDOC in other R/3 system through XI. 

XI Details:

Integration Builder: Design 

Component Name  : SAPNW of sapnw

Namespace             : urn: idoc2idoc

Integration Builder:   Configuration  

Scenario Name     :   IDoc2IDoc

Business System   : SAP01  (Cgnsap 01 System)  

                                   SSI (Cgnsap 13 System)

Communication Channels:

1) No Sender Channel is required as we are using IDOC.

2) CC_OUT_IDOC_MATMAS05 [Send the data from Xi to CGNSAP01]. 

Transaction Codes Used: 

SM59- To Create RFC Destinations

WE21- To Create IDoc Ports

SALE- To Create Logical System

WE20- To Create Partner Profiles

BD64- Display Distribution Model

WE19- To Trigger an IDoc 

IDX1- Port Maintenance in IDoc Adapter

IDX2- Metadata Overview for IDoc Adapter 

Processing Steps:  

Page 2: Idoc to Idoc

Source Side Configuration: CGNSAP13 (SAP R/3) 

IDOC used: MATMAS.MATMAS05 

Using Transaction Code WE19 we can see the structure of IDOC (MATMAS05), which we are using 

Go to Transaction Code WE19 and enter the name of IDOC in Basic Type and execute

Click on the Segment data and then a screen will come in which the data of IDOC is

entered    

Creation of RFC Destination:  

Page 3: Idoc to Idoc

1. Create RFC Destination: To create a RFC destination use transaction SM59.

The RFC destination is created to provide IDOC a route from SAP system to XI server. Thus once the IDOC is initiated will reach to this destination for further transformations.

 

2. Create a RFC Destination XI_IDOC2IDOC with Target Host: Cgnsap 32(XI System) and select the connection type as 3(Connection to R/3 System). 

a.  The following screen will come once you will click on Create for new RFC destination.b. Give a name to your RFC destination.c. The Target Host field will be your XI server like cgnsap32.d. All the other fields are dependent on the target host.e. Save this and your RFC will be created.

Page 4: Idoc to Idoc

Go to Logon/Security tab and fill the details for the Cgnsap32 system as shown below 

Page 5: Idoc to Idoc

 

Creation of IDOC PORT:  

3. Create Port: To create a port uses the transaction WE21. We need a port to send the IDOC to the intended RFC destination. 

1. Create a new Transactional RFC.2. Give the port name.3. Select the RFC destination for this port.4. Save the data.

Page 6: Idoc to Idoc

Creation of Logical System:  

4.       Now Go to Transaction Code SALE and create Logical System.

 Sending and Receiving Systems->Logical Systems->Define Logical System. 

Page 7: Idoc to Idoc

Click on New Entries and fill the relevant details as show below:

 b) As we will save it a new window will pop up, in this click on Create and then it will ask you to create a New Request. Just give description of the request and save it, else everything is self-generated.

 

c) Hence the Logical System is created.

Create another RFC Destination with Target host as cgnsap13. Also create a port and logical system as above using the RFC Destination. This is used as a sender to trigger the IDOC from cgnsap13. 

Page 8: Idoc to Idoc

Creation of Partner Profile:  

Partner Profiles: Now we will create Partner Profiles by using transaction WE20.  These partner profiles are created to identify our logical system uniquely, as we know that there can be n number of logical system in a Business System. 

 

1. In the Partner No field enter the name of the logical system created.2. Enter the Partner Type as LS (logical system).3. The type and Lang field will be same.4.  In the Agent field select the business system from which you are sending the IDOC.5. In the Message Type Field include the IDOC.6. Save all the data.

Page 9: Idoc to Idoc

 

Creation of Distribution Model:  

6. Go to Transaction Code BD64 and create Distribution Model.

Page 10: Idoc to Idoc

 

Click on create model view, window will popup as shown below.

Enter the short text and the technical name as required.  

 

Page 11: Idoc to Idoc

 

Once the model view is created, click on Add message type. A window pops up as shown below. Enter the details of the model view, sender logical system name (for cgnsap13 in this case) and the receiver logical system name. (Logical system created in cgnsap13 for sending to XI server) 

XI SIDE CONFIGURATION: CGNSAP32 (XI SYSTEM) 

Page 12: Idoc to Idoc

Creation of RFC Destination:  

1. Go to Transaction Code SM59 and select R/3 Connections and click on CREATE. 

 

2. Create a RFC Destination RFC_IODCTOIODC with Target Host: Cgnsap 01(R/3 System) and select the connection type as 3(Connection to R/3 System). 

Page 13: Idoc to Idoc

Creation of IDOC PORT:  

3. Go to Transaction Code IDX1 and create an IDoc Port PORT_01 (Transactional RFC) and map it with the RFC destination (RFC_IDOCTOIDOC). 

 

4. Go to Transaction Code IDX2, Click on Create and enter the details of IDoc Type and Source Port. 

 

Target Side Configuration: CGNSAP01 (SAP R/3) 

Creation of Logical System:  

4.       Now Go to Transaction Code SALE and create Logical System.

 Sending and Receiving Systems->Logical Systems->Define Logical System. 

Page 14: Idoc to Idoc

 

Click on New Entries and fill the relevant details as show below:

 

b) As we will save it a new window will pop up, in this click on Create and then it will ask you to create a New Request. Just give description of the request and save it , else everything is self generated. 

Page 15: Idoc to Idoc

 

c) Hence the Logical System is created. 

Creation of Partner Profile:  

Partner Profiles: Now we will create Partner Profiles by using transaction WE20.  These partner profiles are created to identify our logical system uniquely, as we know that there can be n number of logical system in a Business System. 

 

1. In the Partner No field enter the name of the logical system created.

Page 16: Idoc to Idoc

2. Enter the Partner Type as LS (logical system).3. The type and Lang field will be same.4. Now add Inbound parameters.

 

In this screen, enter the Message type and the Process Code for ‘MATMAS’ and save it.

Now go to   XI (http://cgnsap32:50000/rep), click on Integration Repository for Design. 

Page 17: Idoc to Idoc

 

Go to SLD by clicking on the ‘System Landscape Directory’ in the above screen. 

Page 18: Idoc to Idoc

 

Click on Business Landscape and check for the Business Systems, which have the required Technical systems (cgnsap01, cgnsap13 in this case) and the required clients (800 of cgnsap01 and 800 of cgnsap13). 

We create a business system if the required business systems do not exist.

Creation of Business System: 

Click on New Business System and the following screen will appear.

Page 19: Idoc to Idoc

 

Enter the name of the Business System and click next. 

 

Select the type of the business system in this case its Web AS ABAP. 

Page 20: Idoc to Idoc

 

Select the Technical System for the Business System.

 

Select the required client. 

Page 21: Idoc to Idoc

 

Select the Business system role and related integration server and click Finish to complete the creation of the business system. 

Design: Integration Repository 

1. Create a Namespace under component SATYAM_SAPXI_IDOC. 

 

2. Import the IDOC by using Import Wizard in the Imported Object in the Design time. 

Page 22: Idoc to Idoc

 

3.  Create a Message Mapping and drag IDOC Structure into Source Message and Target Message panes. Map the mandatory fields of the input and output IDoc structure. Save and activate the message mapping.   

Page 23: Idoc to Idoc

 

4.  Create an Interface Mapping for the IDoc. 

Page 24: Idoc to Idoc

CONFIGURATION TIME: 

SCENARIO: Create a scenario in which all the objects will be created. 

Scenario Name: SAP_XI_IDOCTOIDOC 

Business System Name: SAP01 (for cgnsap01), SSI (for cgnsap13) 

Page 25: Idoc to Idoc

 

As we are going to send IDOC from the system so no Sender Channel is required. 

SENDER AGREEMENT: No Sender Agreement is required.

Communication Channel:    

Select IDOC Adapter and provide the details as shown below. 

Page 26: Idoc to Idoc

 

Page 27: Idoc to Idoc

RECEIVER DETERMINATION: In receiver determination, we have to specify the Service and Receiver details.  

 

INTERFACE DETERMINATION:  Specify the service, interface and Inbound and outbound interfaces. 

Page 28: Idoc to Idoc

 

RECEIVER AGREEMENT: 

Provide the sender service, receiver service and Receiver Communication Channel here. 

In the Header Mapping, select the Sender Service as the receiving R/3 Business system

       (SAP 01 in this case). 

Page 29: Idoc to Idoc

Testing :

To test all the configuration of IDOC which you have done follow this test procedure: 

a. Use transaction we19 for IDOC Processing.b. Give your IDOC and execute it.

Page 30: Idoc to Idoc

Fill all the entries in the field. 

 

c)       Then enter values in IDOC and save it.

d)       Check the values in the XI System using SXMB_MONI Transaction Code. 

Page 31: Idoc to Idoc