Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:Write
Description:

This Snap writes an SAP IDoc to the configured SAP server. Because IDocs are processed asynchronously on the server, Polling interval and Polling timeout are additional configurations that define how to get the processing status.
 

Expected upstream Snaps: The Control record fields of the IDoc Write Snap input view can be mapped using an upstream Mapper Snap.

Expected downstream Snaps: The Snap will output one document for every IDoc write 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 write record is represented as one document on the output view.


Note
  • 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.
  • Before this Snap, you would need to map data to the control_record as defined by SAP IDoc processing. This is done by mapping data to the input view by using either a Mapper or Structure Snap. The Control Record schema is provided. The values to map are dependent on the use case.
  • The Snap records logs of JCoDestination's connection pool's status, the logs can be seen in Dashboard.


Prerequisites:
Support and limitations:Ultra pipelines: Works in Ultra Pipelines.
  • Spark mode: Not supported in Spark mode.
  • Account:

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


    Views:


    InputThe Snap has exactly one input view and consumes documents. The input view must provide the Control record information.
    OutputThe Snap has exactly one output view and produces documents in the view. Each successful IDoc write will result in one output record on the output view.
    ErrorThe Snap has an error output view  and produces Document(s) in the view. Any status that is not defined in the success codes property of the Snap will trigger to write the result to the error 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.


    IDOC


    Required. The SAP IDoc type to write.

    ExampleMATMAS01

    Default value: N/A


    IDOC Extension type

    The IDoc Extension Write type is an extension of an associated IDOC type.

    If the IDoc specified in the "IDOC" Setting needs to be written with a specified custom extension type, provide a valid extension type in addition to the valid IDOC type with which the custom type is associated.

    The Snap displays an error in the following cases:

    1. The custom extension type is invalid
    2. The specified IDOC extension type and the IDOC type are valid; however, the two types do not have any association with each other

    Example: ZMATMAS01 OR  Z_MATMAS01

    Default value: N/A

    Success codes


    Required. This property defines the comma-separated status codes (with a leading 0) that are considered to be successful for the Snap execution.

    Example: 01,03

    Default value: 01,03,06,08,10,11,13,14,16,18,22,24,30,32,33,,35,38,39,41,50,53,55,62,64,66,69,70,71,73,75

    Note
    See the SAP IDoc documentation for status codes for more information.


    Polling interval

    This property defines the polling interval in seconds for obtaining the IDoc processing status.  At each polling interval, the Snap checks the status of the IDoc processing.  A value of 0 indicates no polling for the IDoc processing status.

    Example: 5

    Default value: 5

    Maximum: 60



    Polling timeout

    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

    IDoc Read BAPI Name

    This property is based on the “IDOC_READ_COMPLETELY” SAP function, which reads the details associated with an IDoc.

    Default value: Z_SNAP_IDOC_READ_COMPLETELY

    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

    Multiexcerpt include macro
    nameSnap Execution
    pageSOAP Execute


    Multiexcerpt include macro
    nameExecution_Detail_Write
    pageSOAP Execute


    Info
    titleClearing 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.

    RESTClearCache.slp

    Examples


    We will provide one example that executes an SAP IDoc write operation for a given input.

    First we provide the input to the SAP IDoc Write Snap, as defined below.


    The SAP IDoc Write Snap is configured as:



    Which results in:

    Downloads

    Attachments
    uploadfalse
    oldfalse
    patterns*.slp, *.zip


    Insert excerpt
    SAP Snap Pack
    SAP Snap Pack
    nopaneltrue