Replicating Employee Data from SAP SuccessFactors Employee Central to SAP S/4HANA

Objectives

After completing this lesson, you will be able to:
  • Configure replication of event reasons from Employee Central
  • Import metadata from Employee Central
  • Define value mappings for employee data
  • Define field mapping for employee data

Replication of Event Reasons from Employee Central to SAP S/4HANA

Find out how the SAP S∕4HANA system regularly replicates employee master data including employee organizational assignments from Employee Central.

Configuring SAP S∕4HANA for Replication of Event Reasons from Employee Central

These are generic settings for personnel actions in SAP S∕4HANA. Therefore, they probably already exist in your system. However, check whether the settings have been made in detail as described here.

SAP S∕4HANA uses two infotypes to log personnel actions performed for an employee:

  • Actions (0000)

    SAP S∕4HANA only stores one personnel action per day for an employee in the Actions infotype.

  • Additional Actions (0302)

    The Additional Actions infotype enables you to log all of the personnel actions that are performed for an employee on a specific date.

Procedure

  1. Go to Customizing for Personnel Administration and choose Customizing ProceduresActions.
  2. Specify whether you want to use the Additional Actions (0302) infotype.
    1. Choose ActionsSet Up Personnel ActionsActivation 'Additional Actions' and set the ADMIN EVSUP switch in the T77S0 table to 1.
    2. Choose ActionsSet Up Personnel ActionsPersonnel Action Types and select the Update IT 0302 checkbox for the action types that you use in data replication from Employee Central.
  3. Choose ActionsSet Up Personnel ActionsPersonnel Action Types and select the Update IT 0000 checkbox for the action types that are to create a new record of the Actions (0000) infotype.

    Selecting Update IT 0000 requires that you also select the Update IT 0302 checkbox.

  4. Choose ActionsSet Up Personnel ActionsPersonnel Action Types and set the status indicators for Customer-Defined (STAT1), Employment (STAT2), and Special Payment (STAT3) according to your requirements.

    Setting one of the status indicators requires that you’ve selected the Update IT 0000 checkbox.

  5. Choose ActionsSet Up Personnel ActionsPriority List for Personnel Action Types and enter sequence numbers in the Priority (ORDNR) field to define a priority for action types that don't change the status of an employee, but for which the Update IT 0000 checkbox is selected.

    If multiple non-status-changing events are replicated on the same day, the priority determines which action is to be stored in the Actions infotype. The smaller the sequence number, the higher the priority of the personnel action type.

  6. Choose ActionsCreate Reasons for Personnel Actions and define action reasons for all action types that you want map to Employee Central event reasons from Employee Central.

    Note

    For technical reasons, at least one action reason must be defined for the action types that you want to use in data replication from Employee Central. If you don't want to use action reasons from a business point of view, add an entry for each action type and leave it empty.

Event Reasons Mapping from Employee Central to Action Types in SAP S∕4HANA

Map event reasons that you replicate from Employee Central to personnel action types so that it is possible to track in SAP S∕4HANA why which change was made for an employee.

Context

If you perform one or more events for an employee on a specific day in Employee Central, using event reasons that aren't mapped, the SAP S∕4HANA system applies the changes you made for the employee. However, it doesn't log the unmapped event reason itself in the form of a personnel action type in the Actions or Additional Actions infotype. Instead, it extends the validity of the previous infotype record (created for an event reason that is mapped to a personnel action type) to fill the gap.

We recommend that you use the sample content we provide for replication of employee master data from Employee Central. The sample content version EE_WS_3 contains the mapping of event reason to personnel action type that we describe here, except for the value mapping entries. We don't provide sample content for the value mapping entries because they're customer-specific.

Procedure

  1. Go to Customizing for the Business Integration Builder and choose Data Replication from Employee CentralEmployee DataDefine Field Mapping for Employee Data .
  2. Select the transformation template for Job Information and map the eventReason field from Employee Central to the SAP S∕4HANA field Action Type (MASSN).
  3. Add the EVENT_REASON value mapping entity to the field mapping.
  4. Choose Define Value Mapping Entries and map all Employee Central event reasons that you replicate with the corresponding personnel action types in SAP S∕4HANA.

    Example

    If you've defined an event reason New Hire (HIRNEW) for the Hire event in Employee Central, map this event reason to the personnel action type Hire (01)

