SAP-ERP (Old Version) Adapter

  1. Home
  2. SAP-ERP (Old Version) Adapter
  3. 12. How to develop inbound interface using IDoc asynchronously?

12. How to develop inbound interface using IDoc asynchronously?


IDoc Inbound Interface from SAP to Salesforce

Table of Contents

  1. Skyvva software landscape and building blocks
  2. Used Convention
  3. Prerequisite and requirement for creating an outbound interface
  4. Creating Inbound Interface
      4.1 Overview of steps to create an inbound Interface
  5. Scenario: Inbound interface using IDoc
      5.1: Create Interface in SAP
    1. 5.2: Define IDoc, Message Type
    1. 5.3: Define IDoc and fields in the skyvva config
    1. 5.4: Export IDoc structure from SAP
    1. 5.5: Create an interface, import Idoc structure.
    1. 5.6: Mapping of fields
    1. 5.7: Define Routing to integration in Skyvva Config
    6. Testing & Monitoring

1.   Skyvva software landscape and building blocks

Skyvva Integration Suite enables the integration between Salesforce and SAP-Backend with the native ABAP-Adapter sitting inside an SAP Backend e.g. an ECC 6.0 System with less effort and without programming neither in SAP nor in Salesforce. It based on the generation and customized an approach to reduce effort and to accelerate the development of interfaces between those systems.

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-Backend of the customer.

Architecture building blocks

The creation of an inbound interface is only possible when the Skyvva solution framework is set up correctly. This work has to be done beforehand by an administrator e.g. an ABAP transport has to be imported into the customer SAP-Backend system.

2.   Used Convention

When talking about the direction we have to clearly define the perspective from which platform we are looking for. Since we couple 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 “Inbound Interface” when data comes to Salesforce from SAP. So the reference point is set to Salesforce.

 3.   Prerequisite and requirement for creating an inbound interface

This section describes the prerequisite to be done beforehand to start creating inbound interfaces. We only mentioned the prerequisite required to be able to create interfaces with the Skyvva development tool. It does not list prerequisites for the time when the interface is running e.g. open the firewall, doing port mapping, etc.


When this prerequisite is fulfilled you can start creating inbound interfaces with the Skyvva development framework to send data from SAP to Salesforce.

4. Creating Inbound Interface

You start developing an inbound interface when you want to send data from SAP-Backend over the ABAP-Adapter to Salesforce. With the ABAP-Adapter you can send only data between SAP and Salesforce. If you want to send data from SAP to anywhere else you need to use other technology or middleware like SAP-PO.

4.1 Overview of steps to create an inbound interface

The first question you should have might be how should I start? What is the first step to do? Should I start first in SAP or first in Salesforce? This chapter gives you an overview of which step is involved in creating an inbound interface and why you need this step.

Before you start to develop the interface make sure that the prerequisite e.g. creating a logical port in the soamanager and installing the Salesforce CA Root certificate is fulfilled.


Steps in creating an inbound interface

The creation of an inbound interface consists of steps shown above. Each step is carried out either in Salesforce or in SAP. In each block, you see in the bracket the name of the component e.g. Salesforce or SAP where the step is done.

Note: The grey box contains complex customizing tasks to do in SAP and is therefore not described. Here, in this document. This block will be described in a separate document called “SAP ALE/IDoc Customizing”. Without having done the task in the grey box you cannot send IDoc or use BAPI to send data from an SAP system.

The table below summarizes the step/task at a higher level.

1.Customize ALE/IDoc or write BAPI to extract the business data


SAPHere you customize ALE and IDoc to send IDoc out of SAP. You need to do a change pointer customizing using IDoc. If you use BAPI you have to develop this BAPI yourself first. This task can be done by an experienced ABAP developer or ALE/IDoc customizer.
2.Define IDoc/BAPI and fields in the Skyvva Config


SAPAfter you have done the ALE/IDoc customizing in you can use this IDoc as an interface. Here you use the skyvva transaction /skyvva/config to create an interface based on IDoc or BAPI and to select fields you need to send to Salesforce.
3.Export the IDoc/BAPI structure from SAPSAPIn this step, you need to export the interface definition based on IDoc or BAPI from SAP.  This is needed later in Salesforce as an interface that represents the data coming from SAP.
4.Create Interface, Import IDoc/BAPI structure and do mapping


SalesforceIn this step, you first create an interface in Salesforce. Then you import the structure you have exported in step 3 using as the left side for the mapping. Then you do the mapping with the Skyvva graphical mapping tool.
5.Define Routing to Integration /Interface in Skyvva ConfigSAPIn this step, you define routing to the interface you have created in step 2. You use again the skyvva transaction /skyvva/config to create this routing.
6. Using workflow to route to the interfaceSalesforceIn this step, you use workflow conditions to route incoming data from SAP to the right interface in Salesforce.
7.Testing  and Monitoring messages


SAP and SalesforceAfter step 7 you have successfully developed an inbound interface and have to test it. Testing involves creating a test ABAP report to call the BAPI or IDoc change pointer customizing. You can then monitor in SAP and Salesforce with the skyvva message monitoring.

5. Inbound interface using Idoc

The aim of this scenario is how to create an Idoc Inbound interface from SAP to Salesforce. Here we will be sending Customer using Basic type “DEBMAS07” using the IDoc from SAP to Salesforce through Skyvva ABAP adapter.

Prerequisites for Interface Development:

To establish the connectivity some basic settings have to be done first.  With Soamanager configure the logical port  for the consumer-proxies and with WE21 the Port for IDOC-Processing has to be configured( Type ABAP-PI and assigning the actual ABAP_IDOC2SOAP_ADAPTER  )

Follow this tutorial for Configuration:

5.1 Create Interface in SAP

To create an interface you call the transaction /skyvva/config.

If you use Idoc to send data out from SAP you have to define an interface that is based on type. Note that you have to develop your own Idoc type beforehand or use the SAP standard Idoc.

Call transaction /n/skyvva/config.

Click on the New Entries button for creating New Interface.

In this screen enter a name for the field SAP interface id. This is the name of your interface. Give a meaning full name for your interface. Then choose the value “IDoc interface” for the type.

Now save you editing with the save button. You might get a popup screen to record your change for later transport. Here just give a transport number of your choice. If you don’t know the transport number you can create a new one or contact your SAP basis admin and ask him for a valid SAP transport number to use.

After this step, you have created an interface with the name /SKYVVA/CUS_S2SF. Now you need to specify the Message type, Basic Type you want to transfer to Salesforce.

To do so, select the created Interface and double click on IDoc interface maintenance on the left side.



The Idoc which we provide in SAP interface is responsible for the process and its parameter is defined for the exchange of data between two systems.

A second flag you have to check when using function module is the flag “send input”. This flag indicates the runtime of Skyvva that the data should be sent via the function module call and not IDoc.

5.2 Define IDoc, Message Type

Now enter IDoc message type and the basic type. Note that in this example we use an own message type DEBMAS we have created before in the ALE/IDoc customizing. As the basic type, we use the SAP standard DEBMAS07. You can use the standard IDoc message type DEBMAS as well or you can also create your message type. Refer to the document “SAP ALE/IDoc Customizing” for creating a new message type if needed.

Now save your setting by clicking on the button. As a result, you will get a new line as shown on this screen.


5.3 Define Idoc and fields in the skyvva config

After this step, you have created an interface. Now you need to specify the IDoc segment and fields you want to transfer to Salesforce. Because an IDoc can have hundreds of Segment and within a segment hundred of fields you have to select only those segments and fields you want to send out. Otherwise, the structure which will be generated later as XML structure will be too big and can cause Salesforce limitation when trying to import this structure file into Salesforce.


Choose New Entry to add segment. We have to choose the least segments, through which we can create a customer. According to the business requirement, you may need to add multiple segments.

Segment: choose from F4.

Next level: At runtime, a new dataset will be transforming this segment created.

Now save it.

The segment has many numbers of fields, but we need only a few fields to create customer so that need to add here.

Select the segment & double click on Idoc Fields.

To add Idoc fields Click New Entry then add these fields using f4.

5.4 Export IDoc/BAPI structure from SAP

The prerequisite to executing this step is that you have defined the IDoc/BAPI structure like described in step 2. You need to export the structure as an XML file to import it into Salesforce in the next step. This structure will represent the SAP structure on the left side in the mapping later on in the skyvva graphical mapping tool in Salesforce.

Use the following transaction.

From the starting Page:


From any other Page in SAP:

      • /n/ SKYVVA/INTF_EXPORT (opens transaction in the same window)
      • /o/ SKYVVA/INTF_EXPORT (opens transaction in new window)


Format: There are 4 different output formats:

D – Deployment Script

U – Format for XML upload

V – Format for XML upload (2)

C – CSV file (not yet supported)

The most commonly used formats of an IStructure to upload to Salesforce are either D or V. they differ in the XML structure and how they are uploaded into the SKYVVA Integration Suite in Salesforce. Structure V offers the possibility to get the SAP field description into the structure.

Execute and save the  XML file.


After executing this step you have an XML file that contains the SAP structure definition. The next step is to upload this structure into Salesforce.


5.5 Create interface, import Idoc structure

Goto>login>skyvva>create new Interface.


Enter the details:

        1. Name: Salesforce Interface Name
        2. Status: Deployed (
          Status of an interface e.g. if the interface is still under development or ready to run. If still on development the value is set to “Development”. If ready for run it needs to set to “Deployed”.)
        3. Operation Type:  Upsert (
          Choose the SKYVVA operation to define which kind of operation the interface should do. For example, we support CRUD operations like INSERT, UPDATE, DELETE and UPSERT. Furthermore, specific skyvva operations like query or pullQuery can be set.)
        4. Source/Target Name: Account (
          In case of Inbound Interface, it is an object API name (for example Account, Buffer__c, …), the object that the integration for this interface is linked to)
        5. Interface Direction : Inbound

And then Save.

Open the Interface. And Goto Related Tab.

To upload the XML file and query for the selection of data to send.


Need to upload the XML file which we created in step 3 and then click on the upload button and then close the pop-up, the file will be loaded.


Now after loading we can see all the SAP interface fields which we have used from parameters.


5.6: Mapping of fields.


Now Refresh the page(F5) and goto Details Tab.

And goto to Mapping Tab and down.

On the left side, the Salesforce field is present and the right side SAP interface field is present.


Now we need to map the field by drag from Account and drop to SF2SAP_IDOC.


After mapping, You see the mapped fields.SAVE the mapping

Now, Salesforce and SAP interface is ready.


5.7 Define Routing to integration in Skyvva Config


Open the transaction /n/skyvva/config and select the tree branch “Routing to Integration/Interface”. Click on the button to create a new routing entry for an interface.

You will get this screen below after clicking on the button “New Entries”. Now fill in the fields. The first field to fill in is the field Partner No. This is the partner profile you have created beforehand with the transaction code we21. You get the value from the drop-down list.

Click on the button to get the value list.

Here you see the value list and select the one that is the right one for your case.

You can see that the field Partner No. and Partn. The type is filled from the value list. If your ALE/IDoc customizing need the Partner Role you have to fill it accordingly. In this example we don’t need this and therefore leave it empty.

Now fill the field Port. The port has to be created before like described in the document “SKYVVA_061_Directcoupling SetupSKYVVASolution_vxxx”.

To create port goto Endpoint Access.

Provide 2,3,4 as per the organization.

For 5,6 Lport Enterprise & Lport Iservice from SOAMANAGER.


It is Endpoint Access created in the Skyvvaconfig tool.

Here click on the button to get the value list for the IDoc port.

Optionally you can enter a value for field Message Variant and Mess. function if the ALE/IDoc customizing need it. In this example, we don’t need this.

Now you have to enter the value for Message Type and Basic Type. Here again, you can choose from the value list by clicking on the appropriate field on the button. The screen below just shows the result of the selection for Message Type and Basic Type since the way how to do it is the same as described above.

The field Extension is only needed if you have enhanced the IDoc with the customer segment. In this example, we don’t and therefore the field is left empty.

Now fill in the fields in the section “Routing to Integration/Interface”. The first field to enter is the field Object TypeName. Here please enter this string for the current release /SKYVVA/CL_IDOC2SOAP_TRANSF_V1

The next fields are Interface Name and Integration ID. These fields are information you get from Salesforce. The field interface name is the name of the interface you created in step 4. The field integration ID is the Id of an integration that you have created in Salesforce for the first time. Instead of Integration Id, you can also use the name of the integration. ( supported since  Version 2.22 of IntegrationSuite) .

Follow like this, Now Sap and Salesforce interface is ready.

6. Testing & Monitoring

Now to send customer there is standard t-Code BD12

Press F8 to execute.

The message shows 1 Idoc sent. To check, goto Salesforce message tab in Integration.

These messages show the data came in Salesforce.


Fandest du diesen Artikel hilfreich? Ja Nein

Wie können wir helfen?