XI - IDoc to IDoc ScenarioBy Raghava Vakada, Mouri Tech SolutionsDescription: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: DesignComponent Name:SAPNW of sapnwNamespace:urn: idoc2idocIntegration Builder:ConfigurationScenario Name:IDoc2IDocBusiness 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 DestinationsWE21- To Create IDoc PortsSALE- To Create Logical SystemWE20- To Create Partner ProfilesBD64- Display Distribution ModelWE19- To Trigger an IDocIDX1- Port Maintenance in IDoc AdapterIDX2- Metadata Overview for IDoc AdapterProcessing Steps: Source Side Configuration: CGNSAP13 (SAP R/3)IDOC used: MATMAS.MATMAS05Using Transaction CodeWE19we can see the structure of IDOC (MATMAS05), which we are usingGo 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 enteredCreation of RFC Destination:1.Create RFC Destination:To create a RFC destination use transactionSM59.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 DestinationXI_IDOC2IDOCwith 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.
Go to Logon/Security tab and fill the details for the Cgnsap32 system as shown belowCreation of IDOC PORT:3.Create Port:To create a port uses the transactionWE21. 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.
Creation of Logical System:4.Now Go to Transaction CodeSALEand create Logical System.Sending and Receiving Systems->Logical Systems->Define Logical System.
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.Creation of Partner Profile:Partner Profiles:Now we will create Partner Profiles by using transactionWE20.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.Creation of Distribution Model:6. Go to Transaction Code BD64 and create Distribution Model.Click on create model view, window will popup as shown below.Enter the short text and the technical name as required. 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)Creation of RFC Destination:1. Go to Transaction Code SM59 and select R/3 Connections and click on CREATE.2. Create a RFC DestinationRFC_IODCTOIODCwith Target Host: Cgnsap 01(R/3 System) and select the connection type as 3(Connection to R/3 System).
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.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.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. Now add Inbound parameters.In this screen, enter the Message type and the Process Code for MATMAS and save it.Now go toXI (http://cgnsap32:50000/rep), click on Integration Repository for Design.Go to SLD by clicking on the System Landscape Directory in the above screen.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.Enter the name of the Business System and click next.Select the type of the business system in this case its Web AS ABAP.Select the Technical System for the Business System.Select the required client.Select the Business system role and related integration server and click Finish to complete the creation of the business system.Design: Integration Repository1.Create a Namespace under component SATYAM_SAPXI_IDOC.2.Import the IDOC by using Import Wizard in the Imported Object in the Design time.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.4.Create an Interface Mapping for the IDoc.
CONFIGURATION TIME:SCENARIO:Create a scenario in which all the objects will be created.Scenario Name:SAP_XI_IDOCTOIDOCBusiness System Name:SAP01 (for cgnsap01), SSI (for cgnsap13)As we are going to send IDOC from the system sono Sender Channelis required.SENDER AGREEMENT:No Sender Agreement is required.Communication Channel:Select IDOC Adapter and provide the details as shown below.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.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).
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.
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.