Blog > Runtime Configuration Options in SAP AIF

Runtime Configuration Options in SAP AIF

runtime configuration options in sap aif
Krzysztof Łuka SAP Integration Architect, SAP Press Author
icon__calendar 2020-03-09

Runtime Configuration Options in SAP AIF

Through AIF’s Runtime Configuration overall performance of interfaces, queues and background jobs can be improved. In this blog, SAP Integration Consultant Krzysztof Luka explains:

  • AIF’s Runtime Configuration details
  • Alternative settings and how they affect the message processing in SAP AIF

Runtime Configuration defines the way in which the interface messages will be processed in SAP AIF.  This setting is usually used for SAP AIF interfaces using XML engine. Understanding the setup is important as it can affect the performance of the interfaces and it can have implications on   systems background jobs and interface queues.

In this blog, I will try to explain details of it, and describe the alternative settings and their effect on the way the messages are processed in SAP AIF.


Runtime Configuration is available at transaction code:


We can define multiple Runtime Configurations and use them in parallel depending on the requirements. We decide which RC should be used when calling the XML enabler method:


In case we want to send multiple messages to AIF at once (packages) we can use the following method:


Both of those methods have parameters:

  • IV_QUEUE_NS – namespace of the RC
  • IV_QUEUE_NAME – name of the RC

By passing the namespace and name of the RC we are specifying which RC should be used to process the messages.

Main configuration options

Below is the description of the available fields for configuration of RC.

  • Description – text description of the Runtime Configuration.
  • Runtime Cfg Active – decides if the particular Runtime Configuration is activated or not. If it is inactive, it will not process any messages that arrive to AIF with this RC unless a special program (/AIF/PERS_RUN_EXECUTE) is executed to process these messages
  • Create User/Creation Date/Creation Time – details on creation of the Runtime Configuration
  • Last User/Last Date/Last time – details on last change of the Runtime Configuration.
  • Background User – user which will be used to process the messages (only if Run scheduled option is selected)
  • Job class. – Priority of the job that will be scheduled to process messages (only if Run scheduled option is selected)
  • Target – name of the application server on which messages should be processed (only if Run scheduled option is selected)
  • Run Scheduled – if selected, messages will be processed in background job (size specified below)
  • Schedule packages – if selected, messages from each run will be packed into packages (size specified below) and a separate background job will be used for each package
  • Messages per Package – number of messages per each package
  • Messages per Run – number of messages per Run

Processing types

“Online” processing

If Runtime Cfg. Active is set to ‘X’ and Run scheduled option is not selected, the messages will be processed in the same work process as the one when they arrive into AIF. For example, if the message arrives to SAP system as proxy message, and from there it is redirected to SAP AIF XML engine interface (using the AIF XML enabler class), then the message will be processed in AIF in the same work process as the one in which it arrived as proxy message.

Hint: In case you need to debug your interface, this is the only mode in Runtime Configuration, that will let you do that.

Background processing

If Runtime Cfg.Active is selected and Run scheduled option is selected, then messages will be processed in background jobs scheduled by SAP AIF Runtime Configuration. In that scenario, the following settings need to be maintained as well:

  • Messages per Run – to specify how many messages should be picked for processing with background job for each run
  • Messages per Package – only in case also the option Schedule Packages is selected. Then this setting controls how many messages will be picked to each package. Package is always a part of a Run.

Example 1.

Runtime Configuration Option AIF


With this setting AIF will collect 100 messages and once they are collected in the AIF persistence, AIF will execute a background job to process all 100.


Example 2.

Runtime Cofiguration Option 2 AIF


With this setting AIF will collect 100 messages. Once they are collected, or if there are no more messages available in the AIF persistence, AIF will execute 1 main job for the Run and then this job will execute 5 jobs in parallel, 20 messages each) that will process their own package of messages.

The ‘Run Scheduled’ option gives us the possibility to process messages in background jobs, which are running in parallel. That, especially for interfaces that process many messages, can speed up the processing in SAP AIF. It can, though, also have an impact on the number of background jobs available in the system, when a larger batch of messages arrives.

There is one more option available within the Runtime Configuration, which is called ‘delayed’ background processing of messages. In that setup we have also a control on when the messages will be processed, as we are in charge of scheduling the processing job (program /AIF/PERS_RUN_EXECUTE). This mode is enabled when the ‘Run scheduled’ option is checked but the ‘Runtime Cfg Active’ setting is unchecked.

Details of this setup, as well as pros and cons for each scenario, will be described in the second part of this blog – coming soon!

Krzysztof Łuka SAP Integration Architect, SAP Press Author
SAP integration consultant at Int4. He started his career in 2006 as an SAP Sales and Distribution module consultant and later shifted to the integration area. He gained his experience in several implementation projects as SAP AIF/PI/PO/CPI consultant and ABAP developer, making systems integration topics his specialty. Since 2015 he has worked on several SAP AIF projects and is an expert in that area. He co-authored 3 books on SAP AIF, published by SAP PRESS: Interface monitoring and Error Handling with SAP AIF, Serializing Interfaces in SAP AIF, BRFplus Output Type Management in SAP S/4HANA.

Contact us

If for any reason, the thought of reaching out to us has crossed your mind, then by all means do not hesitate to get in touch with us, as we are more than happy to put to rest all of your concerns.