Sometimes you encounter problems while integrating your application with SAP. OutSystems Platform includes features and tools that help you to troubleshoot those problems.

You can troubleshoot your SAP RFC calls by:

Check the Logs

If a call to an SAP Remote Function results in an exception, you can find it the Integration Log, in the environment management console.

To access the Integration Log, go to the 'Monitoring' menu, and select 'Integrations'. Filter by 'SAP' in the 'Type' dropdown.

This logging shows all requests made to SAP. In case of error, the 'Error' link is displayed to inspect for further information.

If you need more details on what is sent and received from SAP, change the logging level of the SAP connection:

  1. Select 'Factory' at the top of the page;
  2. Choose 'eSpaces' and select your application module;
  3. On the 'Integrations' tab, click on the SAP connection to edit it;
  4. Set Logging Level to 'Full'.

Requests and responses are now fully logged and new logs for calls to SAP have always a link:

Click on the link and press the 'Download Trace' button (at the bottom of the page).

Notice that, output parameter values may be not logged if the SAP execution fails, because they simply are not sent back.

Debug Calls to SAP

OutSystems Platform allows you to debug the calls to SAP remote functions. This allows you to validate what is being sent and received. Learn more about debugging.


In this example, we will troubleshoot the 'SAPCustomers' application module that raises an exception when it tries to get the customer from SAP.

Using the Logs

Since the message returned from SAP isn't explicit enough to understand the problem, check the logs to see the complete trace:

  1. Open the environment management console;
  2. In the Monitoring screen, select 'Integrations';
  3. Set Type to 'SAP' and eSpace to 'SAPCustomers';
  4. Press 'Filter';
  5. In the list, look for the line of the SAP remote function call with the 'Error' link. Click on the link.

The complete error message is displayed and some other info, like the SAP remote function that generated the error.

By looking at the message, it's evident that the login credentials are not valid.

After fixing to the right credentials, publish and execute the application again.

Now, the list screen is displayed, but empty. In SAP there are customers, so they should be displayed here also!

Since there is no error message returned from SAP, check values sent and received from the SAP system.

For that, debug the application:

  1. Add a breakpoint in the 'BapiCustomerGetlist' action;
  2. Start the Debugger. Learn how to Start the Debugger;
  3. Open the application in the browser;
  4. When the debugger stops at the breakpoint, examine parameter values returned by SAP;
  5. In the 'Return' parameter, there's a message that the 'IdRange.Sign' value is not valid.

Fix the parameter value with the value expected by SAP.

Common Issues

Getting Errors about Wrong Parameter Values

Possible Cause 1:

A typical reason for parameter errors is that SAP expects text identifiers with leading zeros. Normally, integer identifiers are automatically converted to text without leading zeros.

Example: In SAP, an order number has the format '0000001000'. However, you display it on the screen in a more readable format: '1000'. So whenever you send that value to SAP you must add the leading zeros.

Resolution 1:

When using BAPIs, make sure you correctly format identifiers before sending to SAP, i.e., with leading zeros.

Possible Cause 2:

Another possible reason is when you are working with translated values from SAP.

Example: A sales order document type is displayed to English users as 'OR'. The internal SAP value is 'TA'. This value is translated automatically by SAP when returning values. When sending back the record, the document type has to be translated back to 'TA' or, otherwise, SAP raises an error.

Resolution 2:

When using SAP remote functions, you need to set parameters with SAP internal codes, instead of the translated ones.

Implement conversion functions to convert types before sending them to SAP is a good approach.

See Also

SAP Connection | SAP Remote Function