This blog describes how to change standard fields mapping on example of mapping of EC field “Job classification” to ERP HCM field “Work Contract” of Infotype Organizational assignment (0001).
Scenario: you use Employee Central (EC) to manage employee data and need to replicate employee data from EC to the SAP ERP HCM system.
You leverage the prepackaged Integration “Replicating Employee Master Data from Employee Central to SAP ERP” (AddOn PA_SE_IN100) to replicate the employee data to SAP ERP HCM infotypes.
ERP HCM Infotype Organizational assignment (0001) has a field Contract (or Work contract; technical field P0001-ANSVH). This field is usually used in statistical reporting.
The valid codes of this field are checked via the customizing table T542A (Work Contract) in SAP ERP.
Field Contract in SAP standard delivery is mandatory only for one country version: Canada (check setting for mandatory fields in ERP table T588MFPROPS).
Thus, you have to fill this field if you replicate Canadian employees data from EC to ERP HCM.
Currently, there is no any standard field in EC that semantically matches the ERP field Work Contract of Infotype 0001.
The prepackaged Integration for Employee master data replicates the EC field Job Classification from the portlet Job Information to the ERP field Contract of the Infotype 0001 per default.
However, in Employee Central the object Job Classification semantically corresponds to the ERP Org. Management object Job (OTYPE C). If you use Employee org. assignment replication from EC to ERP OM and PA/PD replication between Org Management and Personal Administration in ERP, the field Job Classification from the EC Job Information is replicated to the field Job key (P0001-STELL) of the Infotype 0001.
If you don’t want to replicate the EC Job Classification to the ERP field Contract you have the following options:
- Deactivate standard mapping (if you don’t want to replicate the field in ERP);
- Overwrite standard mapping with extensibility (if you need to replicate the field from EC to ERP e.g. for Canadian employees).
How to deactivate standard mapping?
In ERP HCM you can simply deactivate the default mapping in the Customizing Activity “Switches for Employee Replication Settings” by checking the checkbox Deact. mapping for ANSVH.
The report PAOCF_EC_REPLICATION_SETTINGS, which is triggered by this setting, creates two entries:
- In the customizing table PAOCFEC_MAP_MODC for GDT name “JOB_ID”, ISO code “XX” (all countries) and Code list ID “91399” (ERP customizing step: “Define Customer-Specific Country Dependency of Code Value Lists”).
- In the customizing table PAOCFEC_MAP_CC for GDT name “JOB_ID”, Code list ID “91399”, GDT code value “*” and ERP key “blank” (ERP customizing step: “Define Mapping Code Value Lists”).
The entry created in the customizing table PAOCFEC_MAP_CC deactivates mapping between the EC values of Job Classification and the field Contract of Infotype 0001; thus, the field Contract is not filled.
How to overwrite the standard mapping with extensibility?
If you want to assign the Contract to employee in EC and replicate it to ERP you can use the extensibility of the prepackaged integration to overwrite the standard mapping.
1. As there is no any standard EC field for the ERP field Contract, you can create custom field in the Employee Central portlet Job Information.
Goto “Manage Business Configuration” -> jobInfo:
In example I have created custom field custom-string10 for Work Contract in EC jobInfo.
2. Create a picklist for the new custom field based on the 2 character values in the SAP ERP HCM customizing table T542A (optional, to avoid the wrong data input).
3. Define field mapping. Go to Extensibility table in SAP ERP IMG customizing.
Map the new created custom field custom_string10 of EC node job_information to the Contract field (ANSVH) of infotype 0001.
5. Test the new mapping.
The employee is managed in EC and replicated to SAP ERP.
In EC Job Info of employee I assign code “GM” (Employee) that corresponds to the entry in ERP customizing table T542A.
The integration message transfers the code “GM” of custom field “custom_string10” to ERP.
The replication checks the extensibility table and replicates the “GM” code (Employee) to the field Contract of the Infotype 0001.
Alternatively, you may use BADI EX_PAOCF_EC_CHANGE_INFOTYPE_DA “Change mapped infotype data” if you need extended mapping logic between EC and ERP fields.
Further information is available in SAP Help portal: