Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 

In this blog I would like to give you an overview, which steps are required to activate background RFC (bgRFC) for the AIF processing in your S/4HANA Central Finance system. 

The SAP Application Interface Framework (AIF) is an interface, which allows you to develop and monitor interfaces as well as execute error handling in a single framework residing in your SAP backend system. In S/4HANA Central Finance the AIF is used for the asynchronous processing of documents transferred from source systems to Central Finance.

In the SAP AIF different runtimes for processing of messages are supported. So far the classic “background jobs generated by the XML runtime using jobs with queued bgRFC” (AIF background jobs) was the only supported variant in SAP S/4HANA Central Finance. Starting from S/4HANA 2023 you can also switch to the “XML runtime using background RFC” (bgRFC) to process AIF messages for the replication object for FI/CO postings. Depending on your scenario you might see a positive impact on the performance of the AIF message processing. 

What needs to be done to activate bgRFC for your Central Finance interfaces?

The very first step is that you import the necessary AIF configuration by executing transaction /aif/content_extract and provide Deployment Scenario = SAP_AIF_0017. This will introduce the new AIF interfaces AC_DOC, AC_DOC_CHG and AC_DOC_TMP with version 10, which work with AIF bgRFC runtime. You can cross check in /aif/cust, SAP Application Interface Framework -> Interface Development -> Define Interfaces using the namespace /FINCF if you see the version 10 of the interface. 

In the Central Finance section of the IMG there is the folder “AIF Runtime Configuration”. In this folder all required activities can be found. I will describe each of the activities in more detail and start with the activity “Assign Default bgRFC Subprocess to Replication Objects”.

marlene_katzschner_0-1709049475826.png

Before you can assign the default subprocess, you should decide, on which granularity you would like handle the processing of the AIF messages. You have to set up at least one default subprocess. Better would be if you define one default subprocess per replication object and additional subprocesses on finer granularity.

From our internal testing we realized that the level of initial load group is a good granularity for defining subprocesses for the AIF accounting interface, because it is not generating to much overhead for subprocess maintenance, activation etc., but it allows you to stop the AIF processing without stopping the processing for too many logical system/ company codes combinations at once.

Step 1: Define RFC Destination, Process and Subprocesses

In Central Finance you define the settings for AIF bgRFC. This means, you tell the system, which subprocess shall be used for a specific AIF interface in Central Finance. The AIF XML runtime using background RFC (bgRFC) uses details which are defined in the bgRFC configuration.

That why it is important to start with the bgRFC configuration first, then you do the setting for the AIF processes and subprocess, before you do all the required setting in Central Finance.

marlene_katzschner_0-1709120109060.png

Start to maintain the Inbound Destination in the bgRFC configuration. Call transaction SBGRFCCONF and add your destination here and you have to add the prefixes, which you use in the subprocess. This can be done directly or in a later step. The destination will used when you define your subprocesses.

The next step is to define the AIF subprocesses to be used. But subprocess belong to processes, so you have to define a AIF process first and then the subprocesses. To do so use transaction /AIF/CUST. You navigate to System Configuration -> Configure AIF bgRFC Runtime -> Define Process. Next step is to define at least one subprocess for the newly defined Process using Define Subprocess. Here it is important that you use the inbound destination that you created in the bgRFC Connection in the step before. Maintain the prefixes for each of the queue

Here you have an example of the process configuration that we use in our internal test system. You see that we defined a separate subprocess per logical system and initial load group and named the subprocess accordingly. This is not necessary, but helps you when you assign the subprocesses in the following steps. You can reused the same RFC destination and the same queue prefixes for different subprocesses. If you did not add the prefixes in bgRFC monitor earlier, you have to do this now,

marlene_katzschner_2-1709121380678.png

