SAP S/4HANA Cloud Create
In this article
Overview
You can use this Snap to create data objects in the SAP S/4HANA Cloud instance.
Snap Type
SAP S/4HANA Cloud Create Snap is a WRITE-type Snap creates data objects in the SAP S/4HANA Cloud instance.
Prerequisites
A valid account that supports SAP S/4HANA Cloud instance, with the appropriate access permissions. See, SAP S/4HANA Cloud Accounts.
Support for Ultra Pipelines
Works in Ultra Pipelines.Â
Limitations
None
Known Issues
The Snap does not support OData navigation link.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document  |
|
| Each input document contains data that must be created and written into the SAP S/4HANA Cloud instance. |
Output | Document |
|
| Each document contains the response of the creation of new records in the SAP S/4HANA Cloud instance. |
Error | Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
Snap Settings
Asterisk (*) - indicates a mandatory field.
Suggestion icon () - indicates a list that is dynamically populated based on the configuration.
Expression icon ()- indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.
Add icon ( ) - indicates that you can add fields in the field set.
Remove icon () - indicates that you can remove fields from the field set.
Field Name | Type | Description | |
---|---|---|---|
Label* Default Value:Â SAP S/4Hana Cloud Create | String | 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. Â | |
API object* Default Value: N/A | String/Expression/Suggestion | Select the API that you want to access in SAP S/4HANA Cloud instance. This dropdown list contains APIs available for the S/4HANA account configured in the Snap, each with a short description. | |
Entity* Default Value:Â N/A | String | Select a business object (the Entity or Endpoint) for the API Object chosen above. | |
Subentity Default Value: N/A | String | Add a subentity for the entity chosen. | |
Customized Header | Use this fieldset to add customized HTTP request headers for implementing specific HTTP requests other than the ones listed in the Additional Information - Usage of Customized header section of this page. The Snap provides the Customized Header in the input schema to help you to define the customized headers to the UI using the expression function. You can also manually enter the customized header names with values on the UI Customized header fieldset. If you provide only the customized header names or values using schema, but not link to the UI using the expression, the names or values you have entered will not be delivered to the API. | ||
Field Name Default Value:Â None. | String | Specify the field name of the customized HTTP request header. | |
Field Value Default Value: None. | String | Specify the field value for the above field of the customized HTTP request header.  | |
Connection Details | Use this field set to specify the connectivity parameters. | ||
Connection Timeout Default Value: 300 | Integer | Specify the duration in seconds for which the Snap must try to establish a connection with SAP S/4HANA Cloud. 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.  | |
Maximum Request Attempts Default Value: 0 | Integer | Specify the maximum number of attempts the Snap should make to perform the selected operation in case of connection failure or timeout.  | |
Retry Interval Default Value:Â 0 | Integer | Specify the time interval in seconds between the two successive retry requests. A retry happens only when the previous attempt resulted in an exception. | |
Snap Execution Default Value:Â Validate & Execute | Dropdown list | Indicates how the Snap must be executed. Available options are:
|
Troubleshooting
Error | Reason | Resolution |
---|---|---|
There is 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 |
Additional information
The following contents provide some helpful information to assist you while using the SAP S/4HANA Create Snap.
The General Behavior of SAP S/4HANA Cloud Create Snap
Supports POST operation to create new data to the SAP S/4HANACloud instance.
Supports customized HTTP Header. For details, see the Additional Information - Usage of Customized header.Â
Supports the input schema by which it is allowed to display the Create supported input parameter set from the upstream input snap.
Supports dynamic metadata loading, by which it is allowed to load the API metadata with a Parent-child dependency structure.
Select an API object from the API Object field and only this selected API-object related and Create supported (POST operation supported) entities will be displayed. After selecting an entity, only this selected entity related and Create supported (POST operation supported) parameters will be shown in the input schema.
Input Schema
The input schema for SAP S/4HANA Create Snap is divided into two parts, CustomizedHeader and Payload as shown below.
The CustomizedHeader schema helps you define the customized headers to the UI using the expression function. Alternatively, you can manually enter the customized header names with values on the UI  Customized header fieldset. If you provide only the customized header names or values using schema, but do not link to the UI using the expression, the names or values you have entered are not delivered to the API. Â
The Payload schema helps you define the input payload for the API call via Create Snap. It loads all the parameters that you need for the data object creation. If there is a Mapper Snap or a Snap that displays the entire input schema, then use payload schema to drind the input payload. Otherwise, in the input JSON object, always include "Payload" text as a key in the parent of the input.Â
Schema SettingsÂ
Parameter Name  | Data Type | Description |
---|---|---|
CustomizedHeader Default Value: N/A | Array | Add customized HTTP request header to implement specific HTTP requests. |
name Default Value:Â N/A | String | The field name of the customized HTTP request header. |
value Default Value: N/A | String | The field value of the customized HTTP request header. |
Payload Default Value:Â N/A | Object | Specify the input data parameters for the selected entities. |
Usage of Customized header
For this Snap Pack, setting customized HTTP headers is allowed. SAP S/4HANA Cloud contains a large number of API objects and entities. It is also possible to create customized API objects and entities in SAP S/4 HANA. For some entities, specific HTTP headers might be required. Example: If-Match and Etag. In the current release, only a few commonly used HTTP headers are pre-defined in the Snap. You can however add any custom or specific HTTP headers to fulfill your requirement. The following headers are already defined in Snap: Content-type, Cache-Control, Authorization, Accept, X-CSRF-Token, and Cookie.
Since the header parameters Content-type, Cache-Control, Authorization, Accept, X-CSRF-Token, and Cookie are already internally handled by the Snap, do not provide them in these fields.
See the example below for a defined custom header.Â
Example
Creating new customer material data in SAP S/4HANA Cloud
The example assumes that you have configured and authorized a valid SAP S/4HANA Cloud Account. The following SAP S/4HANA Cloud Create Snap and Pipeline shows how you can create new material data at the SAP S/4HANA Cloud instance using the API object API_CUSTOMER_MATERIAL_SRV_0001 (Remote API for Customer Material) and the entity A_CustomerMaterial.
The configuration of the SAP S/4HANA Cloud Create Snap is shown below:  | A successful validation or execution of the Snap gives the following output preview, showing the query results.  |
Finally, a JSON Formatter Snap and a File Writer Snap are applied to format and record data in a new file. The figure shows the configuration of the File Writer. | To view the newly created file, you must SSH to the target directory and open the newly-created file. The following image shows the preview of the result output JSON file. Â |
Downloads
Snap Pack History
Related Links
Â
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.