Versions Compared

Key

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

In this article

Table of Contents
maxLevel2
absoluteUrltrue

Overview

Use this Snap to ...

Prerequisites

  • Valid client ID

Nonecreate, update, or delete multiple data objects from SAP S/4HANA applications.

Image Added

Prerequisites

Support for Ultra Pipelines

...

See Snap Support for Ultra Pipelines.

Limitations and Known Issues

...

None.

Snap Input and Output


Input/OutputType of ViewNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input 

DocumentBinary

Binary or Document

  • Min:1
  • Max:1
  • Mapper Snap
  • Copy Snap
  • ..
Requires the EDI data and internal ID as a JSON document
  • CSV Parser
  • JSON Parser

The input document contains customized header data and/or key parameter data that need to be passed to the Snap and data that must be written (created/updated/deleted) into the SAP S/4HANA server for the selected entity.

Output

Document

Binary

Binary or

Document (default)

  • Min:0
  • Max:1
  • Multipart Reader
  • File Writer
  • JSON Formatter
  • JSON Splitter

Each document contains the data created in the SAP S/4HANA server or updating/deleting result status data for the selected entity. The output document is a multipart binary stream or a document stream.

  • ..
  • The EDI transaction ID and order confirmation.
    • The binary document contains the header and the original API batch-request response.
    • The document stream contains the JSON structured API batch-request response split from the original API batch-request response. 

    Snap Settings

    ...

    titleDocumenting Fields Based On Data Type/UI Element

    **Delete Before Publishing**

    Choose from the following sentences to document specific field types.

    ...

    Parameter NameData TypeDescriptionDefault ValueExample 

    Label

    String

    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.

    N/A

    SAP S/4HANA Batch Write

    API object

    String

    Required. Select the API that you want to access in SAP S/4HANA On-Premise. This drop-down list contains APIs available for the S/4HANA account configured in the Snap, each with a short description.

    N/A

    ZCRM_BUPA_ODATA_0001
    (Odata Services for Business Partner)

    Entity

    String

    Required. Select a business object (the Entity or Endpoint) for the API object chosen above. 

    N/A

    AccountCollection

    Write Type

    String

    Required. Select the type of write operation you want to perform.

    • CREATE: Performs the POST operation to create new data objects.
    • UPDATE_MERGE: Performs the PATCH operation to partially update the specific data objects.
    • UPDATE_REPLACE: Performs the PUT operation to update the entire data objects.
    • DELETE: Performs the DELETE operation to delete a specific data object.
    CREATECREATE

    Input navigation level

    IntegerSelect the depth of navigation for your input schema. 01
    Batch sizeIntegerSelect the number of records to be processed in each request.200100

    Connection details

    Use this section of Snap Settings to specify the connectivity parameters: timeout, retry count and retry interval. 

    This fieldset comprises the following fields:

    • TimeOut
    • Maximum request attempts
    • RetryInterval

    TimeOut

    Integer

    Required. Enter, in seconds, the duration for which the Snap must try to establish connection with SAP S/4HANA On-Premise server. If the connection cannot be established within this duration, the Snap times out, writes the event to the log, and waits until the specified RetryInterval before attempting to reconnect.

    300

    480

    Maximum request attempts

    Integer

    Required. Specify an integer value to set the maximum number of reconnection attempts that the Snap must perform, in case of connection failure or timeout.

    3

    5

    RetryInterval

    Integer

    Required. Enter, in seconds, the duration for which the Snap must wait between two reconnection attempts, until the number of retries is reached.

    1

    15

    Snap Execution

    String

    Specifies the execution type:

    • Validate & Execute: Performs limited execution of the Snap (up to 50 records) during Pipeline validation; performs full execution of the Snap (unlimited records) during Pipeline execution.

    ...

    • Execute only: Performs full execution of the Snap during Pipeline execution; does not execute the Snap during Pipeline validation.

    ...

    • Disabled: Disables the Snap and, by extension, its downstream Snaps.

    ...

    Check boxes:

    • If selected, <Snap behavior>.
      If selected, an empty file is written when the incoming document has no data.
    • If selected, <behavior>. If not selected/Otherwise, <behavior>
      Use "If not selected" if the first sentence is long.
      If selected, the Snap uses the file path value as is. Otherwise, the Snap uses the file path value in the URL.
      If selected, an empty file is written when the incoming document has empty data. If there is no incoming document at the input view of the Snap, no file is written regardless of the value of the property.
    • Select to <action>
      Use this if the behavior is binary. Either this or that, where the converse behavior is apparent/obvious.
      Select to execute the Pipeline during validation.

    Text Fields

    • Describe what the field represents/contains. Additional details, as applicable, in a separate sentence. Include caveats such as the field being conditionally mandatory, limitations, etc.
      The name of the account.
      The account ID that you want to use to log in to the endpoint.
      Required if IAM Role is selected.
      Do not use this field if you are using batch processing.

    Numeric Text Fields

    • Describe what the field represents/contains. Additional details, as applicable, in a separate sentence. Include caveats such as the field being conditionally mandatory, limitations, etc. Include special values that impact the field's behavior as a bullet list.
      The number of records in a batch.
      The number of seconds for which you want the Snap to wait between retries.
      The number of seconds for which the Snap waits between retries.
      Use the following special values:
      * 0: Disables batching.
      * 1: Includes all documents in a single request.
    Parameter Name

    Execute only

    Validate & Execute

    Troubleshooting

    ErrorReasonResolution

    API object is not existing.

    Allowed API object format is <API ID>(Description).

    Locate and select an API object from the drop-down list.

    Entity is not existing.

    The entered Entity is not found for the selected API object in the server.

    Locate and select the Entity from the drop-down list.

    The input payload is not found.

    The input payload is not found.Fetch an input payload via Input Schema or input with the root key node Payload.

    The input payload should be a JSON object.

    The input payload is not passed as a JSON object. 

    Ensure that the input payload coming from the upstream Snap is a JSON object.

    Additional information

    The following contents provide some helpful information to assist you while using the SAP S/4HANA Batch Write Snap.

    Snap General Behavior

    The SAP S/4HANA Batch Write Snap supports the following:

    • POST/PUT/DELETE operation to create/update/delete data in the SAP S/4HANA On-Premise server.
    • Customized HTTP Header. For more information, see Using Customized Headers (in SAP S/4HANA Read Snap).
    • Display of only the create/update/delete-compatible input parameter set from the upstream input Snap.
    • Dynamic loading of API metadata with a Parent-child dependency structure. This means that you can 
      • Select an API object from the API object field to view only entities that are related to the API object and support POST queries (create operations).
      • And then, select an entity to view and specify values for only create-compatible parameters related to this entity in the Input Schema.

    Using Customized Headers

    See Using Customized Headers (in SAP S/4HANA Read Snap).

    Sending Batch Request

    The SAP S/4HANA supports the OData 2.0 protocol. SAP S/4HANA APIs that support OData 2.0 can send batch requests with specific requirements and for specific operations. See the documentation at OData 2.0 batch request, for more details.

    Batch Input Schema

    The Input Schema assists you to define the input data for the Batch requests. For SAP S/4HANA Batch Write Snap, the KeyParameter and CustomizedHeader can be defined using the Input Schema. The KeyParameter path will only be shown if the Write Type is set as DELETE or UPDATE_REPLACE in the Snap settings.

    Image Added

    Schema settings 

    ...

    Batch execution failed

    ...

    The Pipeline ended before the batch could complete execution due to a connection error.

    Verify that the Batch size field is configured to handle the inputs properly. If you are not sure when the input data is available, configure this field as zero to keep the connection always open.

    Examples

    Excluding Fields from the Input Data Stream

    You can exclude the fields that you do not require from the input data stream by omitting them in the Input schema field set.

    <screenshot of Pipeline/Snap>

    ...

    Parameter Name  Data TypeDescriptionDefault ValueExample 
    LabelString Insert excerptFile WriterFile WriternopaneltrueN/A

    Field Sets

    Specify advanced parameters that you want to include in the request.

    This fieldset consists of the following fields:

    • Field 1
    • Field 2
    • Field 3

    Troubleshooting

    ...

    CustomizedHeader

    Use this property schema to add customized HTTP request headers for implementing specific HTTP requests other than the ones listed under Using Customized Headers section.

    name

    String

    The field name of the customized HTTP request header.N/AIf-Match

    value

    StringThe field value of the customized HTTP request header. N/AW/"'82F636DC08F14D22260CE67E505C231D0D2ACD95'"
    KeyParameterObject

    This property schema enables you to specify the key parameters for a specific entity. Providing values for all key parameters represented in the schema list enables SAP S/4HANA to identify a unique record. 

    Info

    Key parameters are NOT the same as filters which can return multiple records. To use a filter like normal select, use the parameters at the Filter records section instead. Use key parameters only to retrieve specific records. Provide values to all keys found in the drop-down list.


    N/AN/A

    Payload

    ObjectSpecify the input data parameters for the selected entities.N/AN/A

    Examples

    Create multiple customer material records in SAP S/4HANA server

    This Pipeline example demonstrates how to use a SAP S/4HANA Batch Write Snap to create multiple customer material data objects in the SAP S/4HANA On-Premise instance. The Snap queries the C_CustomerMaterial_F2499T entity via API object ZSD_F2499_CUSTOMER_MATERIAL_SRV_0001 (Customer Material).

    Note

    The example assumes that you have configured and authorized a valid SAP S/4HANA Account (see Configuring SAP S/4HANA Accounts).

    Image Added

    Download this Pipeline.


    Expand
    titleSAP S/4HANA Write Batch Snap

    The following settings are defined for the SAP S/4HANA Batch Write Snap to retrieve customer material data from the SAP S/4HANA On-Premise instance it accesses.

    • API objectZSD_F2499_CUSTOMER_MATERIAL_SRV_0001 (Customer Material) 
    • EntityC_CustomerMaterial_F2499T

    Image Added

    A successful validation or execution of the Snap gives the following output preview.

    Image Added


    Expand
    titleJSON Formatter Snap
    • A JSON Formatter Snap is connected to the SAP S/4HANA Batch Write Snap to read and format its output data into standard JSON format.


    Expand
    titleFile Writer Snap
    • A File Writer Snap is connected to the JSON Formatter Snap to save/write the JSON-formatted data into a new file.
      Image Added


    Expand
    titleOutput

    To view the output JSON file, you must SSH to the target directory and open the newly-created JSON file. The preview of the output JSON file can be seen below:

    Image Added

    Alternatively, you can open the preview of the resulting output files from the Manager > Files. These files also store the original batch response.

    Image Added

    Downloads

    Note
    titleImportant 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.

    Attachments
    patterns.*.slp, *.zip

    Insert excerpt
    XYZ SAP S/4HANA Snap PackXYZ
    SAP S/4HANA Snap Pack
    nopaneltrue

    ...

    See Also