SAP ERP – SF Employee Central prepackaged integration: add company code for Cost Center replication
Do you replicate Employee assignments to Cost center from SAP SuccessFactors Employee Central (EC) to ERP HCM?
Then you need to ensure that only the Cost centers that belong to the Employee’s company could be assigned to Employee in EC.
This input validation in EC prevents the replication error in ERP HCM.
This blog explains how to adjust the prepackaged integration “SAP ERP to EC Cost Center Replication” to replicate the ERP Cost Center fields Company Code and Person Responsible to EC Cost Center.
If the Company code is provided in EC Cost center object, you could filter by company in Employee Job Info or/and Position portlet to assign the valid cost center to the employee/position.
Replication of Person Responsible field is optional.
Example: Cost center “UK Marketing” is assigned to Company “Ace UK” via replication as described in the blog:
Validation in Position Portlet based on assigned Company:
You use SAP ERP system to maintain the Cost center information. This might be a separated SAP ERP FIN system or an unified SAP ERP instance.
You need to synchronise the Cost center information between SAP ERP system and SF EC system.
You use the prepackaged integration “SAP ERP to EC Cost Center Replication” for replication of Cost center information from SAP ERP to SF EC system.
You could use Hana Cloud Integration (HCI) or BOOMI middleware prepackaged content. This blog describes configuration in HCI.
You configure SAP SuccessFactors Employee Central system to manage employee data.
You assign Cost center, replicated from SAP ERP, to Employee in SF EC and replicate this assignment to SAP ERP.
You use the prepackaged integration for Employee master data replication “EC to EC Payroll Employee Replication” and for the Employee Organizational assignment “EC to ERP Organizational Management” to replicate Employee data and Cost center assignment to SAP ERP.
Main steps to process:
1. SAP SF EC: create custom fields in Cost center object
2. SAP ERR: enable mapping of ERP field Company code to EC field Company code (if IDs are different in the systems)
3. SAP HCI middleware: set Parameters for custom fields created in EC.
1. SAP SF EC: create custom fields in Cost center object
1.1 Create custom field for ERP Company and ERP Person Responsible.
ERP field Company Code should be mapped to the EC field Company (Legal Entity) to enable filtering/validation by Company while assigning Employee to the Cost center.
This validation is important if the Employees and their Cost center assignments are replicated to the ERP.
Replication of ERP field Person Responsible is optional. This field is not validated in EC and serves for information.
The EC Cost center portlet doesn’t have standard fields for Company and ERP Person Responsible.
In SF EC system go to Administration Tools -> Configure Object Definitions
1.2 Search for “Object Definition” and “Cost Center”
1.3 In my example I create custom field cust_companyCode for Company code (Data Type: Generic Object; LegalEntity) and custom field cust_respManager
for Person Responsible (Data Type: String) in EC:
1.4 Refresh OData API ❗
In SF EC system go to Administration Tools -> Search for “OData API Metadata Refresh and Export”.
2, SAP ERR: enable mapping of ERP field Company Code to EC field Company Code
2.1 Apply SAP Note 2255967 e.g. with ERP transaction snote.
2.2 Create BADI Implementation for mapping ERP field Company Code to EC Company Code.
In my example the ERP Company Code 2000 is mapped to EC Company Code ACE_GBR.
If you use distributed system landscape and your SAP FIN system and SAP HCM (with customizing table PAOCFEC_KMAPCOMC) are in different instances you have to maintain RFC connection to your HCM instance.
Per default the BADI implementation checks the mapping in PAOCFEC_KMAPCOMC locally: iv_rfc_destination = SPACE in the coding below.
2.2.1 Call transaction SE18 -> Enhancement Spot ODTF_CC_REPLICAT_IDOCS_MODIFY
Choose ODTF_CO_REPL_IDOC_COST_CENTERS -> create Implementation e.g. ZZ_MODIFY_CC_COMPANY_ID.
2.2.2 Create Implementing Class e.g. ZCL_MODIFY_COMPANY_CODE
22.214.171.124 Go to Tab “Attributes” -> create Attribute “go_map_company_code” and refer it to Associated Type CL_ODTF_EC_MAP_COMP_CODE_EXMPL, which is provided with SAP Note 2255967:
126.96.36.199 Go to CLASS_CONSTRUCTOR and create e.g. the following code:
IF NOT go_map_company_code IS BOUND.
CREATE OBJECT go_map_company_code.
188.8.131.52 Go to Method IF_ODTF_CO_REPL_IDOC_COST_CENT~MODIFY_COST_CENTER_EXTRACTOR
Enter e.g. the following code:
IF go_map_company_code IS BOUND.
iv_rfc_destination = SPACE ).
it_sel_cost_center = it_sel_cost_center
cs_cost_centers_idoc = cs_cost_centers_idoc ).
2.2.3 Save and activate the created Implementing Class and Implementation
3. SAP HCI middleware: set Parameters for EC custom fields
3.1 In your HCI tenant go to Design. Choose “SAP ERP to SuccessFactors Employee Central Cost Center Replication” -> Configure
3.2 In Configuration go to tab “Parameters” and enter the custom fields that you created in Step 1 in EC.
3.3 Save and Deploy the changes.
4. Optional: Test the replication of Cost center with added fields
In ERP I have created Cost center OL_CC_01 in Controlling area 1000 with Company Code “2000” and Person Responsible “Olga”.
ERP Company Code “2000” is mapped to EC Company Code “ACE_GBR” in Customizing Table PAOCFEC_KMAPCOMC.
You could replicate Cost center using ALE Change Pointers or manually e.g. with report ODTF_REPL_CC.
As the prepackaged integration uses IDoc technology, Cost center IDoc is created with replicated fields:
In EC go to Manage Data .> Cost Center -> enter “OL_CC_01″.
The Cost center fields Company ID and ERP Resp Manager are successfully replicated from ERP into EC Cost Center.
Please also refer to Integration Guide „Replicating Cost Centers from SAP ERP to Employee Central” on the SAP Help Portal at http://help.sap.com/hr_integration#section2 -> SuccessFactors and SAP ERP: Core Hybrid HCM -> Replicating Cost Centers from SAP ERP to Employee Central.
Check other blogs relatedt to prepackaged integration of Cost Center: