SAP IDoc Document Listener

SAP IDoc Document Listener

On this Page

Snap type:

Flow


Description:

This Snap receives SAP IDoc requests and sends the IDoc data contained in the requests to the output view. 

SAP IDoc Listener runs a JCo IDoc server that listens and receives IDoc requests, which means once a pipeline with an SAP IDoc Listener Snap is started, the pipeline won't finish and the user needs to stop the pipeline manually when needed.  

If Include header is checked, the TID (Transaction ID) of a IDoc request will be put in a header object along with the IDoc with the key as "tid" and sent to the output view. 

This Snap records logs of JCoDestination's connection pool's status each time it receives an IDoc request. The logs can be seen in Dashboard.

  • Expected downstream Snaps: Any snap that have a Document input view
  • Expected output: Document that contains segments of IDoc. For preview during validation, the output will be a mocked Document that shows the schema of IDoc type specified.


Prerequisites:

The SAP Snaplex machine's service file should be configured for the SAP gateway service:

Unix/Linux: /etc/services
Windows:    c:\windows\system32\drivers\etc\services


You need to add the SAP Gateway service entry to the file. For example, if the Gateway service is sapgw01, the line entry like this should be added to the file: 

sapgw01         3301/tcp
Support and limitations:Works in Ultra Tasks.
Account:

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring SAP Accounts for information on setting up this type of account.


Views:
InputThis Snap has no input views. Input IDoc data is sent by remote clients.
OutputThis Snap has exactly one document output view that is populated with IDoc document. If the Import header property is enabled, there will be a header object with tid placed alongside the IDoc document.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.

Settings

Label

Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.


Gateway host

Required. The address of SAP gateway host on which the IDoc listener will be registered.

Example: sap.cloud.com

Default value: N/A


Gateway service

Required. The SAP gateway service, usually in the format of "sapgwNN", in which NN stands for two digits.

Example: sapgw01

Default value: N/A


Program ID

Required. Program ID used to register the Snap as a JCo IDoc server in the Snap on SAP gateway server.

Example: Snaplogic

Default value: N/A


Connection count

Required. The count of the registered connections managed by the JCo IDoc server in this Snap. 

Example: 4

Default value: 2


Router string

The SAP router string to be used to access a system protected by a firewall. Such systems can only be reached using an SAP router when registering the server at the gateway of the ABAP server associated with the system. A router string typically has the following format: /H/firewall.hostname/H/.

Default value: N/A


Max request attempts

This property defines the polling timeout in seconds for obtaining the IDoc processing status.  If the timeout occurs while waiting for the status, the Snap displays a SnapExecutionException.

Example: 300

Default value: 300

Maximum: 1800

Max startup delay

Required. The maximum number of SAP connection attempts in case of a failure.

When 0 is entered, the Snap tries for infinite times for the connection. 

Default value: 3

Enable trace

Select this check box to activate JCo traces, which retrieves information about the methods invoked and the data passed through the underlying communication layers throughout the call. This information can help you analyze errors that are related to connection issues associated with the Snap's execution.

Default value: Deselected

Route errors

Writes configuration errors to the error view. If the error is non-recoverable, especially connection errors such as exception handling would be routed to the error view with relevant information.

Default value: Not selected

Loading

Loading

Advanced JCo Server PropertiesLoading
Property NameLoading
Property ValueLoading
Include header

If enabled, a header object containing tid will be generated in the output document.

Default value: false


Basic type for preview

Specify the IDoc basic type that need to be shown in preview during validation. This property works only for validation. If this is empty, then no preview will be generated.

Default value: N/A


Extension type for preview

Specify the IDoc extension type that need to be shown in preview during validation. This property works only for validation. This property must be used with basic type for preview.

Default value: N/A


Segment types for preview

Specify segment types that need to be shown in preview during validation. This property works only for validation. This property must be used with basic type for preview.

Default value: N/A


Snap Execution

Select one of the following three modes in which the Snap executes:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default ValueExecute only





Example: Validate & Execute

Examples


In this pipeline, the SAP IDoc Document Listener Snap sends the documents to an output view that shows the schema of a specified IDoc type. The output is then written to a file using the File Writer Snap.

On the Snap settings, provide the Basic type of the IDoc, DEBMAS07,  Extension type, ZDEBMAS07, and the Segment type, E1KNA1H to be shown during the validation. Note if the Segment type is not provided with, the Snap displays all the segment types of the IDoc.


The output preview from the Snap:

   

Downloads

Loading

  File Modified
No files shared here yet.

 Click to view/expand

Release 

Snap Pack Version

Date

Type

  Updates

November 2025

main33142

Stable

Updated and certified against the current SnapLogic Platform release.

August 2025

main32088

Stable

Updated and certified against the current SnapLogic Platform release.

May 2025

main31019

Stable

Updated and certified against the current SnapLogic Platform release.

February 2025

main29887

 

Stable

Updated and certified against the current SnapLogic Platform release.

November 2024

439patches29736

 

