Skip to Content

 
Hi ,

Here i am trying to connect two systems through PI by using a process SOAP to RFC.

Enterprise Service Builder:

/wp-content/uploads/2013/04/1_205788.png

  • Click on Enterprise Services Builder.

/wp-content/uploads/2013/04/2_205793.png

  • Provide your user name and password for PI, the initial screen is display like below the screen.
  • You have already created a software component, expand the software component.

Create New Name Space:

  • Right click the software component, and click New.


Provide proper name to the name space, it must appear like Web URL name.

/wp-content/uploads/2013/04/4_205841.png


        After providing the Name space and software component version, clicks create.

  • The new name space should appear in the name space list. 


Save and activate it, now new name space should appear in the hierarchical list.

  • Now we can create our other objects using the name space.

Import the RFC:

Go to Imported object and right click, we can see import of SAP Object.

/wp-content/uploads/2013/04/7_205842.png

  • We must provide our Application Server Number, System Number, User Name and Password and click continue.

/wp-content/uploads/2013/04/8_205844.png

Click the Arrow mark besides the Term RFC as follows.

/wp-content/uploads/2013/04/9_205953.png

  • After showing the RFC list, we will chose our particular RFC and click continue.

/wp-content/uploads/2013/04/10_205954.png

  • The import process will start.
  • After completing the RFC import, it will display success message.

/wp-content/uploads/2013/04/12_205961.png

  • We can see the imported object here.
  • /wp-content/uploads/2013/04/13_205962.png
  • Once the RFC is imported we must create the data types, Message types for Outbound Interfaces which are going to map to the RFC which is going to be the Inbound Interface.

Data Type Creation:

  • Right click the Name space, and click New.

  • Go to the Interface objects and select the Data types.
  • When we select the new data type, Name space, software component and classification are automatically appear.

/wp-content/uploads/2013/04/16_205964.png

  • After providing the data type name, click create button.

       Create Row(s), via Right click -> Insert -> Insert Row.

/wp-content/uploads/2013/04/17_205965.png

  • Provide the Row name and select type and occurrence.

    /wp-content/uploads/2013/04/18_205966.png

  • Provide sub elements via Right click -> Insert -> Insert Sub element.

/wp-content/uploads/2013/04/19_205967.png

  • After create the data type save and activate it.

      /wp-content/uploads/2013/04/20_205968.png

  • After Creating the data type one message type should be created for the same.

Message Type creation:

  • Right click the Name space, and click New.

  • Go to the Interface objects and select the Message types.
  • When we select the new Message type, Name space and software component version are automatically appeared here.

/wp-content/uploads/2013/04/22_205969.png

  • After selecting the data type name, click create button, message type initial screen display like the below screen.
  • Select the data type using the input help.

      /wp-content/uploads/2013/04/23_205976.png

  • Select your data type and click the Apply button.

/wp-content/uploads/2013/04/24_205977.png

  • After selected the data type, it displayed the message type structure.

  /wp-content/uploads/2013/04/25_205978.png

  • As seen above the message type has consumed the data type selected. Also you can notice that the data type name (dt_sender_soap) has been replaced by (mt_sender_soap).
  • Save and activate the message type.
  • Now the RFC is imported which is already carrying the Inbound Message and we have also created the Outbound Message.
  • We have to create a Service Interface for both Outbound and Inbound Messages.
  • Since SAP RFC behaves as an Interface we have to create only the Service interface for the Outbound Message.

Service Interface:

  • Right click the Name space, and click New.

  • Go to the Interface objects and select the Service interface.
  • When we select the new Message type, Name space and software component version are automatically appeared here.

/wp-content/uploads/2013/04/39_206142.png

  • After provide SI name, clicks create.
  • After reach the initial screen go to definition tab and set attribute.

  • Select, Category is Outbound.
  • Select, Interface Pattern is Stateful.
  • Select, Mode is Synchronous.

/wp-content/uploads/2013/04/40_206143.png

  • Select, Request is message type.
  • Select, Response is RFC Response, and click Apply button.

/wp-content/uploads/2013/04/41_206252.png

  • The next step is to create a Message mapping between the outbound Message type (mt_sender_soap) and the RFC Request message.

Message Mapping Creation:

  • Right click the Name space, and click New.

  • Go to the Mapping objects and select the Message Mapping.
  • When we select the new Message type, Name space and software component version are automatically appeared here.

