Replicating Organizational Data from SAP S∕4HANA to Employee Central

Objectives

After completing this lesson, you will be able to:
  • Import metadata for web-service based replication
  • Configure replication of language-dependent fields between Employee Central and SAP S∕4HANA
  • Define organizational data-related settings for your Employee Central company
  • Define field mapping for organizational data
  • Define value mappings for organizational data

Metadata Requirements and Restrictions

Use the Import of Metadata from Employee Central Using XML File(ECPAO_ECTMPL_METADATA_WRITER) program to import metadata for web service-based data transfer.

Context

Using this program, you can import entries and delete entries that you have imported for a specific Employee Central instance and template.

You can't delete metadata in the SAP S∕4HANA system that you have already used for field mappings. Otherwise, your mappings become invalid. If you try to delete metadata that is used for field mappings, you receive an error message.

SAP SuccessFactors Employee Central Instance Definition

In the SAP S∕4HANA system, define an ID that represents your Employee Central configuration. The ID refers to the metadata that you use in Employee Central and to basic settings for data transfer between SAP S∕4HANA and Employee Central.

Import Metadata from Employee Central

To define customer-specific settings, you use the Customizing activities and Business Add-Ins (BAdIs) in the integration of SAP S∕4HANA and SAP SuccessFactors Employee Central (ECS4HCM) add-on.

In your SAP S∕4HANA system, go to the Customizing: Execute Project (SPRO) transaction and choose SAP Reference IMG. In the SAP Customizing Implementation Guide structure, openPersonnel ManagementIntegration with SuccessFactors Employee CentralBusiness Integration Builder.

Language-Dependent Fields

Configure the replication of texts (such as names or descriptions of organizational objects) between SAP S∕4HANA and Employee Central.

Prerequisites

The language pack for an Employee Central locale must be enabled in Provisioning so that you can transfer texts in the corresponding language.

Employee Central supports translations for position names, but not for position descriptions. Add a custom description field to the Position object definition in Employee Central if you want to replicate position descriptions for multiple languages.

Context

To enable replication of texts, you first map language-independent text fields. This mapping is used as a placeholder. Also, you map the locales you use in Employee Central to the corresponding SAP S∕4HANA languages. Based on this language mapping, the language-dependent field mappings are then automatically created and replace the placeholders when the data is extracted.

If you don't define at least a language mapping for the default locale, no language-dependent data can be transferred.

Let's say you try to replicate a new department from Employee Central to SAP S∕4HANA. This means that a new record of the Object (1000) infotype must be created in the SAP S∕4HANA system. The Object infotype needs a language. To determine the language to be used, the SAP S∕4HANA system reads the entries stored in the V_ECPAO_LOCALE. If there aren't any entries here, the system doesn't know which language to use for the infotype record. Therefore, the department can't be replicated. The corresponding replication request has the status Pending.

Results

Data transfer between Employee Central and SAP S∕4HANA automatically uses language-dependent field mappings instead of the placeholder mapping. There's no need to define a mapping for the language-dependent fields explicitly. In our example, the integration uses the following mappings.

Employee Central FieldMapping ModeSAP S∕4HANA InfotypeSAP S∕4HANA FieldSAP S∕4HANA Language
name_en_USInfotype MappingObject (1000)Object Name (STEXT)EN
name_de_DEInfotype MappingObject (1000)Object Name (STEXT)DE
name_es_ESInfotype MappingObject (1000)Object Name (STEXT)ES
name_fr_FRInfotype MappingObject (1000)Object Name (STEXT)FR
name_it_ITInfotype MappingObject (1000)Object Name (STEXT)IT
name_nl_NLInfotype MappingObject (1000)Object Name (STEXT)NL

Configure Replication of Language-Dependent Fields

Prerequisites

The language pack for an Employee Central locale must be enabled in Provisioning so that you can transfer texts in the corresponding language.

