SAP PI/PO Adapter

  1. Home
  2. Dokumente
  3. SAP PI/PO Adapter
  4. 50. What is SKYVVA SAP PI/PO Adapter?

50. What is SKYVVA SAP PI/PO Adapter?

This document describes us about the SKYVVA SAP PI/PO Adapter

SAP PI/PO Adapter is used to communicate with SAP PO system. We use SAP PI/PO Adapter only in the outbound direction. It is used to communicate and inter-operate with each other over the Web.

Inside the  SAP PI/PO Adapter we have two protocols

  1. SOAP
  2. REST

1. SOAP Adapter

If we want to create the SAP PI/PO Adapter. First we have to go to Integration tab and then select SAP Control Board.

First Lets discuss about the SOAP Adapter inside the SAP PI/PO Adapter.

Soap adapter is used for data processing of both directions. I,e Inbound and outbound.

Soap request-> Outbound interface

As we have three elements in Request:

  1. HTTP Header
  2. URL Query Parameter
  3. SOAP Header
  4. SOAP Body

Soap response-> Inbound interface

As we have two elements in Response

  1. HTTP Header
  2. SOAP Header
  3. SOAP Body

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

SOAP V3 message type template:

This is the request message type:
{
“Google SOAP Service” : { // This is the API name. This is of type ‘WSDL Operation’
“HTTP Header Parameter” : { //This is of type HTTP Header
//Flate Structure..
},
“URL Query Parameter” : {
//Flate Strture.. This is of type ‘WSDL Query Parameter’
},
“SOAP Header” : {
// Custom Business Messagetype — it’s SOAP Header. This is of type ‘WSDL Header’
},
“SOAP Body” : {
//Custom Buisness Messagetype. This is of type ‘WSDL Body’
}
}
}
In the request, we have a URL section and inside that, we had two other Section URL path Parameters and Query Parameters but the path parameters are not supported by the SOAP protocol so we have removed from the Template.
This is the response message type:
{
“Business Message Type” : {
// Custom Buisness Messagetype. This is of type ‘Plain structure’
}
}
we have only the business object.

Step1: Create Adapter

  • First Insert Adapter Record By giving prefer Name and select Type = SOAP
  • Now Insert Properties:   If Need Authorization
  • Endpoint: Insert Endpoint URL where Request will direct
  • Username: Your End service User Name
  • Password: Your End service Password
  • Authentication: “BASIC”

Example: :

Type: SOAP

Endpoint : http://192.201.104.232:16080/sapo5b/…

Authentication : Basic

Operation : Post

Username: e … admin

Password : e … 12345

We can handle if the business has URL Query Parameter and HTTP Header

 

URL Query Parameter : ?pCity={!City}&pCountry={!Country}

 

HTTP Header : Content-Type:Application/xml|{!LastName}:{!FirstName}

Creation of Outbound Skyvva SAP PI/PO adapter:

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

Provide the details as shown below:

 

Now we have to use this adapter in the outbound interface as shown below

  • 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 an inbound parent response interface

 

 

Do the mapping for inbound parent response interface

 

Save the mapping and the inbound response interface.

 

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

  • Testing the Outbound synchronous Interface.

 

Callout from skyvva from developer console using the below apex code

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

c.returnXml=true;

c.returnListRecord=true;

c.isCreateMessage=true;

c.actionDoIntegrate=true;

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

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

 

We can see the message status in the message monitor

 

 

Quote Id is updated in salesforce

2. REST Adapter

The Representational State Transfer (REST) adapter enables you to exchange messages between remote clients or web service servers and the Integration Server. It supports dynamic URLs, REST API polling, multiple operations per channel as well as XML and JSON data formats.

Rest adapter is used for data processing of both direction. I,e Inbound and outbound.

REST request-> Outbound interface

REST response-> Inbound interface

What is REST request?
REST requires that a client make a request to the server in order to retrieve or modify data on the server. A request generally consists of: an HTTP verb, which defines what kind of operation to perform. a header, which allows the client to pass along information about the request.

Request Structure:

{
“Google REST Service”:{
“Request”:{
“URL”:{
“PATH Param”:{
//Flate Strture..
},
“Query Param”:{
//Flate Strture..
}
},
“Header”:{
//Flate Strture..
},
“Body”:{
//Custom Buisness Messagetype
}
}
}
}
What is Rest response?
When an JSON String is sent to a REST service, you must set Content-Type HTTP header to be “application/JSON”. The REST service converts the XML input data to the JSON format that is accepted by REST services.

Response Structure:

{
//Custom Buisness Message Type like Account,Contact,Asset,Opportunity,Case
}
Resource Methods:
Other important thing associated with REST is resource methods to be used to perform the desired transition. A large number of people wrongly relate resource methods to HTTP GET/PUT/POST/DELETE methods.

Authentication Section:
Here we make authentication three-way like
1) Basic Authentication
2) Certificate Authentication
3) OAuth2.0 Authentication

1) If the authentication type is Basic then the following properties required.
Authentication Type: Basic,
API Service Endpoint URL,
Operation:GET|POST|PUT|UPDATE|DELETE,
Request Format,
Response Format,
username,
password,
REST URL Path Parameter(optional)

2)If the authentication type is Certificate then the following properties required.
Authentication Type: Certificate,
API Service Endpoint URL,
Operation:GET|POST|PUT|UPDATE|DELETE,
Request Format,
Response Format,
clientCertName,
clientCertPasswd,
REST URL Path Parameter(optional)

3)If the authentication type is Oauth2.0 then the following properties required.
Authentication Type: Oauth2.0,
API Service Endpoint URL,
Token Endpoint URL,
Operation:GET|POST|PUT|UPDATE|DELETE,
Request Format,
Response Format,
REST URL Path Parameter(optional)

OAuth 2.0 Flow: Username-Password Credential
//Below properties required for access service
OAuth 2.0 client-id
OAuth 2.0 client-secret
OAuth 2.0 access-token

OAuth 2.0 Flow: Client Credential
//Below properties required for access service
OAuth 2.0 client-id
OAuth 2.0 client-secret
OAuth 2.0 access-token
OAuth 2.0 refresh-token

OAuth 2.0 Flow: OAuth 20 refresh-token
//Below properties required for access service
OAuth 2.0 client-id
OAuth 2.0 client-secret
OAuth 2.0 access-token
OAuth 2.0 refresh-token

Message Type Template:

Rest Adapter Template

Rest Adapter Template
“Rest Service”:{
“Request”:{
“URL”:{
“PATH Parameter”:{
//flat Structure
},
“QUERY Parameter”:{
//flat Structure
}
},
“Header”:{
//flat Structure
},
“Body”:{
//flat Structure
//Custom Hierarchical Business Message type
}
}
}
}
SetUp:
Step1: Create Adapter

First Insert Adapter Record By giving prefer Name and select Type = REST
Now Insert Properties If Need Authorization.
REST API Service Endpoint URL : Insert Endpoint URL where Request will direct
Username : Your Endservice UserName
Password : Your Endservice Password
Authentication : “BASIC”
REST Operation : “POST”

Creation of Outbound REST Adapter:

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

Provide the details as shown below:

Use this adapter in the skyvva outbound request interface.

  • 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 an inbound parent response interface

 

 

 

Do the mapping for inbound parent response interface

 

Save the mapping and the inbound response interface.

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

  • Testing the Outbound synchronous Interface.

 

Callout from skyvva from developer console using the below apex code

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

c.returnXml=true;

c.returnListRecord=true;

c.isCreateMessage=true;

c.actionDoIntegrate=true;

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?