Note

More examples and details regarding replicating event reasons from SAP SuccessFactors Employee Central to SAP S/4HANA can be found in the SAP help documentation.

Metadata Import from Employee Central

You import the metadata from SAP SuccessFactors Employee Central to make Employee Central fields available in the SAP ERP HCM system so that you can use them for field mappings.

To import the metadata, use the following program:

Import of Metadata from Employee Central Using XML File (ECPAO_ECTMPL_METADATA_WRITER)

This program is available in the Import Metadata for Web Service-Based Data Transfer from Employee Central Customizing activity.

Note

You can only use this program to import metadata for Web service entities.

Value Mapping Entities and Details

The value mapping configuration is divided in the definition of the value mapping entities and their value mapping details.

Screenshot of sample Value Mapping Entities.

When defining value mapping entities, you must specify the type of the value mapping entity:

  • For example, Value Mapping type = picklist - external code. A typical EC field using picklist external code is the EC field Address Type mapped to the SAP HCM Address infotype and field PA0006-ANSSA.
  • Supported are also other value mapping entities such as of type Foundation object key. A typical EC field is the Event_Reason mapped to the SAP HCM Action infotype and field IT0000-MASSN.
Value Mapping Details showing Sequence No., ERP Key, and EC Key.

The value mapping details contain the value pairs, that is, which ERP value must be mapped to which EC value.

The allocation of the value mapping entity is specified in the primary mapping of the field mapping configuration. For each mapped EC field to one SAP S/4HANA infotype field, you can specify one value mapping entity.

Parts of our predelivered sample mapping content are as follows:

  • To cover most common value mapping scenarios, we predeliver with our sample mapping content, sample value mapping entities, and details.
  • You can reuse our predelivered sample value mapping entities and details. Therefore, you do not need to create your own value mapping entities.
  • If you want o add further values to EC beyond the standard values, you can enhance it and configure the value mapping to the corresponding ERP value, according to your needs.

Value mapping entities and details can be specified in the following way:

  • in the customizing activities Define Value Mapping Entities and Define Value Mapping Details or
  • by using the Create Value mapping function in the value mapping section of the field mapping configuration.

The relations between the value mapping entity and the corresponding field are specified in the field mapping customizing.

The image shows an example of the value mapping of the EC field Salutation mapped to IT0002 field ANRED based on the predelivered value mapping entity SALUTATION.

Screenshot of sample value mapping configuration options. A further explanation is given in the preceding text.

Use the Sample Content for Employee Data

We provide sample content for different use cases in the Define Field Mapping for Employee Data Customizing step, which you can copy and adapt to your needs.

Sample content is available for these use cases:

Employee Data EC to ERP: Replication (EE_WS_3)

Provides field mapping for employee master data to be replicated from Employee Central to SAP S∕4HANA system. You can use this sample content to set up a regular Web service-based replication of employee data from Employee Central to SAP S∕4HANA system.

Note

This sample content includes field mappings for all entities supported by the standard delivery.

Note

The sample content for the Pay Component Recurring and Pay Component Non Recurring entities does not contain any entries in the Subtype column since each subtype corresponds to a wage type. Wage types are customer-specific, therefore no sample mapping can be provided for them. The sample content for the Dependent ... templates contains entries for the Family Member/Dependents (0021) infotype, but the Subtype column is also empty here. If you want to use the sample content for these entities, copy it and fill in the subtypes.

You can use the cloning feature to define a field mapping for these entities. But make sure that you don't add a secondary mapping in this case, since templates for which a secondary mapping is defined cannot be cloned.

Here is how to use the sample content provided in the Define Field Mapping for Employee Data Customizing activity:

Procedure

  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.

  3. Copy the sample content for each transformation template. Which field mappings are copied depends on the sample content you have selected for the transformation template group.

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

  5. Make the following additional settings:

    If sample value mapping entities are assigned to the sample content you use, but no value mapping details are provided, you need to create corresponding custom value mapping entities and define a suitable value mapping for them.

    Hint

    You use the sample content provided for the Address template. The ADDRESS_BY_WS value mapping entity is assigned to the mapping of the address-type field. A sample value mapping entity with this name is provided. But no value mapping details are assigned to the ADDRESS_BY_WS value mapping entity. Therefore you go to the Define Value Mapping Entities Customizing activity and create an ADDRESS_BY_WS custom value mapping entity. Then you go to the Define Value Mapping Details Customizing activity and define the values to be mapped for this value mapping entity.

