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

Objectives

After completing this lesson, you will be able to:
  • Access Customizing in SAP S/4HANA to make customer specific changes
  • Define value mappings in SAP S/4HANA Customizing
  • Define employee data-related settings for your Employee Central company
  • Configure Field Mapping for Employee Data
  • Define employee and manager relationships

Metadata for Web service Based Replication

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.

Caution:

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

Tip:

For details on which information about the Employee Central fields the program imports, see the program documentation in your SAP S∕4HANA system. You'll find a link to the program documentation in the documentation of the Import Metadata for Web Service-Based Data Transfer from Employee Central customizing step.

Note:

Don't change the metadata in this Customizing view. Use the metadata import program to update the entries in this view.

Caution:

If the Employee Central field has Picklist flag is set for an imported Employee Central field, you might need to assign a value mapping entity when you define a field mapping for this Employee Central field. Otherwise, the data extraction program might fail.

Import Metadata from Employee Central

Prerequisites

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

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, open Personnel ManagementIntegration with SuccessFactors Employee CentralBusiness Integration Builder:

Value Mapping Entities and Details

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

Example

Employee Central uses the value F, SAP S∕4HANA uses the value 1 for the Female gender code. The values have the same meaning, but they aren't identical. Therefore, they must be mapped so that Employee Central can read the gender code that is transferred from SAP S∕4HANA.

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 in the Define Field Mapping for Employee Data Customizing step (view cluster VC_ECPAO_MAP).

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.

Example:

Let's say you want to map event reasons from the Job History entity in Employee Central to action types from the Actions (0000) infotype in SAP S∕4HANA. So you define, for example, a custom value mapping that maps the Hire and Termination event reasons from Employee Central to the SAP S∕4HANA action types Hiring and Leaving.

Since no country-specific standard value mappings are available, you also need to define custom value mappings if you need to map country-specific values.

Example:

Pay scale areas are country specific. If you need a pay scale area mapping, you define it using the suitable ISO code. You could, for example, map the Employee Central pay scale area BR SP BR-Sao Paulo (BRSP) to the SC pay scale area from the SAP S∕4HANA system using the BR ISO code.

Note

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

Employee Central Picklists and Picklist Values

Understand the process for replication of picklist data from Employee Central.

The process for replication of picklist data from Employee Central has steps in three systems interacting with each other: Your Employee Central system, the cloud-based middleware, and SAP SuccessFactors Employee Central.

  1. The query program ECPAO_IMPORT_PICKLIST (Picklist writer report based on Generic OData Service Call) in the SAP S∕4HANA system calls the outbound Web service getGenericDataReplicationQuery_Out. It also updates the query information and administration of the picklist query table with the relevant status information.

  2. The outbound Web service sends the query to the cloud integration middleware and the corresponding Web service proxy class (consumer) for the OData API is called.

  3. The middleware requests the corresponding data from Employee Central using OData APIs.

  4. The middleware calls the inbound Web service GenericDataReplicationRequest in the SAP S∕4HANA system to send the data it has received from Employee Central in packages to SAP S∕4HANA.

  5. The cloud integration middleware sends first sends the Start Notification indicating that response packages are subsequently sent.

  6. The cloud integration middleware sends the Base64 encoded messages based on the OData API response that it receives. It sends the messages to the SAP S∕4HANA system as response packages in an asynchronous way using the inbound webservice.

  7. The corresponding Web service proxy class (provider) is called. The response data is written into the staging area, and it also updates the entries in the response package database table.

  8. The cloud integration middleware sends a final notification message to SAP S∕4HANA system once the last package is transferred which includes the parameter TotalNumberOfResponsePackages, containing the total number of response packages. The system compares the number of entries in the response packages with this parameter and decides whether to wait further or not.

  9. Once all the response packages are collected, it processes the entries in the staging area, and deserializes it. Then it triggers the processing of the picklist update logic, thereby updating the picklist-specific database tables.

  10. Creates SLG1 logs once the processing logic is completed and whether the update process resulted in success or failures.

  11. It clears the staging area and response package database tables if there was a successful run.

  12. If there were failures, the corresponding entries get deleted in the subsequent runs.

