Ansicht
Dokumentation

ECPAO_BADI_USPERSMAP - BAdI: Mapping of User ID, Person ID, Username, and Object ID

ECPAO_BADI_USPERSMAP - BAdI: Mapping of User ID, Person ID, Username, and Object ID

ABAP Short Reference   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the integration add-on for Enterprise Resource Planning (ERP) and SAP SuccessFactors Employee Central (EC) when extracting data from the ERP system and replicating it to Employee Central.

You use this BAdI to map the Employee Central fields user_id, username, and person_id_external (for employees) and external code (for organizational objects) to corresponding fields in the ERP system. Using this BAdI, you can extract the data for the user_id, username, person_id_external, and external code fields from sources other than infotype fields.

You can use this BAdI for the Employee Data and the Organizational Data integration types.

For the Employee Data integration type, the BAdI is called when you have selected the mapping mode BAdI Mapping for one of these fields in the Employee Central instance settings:

  • User ID Mapping
  • User Name Mapping
  • Person ID Mapping

For more information, see Define Employee Data Settings for Employee Central Instance.

For the Organizational Data integration type, you can use this BAdI if you have specific requirements regarding the mapping of organizational object IDs to the external code field of Employee Central entities.

The BAdI uses the following methods:

GET_USERSYSID

This method extracts content for the user_id field. The method uses the following parameters:

  • Importing parameters
  • IV_PERNR: Personnel number (PERNR) of the employee for whom data is to be extracted

  • IV_CENTRAL_PERSON: Central person (CP) of the employee for whom data is to be extracted

  • IV_IS_TRANSFER_WITH_GLUE: Indicates whether the employee had a global transfer where both personnel assignments (personnel numbers) are to be handled together for the Job Information record in Employee Central

  • IT_EMP_GLOBAL_STATUS: Table that stores the details of each personnel assignment of the employee like the global transfer status, global assignment status, and concurrent employment status. Use this parameter to check whether the employee had a global transfer where both personnel assignments are to be handled together and transferred to one Job Information record in Employee Central.

  • Exporting parameters
  • EV_USR_SYS_ID_VALUE: Content from ERP that is extracted for the user_id field in Employee Central

  • EV_SKIP_USER_ENTITY: Indicates that the generation of the Basic Import template in Employee Central should be skipped for the employee. Set this parameter to True if the following applies: The employee's data was replicated from the on-premise ERP system to the Employee Profile in the SuccessFactors Talent Suite before and the employee has a global assignment or is concurrently employed. Setting the parameter to True makes sure that the employee's data is replicated to the same employment and that the employee doesn't get a second user ID in Employee Central.

Example
The US employee with the personnel number P1 is transferred to Germany. In the ERP system, the new personnel number P2 is created for the employee's personnel assignment in Germany. Employee Central uses only one employment (meaning a single user_id) for global transfer scenarios. This means that the data from both personnel assignments in the ERP system has to be replicated to a single employment in Employee Central. Therefore, the sample implementation of this BAdI ensures that both personnel assignments, P1 and P2, are mapped to one and the same user_id in Employee Central.
Note
Implement this method if you have used the integration add-on for ERP and SAP SuccessFactors HCM Suite to replicate employee data from an on-premise ERP system to the Employee Profile in the SAP SuccessFactors Talent Suite. To keep the employee key mapping of this integration consistent with the employee key mapping used in the integration with Employee Central, we recommend to use the same user ID in both integrations.
To do so, first make sure that you have selected the mapping mode BAdI Mapping in the Employee Central instance settings for the User ID Mapping field. Then implement this method in a way so that it checks if a user ID is stored for a personnel number in the log table HRSFI_D_EXTR_LOG (which is part of the integration add-on for ERP and SAP SuccessFactors HCM Suite). If the method finds an entry in the log table, this means that the personnel number has already been replicated to the Employee Profile in the SAP SuccessFactors Talent Suite. In this case you should use the same user ID mapping for the employee data replication to Employee Central. So your implementation of this method should return this user ID in the exporting parameter.

GET_PERSONID

This method extracts content for the person_id_external field. The method uses the following parameters:

  • Importing parameters
  • IV_PERNR: Personnel number of the employee for whom data is to be extracted

  • IV_CENTRAL_PERSON: Central person of the employee for whom data is to be extracted

  • IV_IS_GLOBAL_TRANSFER: Indicates whether the employee had a global transfer

  • IV_STD_PERSON_ID (optional parameter, only used when extracting data for an employee's dependents): Contains the person ID of the employee's dependent.

By default there is no differentiation between the employee's person ID and the dependents' person IDs If you have selected the mapping mode BAdI Mapping in the Employee Central instance settings for the Person ID Mapping field. That's why, using this parameter, you can overwrite the dependent's person ID with a unique key. For example, with the key generated by default when data is transferred for an employee's dependents (see Object Identification Field for Special Processing).
  • IV_IS_DEPENDENT (optional parameter, only used when extracting data for an employee's dependents): Indicates that the person ID is determined for an employee's dependent instead of for the employee himself or herself. If you set this parameter to X in your BAdI implementation, make sure to provide a unique ID using the IV_STD_PERSON_ID parameter.

  • Exporting parameters
  • EV_PERSON_ID_VALUE: Content from ERP that is extracted for the person_id_external field in Employee Central

  • EV_IS_ADDNL_EMPL: Indicates whether the personnel assignment replicated from ERP is a new employment or an additional employment for an existing person in Employee Central. If you set this indicator, an existing person_id_external is used, meaning, an additional employment is added for an existing person in Employee Central. If you don't set this indicator, a new employment with a new person_id_external is created in Employee Central.

Example
In the ERP system, an employee can have several personnel assignments in different countries, but only one central person ID. Therefore, the sample implementation of this BAdI ensures that an employee's central person ID is always mapped to one and the same person_id_external in Employee Central, independent of the number of personnel assignments the employee might have.

GET_USERNAME

This method extracts content for the username field. The method uses the following parameters:

  • Importing parameters
  • IV_PERNR: Personnel number of the employee for whom data is to be extracted

  • IV_CENTRAL_PERSON: Central person of the employee for whom data is to be extracted

  • IV_IS_TRANSFER_WITH_GLUE: Indicates whether the employee had a global transfer where both personnel assignments (personnel numbers) are to be handled together

  • Exporting parameter
  • EV_USERNAME_VALUE: Content from ERP that is extracted for the username field in Employee Central

Example
The US employee with the personnel number P1 is transferred to Germany. In the ERP system, the new personnel number P2 is created for the employee's personnel assignment in Germany. Employee Central uses only one employment (meaning a single username) for global transfer scenarios. This means that the data from both personnel assignments in the ERP system has to be replicated to one and the same employment in Employee Central. Therefore, the sample implementation of this BAdI ensures that both personnel assignments, P1 and P2, are mapped to one and the same username in Employee Central.

GET_OM_OBJECT_ID

This method extracts content for the external code field. The method uses the following parameters:

  • Importing parameters
  • IV_OTYPE: Type of the organizational object for which data is to be extracted

  • IV_OBJID: ID of the organizational object for which data is to be extracted

  • Exporting parameter
  • EV_OM_OBJECT_ID: Content from ERP that is extracted for the external code field in Employee Central

For the Employee Data integration type, you must have made the required settings in the Define Employee Data Settings for Employee Central Instance Customizing activity.

For the Employee Data integration type, if you have selected the mapping mode BAdI Mapping in the Employee Central instance settings, create a customer-specific implementation of this BAdI. The implementation must provide the mapping for all fields from the view for which you have selected this mapping mode.

For the Organizational Data integration type, create a customer-specific implementation of this BAdI if you have specific requirements regarding the mapping of organizational object IDs to the external code field of Employee Central entities.

  • CL_ECPAO_EMP_USYID_PRN_UNM_MAP
This class contains a sample implementation of how you can provide ERP content for the user_id, username, person_id_external, and external code fields in Employee Central.





Vendor Master (General Section)   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 13553 Date: 20240523 Time: 184428     sap01-206 ( 236 ms )