During the course of Initial load and real time replication, the data moves from SAP ECC to SAP S/4HANA Central Finance system via SLT. Over the period the tables are piled up with data and will keep on getting growing so it is important to clean the tables to have better system performance.
Before we move to the clean up, process let us see what all tables require clean-up and when those tables are updated.
Clean up Programs:
- RCFIN_DEL_MIG (to clear the Migration log & CO characteristics)
- RFIN_CFIN_CLEANUP (to clear transfer tables for FI)
- FIN_CFIN_CO_CLEANUP (to clear transfer tables for CO)
- RCFIN_DEL_MIG_CO (to clear the logs from the source system of CO Preparation)
Now let us see how to do this:
When we do the set up in SAP ECC (source system) it asks for periods in highlighted column.
SM30 >> VCFIN_SOURCE_SET
The number entered here means it will retain the documents of the current period, plus last 2 months and all other documents of prior months will be deleted. If this period is 5 it means current period + 5 past periods
This will not apply to CO data unless the SAP note – 2407289 is implemented
Check the table – CFIN_ACCIT and take the screenshot of the data to validate at later stage
Now, Execute the program as below:
SE38 >> RFIN_CFIN_CLEANUP
You can select one or multiple company codes and for package size align with basis team as it depends on system capacity.
With “Commit Package size” in the report RFINS_CFIN_CLEANUP the number of deletions applied reach the specified package size value, a COMMIT WORK is called to push the data to the Database and the DB select statement works in a performance optimised way
Execute and wait for result. You will get the message of deletion with entry count.
Run the CFIN_ACCIT table again
Here the program has deleted the entries of all past periods except 3 (2 past + 1 current)
Data is selected based on CFIN_ACCIT and CFIN_ACCHD with SLT logging table created on the source and important to note that the documents which are not replicated through SLT i.e., in AIF or ACDOCA, then this program will not delete those documents.
Always use correct programs to cleanup the data and ensure to validate. This activity should be done periodically post go live of SAP Central Finance Project.
Other options are to delete the tables (if the volumes are massive) via database (Db) truncation (if system is not yet in productive use)
Important SAP notes to be referred to:
- 2684094 – Performance issues with RFIN_CFIN_CLEANUP
- 2407289 – Central Finance: Correct Keep Periods for RFIN_CFIN_CLEANUP
- 2881460 – Report RFIN_CFIN_CLEANUP does not delete records in staging tables
- 2755895 – RFIN_CFIN_CLEANUP report : Validate SLT Logging table before cleanup
- 2570722 – Central Finance: RFIN_CFIN_CLEANUP doesn’t report the number of deleted
- 2256485 – Central Finance: Correct RFIN_CFIN_CLEANUP
- 2656651 – Additional selection criteria company code for report RFIN_CFIN_CLEANUP