Retrieve sales order data from SAP S/4HANA server - SAP S/4HANA Read Custom Query Snap

This Pipeline example demonstrates how to use a SAP S/4HANA Read Custom Query Snap to define a custom query for retrieving sales order records from the SAP S/4HANA On-Premise instance. The Snap queries the A_SalesOrder entity through the API object ZAPI_SALES_ORDER_SRV_0001 (Remote API for SD Sales Order).

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


Download this Pipeline
  1. The following settings are defined for the SAP S/4HANA Read Custom Query Snap to retrieve sales order data from the SAP S/4HANA On-Premise instance it accesses:
    • API object: ZAPI_SALES_ORDER_SRV_0001 (Remote API for SD Sales Order)
    • Entity: A_SalesOrder
    • Subentity: to_PricingElement
    • Customized query: $select=SalesOrder,SalesOrderType,to_Item/SalesOrder,to_Item/SalesOrderItem&$expand=to_Item&$top=10&$filter=SalesOrderType eq 'OR'


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


  3. A JSON Formatter Snap is connected to the SAP S/4HANA Read Custom Query Snap to read and format its output data into standard JSON format.
  4. A File Writer Snap is connected to the JSON Formatter Snap to save the JSON-formatted data into a file.


  5. To view the output JSON file, SSH to the target directory and open the newly created JSON file. The following image shows a preview of the output JSON file:


To reuse the example pipelines:
  1. Download and import the SLP file into your Environment.
  2. Configure Snap accounts.
  3. Provide Pipeline parameters, if any.