In the first example we will read a list of all sales orders in SAP by Sales Organization and Customer using BAPI_SALESORDER_GETLIST and then split the data by Sales Order # (SD_DOC), format the data to Excel and ultimately write the data to SLDB.
We will start with a JSON Generator Snap which provides Customer and Organization ID which is input for the Mapper Snap where we map the relevant details such as CUSTOMER_NUMBER and SALES_ORGANIZATION to prepare as your input data.
The SAP Execute Snap is configured to use BAPI_SALESORDER_GETLIST. I have renamed the Snap "SAP Execute - BAPI" for the purposes of this example.
The results are returned from SAP, which match the input criteria (Sales Organization and Customer).
Next, we split the data by Sales Order using a JSON Splitter. The JSON Splitter can use the SALES_ORDERS path to split the incoming document into individual output documents for each sales order and then write the results to an Excel file using Excel Formatter.