SAP S/4HANA Update

In this article

Overview

Use this Snap to update a data object in the SAP S/4HANA On-Premise instance.

Prerequisites

Support for Ultra Pipelines

Limitations and Known Issues

  • The Snap does not support OData navigation link.

Snap Input and Output

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

Document

  • Min: 1
  • Max: 1
  • Mapper Snap
  • Copy Snap
  • JSON Parser

A document with data that indicates the entities to be filtered and retrieved from SAP S/4HANA On-Premise instance.

Output

Document

  • Min: 0
  • Max: 1
  • Mapper Snap
  • Copy Snap
  • XML Formatter
  • JSON Formatter

A document containing the entity data retrieved from a SAP S/4HANA On-Premise instance.

Snap Settings

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 Update

API object

String

Required. Select the API that you want to access in SAP S/4HANA On-Premise instance. 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

SubentityString/Expression/Suggestion

Specify or select a subentity corresponding to the entity chosen above.

N/AMainContact

Customized header

Use this field set to add customized HTTP request headers for implementing specific HTTP requests other than the ones listed in the Using Customized Headers section (SAP S/4HANA Read Snap). Only one customized header can be specified in each row. Click  to add a new row in this table and define the values accordingly.

This field set comprises the following fields:

  • Field name
  • Field value

Field name

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

Field value

StringThe field value for the above field in the customized HTTP request header. N/AW/"'82F636DC08F14D22260CE67E505C231D0D2ACD95'"

Key parameter

Required. This field set enables you to specify the key parameters for a specific entity. Providing values for all key parameters in the drop-down list enables SAP S/4HANA to identify a unique record. 

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.

Only one key parameter can be specified in each row. Click  to add a new row in this table and define the values accordingly. 

This field set comprises the following fields:

  • Field name
  • Field value

Field name

StringSpecify the key Parameter (reference parameter) fields.N/AaccountID

Field value

StringSpecify the value for the reference parameter in this field. The data type—String, Integer, Boolean or any other—depends on the field name you specified for the parameter.N/ATEST_001
Disable datatype conversionCheckbox/ExpressionSelect the checkbox to disable the datatype conversion for values of key parameters and filters.Deselected Selected
Updating methodString

Optional. Specify the type of update to be made for the records in SAP S/4HANA On-Premise instance. The available options are:

  • Replace: Replaces the entire existing record with the new data record. All values will get updated. Use this option for updating values in the entire record.
  • Merge: Merges the new values in the existing record. Use this option to update one or more values in an existing record.
ReplaceMerge

Input navigation level

Integer

Select the depth of navigation for your input schema. 

0

1

Connection details

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

This field set 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 instance. 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

120

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.

0

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.

0

10

Snap Execution

String

Indicates how the Snap must be executed. Available options are:

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

Execute only

Validate & Execute 

Troubleshooting

ErrorReasonResolution

You have an empty value in the Field name field for the Key parameter.

The Field name field must not be empty for the Key parameter.

Enter a valid Field name for the Key parameter.

You have an empty field in the Field name/value field for the Customized header.

The Field name/value field must not be empty for the Customized header.

Enter a valid Field name/value for the Customized header.

API object does not exist.

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

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

Entity does not exist.

The entered Entity is not found in the server.

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

Patch verb allowed only via batch 
(ResponseCode: 500; ErrorCode: SY/530;)
SAP S/4HANA (On-Premise) instance does not allow individual updates to some entities. This is a limitation of API provided by this Snap. Use SAP S/4 HANA Batch Update Snap instead, to update the entity. 
Inline component is not defined or not allowed (HTTP PUT) Some APIs in SAP S/4HANA (On-Premise) instance do not support deep batch put requests. Deep entity operations are supported only with POST operation. Use SAP S/4 HANA Batch Update Snap instead, to send multiple update requests in a single request (deep entity operation).

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

Here is some information to assist you while using the SAP S/4HANA Update Snap.

Snap General Behavior

The SAP S/4HANA Update Snap supports the following:

  • PUT operation to Update data in the SAP S/4HANA On-Premise instance.
  • Customized HTTP Header. For more information, see Using Customized Headers (in SAP S/4HANA Read Snap).
  • Display of only the update-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 PUT queries (update operations).
    • And then, select an entity to view and specify values for only update-compatible parameters related to this entity in Key parameter field and input schema.

Input schema

