Replicating Foundation Object Data from SAP S∕4HANA to Employee Central

Objectives

After completing this lesson, you will be able to:
  • Identify Employee Central entities for foundation object data entities
  • Define field mapping for foundation objects
  • Define value mappings for foundation objects

Standard Foundation Data Related Employee Central Entities

You can migrate foundation objects as per your requirement by configuring the transformation template group, transformation template, and developing the BAdI implementations.

This process involves extracting data of foundation objects from the SAP S/4HANA system and migrating it to SAP SuccessFactors Employee Central (EC) using the program ECPAO_FO_OBJ_EXTRACTION. It replicates the foundation objects data by using the transformation template group configurations defined using the view cluster VC_ECPAO_MAP_FO.

SAP has delivered a standard set of foundation objects (Pay Component, Pay Component Group, and Company), sample content, and example BAdI implementation. Also, you can also migrate extra foundation objects as per your requirement by configuring the transformation template group and transformation template and developing the BAdI implementations.

The following table shows the EC Entity details that are packaged with the service pack, sample content, and a sample BAdI implementation. The replication currently works only with web service transfer mode.

EC EntityEntity Name in ECEC Entity Description
WS_FO_LEGFOCompanyEC Entity for FO Legal Entity
WS_FO_PCFOPayComponentEC Entity for Pay Component
WS_FO_PCGFOPayComponentGroupEC Entity for Pay Component Group

Here are the details of the sample content delivered from SAP:

Legal Entity

EC FieldEC Field DescriptionERP TableERP FieldBAdI Mapping
Country/RegionCountry/RegionT001LAND1-
currencyCurrencyT001WAERS-
externalCodeLegal Entity IDT001BUKRS-
name_defaultValueLegal Entity NameT001BUTXT-
standardHoursStandard Weekly Hours--Yes
startDateStart Date--Yes
statusStatus--Yes

Pay Component

EC FieldEC Field DescriptionERP TableERP FieldBAdI Mapping
externalCodePay Component ID--Yes
canOverrideCan Override--Yes
currencyCurrency--Yes
descriptionDescriptionT512TLGTXT-
endDateEnd DateT511ENDDA-
descriptionDescriptionT512TLGTXT-
statusStatus--Yes
payComponentTypePay Component Type--Yes
startDateStart DateT511BEGDA-
isEarningIs Earning--Yes
frequencyCodeFrequency--Yes
recurringRecurring--Yes
isEndDatedPaymentisEndDatedPayment--Yes
maxFractionDigitsMaximum Decimal Places--Yes
nameNameT512TLGTXT-

Pay Component Group

EC FieldEC Field DescriptionERP TableERP FieldBAdI Mapping
externalCodePay Component Group ID--Yes
nameNameT52D6WGRTX-
descriptionDescriptionT52D6WGRTX-
startDateStart Date--Yes
endDateEnd Date--Yes
statusStatus--Yes
showOnCompUIDisplay on Comp UI--Yes
useForComparatioCalcUse for Comparatio Calculation--Yes
currencyCurrency--Yes
useForRangePenetrationUse for Range Penetration--Yes
payComponentFlxPay Component ID--Yes

In addition to the preceding sample content, a sample implementation has been provided as part of the implementation example class CL_ECPAO_MAP_FO_DATA_VIA_BADI, to support the standard foundation objects replication.

Transformation Template Group and Templates for Foundation Objects

To enable the data extraction programs to extract the correct SAP S∕4HANA information for the correct Employee Central fields, you must map SAP S∕4HANA fields to Employee Central fields.

To map fields, you go to the Define Field Mapping for Foundation Objects Customizing step, which has the VC_ECPAO_MAP_FO view cluster assigned. The configuration in this view cluster is done in several steps:

  1. Create at least one transformation template group. A template group bundles all field mappings that you want to use when running the data extraction program. This is the entity that you specify on the program selection screen. From the transformation template group, the data extraction program determines the information that it must extract data from SAP S∕4HANA fields and map it to Employee Central field IDs.

  2. Create at least one transformation template for your transformation template group. A transformation template groups information from the SAP S∕4HANA system that belongs together logically. It is the SAP S∕4HANA counterpart of the Employee Central entity.

  3. Define a primary mapping for each of your transformation templates. This means that you choose Employee Central field IDs from the Employee Central entity assigned to the transformation template. Then, you map suitable SAP S∕4HANA fields to these Employee Central field IDs

Primary Field Mapping for Foundation Objects

You can choose Employee Central fields from the Employee Central data model that you've uploaded to the SAP S∕4HANA system. You then map suitable SAP S∕4HANA fields to these Employee Central field IDs.

Context

To define a field mapping for each transformation template, go to the Primary Mapping view of the VC_ECPAO_MAP_FO view cluster.

Note

There are predefined standard mappings, which are automatically added to the templates you use and aren't available for configuration in this Customizing activity.