Latest

Enhanced the SAP iDoc Document Listener and SAP iDoc Listener Snaps for better error handling of non-connection errors. When this property is enabled, instead of halting on most non-connection errors, the system will now stop on any non-connection error.

Behavior change:

Updated the behavior of the Halt on SAP error checkbox for better error handling of non-connection errors. When this property is enabled, instead of halting on most non-connection errors, the system will now stop on any non-connection error.

November 2024

439patches29181

 

Latest

Enhanced the SAP Execute Snap with the Round to SAP decimal checkbox that enables the Snap to round the decimal value to match the number of Decimal Places defined in the SAP target field. This property only applies to the SAP packed decimal fields, which store data in the BCD (Binary Coded Decimal) format.

November 2024

main29029

 

Stable

Updated and certified against the current SnapLogic Platform release.

August 2024

438patches28277

 

Latest

Fixed the SAP IDoc Listener and SAP IDoc Document Listener Snaps as below:

  • The Snaps now interrupt the Snap thread if the JCo server stops.

  • If you attempt to open and modify the Ultra pipeline with the SAP iDoc Listener Snaps in the Designer, the pipeline restarts (the existing Ultra pipeline stops).

August 2024

438patches27908

 

Latest

Fixed an issue with SAP IDoc Listener and SAP IDoc Document Listener Snaps that displayed a Null Pointer Exception if you select the Route errors checkbox (which routes the error to the error view) in the Snaps.

August 2024

main27765

 

Stable

Upgraded the following libraries for the SAP Snap Pack. Learn more about the library upgrade.

  • JCo from 3.1.4 to 3.1.10

  • IDoc from 3.1.1 to 3.1.3

Refer to the Known Issue caused by this upgrade and follow the steps from the workaround to mitigate any pipeline failures.

May 2024

main26341

 

Stable

Updated and certified against the current SnapLogic Platform release.

February 2024

main25112

 

Stable

Updated and certified against the current SnapLogic Platform release.

November 2023

435patches24068

 

Latest

  • Enhanced the SAP IDoc Listener and SAP IDoc Document Listener Snaps with a new Halt on SAP error checkbox for better error-handling capability. Select this checkbox to enable the listener to interrupt and halt processing in case of an error from SAP.

  • Removed the unnecessary spring-core dependency from the SAP Snap Pack.

November 2023

main23721

 

Stable

Updated and certified against the current SnapLogic Platform release.

August 2023

main22460

 

Stable

Updated and certified against the current SnapLogic Platform release.

May 2023

433patches22386

 

Latest

Fixed an issue with the SnapLogic SAP Accounts that caused issues when connection pools were exhausted. The minimum value allowed for the Connection pool capacity is now 0 so you can disable the connection pooling.

May 2023

main21015

 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023

main19844

 

Stable

Upgraded with the latest SnapLogic Platform release.

November 2022

431patches19026

 

Latest

The SAP IDoc Listener Snap now handles the data event from the SAP instance as expected.

November 2022

main18944

 

Stable

Upgraded with the latest SnapLogic Platform release.

October 2022

430patches18854

 

Latest

The SAP IDoc Read and SAP IDoc Write Snaps do not display the error messages when the IDoc Read BAPI Name field is empty or wrong as a default value IDOC_READ_COMPLETELY is now assigned to the empty field, otherwise, the Snap considers the specified name.

4.30 Patch

430patches17344

 

Latest

The SAP Execute Snap is now equipped to send the actual content of the incoming byte arrays (in binary types like XString) instead of their transformed String values.

August 2022

main17386

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.29 Patch

429patches16637

 

Latest

  • Fixed an issue with the SAP IDoc Write Snap where the Snap wrote the same TID, Document_number, and so on for the different output documents though the I_DOCNUM array contained all the document numbers that are returned from SAP table. Now, the Snap writes different TID, Document_number for different output documents along with the I_DOCNUM array that contains all the document numbers.

  • Fixed an issue with SAP Execute and SAP IDoc Write Snaps where the output preview did not include the original document.

4.29 Patch

429patches16113

 

Latest

Fixed an issue with SAP Execute Snap where the Snap incorrectly handled connection exceptions for 104-JCO_ERROR_SYSTEM_FAILURE. Previously, the Snap captured only the output document without the error. Now, the Snap correctly captures both the output and error.

4.29

main15993

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.29

main15993

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.28

main14627

 

Stable

  • Upgraded the Java Native Library used by the SAP Java Connector (JCo) to version 3.1.

    Breaking change for Pipelines containing Snaps from the SAP Snap Pack with Java Native Library

    This upgrade may cause your existing Pipelines to break if they contain Snaps from the SAP Snap Pack. You must manually upgrade your SAP Java Connector (JCo) Native Library to version 3.1.4 for these Pipelines to run successfully. See SAP Configurations for more information.

4.27 Patch

427patches13992

 

Latest

  • Enhanced the SAP Execute Snap to support nested tables or structure data in the import parameters.

  • Upgraded the Java Native Library used by the SAP Java Connector (JCo) to 3.1.4 version.

