OutSystems Platform allows you to update data in your SAP system. To implement this, you take the following steps:

  1. Create a connection to the SAP system in your application;
  2. Import the SAP remote function that you need for changing data;
  3. Use the SAP remote function in your application.


We have an OutSystems application called Order Management, where users can access the customer data stored in SAP.

We want to extend this application so that users can also change customer's data through the OutSystems application.

Create a Connection to SAP

To use an SAP remote function that updates customer records, you need to get its definition from your SAP system. For that, you first need to create the SAP connection. Do this by following the steps described in Get Data from an SAP System.

Import the SAP Remote Function

After the connection is created, you need to import the definition of the remote function from SAP.

To update Customer records, we need the 'BAPI_CUSTOMER_CHANGEFROMDATA' remote function. To add it to our SAP connection, right-click on the connection and select 'Add SAP Remote Functions'. Choose the function and click 'Finish'.

As a result, the following is added to your application:

When modifying data, it's common to use the credentials of the current user, instead of a service account. Learn more about how to authenticate against an SAP System.

Use the SAP Remote Function

You can now create the logic and edit customers in your application. Use the 'Preparation' action to implement the logic to fetch a customer from SAP.

To get the customer to edit, assign the following values to a variable with the 'BAPICUSTOMER_IDRANGE' data type:

Then put a variable in a list and use it in the 'Bapi_Customer_Getlist' action:

The credentials used in this call are the ones defined in the connection set up. See other authentication methods.

Edit in Your Application and Change in SAP

You can now edit customers on a web screen:

  1. Add CustomerNo as input parameter of the web screen;
  2. Use the 'Bapi_Customer_Getlist' SAP remote function in the Preparation to get the customer. Learn how to get data from SAP;
  3. Use a form to edit the customer data:
    1. Set BapiCustomerGetlist.Addressdata_Out.Current as source;
    2. Add the fields you want to edit.
  4. Add a 'Save' button to the screen. Set its Destination to a new screen action called 'Save';
  5. In the flow of the 'Save' action, use remote function 'BapiCustomerChangefromdata' to update the customer record in SAP:

In the 'BapiCustomerChangefromdata' remote function, make sure you pass the following values also:






<form name>.Record

Here you have map the fields from the form to Pi_Address.

Set 'Langu' to "EN".







In some cases, you may need to transform values into a format that SAP accepts. Learn how to troubleshoot an SAP integration.

Publish and open in the browser.

See Also

Get Data from an SAP System | Troubleshoot SAP Remote Functions