Data Replication in SAP CFIN: A Complete Guide
With the introduction of SAP Central Finance (CFIN), it has become easier for organizations to experience the new functionality of S/4 HANA. In my previous posts, I have covered a lot about the process of Central Finance and it’s complete architecture. Today, we will discuss the accounting data replication in SAP CFIN.
As you are already aware that SAP Central Finance has four different systems in its landscape. These are legacy source systems, the SLT system, the MDG system, and the target CFIN system. I have discussed these systems in detail in the Introduction to CFIN article.
If I talk about the CFIN Architecture, it mainly consists of Key Mapping, Value Mapping, Initial Load, and Replication. All four processes should be processed in the same order. Key Mapping and Value mapping are part of data mapping in CFIN. You need to maintain these mappings in the CFIN system before running the initial load or replication.
Once the data mapping is done, it is mandatory to execute the initial load. It is a process of taking over the existing balances from the source system to the target (CFIN) system.
Similarly, Replication comes after the initial load. A replication in SAP CFIN is a process of replicating or transferring the accounting documents to the target system in real-time. In a nutshell, it means as soon as you post an accounting document in the source system, it will replicate to the CFIN system immediately.
So, without further delays, let’s start the tutorial on the data replication in SAP CFIN.
Table of Contents
Data Replication in SAP CFIN: Pre-requisites
As already mentioned, the replication process is the last step in the SAP Central Finance. Before activating it, you need to run other mandatory processes like:
- Activate the function modules required for CFIN functionality
- Maintain the CFIN configuration
- Maintain the Key and Value Mappings
- Execute the Initial Load
Step 1: Activate Replication in the SLT system
Once the initial load is done, the replication needs to be activated in both the source and the SLT system. In the source system, you need to enable the ‘Initial Load Completed‘ checkbox in the table VCFIN_SOURCE_SET.
Whereas an SLT consultant can enable the replication in the SLT system. The SLT system extracts the data from the source system and stores it in the staging tables. The following staging tables are used for storing the transaction data:
- CFIN_ACCHD – This table stores the header data details of an accounting document from the source system.
- CFIN_ACCIT – This table stores the line items of an accounting document from the source system.
- COBK – This table stores the details of Controlling documents flowing from the source system.
- AUFK – This table stores the cost object details.
Step 2: Maintain Data Mapping
I have already written a brief article explaining the process of data mapping and how you can maintain it using a data mapping tool via tcode FINS_CFIN_MAP_MANAGE. Please note that you need to create the source system ID in the configuration before you can maintain the mapping.
I have a source system that is an SAP ECC system. I have created a source system ID DRA100. While maintaining the key and value mappings in the SAP CFIN system, I need to do it for the source system DRA100 in the data mapping tool.
Company Code Mapping
The first thing I’ll do is to maintain the company code mapping. In my source system, the company code is 1300. But I need to map it to a company code in the target system. I’ll map it to the target company code US45.
As you can see in the screenshot above, I have mapped the source company code 1300 to the CFIN company code US45. Therefore, whenever you post an accounting document for company code 1300 in the source system DRA100, the system will replicate it in the company code US45 in the target system.
Document Type Mapping
You also need to map the document types in central finance. For example, I will be posting a vendor invoice in the source system that has a default document type KR. You must map this document type to a document type in your target system.
What I have done here is that I have mapped the document type KR from the source system to the document type KR in the target system. In case, you are using a custom document type for vendor invoice, then you can map it here. To make it simple, I want the same document type to replicate in SAP CFIN in this example.
GL Account Mapping
Since I’m going to post a vendor invoice in the source system, it will have an expense line item. I need to map this P&L Account to a GL account in SAP.
I have mapped the sourcing expense GL account 871013 (Co. Code 1300) to the expense GL account 77000000 (Co. Code US45) in the CFIN system.
Cost Center Mapping
Since it is a vendor invoice with an expense line item, you need to provide a cost center to book the costs. So, I also need to map the cost center that I’m gonna use in the source system to the target system cost center.
I have mapped the cost center 13155240 from the source system DRA100 to the cost center 1001 in the target system.
Vendor Mapping
For a vendor invoice, it is mandatory to map all your vendor codes as well. In this example, I’m using the vendor code 8300242.
So, I will map this vendor code to the vendor code 2100000000 in the SAP CFIN system.
Step 3: Post an accounting document in the source system
After maintaining all the mappings, it is time to test the replication process. For this purpose, you need to post an accounting document in the source system DRA100.
It’s a simple vendor invoice with only 2 line items, i.e., a vendor and an expense line item.
As you can see, both the line items have an amount of 1500 USD.
The document number is 1900000003, company code 1300, and fiscal year 2019.
Step 4: Check the document replication status in AIF
In the Central Finance system, you can access the Application Interface Framework (AIF) tool using tcode /n/aif/err.
You can go through my tutorial on how to use AIF in SAP Central Finance.
In the AIF, you can check the status of the source document. For example, the vendor invoice document that we have posted in the source system has been successfully replicated to the SAP CFIN system. The status of the source document is in GREEN color.
Also, you can see the document number 1900000000, the fiscal year 2019, and company code US45 in the Message Text column. This is the document number of the replicated document in the target system.
In case, if the replication is unsuccessful, then you need to check the error and resolve it to proceed further. I have also explained this scenario in my tutorial post on AIF.
Step 5: Display the replicated document in the CFIN system
Now you know that the replication of the accounting document from the source system is successful. You can display the final document in the SAP CFIN system using tcode FB03.
Enter the document number 1900000000, the fiscal year 2019, and company code US45 in FB03.
You can display the document with the CFIN values. You have Cost center 1001, GL account 77000000, and Vendor Code 2100000000.
If you click on the header data section of this accounting document, you can view the source system details like the sender company code, sender document number, and sender fiscal year.
These are the source system company code, document number, and Fiscal year that we have created in Step 3.
I hope you have liked this tutorial on data replication in SAP CFIN. I post these kinds of tutorials every week. Please follow my blog and share it with others. Stay tuned for more!!!