Skip to Content

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:

pic31.PNG


Validation in Employee Job Info based on assigned Company: only Cost centers of company “Ace UK” are proposed for assignment:
pic35.PNG

Validation in Position Portlet based on assigned Company:


pic34.PNG


Scenario:

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.

Optional:


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

/wp-content/uploads/2016/02/pic1_893058.png

      

1.2  Search for “Object Definition” and “Cost Center”

/wp-content/uploads/2016/02/pic2_892652.png.

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: 

 


/wp-content/uploads/2016/02/pic3_892655.png

/wp-content/uploads/2016/02/pic4_892654.png


/wp-content/uploads/2016/02/pic5_892656.png

1.4  Refresh OData API ❗

In SF EC system go to Administration Tools -> Search for “OData API Metadata Refresh and Export”.

Refresh Metadata.

/wp-content/uploads/2016/02/pic6_892657.png

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.

The example implementation provided in SAP Note 2255967 uses mapping in the Customizing table PAOCFEC_KMAPCOMC:
/wp-content/uploads/2016/02/pic7_892658.png

/wp-content/uploads/2016/02/pic8_892659.png

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

/wp-content/uploads/2016/02/pic9_892660.png

Choose ODTF_CO_REPL_IDOC_COST_CENTERS -> create Implementation e.g. ZZ_MODIFY_CC_COMPANY_ID.

/wp-content/uploads/2016/02/pic10_892664.png

2.2.2  Create Implementing Class e.g. ZCL_MODIFY_COMPANY_CODE

/wp-content/uploads/2016/02/pic11_892665.png

2.2.2.1  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:

/wp-content/uploads/2016/02/pic12_892666.png

2.2.2.2  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.

ENDIF.

/wp-content/uploads/2016/02/pic13_892670.png

2.2.2.3  Go to Method IF_ODTF_CO_REPL_IDOC_COST_CENT~MODIFY_COST_CENTER_EXTRACTOR

Enter e.g. the following code:

method IF_ODTF_CO_REPL_IDOC_COST_CENT~MODIFY_COST_CENTER_EXTRACTOR.
IF go_map_company_code IS BOUND.
go_map_company_code
->set_map_company_code_rfc(
EXPORTING
iv_rfc_destination
= SPACE ).

go_map_company_code->if_odtf_co_repl_idoc_cost_cent~modify_cost_center_extractor(
EXPORTING
it_sel_cost_center  
= it_sel_cost_center
CHANGING
cs_cost_centers_idoc
= cs_cost_centers_idoc ).
ENDIF.
endmethod.


2.2.3  Save and activate the created Implementing Class and Implementation


/wp-content/uploads/2016/02/pic14_892672.png

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


/wp-content/uploads/2016/02/pic15_892676.png

3.2  In Configuration go to tab “Parameters”  and enter the custom fields that you created in Step 1 in EC.

/wp-content/uploads/2016/02/pic16_892677.png

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”.

pic32.PNG

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:

/wp-content/uploads/2016/02/pic18_892682.png

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.

pic33.PNG

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:

https://scn.sap.com/community/erp/hcm/blog/2015/12/09/successfactors-employee-central-starts-transition-to-sap-hana-cloud-integration-hci

https://scn.sap.com/community/erp/hcm/blog/2015/07/16/how-to-reuse-cost-center-ids-while-replicating-cost-center-from-sap-erp-to-successfactors-employee-central

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Ibzán Campirán

    Hi Olga,

    Thank you, it was helpful, but I jave one question… Could you please explain with more details what we need to do to achieve the proper filter in Job Information Portlet and Position object using the custom field created for legal entity? All the steps decribed above were followed but the cost center list is shown complete.

    Thank you

    Kind regards.

    (0) 
    1. Olga Kreindlina Post author

      Hi Ibzan,

      Thanks for your feedback.

      To filter Cost Centers in Position portlet please call EC Admin Center -> Configure Object Definition -> Position.

      Select field costCenter -> Details.

      Add your custom field for company code e.g. cust_companyCode under Field Criteria as shown below.

      Best regards,

      Olga

      /wp-content/uploads/2016/09/pic37_1044952.png

      (0) 

Leave a Reply