SAP PI/PO Adapter

  1. Home
  2. docs
  3. SAP PI/PO Adapter
  4. 7 How to create an outbound synchronous proxy interface in SAP PI/PO using SKYVVA SOAP Adapter?

7 How to create an outbound synchronous proxy interface in SAP PI/PO using SKYVVA SOAP Adapter?

This document describes on how to create an outbound interface with SAP-PO java single stack. When talking about the outbound interface in this document the direction Salesforce to SAP is meant e.g. Salesforce Interface will be called from SAP-PO. The development of an outbound interface involves steps to be done in Salesforce and in PO. This document does not describe the work at SAP-Backend e.g. developing business logic in SAP-Backend with ABAP.

  • SKYVVA software landscape and building blocks

SKYVVA Integration Suite enables the integration between Salesforce and SAP-Backend over SAP-PO with less effort and without programming either in SAP or in Salesforce. It based on the generation and customized the approach to reduce effort and to accelerate the development of interfaces between those systems.
In order to be able to provide such a toolset and framework some component (green) has been developed by SKYVVA and has to be deployed on Salesforce and SAP-PO of the customer. On the SAP-Backend e.g. SAP ECC 6.0 there is no software installation needed.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

When talking about the direction we have to clearly define the perspective from which platform we are looking for. Since we are coupling two platforms Salesforce and SAP together we have to clearly define from which view we are referencing when talking about direction outbound or inbound.

 

 

 

 

 

 

 

 

 

 

 

 

  • Outbound and Inbound Interface
    The term outbound is used when data is sent out from Salesforce to SAP. Therefore we call interfaces for sending data out of Salesforce to SAP "Outbound Interface". For the other direction, we call interfaces as "Inbound Interface" when data is sent from SAP to Salesforce. So the reference point is set to Salesforce.

Prerequisite for creating an inbound interface

  • The SKYVVA solution framework has to be installed into your Salesforce instance.
  • An integration instance has been created
  • SAP-PO has been installed and set up correctly
  • Your workstation needs an internet browser IE or Firefox of the new release.

You start developing outbound interface when you want to send data from Salesforce over PO to SAP-Backend. Of course, you can send data from Salesforce to anywhere not just to SAP-PO. But the focus of this document is sending data from Salesforce over SAP-PO to SAP-Backend e.g. to SAP ECC 6.0.

 

 

  • Creating Outbound Interface

The figure below depicts which steps to be followed to create an outbound interface with SAP PI/PO.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Creating an outbound adapter in Salesforce.

To Create an Adapter in Salesforce. Go to Adapter tab as shown below.

 

 

 

In the Adapter page. Click on New to create an adapter.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Now specify the Name, description and select the type as SOAP Adapter.

Here in the properties tab specify the endpoint of the receiver system for example here we are sending data to SAP PO. So here we have to specify the endpoint of SAP PO and the username and the password of the PO system and the payloadFormat should be XML as shown below.

 

 

 

 

 

 

 

 

 

 

No need to specify the clientCertName, clientCertPasswd, and soapAction here.

Then click on save to create the adapter.

  • Create Metadata Provider

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Here we are creating metadata for the message type. Metadata providers are plugins that do the actual metadata extraction from files. Metadata Provider tells the data processing layer of lib md which metadata fields (types) they can extract.

In SKYVVA, when we create metadata, the name field is only the mandatory field. On MetaData the Name cannot be duplicated.

  • Create IStructure repository

The term Repository is in fact to store data and structure of a message. The purpose of Istructure is An Interface for a structure that contains the metadata of a structure.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create Message type

Now Create Message Types for IStructure Repository. The free define message type is a type and structure definition which is stored in the Repository. The message type can be resided in a WSDL, in SAP IDoc, SAP Bapi, etc... It can be stored in a file in CSV, XML or other formats.

For the Message Type, you have to use our defined Structure. As we are sending the Opportunity from Salesforce to create project in SAP. Here we use Opportunity sObject.

{
„SOAP_Service“: {//TYPE WILL BE : “WSDL Service”
„SOAP_Request“: {//SOAP_Request TYPE WILL BE : “WSDL Request”
„SOAP_URLPARAM“: { //TYPE WILL BE : “WSDL URL Parameter”
„SOAP_URL_PATH“: {}, // TYPE WILL BE : “WSDL Path Parameter” : This will use in to build Query path of Endpoint URL
„SOAP_URL_QUERY“: {} //TYPE WILL BE : “WSDL Query Parameter” : This will use in to build Query path of Endpoint URL
},
„SOAP_Header“: {},//TYPE WILL BE : “WSDL Header” : This is just of identify not need to include in building of request or response//Hear will be Actual Object which we suppose to insert in header of Request : Must be start by Object
„SOAP_Body“: {//TYPE WILL BE : “WSDL Body” : This is just of identify not need to include in building of request or response
//Hear will be Actual Object which we suppose to insert in Body of Request : Must be start by Object
„ISTRUCTURE_Opportunity“: {
„Opportunity“: {
„Name“: „“,
„SAP_Project_Number__c“: „“
}
}
}
},
„SOAP_Response“: { //TYPE WILL BE : “WSDL Response”
„SOAP_Header“: {},//TYPE WILL BE : “WSDL Header” : This is just of identify not need to include in building of request or response
„SOAP_Body“: {//TYPE WILL BE : “WSDL Body” : This is just of identify not need to include in building of request or response
//Hear will be Actual Object which we suppose to insert in Body of Response : Must be start by Object
„ISTRUCTURE_Opportunity“: {

„Opportunity“: {
„Id“: „“,
„SAP_Project_Number__c“: „“
}
}
}
}
}
}

In Istructure repository click on "Open Editor" to create the message type as shown below.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Select file type as JSON and give input to open text box as below:

 

 

 

 

 

 

 

 

Click on the Save button and you can see the below message type.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Creating an Outbound synchronous interface

Here we have to create two interfaces one for Request and other for Response as shown below.

 

Create Outbound interface as "Opportunity_Out" and provide the necessary details as shown in detail below.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Specify the Invoke Inbound interface as shown below.

 

 

 

 

 

 

 

 

 

 

 

Do the mapping as shown below.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create inbound interface as "Opportunity_Response" and provide the necessary details as shown in detail below.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Do the mapping as shown in screenshot below.

 

 

 

 

 

 

 

 

 

 

 

 

 

Download the WSDL's and import it into SAP PO for mapping.

  • Designing the objects in ESR

Import the Request WSDL as external definition into ESR and save activate it

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Import the response interface WSDL as external definition, save and activate it

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create the request and response data types as shown below.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create request and response message types as shown below

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create inbound and outbound service interfaces as shown below.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create request and response message mapping as shown below

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create Operation mapping as shown below

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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
  • Transmitter 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 Salesforce 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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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 Outbound Interface.

Triggering the data from the Source system using the following Apex Code.

skyvvasolutions.CallOutControl c=new skyvvasolutions.CallOutControl();
c.returnXml=true;
c.returnListRecord=true;
c.isCreateMessage=true;
c.actionDoIntegrate=true;
String[] ids=new String[]{‚0066F000010hsgNQAQ‘};
skyvvasolutions.CallOutResponse r=skyvvasolutions.Iservices.invokeCallout2(‚Skyvva_SAP_Salesforce‘,’Opportunity_Out‘,ids,’SYNC‘, c);
System.debug(‚>>>XML: ‚+r.payloadXML);

 

Check the message in the message board. Message sent successfully to SAP PO.

 

 

Was this article helpful to you? Yes No

How can we help?