SAP PI/PO Adapter

  1. Home
  2. Dokumente
  3. SAP PI/PO Adapter
  4. 29. How to create an interface using SKYVVA REST Query using SAP PI/PO with SKYVVA V3 Connector module?

29. How to create an interface using SKYVVA REST Query using SAP PI/PO with SKYVVA V3 Connector module?

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

What is REST Query?

REST query -This is the new type we support and we can handle bigger sizes as the searchService. This is possible because Salesforce held the cursor and can return the result page by page. In our module, we can collect the result set and combine it to a new message.

What is REST Query All?

REST Query All – It will retrieve all archived and deleted records along with the existing records.

The SKYVVA search will internally work on your query and will provide the complete result from your query.

You can configure in your Interface with operationType as “REST Query“ or “REST Query All“ to use REST Query feature.  Then you need to configure your SOQL in the SKYVVA interface. Base on your configuration in Interface SkYVVA connector will automatically detects the operation type and work accordingly with the same search operation.

 

The following figure shows how the new V3 REST Query works with new V3 module

 

 

 

 

 

2. SKYVVA interface creation

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

Select the Operation type as REST Query” or “REST Query All”

 

 

 

 

 

In this example we are going to put the SQL statement in the Skyvva Interface.

Now save the interface and download the WSDL  from Lightening mode. For New V3 we are going to use the new way WSDL only.

Follow the below steps to download the WSDL from Lightening.

 

 

 

Provide the necessary details as highlighted in color and then export the file

 

 

Click on view to download the WSDL file

Step 3 – Import WSDL into ESR

First, we have to create a namespace in ESR like “http://SAP_to_SF_RESTQueryTest“.

Now create an external definition under the namespace like below.Here the WSDL is for RESTQueryTest. So, we can give the name as ED_RESTQuery_Req

 

 

 

Here instead of WSDL from salesforce we can also use our own message type in this example like below.

 

 

Here we are going to use only one interface for both Request and Response.

Import the WSDL and save and activate the external definition.

  • Sender request data type

Create sender request data type as shown below

 

 

 

Sender response datatype –

 

 

 

after creating the source data type click on save and activate.

  • Source request message type

Create the request message type as shown below:

 

 

 

 

  • Source response message type

Create the response message type as shown below:

 

 

 

  • Outbound Service Interface

Create an Outbound service interface, in that select category as outbound and select the respective message type.

 

 

 

 

 

then save and activate the outbound service interface.

 

  • Inbound Service Interface

Create an inbound service interface, in that select category as inbound and select the respective external definition.

 

 

 

 

Save and active the inbound service interface.

  • Request Message Mapping

Create request message mapping as shown 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 3 different options to place the SELECT statement e.g.:

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

Here is the SQL Statement used in the interface.

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}’

 

  • SQL Statement in the SAP PO Mapping

 

  • SQL Statement in the Skyvva Interface

 

 

  • SQL Statement in the SAP PO module parameter:

 

 

 

 

  • Response Message Mapping

Create response message mapping as shown below:

 

 

 

 

Insert the respective source and target structure and then do the mapping.

Now save and activate the message mapping.

  • Operation Mapping

Create Operation mapping as shown below

 

 

 

 

 

Select the respective outbound and inbound service interfaces and also the message mapping for request and response 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.
Since in this example we are using SOAPUI as source system. So need to create Business component for SOAPUI as BC_SOAPUI. 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 SOAP UI as a source. So, here we are using SOAP  in the sender channel.

 

 

 

 

Provide the necessary details as shown and then 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 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

 

 

 

 

The below parameters has the following meaning.

For V3 we don’t need to specify SforceBulkInterfaceId in the parameters

 

 

 

 

 

 

 

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.

 

 

 

 

  • Test the Inbound Interface.

Triggering the data from the Source system.

Here is the result from Salesforce.

 

Fandest du diesen Artikel hilfreich? Ja Nein

Wie können wir helfen?