Issues and considerations during Copy data from ‘n’ number of Consolidation Units into one Consolidation Unit in S/4HANA Finance for Group Reporting
In one of our customer’s SAP S/4HANA system, some of the company codes have been created based on Business lines as a result they are not actual legal entities. Hence a group of business line-based company code’s data needs to be aggregated and put it in a different Company Code to make the target Company Code as a legal entity. In this blog I will explain the issues which we have encountered during this process so that it will be helpful for those who needs to perform similar kind of activity.
Below is the consolidation structure (IDs changed). Company codes 1000 to 1050 are not actual legal entities. Once we copy all these company codes data into another company code i.e.2000, then this company code 2000 will become the Legal entity which consists of aggregated data of Company codes 1000 to 1050.Please note that company code 2000 is not in the Enterprise structure in SAP S/4HANA but created in Group Reporting module as one of the consolidation unit so the Data Transfer method filed value is “Flexible upload” and the type of consolidation unit is non-integrated.
To meet this copy requirement, we have checked if the below two possible options can meet the requirement.
Option 1: Using transaction code CXCK: Copy Transaction data: With this transaction code, we can copy data from one version to another version, one period/year to another period/year but we cannot copy data from one consolidation unit to another consolidation unit. Consolidation Unit field is available in the selection area of this Transaction Code but not in the copy area.
Option 2: We also cannot use the assignment of multiple company codes into one single common Company in the enterprise structure of SAP S/4HANA. This is due to the fact that there are some inter unit transactions exist between the company codes 1000, …1050 and we cannot eliminate the same in SAP S/4HANA system. Hence, we need to transfer these company codes data into Group Reporting module where we can perform Inter unit eliminations. That means data will get copied to Consolidation Unit 2000 after elimination of inter Unit Transactions within the Consolidation Group GR10 (please see the above picture)
Due to the above limitations we could not use any of the above options and finally we decided to go for custom development through ABAP Program. Broadly the following objects have been created for this purpose.
- Developed one ABAP Program
- Selection Screen for the user to select the values
- Transaction Codes for the users
Created selection screen similar to the selection screen of Transaction Code CXCK.
In CXCK Transaction screen the consolidation unit is showing under settings area where we can select the Consolidation units for selection of Data but here in our case the consolidation unit is in the area of copy section so that data gets copied From Consolidation Unit To Consolidation unit
Note: You may have different fields in the selection screen as per your requirement and ensure the corresponding code is written for all the fields as required.
In the process of testing the program, we have faced several issues and I would like to explain those issues and the resolutions there of. Here I am not providing the ABAP code as the intention of this document is to explain on the issues we came across during development and testing of the copy Program.
Issue # 1: At least one Target key field value should be different
Change the ledger ID:
As a standard rule, while copying the data, the values for FROM and TO should not be the same and at least one key field value should be different for the target value.
While extracting data through Data Monitor- Release universal Journal data Task, we have used the ledger C1 but when we do the copy, we have selected different ledger C2. This is required as there should be a different value for at least one of the key field in ACDOCU table. Please note that our source table and the target table is same i.e. ACDOCU.
Ledger is not available in the selection screen as that is not meant for the users to select but through program the value gets changed from C1 to C2
Issue #2: Change the Record Type form U to 0
During testing the BCF task, we faced another issue and found that there is an issue with the record type field value. System writes the record type U for the release data task and 0 for the flexible upload.
Since the consolidation unit 2000 is a non-integrated consolidation unit, system expects record type 0 but as we are copying data from integrated consolidation units, system copies the record type U as it is. Hence, we have changed the record type value from U to 0. We have achieved this requirement by adding the relevant code in the same program.
Filed name in Table ACDOCU is RRCTY
U= Replication from Universal Document
Issue # 3: Change the Trading partner value
Scenario: As per the business requirement, any company code may do transactions with any other company code, so the intercompany transactions happens with any combination of company codes.
If the intercompany transaction happens between the company codes which are in Group GR10 then there is no issue with this copy program as eliminations happens at GR10 Group level itself. However, if the intercompany transaction happens between the GR10 Group Company codes and GR20 Group company codes then there is a problem when elimination at GR20 Group Level.
For example, if the transaction happens between Company Codes 1000 & 2010:
|Consolidation Unit 1000 Side of the Transaction:|
|Before data copy||After Copy|
|1000 à 2010 (Actual Transaction)||2000 (after Copy data from 1000 to 2000) à 2010|
|Impact: Nil (Trading partner ID remains same after copy)|
|Consolidation Unit 2010 Side of the Transaction:|
|Before data copy||After Copy|
2010à 1000 (Actual Transaction)
2010à 1000 After copy data from 1000 To 2000
Impact: Yes (There is impact, we need 2000 instead of 1000 to get the eliminations done. This is because we don’t have Consolidation unit 1000 in GR20 Group)
Please note that GR10 Group is not part of Top group as we are sending all GR10 Company codes data to Consolidation Unit 2000.
Solution: In the program, we need to change the trading partner from 10xx to 2000 for the intercompany transactions with Company Codes 20xx
When you want to copy data from one consolidation unit to another consolidation unit, after copying the data please run all the tasks which are in both Data Monitor and Consolidation Monitor to ensure that the target Consolidation Unit got the required data. Also decide when you want to copy the data i.e. for example before inter unit eliminations or after eliminations. Also please ensure to have some data validation controls and data reconciliation reports etc. as part of total solution.
I hope you understand the business scenario and the solution, and I look forward to receive your comments and I am happy to answer all your queries, if any.
To my manager Gummadi Venkateswara Rao who helped me in my first blog(https://people.sap.com/vr.gummadi)