Extracting and Transferring Employee Data from SAP S/4HANA to Employee Central

Objectives

After completing this lesson, you will be able to:
  • Extract employee data from SAP S/4HANA
  • Setup parallelization of employee data extraction via job scheduler report

Employee Data from SAP S/4HANA

Here is how to extract employee data from the SAP S∕4HANA system to transfer it to Employee Central.

Context

Before running the extraction report, check if the mulitiple Employee Central instance functionality is enabled or disabled in the constants table. If the ERP to EC/EC to ERP: Connect Multiple EC Instances switch is enabled in the constants table, then make sure that you choose the correct Employee Central instance for the transformation template group. For an existing employee based on the already existing entry in the employee key mapping table, ensure that the same Employee Central instance is used. Also ensure that all the PERNR's of an employee are sent to the same Employee Central instance.

You can use the Assign Employee Central Instance to Company Code Customizing activity at Personnel ManagementIntegration with SuccessFactors Employee CentralBusiness Integration BuilderPrerequisites to make sure that the configurations maintained in the activity are used to ensure that the employment (PERNR) is migrated to the intended Employee Central instance. Based on this view, a check is introduced to identify whether the transformation template group used for extraction is relevant for the PERNR which is extracted. For the additional employments of existing employees, the Employee Central instance is also determined from this configuration. Migration is only allowed when the Employee Central instance matches with the Employee Central instance used for the previous contracts.

Extract Changed Employee Data Using Delta Replication

After the initial run of the employee data extraction program, changed data is replicated using delta replication. Here, you learn how to set this up.

Prerequisites

You can only use template groups with the Web Service Transfer communication channel for delta replication.

Context

When HR administrators change employee data in the SAP S∕4HANA system, change pointers are created. You can use the Job Scheduler report (ECPAO_EMPL_DMT_JOB_SCHEDULER) to extract the data for the changed employees. In addition, you can now replicate the employees who will be hired in future using the change pointers. By using the job scheduler report, you can run the extraction process for a larger load and also schedule the extraction process in batches. SAP recommends using the Job Scheduler report as it is more efficient. For more information see: Parallelization of Employee Data Extraction Via Job Scheduler Report

Data extraction program, choose the transformation template group from the VC_ECPAO_MAP view cluster. to enable the delta replication, choose the Enable for Delta Replication option. Also, you can choose a subset of transformation templates from the group for delta replication by enabling the Enable for Delta Replication option in the V_ECPAO_VARIANT view.

The Creating IDoc Type from Change Pointers (RBDMIDOC) program (or BD21 transaction) reads the change pointers with the ECPAO and ECPAO_OM message type. It collects the object list to be processed, and determines the delta enabled transformation template group and submits these details to the employee extraction report at once. If you enable the ERP to EC/EC to ERP: Connect Multiple EC Instances switch in the constants table, then the objects that are to be processed are split based on the Employee Central instance that is associated with their company code. The objects are grouped together with the associated delta enabled transformation template group.

Note

The data replication does not use Application Link Enabling (ALE) or IDocs. The RBDMIDOC program uses the ECPAO message type to trigger the replication of changed employee data to Employee Central using a synchronous Web service call.

Note

In SAP S∕4HANA, all infotype data is effective dated. In Employee Central, some data, such as e-mail or phone information, isn't effective dated. If you change data in SAP S∕4HANA for the future that isn't effective dated in Employee Central, the corresponding change pointers will only be executed at this future date.

To ensure that the change pointers are not captured in PA_SE_IN integration when the message type ECPAO and ECPAO_OM are not active in the BD50 transaction, you must install the SAP Note: 2552346

Tip

For larger loads of data, we recommend you to run the delta replication using the job scheduler report instead of the RBDMIDOC program or BD21 transaction.

To run the RBDMIDOC program, follow these steps.

Steps

  1. Go to the Define Background Job (SM36) transaction.

  2. Schedule the Creating IDoc Type from Change Pointers (RBDMIDOC) program as a regular background job using the ECPAO message type.

Employee Data with Additional Events Before Earliest Transfer Date

Learn how to extract the employee data with extra events before the earliest transfer date.

Context

The employee extraction report extracts the employee data from or after the earliest transfer date that you have defined at the transformation template group. Hence, the records are extracted with the earliest transfer date or after the earliest transfer date with pseudo hire date as the first event reason. During this process:

  • Employee records before the earliest transfer date are not extracted which can lead to a different hire date in Employee Central (Employment information). The hire date in Employee Central is derived from the first job information record. Hence, the start date of the pseudo hire event reason can be considered as the actual hire date in the Employee Central (Employment information) system.

  • Terminated employees and the employees on long-term absences are not migrated.

To overcome these problems, as a best practice, it is recommended to use the additional events feature. By configuring the additional events, the employee extraction report migrates the records (Job Information and Personnel Information) before the earliest transfer date with additional data along with the records after the earliest transfer date. For such extra records of job information created before the cut-off date, you can migrate a constant or an actual database value, based on the validity period.

If the additional events are not configured, the employee data migrates the data as shown here:

Graphic showing an example of the earliest transfer data with additional events that are not configured.

Note

Refer to the SAP Help Documentation for more information on this topic.

Replicate Employee Data from SAP S/4HANA to Employee Central

Parallelization of Employee Data Extraction through Job Scheduler Report

For migrating a large amount of employee data to Employee Central you can use the Job Scheduler report. This report automatically divides the load into smaller batches and schedule multiple background jobs, which can be executed in parallel.

Prerequisites

You must have already configured the settings for running the employee extraction report.

Context

When you run the report, it automatically divides the load into smaller batches and schedule multiple background jobs for each batch. The program extracts all employee data for the selected employees that you have defined using the transformation template group specified on the selection screen of the program. At any time, a set of parallel jobs are running. Once a particular job is completed, the next job starts immediately. This ensures that the total processing time to complete the employee migration for all the employees is shorter.

