SAP IDoc Read

On this Page

Snap type:Read

This Snap reads an SAP IDoc of the configured SAP server. The IDoc property provides the output view schema.

The Processing Type attribute in SAP needs to be set to Remote-Enabled Module for this Snap to work with an SAP Normal Function Module. This setting is located on the Attributes tab for SE37 Function Module “IDOC_READ_COMPLETELY” .

Expected upstream Snaps: The DOCUMENT_NUMBER field can be mapped using an upstream Mapper Snap, which will provide the IDoc number(s) to be read from SAP.

Expected downstream Snaps: The Snap will output one document for every IDoc read operation, hence any document processing Snap can be used down stream.

Expected input: Document that conforms to the input view schema of the Snap. The input view schema is provided to an upstream Mapper Snap based on the selected service object.

Expected output: Document which represents the record structure of the retrieved IDoc record output definition. Each IDoc read record is represented as one document on the output view.

Support and limitations:Works in Ultra Pipelines.

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.


This Snap has exactly one input view that contains the unique IDoc number to read.

OutputThis Snap has exactly one document output view that is populated with IDoc data.
ErrorThis Snap has at most one error view and produces zero or more documents in the view.



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.

iDoc Read BAPI Name

Required. An IDOC Read BAPI name that is based off the SAP-delivered IDOC_READ_COMPLETELY BAPI property and containing the same input. In SAP, clone the IDOC_READ_COMPLETELY BAPI to Z_SNAP_IDOC_READ_COMPLETELY to make the default value work. Typically done in se37 transactions by users who have SAP programmatic access.



This is required to get information other than the IDoc number and transaction ID, such as the iDoc status code information.

Max request attempts

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

Request retry interval

The time in seconds to wait before retrying the request. 

Default value: 5

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

Snap Execution

Select one of the three modes in which the Snap executes. Available options are:

  • 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.

Clearing Cache for the Snaplex

To load a new or updated IDoc, the cache needs to be cleared for the Snaplex. Instead of restarting the JCC to access the refreshed metadata, running the following pipeline (download) can help clear the cache. This pipeline informs all nodes in the Snaplex that their respective SAP metadata cache is stale. This action can take a moment to propagate to all nodes in the Snaplex. A Snap in a node, on the next run, will automatically clear the cache for the given node, display the IDoc version, and populate the current schema.



We will show one example on how to read an SAP IDoc record from SAP.

First we configure the Mapper Snap to define the IDoc number to read and to map it to the DOCUMENT_NUMBER field of the IDoc Read input view.

The SAP IDoc Read Snap is configure with the defaults. 

Which will result in the following output:

The IDoc number is unique to the SAP system being used in the example, hence you must choose your own number for the SAP system being used.


Important steps to successfully reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide Pipeline parameters as applicable.

  File Modified

File Example_SAP_IDoc_Read.slp

Mar 10, 2022 by Subhajit Sengupta

Snap Pack History

 Click to view/expand
Release Snap Pack VersionDateType  Updates
August 2022main17386 StableUpgraded with the latest SnapLogic Platform release.
4.29 Patch429patches16637 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



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.29main15993 StableUpgraded with the latest SnapLogic Platform release.
4.29main15993 StableUpgraded with the latest SnapLogic Platform release.
4.28main14627 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 Patch427patches13992 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 Patch427patches12999 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.





Upgraded with the latest SnapLogic Platform release.
4.26main11181 StableUpgraded with the latest SnapLogic Platform release.
4.25 Patch425patches10571 Latest

Renamed the RFC Listener Snap as SAP RFC Listener Snap. 


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.

StableUpgraded with the latest SnapLogic Platform release.
StableUpgraded 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.
  • 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.



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 Patchsap8811 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.
StableUpgraded with the latest SnapLogic Platform release.
StableUpgraded with the latest SnapLogic Platform release.
StableUpgraded with the latest SnapLogic Platform release.

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


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

StableUpgraded with the latest SnapLogic Platform release.
StableUpgraded with the latest SnapLogic Platform release.
StableUpgraded with the latest SnapLogic Platform release.


StableUpgraded with the latest SnapLogic Platform release.


  • 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.
StableUpgraded with the latest SnapLogic Platform release.



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


Introduced the SAP IDoc Document Listener Snap in this release.




Info tab added to accounts.



StableUpgraded with the latest SnapLogic Platform release.
StableUpgraded with the latest SnapLogic Platform release.


StableUpgraded with the latest SnapLogic Platform release.