Import Picklists and Picklist Values from Employee Central

Prerequisites

Create Value Mapping Details in SAP S/4HANA

Employee Data Related Settings

Make more settings for the Employee Central company that you've defined before in the Define Employee Data Settings for Employee Central Company Customizing activity (view V_ECPAO_CMPNY_EE).

  1. Choose your Employee Central company ID.
  2. Specify how the following Employee Central fields are to be mapped to SAP S∕4HANA:
    • user_id

      You can choose from the following mapping modes:

      • Standard mapping (PERNR): The user_id field is mapped to the Personnel Number (PERNR) field in SAP S∕4HANA.
      • BAdI mapping: If you have specific requirements, you create a Business Add-In (BAdI) implementation of the Mapping of User ID, Person ID, User Name, and Object ID (EX_ECPAO_EMP_USYID_PRN_UNM_MAP) BAdI to define the mapping.
    • person_id_external

      You can choose from the following mapping modes:

      • Standard mapping (CP): The person_id_external field is mapped to the central person (CP) in SAP S∕4HANA.
      • Infotype mapping (0709): The person_id_external field is mapped to the SAP S∕4HANA infotype Person ID (0709).
      • BAdI mapping (see above)
    • username

      You can choose from the following mapping modes:

      • Standard mapping (PERNR): The username field is mapped to the Personnel Number (PERNR) field in SAP S∕4HANA.
      • Infotype mapping (0105/001): The username field is mapped to the SAP S∕4HANA infotype Communication (0105), subtype System User Name (SY-UNAME) (0001).
      • BAdI mapping (see above)

    Note

    We always ensure that an employee gets a new personnel number while undergoing any new international transfer HR process.

    An employee may have been previously migrated using the Reuse Existing Employment for International Transfer setting. If so, we ensure that it continues to work as before (data of both personnel numbers are transferred to one employment in Employee Central) during the re-migration process.

Custom Employee Central Entities

To define custom Employee Central entities, carry out the following steps described for each template that you add.

In the Define Employee Central Templates for Additional Employee Data Entities Customizing activity (view V_ECPAO_ECTMPL), 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.

Details of an Employee Central Entities