4.27 Patch

427patches12999

 

Latest

Enhanced SAP RFC ListenerSAP IDoc Listener and SAP IDoc Document Listener Snaps with a new field set Advanced JCo Server Properties that allows you to configure Java Connector (JCo) server-related attributes.

4.27

main12833

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.26

main11181

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.25 Patch

425patches10571

 

Latest

Renamed the RFC Listener Snap as SAP RFC Listener Snap. 

4.25

main9554

 

Stable

Introduced the SAP RFC Listener Snap that facilitates Remote Function Calls (RFCs) between two SAP systems. The Snap simulates an RFC server and listens to the incoming RFC calls infinitely. Subsequently, the Snap generates output documents either from the import parameters or triggers a child Pipeline. Business applications can use the RFC mechanism to communicate and exchange information (in predefined formats) with other systems.

4.24

main8556

Stable

Upgraded with the latest SnapLogic Platform release.

4.23

main7430

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.22 Patch 

422patches7378

 

Latest

Enhances the SAP Execute Snap to process the structure that contains nested Table Type fields in the output document by recursively parsing them into a Map or a List set.

4.22 Patch 

422patches6796

 

Latest

Fixes the JCO_ERROR_REQUEST_CANCELLED (connection is closed) error in SAP Execute Snap that occurs even when the session is active after 10 minutes.


4.22 Patch 

422patches6601

 

Latest

Enhances SAP Execute and SAP IDoc Write Snaps by introducing the following fields:

  • Reload Function Metadata: To get latest schema.

  • Reload Metadata and Validate: Allows clearing the JCo Metadata cache on the plex node before each validation.

4.22 Patch 

422patches6597

 

Latest

Enhances the SAP Execute Snap by introducing the following two fields:

  • Commit Timeout (sec): Creates a session to call BAPI and commit.

  • Session ID: Identifies specific sessions for all the Snaps that are in a stateful call sequence.

4.22

main6403

 

Stable

  • Enhances the Snap Pack to support SNC-based authentication in SAP Accounts and the execution of BAPI call sequences in a Pipeline.

    • The SAP Accounts, SAP JCo Account and SAP Load Balanced JCo Account, can be used to extend connection security with an additional layer of Secure Network Communications (SNC) configuration by passing advanced JCo parameters.

    • Updates the SAP Execute Snap with the ability to execute a sequence of BAPI calls within the same Pipeline and session. Sequence implies that the output from a BAPI call is needed for the next BAPI call to run.

4.21

snapsmrc542

 

Stable

Enhances the SAP Execute Snap to add a new field, Output date time as Text, which enables you to output date and time as a String data type instead of a DateTime object.

4.20 Patch

sap8811

 

Latest

Updates the SAP IDoc Write Snap with the following:

  • Fixes the stack overflow error that occurs while retrying to write the IDoc to the SAP server. 

  • Adds inbound success codes to the default value which otherwise only indicates the IDoc being created.

  • Enhances the error messages for a better user experience.

4.20

snapsmrc535

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.19

snaprsmrc528

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.18

snapsmrc523

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.17

ALL7402

 

Latest

Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17

snapsmrc515

 

Latest

Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16

snapsmrc508

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.15

snapsmrc500

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.14

snapsmrc490

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.13

snapsmrc486

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.12

snapsmrc480

 

Stable

  • Added the retry connection and error routing mechanism to the SAP Execute, SAP iDOC Read, SAP iDOC Write, SAP iDOC Document Listener and SAP iDOC Listener Snaps.

  • Updated the SAP Account with Enable trace property to analyse the connection related errors.

4.11 Patch 

sap4514

 

Latest

Addressed an issue with the SAP iDoc Listener and iDoc Document Listener Snaps where the pipeline takes a longer time to stop while performing a manual trigger. 

4.11 Patch 

sap4342

 

Latest

  • SAP IDoc Write Snap now supports IDoc Extension type.

  • SAP Self-service/on-demand ability to clear IDoc metadata cache.

4.11

snapsmrc465

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.10

snapsmrc414

 

Stable

Added SAP account to connect to a message server, SAP Load Balanced JCo Account.

4.9 Patch 

sap3246

 

Latest

  • Added SAP account to connect to MSHOST (JCo Load Balanced account).

  • Addressed an issue with SAP BAPI call appending duplicate fields to object

  • SAP Execute: Support for "table-type" fields added

  • Addressed an issue in SAP Execute: Changing parameter metadata not imported

4.9 Patch 

sap3233

 

Latest

Addressed an issue with SAP Execute failing to call BAPI with integer request parameter

4.9

snapsmrc405

 

Stable

Introduced the SAP IDoc Document Listener Snap in this release.

4.8

snapsmrc398

 

Stable

Info tab added to accounts.

4.7

snapsmrc382

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.6

snapsmrc362

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.5.1

snapsmrc344

 

Stable

Upgraded with the latest SnapLogic Platform release.