This document describes how to create an outbound Synchronous interface in SAP PO with SKYVVA V3 REST Adapter
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”: {
“QuoteLineItem”: {}
}
}
},
“Response”: {
“root”: {
“Quote”: {
“QuoteLineItem”: {}
}
}
}
}
}
Initially we have to create Metadata Provider.
Now create Istructure repository
Now create Message type for hierarchical request and response interface.
Now we have to use the message type in both request and response interface.
Provide the details as shown below
Use this adapter in the skyvva outbound request interface.
In this example, I have created the interface under “SAP PI/PO Integration App V1″
- Create Outbound 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 interface.
- Create an inbound response interface
Do the mapping for inbound response interface
Save the mapping and the inbound response interface.
Download the inbound and outbound interface XSD’s and upload it into SAP PO for mapping.
For Outbound interface XSD download the XSD from message type as shown below
Use the exported XSD file to import into SAP PO mapping.
For Inbound Interface XSD download do the same export metadata from skyvva message type as we did for outbound interface XSD.
Use the exported file to import 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.
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();
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