Employee Central supports translations for position names, but not for position descriptions. Add a custom description field to the Position object definition in Employee Central if you want to replicate position descriptions for multiple languages.

Context

To enable replication of texts, you first map language-independent text fields. This mapping is used as a placeholder. Also, you map the locales you use in Employee Central to the corresponding SAP S∕4HANA languages. Based on this language mapping, the language-dependent field mappings are then automatically created and replace the placeholders when the data is extracted.

If you don't define at least a language mapping for the default locale, no language-dependent data can be transferred.

Custom Definition of Employee Central Entities for Organizational Data Entities

An Employee Central entity represents an entity from Employee Central, such as a CSV data import template or a generic object (also known as MDF entity). You only need to define custom Employee Central entities if you want to transfer data from SAP S∕4HANA to an Employee Central entity for which SAP hasn't provided a default template.

Context

In the Define Employee Central Entities for Additional Organizational Data Entities Customizing activity (view V_ECPAO_ECTMPL_O) you can also see the default templates defined by SAP. If the default templates suit your requirements, there's no need to define any custom templates.

To define custom Employee Central entities carry out the steps described below for each entity that you add.

Procedure

  1. Define the basic settings.
    1. Enter a unique entity ID and a description. The ID has to be in the customer namespace, which means that it has to start with a number (0* - 9*). You can enter any description.
    2. Enter the entity name. You must use the exact name of the corresponding entity in Employee Central.

      To find out about the name for generic objects, go to the Admin Center and choose the OData API Data Dictionary tool. For CSV data import templates, go to the Admin Center and choose the Import and Export Data tool.

    3. Specify the organizational object type from Employee Central, such as Business Unit or Job Classification.
    4. Depending on the type of Employee Central entity for which you use the template, select the communication channel (CSV File-Based Transfer or Web Service Transfer).
    5. If you want to be able to assign your Employee Central template to several transformation templates, select the Multiple Use checkbox.
    6. Specify if the Employee Central entity is effective dated.
  2. Define the standard Employee Central field IDs.
    1. Specify the name of the field that contains the external code of the generic object in Employee Central and to which the organizational object I from SAP S∕4HANA is to be transferred.
    2. Specify the Employee Central field (such as effectiveStartDate) in which the start date is stored for the corresponding entity and which is to be mapped to the Start Date (BEGDA) field in SAP S∕4HANA.

      For standard effective dated templates and standard effective dated MDF templates if the start date is specified, then the start date would be considered as a standard field. For custom MDF templates, start date would not be considered as a standard field.

    3. Specify the Employee Central field (such as endDate) in which the end date is stored for the corresponding entity and which is to be mapped to the End Date (ENDDA) field in SAP S∕4HANA.

      For standard effective dated templates if the end date is specified, then the end date would be considered as a standard field. For custom MDF templates and standard MDF templates, end date would not be considered as a standard field. End date is now not a mandatory field and you will be receiving a warning message when you do not mention the end date.

      Standard EC fields can be left blank while replicating the data to ERP when the dependent entity is maintained.

  3. Define the Parent Child configuration.
    1. Enter the upsert sequence number. This number defines the sequence in which the data for different entities are transferred between the ERP system and SAP SuccessFactors Employee Central (EC).
    2. In the Dependent Entity field, select the Employee Central entity that corresponds to the parent object of the composite child object.

      If the parent entity is a standard delivered SAP entity, then only the upsert sequence of the child entity has to be entered which can be any number. But if the parent entity is also a custom template, then you need to ensure that the upsert sequence of parent is lower than that of the child entity.

      The EC Org. Obj.Type value should be same as the parent/dependent entity. In case the child entity is migrated to EC, the parent entity should also be included in the extraction process.

      Example: To map cost distribution, you need to create a custom composite child object with parent as position and then map the Infotype 1018 value.

