Skip to main content

Change data in SAP

Streamline your SAP order management by automating requested delivery date updates. This Action Flow eliminates the need for manual adjustments, allowing you to automatically postpone or modify delivery dates based on specific criteria, such as a customer's payment status or order category. By integrating Celonis data directly with your SAP system, you can ensure your logistics stay synchronized with real-time business conditions without manual intervention.

The following Action Flow demonstrates a complete automation cycle—from identifying date discrepancies to executing updates in your ERP. The process consists of three core stages:

  1. Data Extraction (Celonis): The flow begins by querying your Celonis Data Model to identify specific Sales Orders. In this example, we retrieve the Order Number, current Requested Delivery Date, and Customer Name.

  2. Logic and filtering: To ensure only relevant records are processed, a filter is applied. This stage isolates orders for specific customers (e.g., BASF SE) and narrows the scope to deliveries scheduled within a specific timeframe (e.g., the next 30 days).

  3. SAP Write-Back: For every record that passes the filter, the flow triggers an update in SAP. It uses the addDays and formatDate functions to shift the delivery date by a set increment and ensure the date string is compatible with SAP’s required format.

55707009.png

Below you will find the step-by-step guide for configuring each module of the above Action Flow.

To get the data you need to change a specific delivery date in a sales order you have to set up the Get Rows module. All information on how to do it can be found here. We use some Demo Data here as an example, getting Sales Order Numbers (VBAK.VBELN), requested delivery dates (VBAK.VDATU) and the corresponding customer name (KNA1.NAME1).

In addition we already filter here for the customer with the name BASF SE to keep the amount of orders we find small. So we just want to change the delivery dates of the customer BASF SE.

55706906.png

In your use case, you may wish to access data from a different source (i.e. not Celonis) like SAP, email, spreadsheet, etc. and push that information to your Celonis data model. To do so, you would need to replace this Celonis "Query Data" action with the module that corresponds to your chosen data source.

Row Limit

Don't forget to specify the Row Limit - the row limit defines the maximum of rows in the result so make sure it is set to a limit high enough. The default value is 50.

Configuration:

Action Flows Module: Celonis

Action: Query Data

55707010.png

To change the sales order in SAP you have to connect to SAP. All information on how to do it can be found here. After connecting you can choose in the section Field what you want to change within the sales order. As we decided to change the requested delivery date we have to choose this in the list. When ticking the box two new fields will pop up.

Order Number: This defines which order we want to change. We choose the Sales order item created in the module before

Requested Delivery Date: This field lets us adjust the date. We can do this by adding days on the current delivery date using the addDays function. In our example we postpone the delivery by 3 days.

Dates in SAP

When using dates in SAP one has to be aware of the right format which is YYYY-MM-DD or YYYYMMDD other formats will cause problems. Use the formatDate function provided to bring every date in the right form.

55706910.png

Configuration:

Action Flows Module: SAP

Action: Change Sales Order

55707011.png

To make sure to not change every requested delivery date of BASF SE in the database we set up a filter defining some criteria for changing the sales order. In our example we only want to consider sales orders which have a requested delivery within the next month.

55707012.png

Related topics