Procedure

  1. Define the basic settings.
    1. Enter a unique template 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 OData entities and 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 Employee Data tool.

    3. If you want to be able to assign your Employee Central entity to several transformation templates, select the Multiple Use checkbox.
    4. Specify if the Employee Central entity is effective dated.

      Note

      If you define an earliest transfer date for a transformation template group in the Define Field Mapping for Employee Data Customizing step, this date influences effective-dated and noneffective dated templates in different ways.

    5. If your template refers to a generic object in Employee Central, select the Is Generic Object in EC checkbox.
    6. If your template must inherit the metadata that you upload for another Employee Central entity, specify the template that is to be used as the metadata basis.

      Note

      If you make an entry in this field for an Employee Central entity, you can't import metadata for this template. You can only import metadata for the Employee Central entity that you've entered, meaning the template from which the metadata is to be inherited.

      Example

      The Dependent Biographical Information template inherits metadata from the Biographical Information template. This means it uses the same data model comprising fields such as date-of-birth, country-of-birth, or place-of-birth. You must import the metadata for the Biographical Information template only and can then reuse it for the Dependent Biographical Information template. You can't import metadata for the Dependent Biographical Information template.

    7. If your template refers to a generic object in Employee Central, make an entry in the Object ID Field in EC field. Here, you enter the name of the field that contains the external code of the generic object in Employee Central and to which the employee ID from SAP S∕4HANA is to be transferred.

      The field must have the User data type assigned in Employee Central so that the employee ID information from SAP S∕4HANA can be transferred to this field. Which ID is transferred depends on the mapping that you have defined in the Define Employee Central Instance Customizing step. In the standard mapping, the personnel number (PERNR) is used as the employee ID.

    8. For the SAP delivered templates, the start date field is already maintained. For the templates that you want to be defined, 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 system.

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

      CSV & WS TemplateIS_MDFStandard Field (start date)Standard Field (end date)
      Standard EE Templates XX
      Standard EE MDF TemplatesX  
      Custom EE TemplatesX  
      Standard OM Templates XX
      Standard OM MDF TemplatesXX 
      Custom OM TemplatesX  
    9. For the SAP delivered templates, the end date field is already maintained. For the templates that you want to be defined, 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 system.

      For standard effective dated templates if the end date is specified, then the end date would be considered as a standard field. For standard MDF templates and custom MDF templates, end date is not considered as a standard field even if it is defined for a template.

      Note

      If the start and end date fields are configured in the field mapping table, then they are considered for the template configuration. If they are not defined in field mapping, it is read from the templates table.

  2. Define the settings for data replication from SAP S∕4HANA to Employee Central.
    1. Enter a unique sequence number.

      The sequence in which the Employee Central entities delivered by SAP are transferred from SAP S∕4HANA to Employee Central is defined by SAP. You can't change this sequence. If you define your own template, we recommend using a sequence number that is higher than the numbers assigned to the Employee Central entities that are delivered by SAP.

    2. If the entity has a parent entity in Employee Central, enter the ID of the parent EC entity in the ID of Dependent EC Template column. PaymentInformationV3, for example, is entered in the ID of Dependent EC Template column of PaymentInformationDetailV3.
    3. If your template refers to a country/region-specific entity in Employee Central, specify the local version. If you'd create an Employee Central entity for the PerGlobalInfoUSA template entity, for example, you would specify the 10 (USA) country version.
    4. The settings in the Deletion Supported section are only available for Employee Central templates that are defined by SAP in the SAP namespace. You can't make any entries in the following fields:
      • The Deletion Permitted flag specifies that data deletion can be replicated for the Employee Central template from SAP S∕4HANA to Employee Central.

      • The HRIS Element ID is used by the Compound Delete or SFOData.HrisCompoundDeletion template when replicating the deletion of data from SAP S∕4HANA to Employee Central. The HRIS element ID is only needed for Employee Central templates that support the replication of data deletion to Employee Central.

  3. Define infotype-specific settings.
    1. Specify the SAP S∕4HANA infotype that is required for your Employee Central template to be able to use it for a proper field mapping. The infotype you specify in this field is used by the SAP S∕4HANA system to check if the necessary field mapping is defined.

      Example

      The Personal Data (0002) infotype is required for the Personal Information entity in Employee Central. You can't transfer any data from SAP S∕4HANA to this entity if you haven't defined a mapping for any of the infotype fields.

    2. Only for Employee Central entities defined by SAP: An infotype can be specified that requires a special mapping (such as the Date Specifications (0041) infotype).
    3. If you need a special processing for the Employee Central entity, specify the processing mode you need. The processing mode refers to the infotype that you enter in the next step. The following processing modes are available:
      • Repetitive Structure Mapping

      • Object Identification Mapping

      • Only for Employee Central entities defined by SAP: Time Constraint 3 Mapping

    4. Enter the SAP S∕4HANA infotype for which a special processing is needed.
    5. If you've selected the Object Identification Mapping processing mode, specify the object identification (OBJID) field for which a unique key must be generated.
    6. If you've selected the Repetitive Structure Mapping processing mode, specify a structure that contains the fields for which you want to use the repetitive mapping.

An Employee Central entity represents an entity from Employee Central, such as a CSV data import template, an OData entity, 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.

Transformation Template Group and Transformation Templates for Employee Data

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

To map fields, go to the Define Field Mapping for Employee Data customizing step, which includes the following steps:

  1. You create at least one transformation template group. A transformation 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. You create at least one transformation template for your transformation template group. The 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. You define a primary mapping for each of your transformation templates. This means that you choose Employee Central fields from the Employee Central template assigned to the transformation template, and map suitable SAP S∕4HANA fields to these Employee Central field IDs.

  4. If you need an additional field mapping, for example, for country/region-specific fields, you could also define a secondary field mapping.

Note

We also provide sample content, which contains configurable standard field mappings, in Primary Mapping of the Define Field Mapping for Employee Data customizing step. When you define a field mapping there, you can easily copy these standard field mappings using a pushbutton and then adapt them if necessary. This is a different kind of sample content than the transformation template groups, templates, and field mappings contained in the delivered sample Customizing.