Transformation Template Group and Templates for Organizational Data

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, go to the Define Field Mapping for Organizational Data Customizing step, which has the VC_ECPAO_MAP_OM view cluster assigned. The configuration in this view cluster is carried out in the following 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 all 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 you choose Employee Central field IDs from the Employee Central entity assigned to the transformation template, and you map suitable SAP S∕4HANA fields to these Employee Central field IDs.

Diagram representing the integration of Employee Central Instance ID and the Transformation Template Group.

The Employee Central Instance ID and the Transformation Template Group are the main configuration elements of the Business Integration Builder.

Employee Central Instance ID

The Employee Central Instance ID represents in SAP S/4HANA the connected SAP SuccessFactors Employee Central Instance.

All BIB configurations are linked to one specified Employee Central instance, which includes the following:

  • EC Entities, that is imported EC meta data, to be mapped and replicated.
  • Value Mapping Entities (EC Picklists) which represent EC values to be mapped and replicated.

Transformation Template Group

The Transformation Template Group specifies the scope of data and configured mapping scenarios considered during the replication run. A Transformation Template Group is assigned to an EC Instance and consist of the following:

  • Field and value mapping specified in Transformation Templates. Transformation templates are based on metadata from EC represented by EC entities and imported EC picklist information represented by value mapping entities.
  • EC entities represent an entity of EC, such as a CSV data import template, an OData entity, or a generic object, also known as MDF entity.

If you want to map organizational units, consider that business units, divisions, and departments from Employee Central all map to organizational units in the SAP S∕4HANA system. Therefore, you must decide how to handle the organizational unit templates:

  • Either you decide which of these object types you want to use. For example, if you decide to always replicate organizational units to departments, only add a transformation template to your transformation template group if the template has the Department Employee Central entity assigned.

  • If you want to use all three templates in your transformation template group, implement the Validity Periods for Data Replication to EC(EX_ECPAO_EMP_VALIDITY_TAB) Business Add-In (BAdI). This add-in defines to which object in Employee Central each organizational unit is mapped.

The following sample transformation template groups are defined for the Employee Central company SBS_MODEL in the delivered sample Customizing:

  • SBS_OM_MODEL_CSV

    This is an example of the replication of organizational data using the CSV File-Based Transfer communication channel.

  • SBS_OM_MODEL_WS

    This is an example of the replication of organizational data using the Web Service Transfer communication channel.

You can copy the transformation template group to your Employee Central company and change the field mapping of the transformation templates to suit your requirements.

Create a Transformation Template Group and Templates

A template group bundles all field mappings that you want to use when transferring data from SAP S∕4HANA to Employee Central.

Screenshot of the Transformation Template Group. Details are explained in the following text.

The transformation template is the counterpart of the Employee Central entity. You can map fields from the transformation template to fields from the assigned Employee Central entity.

Screenshot of the Transformation Template. Details are explained in the following text.

Primary Field Mapping for Organizational Data

You can choose Employee Central fields from the Employee Central data model that you've uploaded to the SAP S∕4HANA system, and you 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_OM view cluster.

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

How to Map Fields

  1. Choose an Employee Central field from the assigned Employee Central template.

    Make sure that you have imported the data model for this Employee Central template to the SAP S∕4HANA system using the metadata import program. Otherwise, no fields are available here.

  2. Map each Employee Central field to an SAP S∕4HANA field using a suitable mapping mode:
  • When you select the mapping mode Infotype Mapping, you assign an infotype or subtype field in the primary mapping. You can use fields from Organizational Management infotypes for field mapping. For the mappings of text fields such as Object Name (STEXT), you define a language-independent mapping. The Use Language Mapping checkbox is selected for this kind of field mapping.

    Use Lang. Mapping for Infotype Mapping
  • To make the language-dependent mapping work, you must also map Employee Central locales to SAP S∕4HANA languages.

    When you select the mapping mode BAdI Mapping, 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.
  • When you select the mapping mode Evaluation Path Mapping, you can map an Employee Central field ID to an evaluation path from SAP S∕4HANA.

Results

