SAP JCo Connector Reference¶ The following operations allow you to work with the SAP JCo Connector. Click an operation name to see parameter details and samples on how to use it. Connection configuration¶ The SAP JCo connection represents an SAP JCo client used to call RFC-enabled function modules and to send IDocs. In the 'Properties' section of each operation, you can configure the connection. Once a connection is created, it can be reused across operations. Connection configuration Parameter Name Description Required Connection Name A unique name used to identify the connection. Yes configDataType How the connection is configured. DestinationConfig exposes the common SAP logon parameters as individual fields. map lets you supply raw JCo property keys as a JSON object. Accepted values: DestinationConfig, map. The default value is DestinationConfig. Yes When configDataType is DestinationConfig: Parameter Name Description Required ashost The SAP application server host name. Yes sysnr The SAP system number. Yes jcoClient The SAP client number. Yes user The SAP logon user name. Yes passwd The SAP logon password. Yes lang The SAP logon language (for example, EN). No group The SAP logon group for load balancing. No When configDataType is map: Parameter Name Description Required configMap A JSON object of raw JCo property key-value pairs. Use this to supply settings not covered by the DestinationConfig fields (for example, jco.client.ashost, jco.client.sysnr, jco.client.client, jco.client.user, jco.client.passwd). Yes Advanced: Parameter Name Description Required destinationId A unique identifier for the JCo destination registered for this client. If not provided, a value is generated automatically. No Sample configuration <sap_jco.init> <connectionType>sap_jco_Client</connectionType> <configDataType>DestinationConfig</configDataType> <config_ashost>10.128.0.1</config_ashost> <config_sysnr>00</config_sysnr> <config_jcoClient>100</config_jcoClient> <config_user>JCOTESTER</config_user> <config_passwd>SECRET</config_passwd> <config_lang>EN</config_lang> </sap_jco.init> Operations¶ execute¶ executeThe execute operation calls an RFC-enabled function module (including BAPIs) on the SAP system and returns the response. Parameter Name Description Required functionName The name of the RFC-enabled function module to call. Yes importParameters Scalar values and structures sent to SAP as import parameters. No tableParameters Named tables sent to SAP as table parameters, where each entry maps a table parameter name to its rows. Provided as JSON. No returnTypeDataType The data type of the operation response. Accepted values: RfcRecord, xml, json. The default value is RfcRecord. No Sample configuration <sap_jco.execute configKey="SAP_CONNECTION"> <functionName>TEST_FUNCTION</functionName> <importParameters>{"importParam1": "Hello", "importParam2": 123}</importParameters> <returnTypeDataType>json</returnTypeDataType> <responseVariable>sapExecuteResult</responseVariable> <overwriteBody>false</overwriteBody> </sap_jco.execute> sendIDoc¶ sendIDocThe sendIDoc operation sends an IDoc to the SAP system over tRFC, including TID creation and confirmation. Parameter Name Description Required iDoc The IDoc to send, in XML format. Yes iDocType The IDoc version/type indicator passed to JCo. Accepted values: I, Q, 3, 2, 0. The default value is 0. No Sample configuration <sap_jco.sendIDoc configKey="SAP_CONNECTION"> <iDoc>{${payload}}</iDoc> <iDocType>0</iDocType> <responseVariable>sapSendIDocResult</responseVariable> <overwriteBody>false</overwriteBody> </sap_jco.sendIDoc> close¶ closeThe close operation releases the JCo destination registered for this client. Call it when the client is no longer needed, to free the destination ID for reuse. Calling this operation more than once is safe. This operation takes no input parameters other than the connection. Sample configuration <sap_jco.close configKey="SAP_CONNECTION"> <responseVariable>sapCloseResult</responseVariable> <overwriteBody>false</overwriteBody> </sap_jco.close>