Result

Sample content is available for all employee-related templates apart from: Job Relationships, Payment Information Details USA, Dependent Address, Dependent National ID, and Dependent Global Information.

Hint

The sample field and value mapping is also available in the form of an editable spreadsheet containing sheets for the different sample content versions. Download this spreadsheet from SAP Help Portal, at http://help.sap.com/hr_ecintegration, on the Implement tab in the Configuration section.

Caution

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.

Hint

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

Transformation Template Group for Employee Data

After specifying your EC instance ID, you must create a Transformation Template Group (TTG) to be used when running the replication job.

  • Your data replication scope for your EC instance ID is represented by one TTG. For the data replication direction, in the Sample Content, you must specify the value EC to ERP.
  • If you want to reuse the predelivered sample content for the employee data and organizational assignment replication, in the Sample Content field, you must specify the value EE_WS_3. Only then you can use the copy function to copy our predelivered sample field and value mapping during the field mapping configuration.
  • Earliest Transfer Date is in the context of the data replication from EC to ERP replication the Full transmission start date (FTSD). The FTSD marks the date as of when data are considered in the replication. Decide carefully on the FTSD and then specify the Full Transmission Start Date in the TTG.
  • Remark: In the date replication program, we consider all configurations that you specify in the Transformation Template Group (TTG).
Screenshot showing a sample Transformation Template Group.

The transformation template group brings together all field and value mapping between ERP information and SAP SuccessFactors Employee Central (EC) fields defined in transformation templates. Transformation templates are assigned to transformation template groups.

Note

The Transformation template group plays an important role in our date replication processing. Later in the data replication program, specify the Transformation Template Group and all the configurations that you made are then evaluated during the replication processing.

Transformation Template

This is a technical entity used to group field and value mapping of an EC entity that belong logically together. For example, EC Entity WS_10 Address is assigned to Transformation Template Address. In the primary mapping, the mapping between each EC Entity field to the specified infotype 0006 and subtype. For example 1, can be specified, if a value mapping to the corresponding ERP infotype field is needed: then the corresponding value mapping entity can also be specified.

Defining Additional Fields for Mapping Purpose

You can now define extra fields, which can be used for the mapping purpose. When you are replicating the data from Employee Central, two values are configured for a particular field in the ERP system while you are entering only one value in Employee Central. Hence, any additional fields can be added to the ECPAO_FLD table without the need of adding any additional unused fields from Employee Central. Make sure that all the field properties are maintained properly.

Note

If you are adding extra fields, then you must set the IS_INVALID field (Deleted checkbox) in the V_ECPAO_FLD view. This is to ensure that these fields are not considered during extraction for migration/integration to Employee Central through the Infoporter tool (ECPAO_EMPL_EXTRACTION).

Configure Field Mapping for Employee Data Replication from Employee Central

Primary Field Mapping for Employee Data

Screenshots of sample transformation templates. More details are provided in the following text.

The Transformation Template Group (TTG) for your data replication consist of Transformation Templates (TT).

Transformation templates contain the field and value mapping of one EC Entity and thus the EC fields mapped to the corresponding infotype fields and, if required, also the associated value mapping.

Transformation templates reflect your replication scope.

  • In the previous image, you can see the transformation templates copied from the data replication sample content.
  • We recommend copying our sample content and adjust the transformation template according to your needs.
  • If our sample content doesn't cover your needs, you can create extra transformation templates to cover your use cases.

Transformation templates can be marked as active or inactive. This is useful during the testing phase. Thus, you're are enabled to test the replication behavior in test mode step by step.

Screenshot of Primary Mapping, showing EC Field Attributes, Mapping Mode, and Infotype field.

All transformation templates used for the EC to ERP replication direction must have specified as mapping mode the Infotype Mapping as shown in the screen example for address data.

The Infotype Mapping distinguishes between primary and secondary mapping.

Primary Mapping