Procedure

  1. Go to the Job Scheduler for Employee Data Migration (ECPAO_JOB_SCHED_EE) transaction to run the Job Scheduler for Employee Data Migration (ECPAO_EMPL_DMT_JOB_SCHEDULER) program.

    The program extracts employee data from the SAP S∕4HANA system based on your selection criteria.

  2. Specify for which employees the data is to be extracted. To do so, either specify the personnel numbers of the employees or use organizational assignment criteria to select a group of employees.

    For the list of PERNRs that you have chosen, the delta-enabled transformation template group is determined for the chosen Employee Central instance. It is submitted through the background jobs for processing. The remaining PERNRs are filtered out for processing as they don't belong to the chosen Employee Central instance.

  3. Select the Modified Employees Only checkbox if you want to extract the data only for the modified employees and then schedule the extraction process in the background. When you choose this option, you can only use the Job Selection Criteria fields to execute the report. This option should be chosen when you want to perform delta replication via change pointers. For more information see: Extracting Changed Employee Data Using Delta Replication topic. If the ERP to EC/EC to ERP: Connect Multiple EC Instances switch is enabled in the constants table, then you need to choose the Employee Central instance. Only those objects that are related to the chosen Employee Central instance are considered for processing by the job scheduler for employee data migration program.
  4. Specify the number of employees that need to be replicated per job and the number of jobs that has to be performed in parallel.

    Note

    The maximum number of Employees Per Job is 100 and the Max No. of Jobs is 50. The default Max No. of Jobs is 10. If the number of employees per job and the maximum number of jobs exceeds the limit, you would receive a warning message.

  5. Select the transformation template group to be used for the data extraction. Transformation template groups are defined in the VC_ECPAO_MAP view cluster.
  6. Select the variant ID that you have created before in the Define the Variant IDs for Data Migration customizing activity (view V_ECPAO_VARIANT). Once you have created the variant ID, you should have assigned the required transformation templates to the variant ID using the Define the Transformation Templates for a Variant ID customizing activity (view V_ECPAO_TEMP_VAR).

    Note

    This is not a mandatory field. You can choose the Variant ID if you want to perform the extraction in multiple steps. For more information, see: Extracting Employee Data in Multiple Steps.

    For example, a transformation template group consists of the five transformation templates (ERP1, ERP2, ERP3, ERP4, and ERP5). In these templates if you want to choose only ERP1, ERP3, and ERP5, you can create a variant ID for these transformation templates. Also, when you choose this variant ID for migration process, only these transformation templates (ERP1, ERP3, and ERP5) are considered.

    You can configure the EC templates, which should be filtered out for a given country/region using the customizing activity Filter EC Entities for Migrating Employee Data to EC based on Country (view V_ECPAO_ECTM_FIL).

  7. Specify how you would like to transfer the data:
    • By Web Services, using the middleware that is available for the Employee data migration from SAP S∕4HANA to Employee Central.

    • Using an application server.

      If you select the File Transfer and Use Server Path options, you can later transfer the data from the application server location to a local drive.

      Note

      When you schedule the program as a background job to carry out a mass data extraction where the data is imported to Employee Central, choose the File TransferUse Server Path option.

      If you want to combine several CSV files into a ZIP file, select the Combine into ZIP file checkbox. Note that the CSV files that you create for generic objects can't be zipped. They are stored separately, even if you select the Combine into ZIP file option.

  8. Select the Detailed Message Log checkbox if you want to get a detailed log containing all messages.

    The download log file shows all the success, error, and warning messages. It also includes the number of files that were downloaded and from where the file is downloaded from.

    Note that the files can contain personal and sensitive data. Extra authorization is performed to check if the user has the right to download the CSV file. For this operation, only specific authorized users must be allowed. The downloads that are triggered by a user to the application server or local server in Production mode and in Test Run (Download Payload) are logged through the table ECPAO_OBJ_DWNLD along with the timestamp and transformation template details.

    The following authorizations are required to be able to download the CSV files:

    Authorizations

    Authorization ObjectAuthorization FieldAuthorization Value
    S_DATASET(for application server)ACTVT34
    S_DATASET(for application server)FILENAME/usr/*
    S_DATASET(for application server)PROGRAM

    CL_ECPAO_FILE_ON_SERVER*

    ECPAO_EMPL_EXTRACTION

    S_TABU_NAMACTVT02
    S_TABU_NAMTABLEECPAO_OBJ_DWNLD
  9. You can also choose other selection criteria based on for which employees the data is to be extracted:

    Select the Failed Employees Only checkbox if you want to rerun the replication for only those employees for which the replication status is failed. The number of jobs created is based on the number of failed employees.

    Failed Employees Only is supported only for Web Service Transfer mode.

    The Suppress Identical Records option that was previously present in the selection screen is not available from SP 03 as Employee Central by default does suppression for the identical records always.

Results

After all the jobs are completed in the background, all the Employee data will be migrated to Employee Central through Web service transfer or downloaded through CSV files in the application server.

Note

If multiple PERNRs are linked to one Central Person (CP), then the PERNRs belonging to the same Central Person are processed in the same job. If the employees per job is 100, there can be more than 100 PERNRs executed in a single job, because the PERNRs are linked to the same CP.

The extraction process updates the change pointers (if available) of the successfully migrated PERNRs, and marks the change pointers as processed. If the ERP to EC/EC to ERP: Connect Multiple EC Instances switch is enabled in the constants table then the change pointers are used to determine the list of PERNRs that are relevant to the chosen Employee Central instance. The program only processes these PERNRs.

Log in to track your progress & complete quizzes