As a last step I recommend that you once more carefully compare that the destination and the prefix in the inbound destination of the bgRFC configuration with the details in the subprocess. If the combination of the prefix and the RFC destination is not found in the bgRFC configuration, the message cannot be processed in AIF. Here is again my example. You see on the left side under Destination "CFIN_BGRFC" and on the right side my prefixes. This is the same I maintained for the subprocesses

marlene_katzschner_1-1709120838925.png

Step 2: Assign Default bgRFC Subprocess to Replication Objects

This step is the first Central Finance specific step. Before you activate bgRFC for your interface, it is important to maintain a default subprocess for your replication object, otherwise the AIF message cannot be processed in your Central Finance system. This is different compared to background jobs, where a default was predelivered. 

You do this in the customizing activity AIF Runtime Configuration -> Settings for bgRFC -> Assign Default bgRFC Subprocess to Replication Objects. In the list you see all replication object, that support the AIF processing using bgRFC in Central Finance.

marlene_katzschner_3-1709049524530.png

Optional Step 3: Assign Specific bgRFC Subprocess for Accounting Interface

As mentioned earlier, it is recommended to use different subprocesses for different logical systems and/ or company codes to allow activation and deactivation of AIF processing on a fine granular level. This is recommended e.g. for the IDR initial load, because with this setup you can easily stop processing for a specific logical system or company codes, while the online replication is still running for your other logical systems or company codes.

The relevant settings are done in the customizing activity AIF Runtime Configuration -> Settings for bgRFC -> Assign Specific bgRFC Subprocess for Accounting Interface. If you compare this step for bgRFC it with AIF background jobs then this is same what you do in the customizing activity “Assign AIF Runtime Configuration Group for Replication Object”.

In picture below you see that I assigned different company codes to different subprocesses. The last entry is the fallback for all other company codes from the specific sender logical system.

marlene_katzschner_4-1709049524531.png

Step 4: Activate AIF bgRFC for Existing Interfaces

This step I see as last step in the sequence, because you should define the default subprocess before you activate the bgRFC processing for a specific interface to avoid processing errors.

As long as you do not set the indicator for any of the AIF Accounting Interface (AC_DOC, AC_DOC_CHG and AC_DOC_TMP) the interface still uses the background jobs for processing. Once you have completed the configuration described in Step 1 to 3, you can set the indicator “CFIN: bgRFC Active Indicator” in AIF Runtime Configuration -> Activate AIF bgRFC for Existing Interfaces to activate bgRFC for the interface. 

Note:
When this flag is set, then the interface version 10 is used. This means that you have to use the interface version 10 to select errors in the AIF error monitor and in the AIF interface monitor. This means, that you also have to add additional entries for the new interface in the customizing activity Settings for Accounting Document Replication -> Assign AIF Recipients to Accounting Interfaces. The AIF messages which were created before the switch to bgRFC are displayed under interface version 2 (AC_DOC and AC_DOC_CHG) and interface version 1 (AC_DOC_TMP). 

You can easily switch back to the AIF processing using background jobs, but you have to be aware, that then again the AIF messages use the previous interface version and you have to adjust your search in the AIF error monitor and the AIF interface monitor again. 

The switch from AIF background jobs to AIF bgRFC processing and back has no impact on the Fiori apps Manage Pending Journal Entries , Manage Temporary Postings and Manage Pending Journal Entries - Message View

Step 5: Activating/ Deactivating the AIF Processing per Subprocess

When do you deactivate AIF processing for an interface? The typical scenario for deactivation of the AIF processing is, that SLT was stopped and you have a large number of AIF messages, which have be transferred using a SLT initial load (this approach we use in the IDR initial load). In this case stop the AIF processing for the subprocess in customizing activity AIF Runtime Configuration -> Settings for bgRFC -> Deactivate Processing per Subprocess. To restart the AIF processing again, remove the indicator and restart processing of all messages for the specific subprocess using the report FINS_CFIN_AIF_BGRFC_RESTART. 

 
Further links:

Online help for Central Finance

Online help SAP Application Framework

Online help for Plan Data Replication