1. Home
  2. SAP/ERP,S4/HANA(Latest Version) Adapter
  3. 18. How to develop outbound interface using FM/RFC synchronously?

18. How to develop outbound interface using FM/RFC synchronously?

[add-search-inside]

Outbound Interface – Call SAP RFC/BAPI/IDOC from salesforce

This unit describes:-

How to send salesforce to sap data (In synchronous mode) and get a response back

Introduction:-

This document describes how data can be transferred from SFDC to SAP and get a response back . To call SAP RFC/BAPI/IDOC from salesforce we need to create two interface. The interface will be Outbound( RFC/BAPI/IDOC request) and second interface will be inbound ( RFC/BAPI/IDOC response).We need to link this interface each other using response field in outbound interface and parents field in inbound interface.

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 “Inbound Interface” when data comes to Salesforce from SAP. So the reference point is set to Salesforce.

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))

The development of an interface involved set of steps to be done in SAP & SALESFORCE

  1. Develop function module with importing and exporting parameter OR use existing RFC/BAPI/IDOC from SAP. As per business requirement select the correct RFC/BAPI/IDOC.
  2. Check the existing integration if does not exist then create the new integration
  3. Create SAP Connection Destination And Create Adapter (For More Details See in Chapter (4.b))
  4. Create Metadata Provider, Repository and  message type using Import SAP Metadata (For More Details See in Chapter 9(1)
  5. Creating  Outbound and inbound interface using Metadata created using same RFC/BAPI/IDOC

1. Creating outbound Interface
You can start developing an outbound interface when you want to send data from SF  to SAP using Skyvva ABAP-Adapter.

For outbound interface involved set of steps to be done

a.  Go to Integration and click on interface tab then click on new Interface button as below.  

b. After clicking on new interface button below screen will  appear and fill  the all required details      as describe in below screenshot.

c. Select outbound adapter in outbound interface as below

d. Click on open mapping and do the required field mapping  to send data from SF to SAP

e. Mapping screen will look like below screen after mapping

f. After mapping save the outbound interface.

2. Steps in creating an inbound interface

The creation of an inbound interface follow of steps shown above for outbound interface as (point 1. Creating outbound Interface). For inbound interface select Interface Direction as “InBound” as below

Note:  Do not select any adapter for Inbound interface (Response interface ) system.

6. Linking Outbound and Inbound interface each other

a. Open outbound interface and edit it as below.

Select Inbound interface here

b. Open Inbound interface and edit it as below.

Select outbound interface as below and save

7. Call outbound Interface using APEX code

skyvvasolutions.CallOutControl c=new skyvvasolutions.CallOutControl();
c.returnListRecord=true;
c.isCreateMessage=true;
String[] ids=new String[]{‘001A000000Hl6ULIAZ’};
skyvvasolutions.CallOutResponse r=skyvvasolutions.Iservices.invokeCallout2(‘Direct_SF_SAP_CONNECTION‘,’Account_update_outbound’,ids,’SYNC’, c);
System.debug(‘>>>XML: ‘+r.payloadXML);
System.debug(‘>>>List of Map:’+r.records);

 

NOTE : invokeCallout2() have five parameter as below.

First       : “Direct_SF_SAP_CONNECTION” which is integration name.

Second  : “Account_update_outbound” Which is interface name

Third      :  “Ids” which is salesforce record id

Fourth   : “SYNC” which is calling mode

 

 

 

 

 

Fandest du diesen Artikel hilfreich? Ja Nein

Wie können wir helfen?