Primary Field Mapping for Employee Data

You can choose Employee Central fields from the Employee Central metadata that you've uploaded to the SAP S∕4HANA system. You map suitable SAP S∕4HANA fields to these Employee Central fields and if necessary, define more transformations.

Context

To define a field mapping for each transformation template, go to the Primary Mapping view of the VC_ECPAO_MAP view cluster. An easy way to define your field mapping is to copy the sample content we provide and adapt it to your requirements. You can use the sample content that you've selected for your transformation template group.

Sample Content Options in Primary Mapping View

Create Transformation Templates and Copy Sample Content

Types of Manager Relationships

You define different types of employee-manager relationships (such as a line manager or a matrix manager relationship) and the corresponding evaluation paths in the Define Relationship Types for Managers and Employee-Related Org. Mgmt Data Customizing activity (view V_ECPAO_MNGRTYPE).

Context

The Determination of Managers and Organizational Management Data (ECPAO_MNGR_TYPES_EXTRACTION) program (transaction ECPAO_MNGR_EXTR) uses the types of manager relationships that you define here to determine the different types of managers for a given selection of employees.

In the VC_ECPAO_MAP view cluster, you can use the types of manager relationships that you define here to map managers from SAP S∕4HANA to Employee Central. For example, to use them in the Job Relationship template.

For each type of manager relationship that you want to use, follow these steps.

Procedure

  1. Enter a unique ID and a description of the relationship type. You can enter any description. The ID that you enter here is used in the VC_ECPAO_MAP view cluster, in the Primary Mapping view. In this view cluster, enter the ID in the Subtype field.
  2. Select the evaluation path that is to be used to determine the managers for this type of relationship. The evaluation path describes a chain of relationships between objects in a hierarchical structure, such as organizational unitpositionpath. The SAP S∕4HANA system evaluates the structure along this evaluation path and takes into account the objects that it finds using this path. You can use evaluation paths that start with the object types * (any), O (organizational unit), S (position), or P (person).
  3. Enter the structure depth. This is a number of one to six digits. The number corresponds with the different levels of an organizational structure, with 1 being the highest level in a structure, and all subsequent numbers representing lower levels. The level number determines how much of a structure is processed. For example, if the structure depth is 3, the SAP S∕4HANA system processes down three levels of the structure, beginning from the object that you select as the root object. If you don't want to limit processing, leave the structure depth blank.
  4. To define whether the type of manager relationship is currently active and used by the manager extraction report or not, select or clear the Is Active checkbox.
Results of Defining Relationship Types for Managers

Employee Manager Determination

You can determine different types of managers for a given selection of employees, based on the types of manager relationships that you have defined in the Relationship Types for Managers and Organizational Mgmt Data (V_ECPAO_MNGRTYPE) view (seeDefine Types of Manager Relationships). The managers are stored in the Managers and Org. Mgmt Fields for Employee Replication (ECPAO_EE_MGNR) table so that manager relationships can be transferred to Employee Central. Employee Central uses the manager relationships, for example, in the Job Relationships and the Job Information templates to identify different types of managers, such as matrix managers, second managers, custom managers, or HR managers.

  1. On the selection screen, specify the personnel numbers for which you want to determine the managers.
  2. The program reads the active types of manager relationships from the V_ECPAO_MNGRTYPE view and uses the evaluation paths stored there to determine the managers for the given selection of employees.
  3. To check the messages issued by the program, go to the Analyze Application Log (SLG1) transaction.
  4. Enter the ECPAO object and ECPAO_MANAGER subobject, optionally specify extra selection criteria, and choose Execute.

Next Steps

The Employee Data Extraction program reads the information about the managers from the ECPAO_EE_MGNR table. If it finds the manager for an employee, it transfers this information to Employee Central. Otherwise, the entry NO_MANAGER is transferred.

Procedure

  1. Go to the Define Background Job (SM36) transaction.
  2. Schedule the Determination of Managers and Organizational Management Data (ECPAO_MNGR_TYPES_EXTRACTION) program as a regular background job.

Define Types of Manager Relationships in SAP S4/HANA

Log in to track your progress & complete quizzes