Used for the general field mapping between an EC Field and SAP S/4HANA Infotype field. If no secondary mapping is specified, than this mapping is always used.

Secondary Mapping

Allows you to specify country-specific mappings of employee master data. Required if the EC field must be mapped to a different field of the SAP S/4HANA infotype.

Screenshot of Primary Mapping. More details are provided in the text.

Let’s see how the field mapping is done by using the address data mapping (SAP ERP address infotype – IT0006) as an example.

All transformation templates used for the EC to ERP replication direction must have specified as mapping mode the Infotype Mapping. In the screen example, transformation template ERP_WS_10 has the Mapping Mode Infotype Mapping specified.

The Infotype Mapping distinguishes between primary and secondary mapping.

  • Primary mapping is used for a general field mapping between the EC Field and SAP S/4HANA Infotype/ subtype field. In our example, EC field address1 is mapped to the Address Infotype (0006) subtype 1 (permanent address) field STRAS.
  • Secondary mapping is mainly used for country-specific mappings of employee master data. It allows you to specify a mapping between EC fields and country/region-specific infotype fields based on countries/regions.

In the following image, you can review examples of secondary mappings.

Screenshot showing examples of Secondary Mapping. More details are provided in the text.

How a Secondary Mapping Can Be Specified

Based on the Linking Field, perform the following:

  • You want to map an EC field to an infotype field depending on the Country/Region key of an EC entity based on the person object.
  • In that case you need to enter as Linking field LAND1 to be used for the secondary mapping.
  • In the example, you can then map EC field address2 for Country/region key Canada to IT0006 subtype 1 field LOCAT.
  • During the replication of an employee with a Canadian employment the corresponding value in address2 is transferred to IT0006 subtype 1 field LOCAT.

Based on MOLGA (SAP ERP HCM Country grouping), perform the following:

  • You want to map an EC field to an infotype field depending on the MOLGA value. For example, EC field Birth name.
  • Leave the linking field empty and define a country/region-specific secondary mapping based on a Country grouping. In the example, the EC field Birth name for Molga 01 (Germany) is mapped to IT0002 field NAME2.
  • During the replication of an employee with a German employment the corresponding value in EC field Birth name is transferred to IT0002 field NAME2.

Employee Central Field Formatting by Value Conversion

Data Mapping: What is the Value Conversion Feature?

  • This feature allows you to format the content of Employee Central fields before processing the field and value mapping.
  • It translates the EC field format into the correct SAP S/4HANA field format.

Typical Use Cases

  • In SAP SuccessFactors Employee Central, you’ll find that fields use different data formats compared to their corresponding mapped Infotype fields in SAP S/4HANA.
  • For example, you might find an EC field that holds data needing transfer to not just one, but two different SAP S/4HANA Infotype fields.

Key Features

  • It allows you to format the values of Employee Central fields by using standard value conversion rules. Value conversion rules consist of arithmetic and/or string operations used to convert values.
  • It supports the option of converting values into the right format by using multiple conversion rules in a sequence.
  • It allows you to specify ‘generic’ value conversion and also ‘country/region-specific’ value conversions.
  • It offers more than 10 standard conversion rules to cover the most common use cases.
  • Sample content includes for some country/region-specific fields and also pre-delivered country/region-specific value conversion rules.

Example

In SAP SuccessFactors Employee Central, the Canadian social insurance number is entered with hyphens whereas in SAP S/4HANA without hyphens. Use of our standard value conversion rule Edit using pattern and Replace using pattern with string for the National ID fields allows you to transfer the value properly.

Data mapping – Value conversion example. Details are provided in the following text.

How Are Field Mappings and Value Conversion rules Considered during the Data Replication?

The value conversion rules format the content of Employee Central fields. They kick into action before the field and value mapping processing take place. So, here’s how it works:

  • If you’ve specified any value conversion rules for field values, the replication processing starts by converting field values first.
  • Then, it evaluates and processes the value mappings that you’ve defined in both the primary and secondary mapping.

The Business Integration Builder’s processing logic always checks if there’s a value mapping in the secondary mapping. If not, it moves on to check the value mapping in the primary mapping.

Note

As a general processing sequence rule: The secondary value mapping beats the primary mapping, which beats the pass through of the original EC value.