If the value from the SAP S∕4HANA field must be converted to an Employee Central value, enter the value mapping entity that you defined in the Define Value Mapping Entities customizing step. You can define the value mappings for this entity directly from here by choosing Define Value Mapping Entries.

You are now ready to use your field mapping when running the data extraction program.

Don't define a secondary field mapping for organizational data. The Organizational Data Extraction program doesn't replicate organizational data fields that have a secondary mapping.

Value Mapping Entities and Details for Organizational Data

Value mapping means that Employee Central field values are mapped to values of SAP S∕4HANA fields.

The data extraction programs use the value mappings when extracting data. They replace the SAP S∕4HANA keys by the corresponding Employee Central keys if a value mapping is defined for the corresponding field mapping. Value mappings are assigned to field mappings in the Primary Mapping and Secondary Mapping views of the field mapping view cluster. Field mappings are grouped together in a transformation template group. You enter the transformation template group on the selection screen to tell the extraction program which field mappings and which value mappings it must use.

There are standard value mappings provided by SAP. Standard value mappings are provided for values that can't be configured in the SAP S∕4HANA system and in Employee Central and therefore always stay the same.

Example

Language codes can't be configured. The Employee Central language code English always corresponds to the language code EN in the SAP S∕4HANA system. Therefore, a standard value mapping is provided for language codes.

However, if you want to map values that can be configured in the SAP S∕4HANA system and in Employee Central, you must define custom value mappings.

Note

After copying the new value mapping entries, don’t save the entries immediately. To see all the entries, choose the page down button until you see the last set of entries. Once you see the last set of entries, you can save all the newly created entries.

Sample Value Mapping for Organizational Data

Use the sample value mapping entities SAP provides for organizational objects to easily create the value mappings you need, for example, for the relationships to other objects.

We provide sample value mapping entities for the default organizational objects (departments, divisions, business units, job classifications, and positions) and for the Status of Vacancy (STATUS) field of the Vacancy infotype (1007).

Note

If you choose Copy Sample Value Mapping, all entities that are available in the V_ECPAO_VALENT_S (S table) view are copied to the V_ECPAO_VALUENTY (C table) view in the Define Value Mapping Entities Customizing activity. This includes the value mapping entities for organizational data and employee data, and for both directions (replication from SAP S∕4HANA to Employee Central and replication from Employee Central to SAP S∕4HANA). If you only need some of the sample value mapping entities, choose Copy Sample Value Mapping and then remove all entities that you don't need from the V_ECPAO_VALUENTY view.

Once you've made entries in the V_ECPAO_VALUENTY view (either by copying or by entering them manually), you can no longer copy the sample value mapping entities. Either remove all entries from the V_ECPAO_VALUENTY view and copy again, or show the sample value mapping entities and use them as an example for making the entries manually.

If you want to replicate other organizational objects (including custom objects), you must define custom value mapping entities for them.

Map Organizational Data to Table Infotype

You want to map the table infotype in the view cluster to support the migration process.

Prerequisites

You must create a custom OM Entity in the V_ECAPO_ECTMPL_O view similar to the one, which is created in the EC instance.

Context

Table infotypes allow you to store the data in a tabular structure in one infotype record. All the OM infotypes, which have HRT table in addition to the HRP tables are table infotypes. You can map any table infotype in the configuration since this is common for both Organizational data migration and Organizational data replication. But in Organizational data migration, only table infotypes 1002 and 1018 are supported.

  1. Go the view VC_ECPAO_MAP_OM.
  2. Choose the transformation template group for which you want to map the table infotype.
  3. Create a transformation template for the transformation template group corresponding to the custom OM entity.
  4. In the Primary Mapping screen, choose the fields from the F4 help menu and then perform the mapping. All the fields from HRP and HRT table will be available for mapping.

    You can migrate multiple cost distributions stored in the corresponding 1018 table infotype records for the parent object, as shown in the following example.

Screenshot of the position entries in the 1018 table.

Log in to track your progress & complete quizzes