SAP PI/PO Adapter

  1. Home
  2. SAP PI/PO Adapter
  3. 42. How to create an outbound synchronous interface in SAP PI/PO using SKYVVA SAP PI/PO adapter using REST Protocol with URL Path parameter?

42. How to create an outbound synchronous interface in SAP PI/PO using SKYVVA SAP PI/PO adapter using REST Protocol with URL Path parameter?

This document describes how to create an outbound Synchronous interface in SAP PO using SKYVVA SAP PI/PO Adapter using REST Protocol to pass the URL Path Parameter

For REST V3 we have to create the message type in skyvva as explained below.

REST V3 message type template:

We use a standard message type template for REST Adapter

“REST Service”: {
“Request”: {
“URL”: {
“Header”: {
“Body”: {
“Quote_Header_Request”: {
“skyvvasolutions__SAP_Requested_Delivery_Date__c”: “”,
“skyvvasolutions__SAP_Sales_Org__c”: “”,
“skyvvasolutions__SAP_Distribution_Channel__c”: “”,
“skyvvasolutions__SAP_Division__c”: “”,
“skyvvasolutions__SAP_Group__c”: “”,
“Id”: “”,
“Name”: “”,
“OpportunityId”: “”,
“skyvvasolutions__SAP_Offer_Valid_To__c”: “”,
“skyvvasolutions__SAP_Offer_valid_from__c”: “”,
“QuoteLineItem”: {
“LineNumber”: “”,
“Quantity”: “”,
“skyvvasolutions__SAP_Material_Number__c”: “”,
“skyvvasolutions__SAP_Customer_Number__c”: “”
“Quote”: {
“Name”: “”,
“Id”: “”,
“OpportunityId”: “”,
“skyvvasolutions__SAP_Quote_ID__c”: “”,
“Status”: “”,
“QuoteNumber”: “”,
“QuoteLineItem”: {
“Quantity”: “”,
“QuoteId”: “”,
“skyvvasolutions__SAP_Material_Number__c”: “”,
“skyvvasolutions__SAP_Quote_Line_ID__c”: “”,
“OpportunityLineItemId”: “”

Initially we have to create Metadata Provider.




Now create Istructure repository



Now create Message type for hierarchical request and response



Now we have to use the message type in both request and response interface and also the child request and response interfaces

Creation of Outbound SAP PI/PO Adapter with REST Protocol:

To pass URL Path parameter:

Provide the details as shown below

To create SAP PI/PO Adapter we have to go to Integration details tab and then select “SAP Control board” as shown


Select Adapter tab and then click on new to create Adapter



Save the adapter and use this in the skyvva outbound request interface.


In this example, I have created the interface under “SAP PI/PO Integration App V1″


  • Create Outbound parent request interface




If we use the message type defined in skyvva then we have to do mapping in skyvva as shown.



Now save the mapping and the outbound parent interface.

  • Create Outbound child request interface



Add this child interface as i chained interface in the parent interface related tab


Save the outbound child interface.

  • Create an inbound parent response interface




Do the mapping for inbound parent response interface



In the related tab add the foreign key fields as shown below



Save the mapping and the inbound response interface.

  • Create an inbound child response interface





Save the interface and add this child interface as ichained interface in the parent response interface related tab

Add the foreign key field to link to the parent quote interface as shown below


Download the inbound and outbound parent interface WSDL’s and upload it into SAP PO for mapping.


In this example we are going to use datatype for Skyvva Request and Response interface

Request Skyvva Datatype:


Response Skyvva Datatype:


Request Skyvva Messagetype:


Response Skyvva Messagetype:

It’s a Salesforce to SAP outbound interface sending quote information to SAP. SAP side we are using RFC. So no need to create data type, message type and service interface for the target side.

Create Outbound Service interface:


Provide the necessary details as shown and then save and activate it.

  • Message mapping

Create request and response message mapping as shown below.

Request Mapping – 

Select the Source structure and target structure and complete the mapping.

For query parameters create function to read the data from the dynamic attributes of the message

public String getASMA(String attribute, String namespace, Container container) throws StreamTransformationException{
Map map = container.getTransformationParameters();
DynamicConfiguration conf = (DynamicConfiguration)map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create( namespace, attribute);
String value = conf.get(key);
return value;

Use UDF in mapping

Where ‘attribute’ field in UDF (constant ‘id’ in this example) = Name of Dynamic attribute in communication channel (see further down for details on setting this up)

And ‘namespace’ field in UDF is set to:

Response Mapping – 


Now save and activate both the mappings

  • Operation Mapping 

Create Operation mapping as shown below.

Now select the inbound and outbound service interfaces and the respective request and response mappings.

This is for request mapping





Response Mapping



Then save and activate the operation mapping.

  • Creation of Integrated Configuration Objects

After creating the objects in ESR. We have to configure these objects in the integration directory.

First, we have to create Configuration Scenario.

An Integration scenario has the following objects.

  • Business System for Sender and Receiver
  • Sender and Receiver Communication channel
  • Integrated Configuration



These are the objects we should create. We have to define our business system e.g. for the SAP-Backend. For Salesforce you can use our proposal “Salesforce” as the business system. We have to import these business systems from SLD.

  • Configuring the Sender REST communication channel

Create sender communication channel as shown below.

We are using REST adapter in the sender channel

Configuration for Tab “General”

Tab Channel Selection:

Tab REST Resources:

Tab REST Operation:


Provide the necessary details. After that save and activate the channel.

  • Configuring the RFC receiver channel


  • Integrated Configuration

Create integrated configuration objects as shown below.

Enter the required data e.g. the Communication Component, Interface and Namespace and then click on create button to create an ICO.

Now go through the tabs from left to right to configure the relevant objects. In this first tab “Inbound Processing” here we have to specify the sender communication channel.



Here in the “Receiver” tab, we have to specify the receiver business system.



In Receiver interfaces tab specify the operation mapping.



In the “outbound processing” tab, we have to specify the receiver channel.




  • Testing the Outbound synchronous Interface.


Callout from skyvva from developer console using the below apex code

skyvvasolutions.CallOutControl c=new skyvvasolutions.CallOutControl();





String[] ids=new String[]{‘0Q03N000000HZYbSAO’};

skyvvasolutions.Iservices.invokeCalloutV3(‘SOAPV3′,’REST_Quote_Out’,ids,’SYNC’, c);


We can see the message status in the message monitor



Quote Id is updated in salesforce





Fandest du diesen Artikel hilfreich? Ja Nein

Wie können wir helfen?