The Value Conversion Feature – Technical Insight into Value Conversion rules

Value conversion rules can be specified for each field specified in one Transformation Template mapped to one SAP S/4HANA field in the IMG activity Define Field Mapping for Employee DataPrimary MappingGeneric/Country-specific Value Conversion.

The following screen displays country/region-specific value conversions for field National ID for countries such as Spain (04), Canada (07), Great Britain (08), USA (10), and so on.

Country-specific value conversions for field National ID for countries such as Spain (04), Canada (07), Great Britain (08), USA (10), etc.

Conversion rules can be performed based on three main parameters, two input parameters 1 and 2, and one EC field parameter.

Conversion rules can also be combined and it is possible to define a sequence of conversion rules, which determines how the SAP S/4HANA field must finally be filled.

Note

For details on predelivered value conversion rules for country/region-specific fields, check out our sample content Excel on help.sap.com. Navigate to SAP SuccessFactors Employee Central Integration with SAP Human Capital Management for SAP S/4HANA and à Configuration.

Conversion RuleDescription
Multiply with a Number.Multiply with a constant value specified, that is, in Parameter 1.
Replace Using Patterns with String or Employee Central Field.Replace the characters in the field value that match the pattern entered in Parameter 1 with a string defined in Parameter 2 or with the value from the field defined in the EC Field Parameter.
Append String or Employee Central FieldConcatenate the field value with a string or with the value from the field defined in the EC field Parameter, suffixing the value, separated by the characters entered in Parameter 1.
Adjust String to Length.Adjust the EC field value to a fixed length. If the value is shorter than what’s entered in Parameter 1, fill it up with the characters defined by Parameter 2. In case the value is longer, cut off characters at the end.
Prepend String or Employee Central Field.Concatenate the field value with a string or with the value from the field defined in the EC Field Parameter, prefixing the value, separated by the characters entered in Parameter 1.
Replace with String or Employee Central Field.Replace the Employee Central field value, regardless of the content, with a string or with the value from the field defined in the EC Field Parameter.
Split Before String or Character.Split at the first occurrence of the string or character entered in Parameter 1 and cut off what comes after the string or character.
Split After String or Character.Split at the first occurrence of the string or character entered in Parameter 1 and cut off what comes before the string or character.
Edit Using Pattern.Insert characters or strings at specific positions of the field value using a mask, such as __-__/__, where each underscore represents a character of the incoming string. The final output string then shows the additional characters from the mask.
Check and Replace.Replace the value of an Employee Central field with a string, but only if it is the same as the value of another field from the same Employee Central entity.

Clone Transformation Templates

If the fields mapped of multiple subtypes of one infotype are the same, it’s not necessary to define a transformation template mapping configuration for each subtype. You can reuse the primary field mapping specified for an infotype by another subtype of the same infotype by cloning the corresponding transformation template assigned to your transformation template group. That way, you save time when specifying the mapping.

Example of how to reuse data mappings in transformation templates: same infotype

Example: Family/Dependents infotype (IT0021) has a primary mapping specified in the transformation template ERP_WS_2_DEP. This mapping consists of the EC fields birth name, date of birth, and place of birth.

To reuse these primary mappings for the subtypes 1-Spouse, 2-Child and 10 Divorces spouse, all you must do is use the cloning feature.

Let’s have a look at the necessary steps by using as example the data mapping for infotype Family Member/dependent (IT0021) for our demo transformation template group.

Steps

  1. To define Cloning transformation templates for Infotypes and subtypes, choose the customizing under Clone Transformation Template.

    Transformation template group and transformation template ERP_WS_19.
  2. Choose the transformation template group and transformation template ERP_WS_19.

    Enter the related infotype and subtypes in the list.
  3. Enter the related infotype and subtypes in the list.

Result

Primary mapping defined in transformation template ERP_WS_19 for Infotype 0021 is reused.

During the data replication, the primary mapping defined in the transformation template ERP_WS_19 for Infotype 0021 is reused when the subtype data is processed. Consider only primary mapped data that can be reused. It is also possible to consider country dependencies. For that purpose, we provide an additional customizing. Define country/region-specific infotypes and subtypes for cloning ERP transformation templates.

Log in to track your progress & complete quizzes