SAP PI/PO Adapter

  1. Home
  2. SAP PI/PO Adapter
  3. 27. How to create inbound synchronous query interface in SAP PI/PO using SKYVVA V3 connector module??

27. How to create inbound synchronous query interface in SAP PI/PO using SKYVVA V3 connector module??

This document describes how to create an inbound query interface in SAP PI/PO with new SKYVVA  V3 connector module.

What is Query?

If want to search the data/records present in your Salesforce then this module will help you. It will help you to create a dynamic nature of search. You can configure the search feature and use it as per your needs. Skyvva app will help you to configure your search. You need to follow the below steps to configure your search:

  1. Create an integration or use an existing integration.
  2. Create an interface using the above integration.
  3. The interface should have operationType as “query“ or “queryAll“. The SOQL query to select sObject data needs to be set with required SOQL query.

To fetch small size data we use query and for Big size data we are going to use Bulk query.

What is Query All?

Executes the specified SOQL query. Unlike the Query resource, Query All will return records that have been deleted. Query All will also return information about archived Task and Event records.

SKYVVA interface creation

Create an inbound interface, for example, “searchService_IN“ as shown below.

Select the Operation type as query“ or “query All“






Similarly, create the Outbound scenario for Query response as “searchService_Out” as shown below






Now save the interfaces and download the WSDL. This is needed to do mapping in SAP PO.

Step 3 – Import WSDL into ESR

First, we have to create a namespace in ESR like “urn:skyvva: Querysalesforce“.

Now create an external definition for Query Account request under the namespace like below. Here the WSDL is for Account. So, we can give the name as ED_SF_SearchQuery_Request.





















Now import the WSDL and Save and activate it.

Now create an external definition for Query Account response under the namespace like below. Here the WSDL is for Account. So, we can give the name as ED_SF_SearchQuery_Response.





















Since in this example, we are sending data from SOAPUI to Salesforce. So, we need to create data types for request and response as shown below.

DataType for Request – 














Save and activate the request data type.

DataType for Response


















Save and activate the response data type.

Now create Message type for both Request and Response as shown below.

Request Message type –















Save and activate the request message type.

Response Message type – 




















Now Save and activate the response message type.

Create Outbound and inbound service interfaces as shown below.








































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.


















Response Mapping – 





















Now save and activate both the mappings

  • Operation Mapping 

Create Operation mapping as shown below.

This is for request mapping




















In Response-Mapping, a java mapping is needed to convert the Skyvva message format into a business structure. The java mapping will be provided from Skyvva and you just have to use it.



















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

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 SOAP communication channel

Create sender communication channel as shown below.

Since we are using SOAPUI as a source. So, here we are using SOAP adapter in the sender channel.





















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

  • Configuring the SOAP receiver channel

Configuration for Tab “General”



















Specify the parameters as shown in the above screenshot.

Below is the configuration for the “Advanced” Tab.













The value “TserverLocation” has to be entered for the parameter Variable Header (XHeaderName1).

Below are the settings for Tab “Module”. Here, the SKYVVA module containing the logic for session handling and transformation logic must be specified. 

For V3 Skyvva module:

We need 3 modules in the soap receiver channel

1. Skyvva/V3/QueryBuilder -> prepare the execution of the REST and BULK query and pass the message payload to the 3. module
2. XISOAPAdapterBean -> calling our new soap API ‘RouteRequest‘ to just pass back the request from the 1. module
3. Skyvva/V3/ExecuteQuery -> here we only fetching the result which has been executed








For the new Module we no need to use the Java mapping in response mapping to convert the JSON response into XML.

We can directly include the parameter in the module to convert the JSON Response. Here are the channel configurations for new module.

Configuration of module parameters are described in detail below

  • Skyvva V3 Module Parameters

 Module parameters are outlined below







The different way to put the SELECT statement

Here we are able to build the select statement dynamically by the pi mapping. Thus we need a field in the request payload which for example is called ‘SKYVVA__SOQL_SELECT’ and where we can build the SELECT-statement by using concat formula in the mapping. In this case, you are taking the value from this field and it will dominate the SELECT-statement on the module parameter.
In the request WSDL we need to add SKYVVA system field e.g. ‘SKYVVA__SOQL_SELECT’ and build dynamically the SELECT in the mapping.
We have at 3 different places to put the SELECT statement e.g.:

  1. In the interface
  2. In the module parameter
  3. In the PO request mapping in the field ‘SKYVVA__SOQL_SELECT’ .

Here is the SQL Statement used in Module Parameters.

SELECT BillingCity,BillingCountry,BillingPostalCode,BillingState,BillingStreet,Description,Fax,Id,Name,Phone,skyvvasolutions__SAP_Distribution_Channel__c,skyvvasolutions__SAP_Division__c,skyvvasolutions__SAP_Sales_Org__c FROM Account where skyvvasolutions__SAP_Distribution_Channel__c = ‘{!skyvvasolutions__SAP_Distribution_Channel__c}’ and skyvvasolutions__SAP_Sales_Org__c = ‘{!skyvvasolutions__SAP_Sales_Org__c}’ and skyvvasolutions__SAP_Division__c = ‘{!skyvvasolutions__SAP_Division__c}’


  • 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 inbound synchronous Interface.

I am sending the data from SOAPUI. We are getting the JSON Response from Salesforce  but with the ResponseFormat parameter we are converting it to xml





Here we can test the interface directly using the SKYVVA SOAP API. The result will be in JSON format.











Fandest du diesen Artikel hilfreich? Ja Nein

Wie können wir helfen?