Wednesday 22 March 2017

End to End Idoc to File Scenario (Dual stack)

         Idoc to File Scenario (Dual stack(7.11))


Maintain R/3 Sender System (For posting IDoc to PI – Outbound IDoc):
ü  Step 1:  Identify Message type and Basic Type to be used for posting the Idoc. This scenario is for understanding all step required to implement IDoc to FILE scenario. For simplicity we will use Message Type MATMAS and Basic Type MATMAS05 (for IDoc).
ü  Step 2: Logon to Sender R3 System

ü  Step 3: Create RFC Destination to Receiver XI System.
·         Open Transaction SM59.
·         Click on Create Button and  Give RFC Destination Name(E66TOP50) and Connection type select 3
·         Click on Save.
·         The following screen will appear

Log on and security:

·         Click on Save.
·         Now the RFC Destination is ready for testing.
·          Click on Test Connection Button and Remote Logon Button. Both must be successful.

ü  Step 4: Create Communication PORT for IDoc Processing.
·         Open Transaction WE21.
·         Select the Transactional RFC from Ports (left tree panel) .
·         Click on Create Button.
·          The following screen will appear.

·         Give the description of the port and select the RFC destination (in this example PORT_DUAL which we have created in step3). Now click on save.
ü  Step 5: Create Logical System (LS) for IDoc Receiver System
·         Open Transaction BD54.
·         Click on New Entries Button.
·         Give data for your Logical System and Name (IDoc2FILE in this example)

·         Now click on save. Here one window may appear (if so) just click on continue. Now the Logical System (LS) is ready.
ü  Step 6: Create Partner Profile with Outbound Parameter(s)
·         Open Transaction WE20.
·         Select Partner Type LS from Partner (left tree panel).
·         Click on Create Button.
·         Give Logical System Name which we have just created in step 5 as Partner No. (In this example IDoc2FILE), Partner Type should be LS (Just Check), Agent (some valid data) Language (EN). Now click on Save.

·         Now we have to give some Outbound Parameter, so click on Add to create outbound parameter, the following screen will appear.

Maintain XI System for Integration (Receive IDoc - Transform - Send File)
ü  Step 1: Maintain SLD (System Landscape Directory) One Business system as 3rd party with corresponding Technical System, Product, Software components for Receiver System needs to be created.
ü  Step 2: Maintain IR (Integration Repository)
·         Import S/W Component and IDoc structure.
·         Open Integration Repository.
·         Import you software components information which has been created in SLD to IR.
         

·         Now select Import of RFC and IDoc interfaces from Sap System permitted. Provide other relevant info like Sender System ID, Client and Message Server (usually the Sender System Host) click on Save.

·         Create Data type for receiver (DT_Idoc2File) as shown below.

·         Create Message type for corresponding data type

·         Create Inbound Service interface with the following message type.


·         Create Message Mapping(Transformation between Sender and Receiver) as given below:

• Select IDoc (MATMAS05) as source message type and MT_Idoc2FILE as Target Message type and do mappings as follows and save:
·         Create Operational mapping as below.

·         Now GOTO change list and activate it.
ü  Step 3: Maintain ID (Integration Directory)
·         Open Integration Directory and create Configuration scenario

·         Create Business component by adding Inbound service interface and Idoc which we have imported from ECC system.



·         Create receiver file channel under receiver tab.






·         Now create Receiver Determination as shown below:
   

·         Now create Interface Determination as shown below:

·         Create receiver Agreement.


·         All the objects created should be activated without any error.
ü  Step 3: Some Other Configuration in XI System
·         Create RFC Destination (SM59) to Sender System (R/3). This can also be used for acknowledgement. This is similar Step as mentioned in Step 3 (Create RFC Destination to Receiver XI System). We have to specify this RFC Destination while maintaining the Metadata Information of the Sender System in XI using transaction IDX1.


·         Create PORT using transaction (IDX1) to get the Metadata of the IDoc from the Sender System (The Port Name = The Port Name in the source IDoc header – normally in format SAP. eg. SAPXID in our example [though this is Optional]. This is Similar to transaction WE21. This should be in sync with data maintained in R/3 else the IDoc is will not transmitted to the recipient system successfully.

·         To maintain the IDoc Metadata we need to use transaction (IDX2). This is only for XI System as XI needs to construct Idoc-XML from the Idoc.

üIDoc Posting and Testing the Scenario:
·         Log in to sender system, go to transaction WE19 (test tool to generate IDoc), generate IDoc of the required message type.

·         Click on standard Outbound processing and click on ok it will process the idoc.

·         Execute Transaction WE05; enter correct date/time frame and logical message type. Hopefully the Idoc Status should be 3 (successful), if not check the status code and correct the error and reprocess the message.
·         Open Log in to Xi system and execute transaction SXMB_MONI and check for the XML messages. Use your source and destination system to filter messages; it should have flag as in picture below.

After click on execute It will open the XML messages which have been processed as shown below.

·         Open Winscp and GOTO exact path which have been configured in File receiver channel (/usr/sap/storage/Output). We will find the xml file with MATMAS data.


                    

               SOAP to SOAP Scenario( Dual Stack(7.11)

ESR Connectivity:
Step1:
Create Namespace for Soap to Soap scenario as shown below

Step2:
Under that namespace create External definition by importing the wsdl file.

Step3:
Create Service interface one for outbound and another for inbound.

Outbound:




Inbound:










Integration Builder Configuration:
Step4:
Create two Business components one for sender interface and another for receiver interface as shown below.
Sender Business component:
Receiver Business component:



Step5:
Create communication channels one for sender and another for receiver under sender and receiver  bussiness components respectively as shown below.
Sender Communication channel:











Receiver Communication channel:








Step6:
Create Sender Agreement by adding the sender details as below.
Step7:
Create Receiver Agreement by adding communication component for sender , receiver and communication channel .

Step8:
Now, Create Interface determination by adding sender communication component and conditions for receiver interface.
Step9:
Create Receiver Determination by adding communication component for receiver as shown below.
Save and active all the objects which we have created above.
Step10:
Now, Create WSDL file for testing the soap scenario in SOAP UI.
Process of creating wsdl file:
1.       Go to Tools and click on Display WSDL















2.       It will open wizard click on continue.
3.       Now, Specify URL of Web Server as shown below.

4.       Specify the name, namespace and Software components and click on continue.

5.       Now, Specify the sender details and again click on continue.
6.       Finally, after clicking on continue it is asking for overview just verify the details and click on finish.
7.       After click on finish it will generate WSDL file save the file.









Testing in SOAP UI:
ü  Open SOAP UI and click on new project browse the wsdl file as shown below.
      
ü  Provide credentials for the service and provide inputs then click on execute it will show the response.