Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

 
Hi ,

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

Enterprise Service Builder:


  • Click on Enterprise Services Builder.

  • 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.


        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.

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


Click the Arrow mark besides the Term RFC as follows.


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

  • The import process will start.

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


  • We can see the imported object here.

  • 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.

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

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


  • Provide the Row name and select type and occurrence.

   

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

  • After create the data type save and activate it.

     

  • 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.

  • 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.

     

  • Select your data type and click the Apply button.

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

 

  • 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.


  • 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.


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


  • 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.


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

  • 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.


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


  • 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.


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


  • The RFC will appear the target message part.


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


  • 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.


  • 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.


Operation mapping initial screen:


  • 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.


  • 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:

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.


  • v The configuration scenario initial screen display like below.


  • 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.


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


  • 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.


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

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


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


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

Application server name, login id, password and client number


  • 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.

  • 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.

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.


  • 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.


  • 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.


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


  • 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.


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

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


Test configuration:

  • Go to,  Tools -> Test configuration.

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


  • 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.


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


Create WDSL File:

  • Go to,  Tools -> Display WSDL.


Step 1:


Step 2:


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.


Step 3:


Step 4:


Step 5:

  • Save this WSDL File.

Important:

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


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


  • 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.


  • Upload the WSDL file.

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

SOAP TO RFC Output:


Important:

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

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

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

  • Here we can monitor our send and receive process.

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


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


Labels in this area