This unit describes:-
How to send sap data to salesforce (In synchronous mode) using Multitab
Introduction:- #
This document describes how data can be transferred to SFDC within your own Programs. The MultiItabAdapter allows you to transfer data of different RFC/BAPI or Structures(DDIC), which you have filled before in your own FM/Report, within one SKYVVA FM Call. The routing to the different Salesforce Objects is implemented with workflow in Skyvva-IntegrationSuite on SFDC.
When talking about inbound interface in this document the direction SAP to Salesforce . Interface will be called from sap to Salesforce. The development of an interface involved steps to be done in Salesforce . This document does not describe the work at SAP-Backend e.g. developing business logic in SAP-Backend with ABAP.
SKYVVA integrations connect Salesforce to your backend systems(SAP), whether by referencing through a call, or replicating the data into Salesforce. While SKYVVA provides a rich suite of pre-built integrations for SAP->Salesforce process integration, the SKYVVA Integration App gives you the ability to quickly and easily create your own integrations. The SAP integrations support S/4HANA in addition to SAP ECC, and we can also integrate with other systems via REST, SOAP, and OData web services.
Prerequisite
- SKYVVA package installed at SAP side
- SKYVVA package installed at Salesforce side
- check the skyvva service active or not in SAP using Tcode SICF (For More Details See in Chapter (4.a))
- Develop function module with importing and exporting parameter.
The development of an interface involved set of steps to be done in SAP and SALESFORCE
- Develop function module with importing and exporting parameter. ( For More Details See in Chapter 8)
- Create the Integration
- Create SAP Connection Destination And Create Adapter (For More Details See in Chapter (4.b))
- Create Metadata Provider and Create Repository (For More Details See in Chapter 10)
- Create the message type using Import SAP Metadata ( For More Details See in Chapter 10)
- Creating an inbound interface
- Send SAP data using FM/Report
1. Develop function module with importing and exporting parameter.
1. SAP Implementation Part
1.1 Prerequisites
Please use repository based typing instead of program-internal types for the RFC/BAPI definition and Structure definition (DDIC). Otherwise the Adapter will have problems at runtime.
1.2 Implement a sender module for the transfer of Internal Tables (ITAB)
In this example a SenderModule : ZV3_MULTI_ITAB_DEMO has been implemented .
This Module is also used in salesforce for metadata provider in salesforce to create message type in salesforce on the Interface-definition of this module.
in the importing Parameter “IM_DEBITOR_NO” has data need to send salesforce and the exporting parameter “EX_DEBITOR_DETAILS” has field or structure coming data back from salesforce in that format.
Here you can see an example for call skyvva interface in a synchronous mode and process the response. #
The importing Parameters
1. im_integration is the mandatory parameter in which we pass salesforce integration Id
2. im_iinterface is the mandatory parameter in which we pass salesforce interface Id.
3. im_endpoint is the mandatory parameter in which we pass salesforce endpoint name in endpoint we have maintain salesforce login details .
4. im_resp_param_name is the optional parameter in which we pass response param name which is exporting parameter of skyvva calling FM (Multi-tab).
5. im_req_param_name is the mandatory parameter in which we pass request param name which is importing parameter of skyvva calling FM .
6. im_req_data is the mandatory parameter in which we pass request data internal table which is importing parameter of skyvva calling FM
The Exporting Parameter
1. EX_RETURN is the parameter which return error/success message .
2. IM_SF_RESPONSE is the parameter which return the response from salesforce which is the exporting parameter of calling skyvva FM.
Example Code :
“Selecting function config data for multi-tab
SELECT SINGLE * FROM /skyvva/multitab INTO @DATA(ls_func_config)
WHERE funcname = ‘ZV3_MULTI_ITAB_DEMO’.
“calling skyvva multi-tab function module to send data to salesforce
CALL FUNCTION ‘/SKYVVA/MULTI_ITAB_ADAPTER_V3’
EXPORTING
im_integration_id = ls_func_config–integrationid ” Salesforce integration id
im_iinterface_id = ls_func_config–interfaceid ” Salesforce interface id
im_endpoint = ls_func_config–endpointid ” Salesforce connection name
im_resp_structure_param_name = ‘ZTT_KNA1’ ” Reponse(exporting)parameter table type
im_req_structure_param_name = ‘ZTT_KUNNR’ ” Request(importing) parameter table type
it_req_data = im_debitor_no ” bussinus data need to send to salesforce
IMPORTING
ex_sf_response_data = ex_debitor_details. “Data retriving from salesforce
Remark: the importing/exporting structure must be used in salesforce as message type.
For call skyvva interface in a Asynchronous mode do not pass the response parameter “im_req_param_name” and exporting response parameter “IM_SF_RESPONSE” in skyvva Multi-tab FM.
2. Create the Integration
Goto the integration tab and Create the Integration in salesforce as below
3. Create SAP Connection Destination And Create Adapter
Once you save integration below screen will display, Here we are selecting SAP Control Board.
a. Create Connection Destination
Provide the details for connection details as shown below and click on continue button
Type: SAP ERP
Deployment: Embedded
Logical System: ****
Here we need to provide the SAP connection details as below
Host Url: http://xxxx.com
Port: 16xxx
Username: xxxx
Password: ******
SAPID: System Id
Client: ***
Once we provide the details we need to ping the SAP Connection. Then we can see the pop-up as below
Now we have to provide the salesforce details as shown below.
Consumer Key and Consumer Secret we can get from the connected App.
Click on Ping Connection of Salesforce to check if its connected successfully.
b. Create Adapter
To create adapter goto integration->SAP control board then select adapter tab and click on new button and fill the details as
below.
Click on new and fill the required details as below and save the adapter
Type : SAP ERP
Connection destination select which we have create in step (2.a)
Click on ping connection for test adapter is working or not
4. Create Metadata Provider and Create Repository
To create metadata provider click on tab metadata provider then click on New button and give the metadata name then Save as shown below screenshot
After save metadata below screen will come, Now click on New button to create repositories as shown below
Give the repository name and select object format type :(”SAP IDOC,SAP BAPI, SAP Table/view) and save as shown below
After save the Repository below screen will come , now click on button “Import SAP metadata”
Select the below details from list as per your requirement then click on retrieve button as shown below
It will display all the object from sap which you have selected above, now you can search you object name here as shown below
5. Create the message type using Import SAP Metadata
Select your object name from list and click on create message type .
Once you click on Create Message Type it will create message type in salesforce as shown below
Now use this message type in Interface .
6.Creating an inbound interface:
Provide the Name, sObject type, Description, Processing mode, Status, Metadata provider, Repository, Message type, adapter as shown in the screenshots below
Save the interface once provide all the necessary details. Now again open the interface and assign inbound adapter as below
For inbound interface we have to do mapping, click on open mapping in interface and do mapping as shown below
Save the interface once provide all the necessary details.
7. Send SAP data using FM/Report
Once the save the interface, now you can go to sap and run/call the custom function module/report in order to send sap data into salesforce.
In our case we are using below function module to send data in synchronous mode.
We can also see the message in salesforce side in message monitor