Here's how to map fields:

Procedure

  1. Choose an Employee Central field from the assigned Employee Central template.
    • For Mapping mode as Table Mapping, the system allows to choose only a set of approved tables.

      Hint

      The system table ECPAO_TABLE_LIST contains the currently supported configuration tables.

    • While creating a foundation object entity, a primary table is assigned along with one key field, which identifies the foundation object.

    • When configuring the table mapping for the above FO entity, only approved tables with the same key as defined previously must be used. Approved tables with different keys cannot be used.

  2. Map each Employee Central field to an SAP S∕4HANA field using a suitable mapping mode:
    • When you select the mapping mode Table Mapping, you can map an Employee Central xxxxx.
    • When you select the mapping mode BAdI Mapping for Integration/Migration to EC, you can use an implementation of the Mapping of EC and ERP Data for Data Replication to EC (EX_ECPAO_EMP_DATA_EXTRACT_OUT) BAdI to define the field mapping.
  3. If the value from the SAP S∕4HANA field needs to be converted into an Employee Central value, enter the value mapping entity that you have defined in the Define Value Mapping Entities Customizing step.

    Note

    You can define the value mappings for this entity directly from here by choosing Define Value Mapping Entries.

Use the Sample Content for Foundation Objects

SAP provides sample content for different use cases in the Define Field Mapping for Foundation Objects customizing step, which you can copy and adapt to your needs.

You can copy the sample content for the required foundation objects according to your needs.

Steps

  1. Create a transformation template group and select the sample content that you want to use for it.

  2. In your transformation template group, create transformation templates for all entities you want to use and assign the corresponding Employee Central entities. You can create the transformation templates by choosing Copy Sample Content at each transformation template level. You can use the Copy Sample Content button to copy the transformation templates and the corresponding Primary Mapping configurations for the relevant Employee Central entities. To see the entries copied to the Primary Mapping view, to save and view all the configurations, choose Save. Which field mappings are copied depends on the sample content you have selected for the transformation template group.

  3. If needed, adapt the copied sample content to suit your requirements. You can, for example, delete mappings that you don't need, change the mapped field, or add new mappings.

Result

Once you have made custom entries in the Primary Mapping view (either by copying and adapting the sample content or by making your custom entries from scratch), you can no longer copy the sample content. If you have defined custom mappings and decide that you want to use the mappings provided by the sample content instead, delete the transformation template and create a new template.

If you have already defined field mappings in the previous releases, you can continue to use them without any changes. However, if you want to replace your custom mappings with mappings provided with the sample content, create new transformation templates for all entities for which you want to use the sample mapping. Then continue as described previously. Remove your existing transformation templates for the same entities from the transformation template group or clear the Is Active checkbox for them so that the new transformation templates are used instead.

Value Mapping Entities and Details

A value mapping entity combines a set of value mappings for a specific purpose.

Context

You define value mapping entities in the Define Value Mapping Entities Customizing step (view V_ECPAO_VALUENTY). The easiest way to create value mapping entities is to copy the sample entities by choosing the Copy Sample Value Mapping pushbutton. You can also create country specific value mapping entries and create a new value mapping entity using the Create Value Mapping Entity and Define Ctry. Spec. Value Mapping Entries pushbuttons from the primary mapping details screen.

How to copy sample value mapping content.

You'll get a list of all standard entities provided for the integration, which you can adjust to your needs.

Defining Value Mapping Details

The value mapping details actually map SAP S∕4HANA values to the corresponding Employee Central values.

Procedure

  1. Go to the Define Value Mapping Details Customizing activity (view V_ECPAO_VALENTY).
  2. Map SAP S∕4HANA keys and the corresponding Employee Central keys.

    If the value mapping entity has a picklist ID and a SAP S∕4HANA value help assigned, you can select suitable picklist values in the EC Key field and corresponding input help values in the ERP Key field.

Mapping from an SAP S/4HANA value to an Employee Central value

You can also enter the wildcard * in the ERP Key field. If only the wildcard is defined in the value mapping details, any SAP S∕4HANA value will be mapped to the Employee Central key for the field that uses this value mapping entity. If the wildcard is defined in addition to specific SAP S∕4HANA keys, the system first checks for the specific keys. If an Employee Central key is mapped to a specific SAP S∕4HANA key, this mapping is used. For all other SAP S∕4HANA values, the Employee Central key mapped to the wildcard is used.

Results

The data extraction programs can now use the value mappings. When extracting data, they will replace the SAP S∕4HANA keys by the assigned Employee Central keys if a value mapping is defined for the corresponding field mapping. If no value mapping is available, they won't map any values for the specific field and use the values from SAP S∕4HANA as they are.

Replicate Foundation Object Data from SAP S4HANA to Employee Central

Log in to track your progress & complete quizzes