/wp-content/uploads/2013/04/43_206253.png

  • After provide the message mapping name, go and click create button, message mapping initial screen display like the below screen. 

/wp-content/uploads/2013/04/44_206254.png

  • Select sender message using search help and then select the RFC using search help for target message part
  • Go to search help -> Source message -> Find design object.

/wp-content/uploads/2013/04/45_206255.png

  • Select our message type, and click Apply button.
  • Our message type will display like below the screen.
  • Source message appeared here.

/wp-content/uploads/2013/04/47_206256.png

  • Now we have to select RFC (ZAN_RFC_SQR) for target message part.

Select RFC for Target message:

  • Go to target message -> search help -> Find Design Object.

/wp-content/uploads/2013/04/48_206270.png

  • Choose message window will display.
  • Go to your software component -> imported objects -> RFC Messages -> select your imported RFC and click Apply.

/wp-content/uploads/2013/04/49_206271.png

  • The RFC will appear the target message part.

/wp-content/uploads/2013/04/50_206273.png

  • Map the source and target message as per your concept.

/wp-content/uploads/2013/04/51_206274.png

  • After finishing your all mapping, save and activate it.
  • Now we can test our mapping, for check our mapping is correct.

Go to Test tab and give the value of your source and click the execute button.

/wp-content/uploads/2013/04/52_206275.png

  • If mapping and our object creation are correct it will show answer in the result part.
  • In the same, we have to create one operation mapping.

Operation Mapping:

  • Right click the Name space, and click New.
  • Go to the Mapping objects and select the Operation Mapping.
  • When we select the new Message type, Name space and software component version are automatically appeared here. 
  • After provide the operation mapping name, click create.

/wp-content/uploads/2013/04/54_206335.png

Operation mapping initial screen:

/wp-content/uploads/2013/04/55_206342.png

  • Select service interface to source operation and select RFC to target operation and click Read operation Button.

  • You can see the source message and Target message.

/wp-content/uploads/2013/04/56_206343.png

  • The select the message Mapping- mm_sender_soap (it will come automatically).
  • Then Save and Activate.
  • Here we can show our entire created object.
  • Now we have to go Integration Builder for create our SOAP to RFC process.

Integration Builder:

/wp-content/uploads/2013/04/58_206344.png

The Integration Directory initial screen display like below the screen

  • Now we have to create one configuration scenario for further process.

Create configuration scenario:

  • First we create one configuration scenario.
  • Go to object -> New – for create configuration scenario.

        Provide name to configuration scenario and click create.

/wp-content/uploads/2013/04/61_206348.png

  • v The configuration scenario initial screen display like below.

/wp-content/uploads/2013/04/62_206349.png

  • Save and activate it, now we have to create Business Component.

Create Business Component:

  • Go to Business Component -> Right click -> New.
  • Provide the communication component name and description, add to scenario will automatically fill, and then click create button.

/wp-content/uploads/2013/04/63_206350.png

  • We have to create two business components, one for sender and one for receiver, some time we can use same business component for both.

/wp-content/uploads/2013/04/64_206351.png

  • After create the business component save and activate it.
  • Now we have to create two communication channels for sender and receiver.

Create Communication Channel:

  • Go to Communication Channel -> Right click -> New.
  • Provide the communication component name and communication channel name, then click create button.
  • We have to create two communication channels, one for sender and one for receiver.

/wp-content/uploads/2013/04/65_206352.png

  • Create communication channel for Sender.
  • Using the search help go to choose adapter Type and select SOAP adapter and click apply.

/wp-content/uploads/2013/04/66_206353.png

/wp-content/uploads/2013/04/67_206354.png

  • Select processing parameters is Best Effort since the scenario is synchronous scenario.

/wp-content/uploads/2013/04/68_206355.png

The same way create one receiver communication channel, select RFC adapter.

/wp-content/uploads/2013/04/69_206356.png

  • After select the RFC adapter, provide the client parameter details
  • Ex:

Application server name, login id, password and client number

/wp-content/uploads/2013/04/70_206357.png

  • After provide all details, save and activate it.
  • Now we have to create Receiver determination.

Receiver determination creation:

  • Go to Receiver determination -> Right click -> New.
  • Provide the communication component name and interface name, and name space then click create button.

/wp-content/uploads/2013/04/71_206358.png

  • After entering the Receiver determination screen, go and select the software component version, and select receiver business component using search help.
  • Then save and activate. Now we have to create Receiver determination.

/wp-content/uploads/2013/04/72_206359.png

Interface determination creation:

  • Go to Interface determination -> Right click -> New.
  • Provide the sender and receiver communication components name and interface name, and name space then click create button.

/wp-content/uploads/2013/04/73_206363.png

  • Here we can select receiver interface, our receiver interface is RFC so we can select the RFC and RFC’s namespace, then save and activate.

/wp-content/uploads/2013/04/74_206364.png

  • Now we have to create one Sender Agreement for SOAP.

Sender Agreement Creation:

  • Go to Sender Agreement -> Right click -> New.
  • Provide the sender communication component name and interface name, and name space then click create button.

/wp-content/uploads/2013/04/75_206365.png

  • Select the sender communication channel and select the software component version, then save and activate it.

/wp-content/uploads/2013/04/76_206366.png

  • Now we have to create one Receiver Agreement for RFC.

Receiver Agreement Creation:

  • Go to Receiver Agreement -> Right click -> New.
  • Provide the sender communication component name, receiver communication component name and interface name, and name space then click create button.

/wp-content/uploads/2013/04/77_206367.png

  • Here we must give receiver communication channel, and software component, then save and activate it.

/wp-content/uploads/2013/04/78_206368.png

  • After create all objects go to the configuration scenario, here we can see our all created objects.

/wp-content/uploads/2013/04/79_206369.png

Test configuration:

  • Go to,  Tools -> Test configuration.

/wp-content/uploads/2013/04/84_206370.png

  • Go to, Enterprise service builder -> Message mapping -> Test tab -> SRC Icon -> Copy the source XML payload.

/wp-content/uploads/2013/04/81_206371.png

  • Paste the XML code in the payload box.


  • Provide the sender communication component name, interface, name space and sender communication component name.
  • Click Run or F5.

/wp-content/uploads/2013/04/82_206372.png

  • If our process is correct, it does not trigger any error, and show the correct flow with green right mark.

/wp-content/uploads/2013/04/83_206373.png

Create WDSL File:

  • Go to,  Tools -> Display WSDL.

/wp-content/uploads/2013/04/84_206370.png

Step 1:

/wp-content/uploads/2013/04/85_206375.png

Step 2:

/wp-content/uploads/2013/04/86_206378.png

Ex URL:

http://<host name>:<port name>/XISOAPAdapter/MessageServlet?channel=<party name>:<service name>:<channel name>.

  • Because there is no party name so we can neglect it.

/wp-content/uploads/2013/04/88_206380.png

Step 3:

/wp-content/uploads/2013/04/89_206381.png

Step 4:

/wp-content/uploads/2013/04/90_206382.png

Step 5:

/wp-content/uploads/2013/04/92_206384.png

  • Save this WSDL File.

Important:

  • Login to ABAP Stack of the SAP PI using your PI username and password.
  • Type T code “sxi_cache”.

/wp-content/uploads/2013/04/93_206385.png

  • Go to Runtime Cache -> Start Complete cache Refresh or Shitf+F6.

/wp-content/uploads/2013/04/94_206405.png

  • Go and click this arrow, here we can see our Name space and interface name.
  • Testing the web service, using a third party tool like SOAP UI or Altova XML.
  • Here we are using SOAP UI.

SOAP UI:

  • Go to SOAP UI and create new project and upload the WSDL file.

/wp-content/uploads/2013/04/96_206406.png

  • Upload the WSDL file.

/wp-content/uploads/2013/04/97_206407.png

  • Click Aut button, give the Authentication (PI User Name and Password), and click Run.

/wp-content/uploads/2013/04/98_206408.png

/wp-content/uploads/2013/04/99_206409.png

SOAP TO RFC Output:

/wp-content/uploads/2013/04/100_206410.png

Important:

  • Login to ABAP Stack of the SAP PI ( using your PI username and password)

Type T code “Sxi_monitor” (XI: Message Monitoring).

/wp-content/uploads/2013/04/101_206411.png

  • After reach the “Sxi_monitor” screen, click execute button.

/wp-content/uploads/2013/04/102_206412.png

  • Here we can monitor our send and receive process.

/wp-content/uploads/2013/04/103_206413.png

  • Click the sender name space, it will show our sent value here. (SOAP)

/wp-content/uploads/2013/04/104_206414.png

  • Click the receiver name space, it will show our receiver value here. (RFC)

/wp-content/uploads/2013/04/105_206415.png

To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply