Know the component and how to use it.

Rodrigo Lara avatar
Written by Rodrigo Lara
Updated over a week ago

IMPORTANT: This documentation has been discontinued. Read the updated SAP documentation on our new documentation portal.

SAP enables SAP connection (RFC only) for requirements dispatch.

Take a look at the configuration parameters of the component:

  • Account: it's necessary to create a BASIC-type account to use the SAP credentials (user and password).

  • SAP Operation: connection method in SAP - the component supports access via RFC or IDOC.

  • Host: hostname of the SAP system - for "IP" and "Port" to be supported, it's necessary to have connectivity via VPN (you can define VPN through SAP Gui).

    To resolve the hostname to an IP address, you must add a mapping entry to the host file of the machine on which the agent is installed.

  • RFC: name of the RFC used to connect with the SAP system - this field is informed by the client (the import parameters of the SAP funtion must be mapped).

  • Language: language to be used in the connection with the SAP system (ex.: "EN" for English).

  • Client ID: SAP Client ID, normally with 3 digits, used to connect with SAP.

  • System Number: normally with 2 digits, used to connect with the SAP system (you can find this information in SAP Gui).

  • Template (XML): template Apache FreeMarker for the SOAP message sent in the request.

  • Enviroment/SystemName/System Id: normally with 3 characters - you can find this information, that comes in a JSON file, in SAP Gui.

  • Fail On Error: if the option is enabled, the execution of the pipeline with error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.

We recommend you to set GLOBALS for the SAP ENVIRONMENT, as shown below:

  • Globals:

  • environment = SAP environment   


See the examples of the items listed, that must be replaced according to your need:

  • [rfc] = RFC name

  • [table] = Table related to RFC

  • [columns] = Table columns



Component structure for RFC connections

For RFC connections, use the "SAP Json to RFC" capsule before the SAP component. That way, the call is transformed in the format expected by SAP. This is an example of RFC call syntax inside SAP:


Function call (RFC) BAPI_BUPA_ADDRESS_GETDETAIL inside JSON Generator component

  "sid": "{{sap-test-sid}}",
  "importParameters": { 
    "attributes": { 
      "VALID_DATE": {{FORMATDATE(NOW(), "timestamp", "yyyy-MM-dd", null , "GMT-3") }} 


For a RFC call, it's important to pay attention to the following points:

  • always inform Sid - field Enviroment/SystemName/System Id previously mentioned.

  • RFC field - can be in the JSON file, as well as informed inside the component. 

  • importParameters - function call inside SAP. Be specific only with the fields that must be filled out in the call.


About SAP IDOC             

  • IDOC: means Intermediate Document

  • IDOC Type: has a specific structure, that put into sequence the data transfered from one system to another.

  • IDOC TYPE EXTENSION (optional): specifies the IDOC extension, if it exists, of an IDOC produced by this endpoint.

  • SYSTEM RELEASE (optional): specifies the SAP Basis Release associated, if it exists, to an IDOC produced by this endpoint.

  • APPLICATION RELEASE (optional): specifies the Application Release associated, if it exists, to an IDOC produced by this endpoint. 


Component structure for the use of the Template XML field     

See an example of template (XML):

<?xml version="1.0" encoding="ASCII"?> 
  <rootSegment xsi:type="FLCUSTOMER_CREATEFROMDATA01---:ROOT" document="/">
    <segmentChildren parent="//@rootSegment">
      <E1SCU_CRE parent="//@rootSegment" document="/">
        <segmentChildren parent="//@rootSegment/@segmentChildren/@E1SCU_CRE.0">
          <E1BPSCUNEW parent="//@rootSegment/@segmentChildren/@E1SCU_CRE.0"
              CUSTNAME="Fred Flintstone" FORM="Mr."
              STREET="123 Rubble Lane"
              EMAIL="[email protected]"

Important: {YOUR_ENVIRONMENT} must be replaced by your SAP SID.

If it's a single query, you can use the following syntax:


Elementary fields/Import Parameters

<?xml version="1.0" encoding="ASCII"?> 
<[rfc]:Request xmlns:[rfc]="{{global.environment}}/[rfc]" [columns]="20180801" [columns]="20180806" [columns]="050" />


<?xml version="1.0" encoding="ASCII"?> 
<ABCD_RFC_ORDEM_FATURA:Request xmlns:ABCD_RFC_ORDEM_FATURA="" P_ERDAT_INI="2018-07-01T00:00:00.000" P_ERDAT_FIM="2018-08-01T00:00:00.000" CLIENTE="" VKORG="0010" AUART="" /> 


If it's a table query, use this syntax:  

Table fields

<?xml version="1.0" encoding="ASCII"?> 
<[rfc]:Request ">xmlns:[rfc]="{{global.environment}}/[rfc]"> 


<?xml version="1.0" encoding="ASCII"?> 
<ABCD_RFC_MATERIAIS:Request ">xmlns:ABCD_RFC_MATERIAIS:Request="{{global.environment}}/ABCD_RFC_MATERIAIS:Request"> 



    "type": "S"

  • ${type}: variable that must be provided inside a tag "body"

For the variable sapRequestTemplate, it's important to pay attention to these points:

  • the variable name can have the following signs: minus (-), period (.) and colon (:) in any position. But these characters need to be escaped with backslash (\). Otherwise, they'll be interpreted as operators.

  • it might be more convenient to use variables and conversion functions:

<#assign x=42>
${x?string} <#-- the same as ${x} -->



Messages flow



The component expects a message under any format. However, it will look for a path inside the "modelPath" configuration property.


The output message will be the same as the input message, but replacing the model property according to the template definition (as a string). If there's an error, the "property_error" property will be created on the same level of the original property.

Did this answer your question?