The input schema for SAP S/4HANA Create Snap is divided into three parts: CustomizedHeader, KeyParameter and Payload.

  • You can define customized headers for your HTTP requests using either the CustomizedHeader schema and as expressions or Customized header field set to manually enter the customized header names with values. Use the KeyParameter schema to define the key parameters (conditions) for the Update request. If using the CustomizedHeader schema or KeyParameter schema, it is mandatory to define the name and values as expressions to ensure the names and values provided are delivered to the API.
  • Use the Payload schema for SAP S/4HANA Create Snap to define the input payload for an API call. This dynamically loads and represents all the parameters that you need for creating the data object (payload). 
    • If the upstream Snap can display the entire input schema like Mapper Snap, always select the Payload object in the schema to define your input payload in that Snap.
    • If your input payload is a JSON object, ensure that the text Payload is included as the key in the parent of your input.

Schema settings

Parameter Name
Data Type
Description
Default Value
Example 

CustomizedHeader

Array

Add customized HTTP request header to implement specific HTTP requests. 

N/A

N/A

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'"
KeyParameterObjectSpecify the key parameters for a specific entity. Providing values for all key parameters listed in the schema enables to easily identify a unique record.N/AN/A

Payload

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

Using Customized Headers

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

Examples

Update customer material data from SAP S/4HANA instance

This Pipeline example demonstrates using a SAP S/4HANA Update Snap to update customer material data in the SAP S/4HANA On-Premise instance.

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

Download this Pipeline.


 SAP S/4HANA Update Snap

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

  • API object: ZSD_F2499_CUSTOMER_MATERIAL_SRV_0001 (Customer Material) 
  • Entity: C_CustomerMaterial_F2499

A successful validation or execution of the Snap gives the following output preview, showing the query results.

 JSON Formatter Snap

A JSON Formatter Snap is connected to the SAP S/4HANA Update Snap to read and format its output data into standard JSON format.

 File Writer Snap

A File Writer Snap is connected to the JSON Formatter Snap to save / write the JSON-formatted data into a file.

 Output

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:

Downloads

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 SAP_S4HANA_UPDATE_SNAP_EXAMPLE_01_CUSTOMER_MATERIAL.slp

Aug 05, 2020 by Anand Vedam

Snap Pack History

 Click here to expand...
Release Snap Pack VersionDateType  Updates
August 2024main181 Latest

Enhanced the SAP S/4HANA Read and Read Custom Query Snaps now include the Raw response checkbox. Select this checkbox to output the raw response as a single document. If you clear the checkbox, the results are written as individual documents.

August 2024

main180

 

Stable

Updated and certified against the current SnapLogic Platform release.

May 2024

main172 StableUpdated and certified against the current SnapLogic Platform release.
February 2024main168 StableUpdated and certified against the current SnapLogic Platform release.
November 2023main155 StableUpdated and certified against the current SnapLogic Platform release.
August 2023main150 Stable

Enhanced the input schema for the SAP S/4HANA Create Snap.

August 2023main140 Latest

Fixed the encoding of special characters in the SAP S/4HANA Update Snap.

August 2023main138 Stable

May 2023

main130 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023main114 StableUpgraded with the latest SnapLogic Platform release.
November 2022main113 StableUpgraded with the latest SnapLogic Platform release.
August 2022main111 StableUpgraded with the latest SnapLogic Platform release.
4.29main108 StableUpgraded with the latest SnapLogic Platform release.
4.28main100 StableUpgraded with the latest SnapLogic Platform release.
4.27 Patchmain95 Latest
  • Enhanced the SAP S/4 HANA Snaps to support sub-entities and pagination support.

  • Removed unnecessary datatype conversions.

  • Reduced metadata request volume.

  • Fixed issues in concurrency exception and potential Snap crashes.

4.27main93 StableUpgraded with the latest SnapLogic Platform release.
4.26main88 StableUpgraded with the latest SnapLogic Platform release.
4.25main73
 
StableUpgraded with the latest SnapLogic Platform release.
4.24main73
StableUpgraded with the latest SnapLogic Platform release.
4.23main7430
 
Stable

Enhances the Snap Pack to handle batch and custom query operations:

  • Introduces the SAP S/4HANA Batch Read Snap that enables retrieving batches of records from an SAP S/4HANA On-Premise instance.
  • Introduces the SAP S/4HANA Batch Write Snap that enables writing batches of records to an SAP S/4HANA On-Premise instance.
  • Introduces the SAP S/4HANA Read Custom Query Snap that enables retrieving multiple records from an SAP S/4HANA On-Premise instance, based on custom queries.
  • Introduces the SAP S/4HANA SSL Auth Account type to enable SSL-based authentication on an SAP S/4HANA On-Premise instance.
  • Adds the Count field to the SAP S/4HANA Read Snap to allow returning the total number of records retrieved.
4.22 Patch 422patches6973 Latest

Enhances the SAP S/4HANA Snap Pack with the following additions:

4.22main6403
 
StableUpgraded with the latest SnapLogic Platform release.
4.21snapsmrc542

 

StableInitial release.