Sapass

 Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> Bapi>HRMasterDataReplica



Index

HRMasterDataReplica

HRMasterDataReplica


The control object for HR master data replication controls the
replication of data from Organizational Management and the HR master record.


This object is used in a distributed system environment.


11-Dec-2005


Methods

Available Methods


  • SaveReplicaMultiple : Replication of HR master data and HR organizational data [ BAPI_HRMASTER_SAVE_REPL_MULT ]

11-Dec-2005


SaveReplicaMultiple

SaveReplicaMultiple



Functionality

This method determines how data from Organizational Management and HRmaster data is replicated, and stores the replications of objects.

The BAPI is used in the 'HR-ONLY' ALE scenario, which requires HR datato be validated and imported in a non-HR system. The number of
infotypes supported by 'HR-ONLY' is preset, which means that the BAPI is less suitable for complete legacy data transfers.

The header data of objects to be replicated is transferred using the'HR_Object_Header' parameter. In addition to the object key, which
consists of the plan version, object type, and object ID, there is a'proof flag' that must be set to 'X', and the 'Operator' field. Thisfield determines the mode in which the object in question is imported. You must decide whether to use the insert or update mode.


Insert mode:

The data records for the object are transferred in full. If an objectyou want to transfer already exists, it is replaced in full. In otherwords, it is deleted in full and then recreated using the transferred data records.

Update mode:


In the target system, the records that are completely within the perioddetermined by the 'HR_Infotype_Header' parameter are deleted in full,and then recreated using the transferred infotype data for the infotypes for the object.

If you want to create an object, you must ensure that the following
infotypes are transferred: infotypes 0000, 0001, and 0002 for persons,and infotype 1000 (object) for objects in Personnel Planning and Organizational Management.

The 'HR_Infotype_Header' parameter is used for each object to determinethe infotypes that are transferred for a particular period. All of the
infotype records that are completely within this period for theinfotype in question are transferred to another corresponding infotype table.

Example

Importing an organizational unit in insert mode

(existence infotype 1000):

BAPIHROBJ[1]-PLAN_VER = '01'.


BAPIHROBJ[1]-OBJ_TYPE = 'O '.

BAPIHROBJ[1]-OBJ_ID = '12345678'.

BAPIHROBJ[1]-PROOF = 'X'.

BAPIHROBJ[1]-OPERATOR = 'I'.

BAPIHRINF[1]-PLAN_VER = '01'.

BAPIHRINF[1]-OBJ_TYPE = 'O '.

BAPIHRINF[1]-OBJ_ID = '12345678'.


BAPIHRINF[1]-INFOTYPE = '1000'.

BAPIHRINF[1]-SUBTYPE = ' '.

BAPIHRINF[1]-FROM_DATE = '19980101'.

BAPIHRINF[1]-TO_DATE = '99991231'.

PD_OBJECT[1]-CLIENT = '000'.

PD_OBJECT[1]-PLAN_VER = '01'.

PD_OBJECT[1]-OBJ_TYPE = 'O '.


PD_OBJECT[1]-OBJ_ID = '12345678'.

PD_OBJECT[1]-INFOTYPE = '1000'.

PD_OBJECT[1]-SUBTYPE = ' '.

PD_OBJECT[1]-PL_STATUS = '1'.

PD_OBJECT[1]-PRIORITY = ' '.

PD_OBJECT[1]-FROM_DATE = '19980101'.

PD_OBJECT[1]-TO_DATE = '99991231'.


PD_OBJECT[1]-CHANGED_ON = '19980101'.

PD_OBJECT[1]-CHANGED_BY = 'MODEL USER'.

PD_OBJECT[1]-OBJ_ABB = 'ORG_EH_A'.

PD_OBJECT[1]-OBJ_NAME = 'organizational unit A'.

PD_OBJECT[1]-LANGU_ISO = 'DE'.

Importing infotype 0006 with subtypes 1 and 2 for a person in update


mode:

BAPIHROBJ[1]-PLAN_VER = '01'.

BAPIHROBJ[1]-OBJ_TYPE = 'P '.

BAPIHROBJ[1]-OBJ_ID = '00112233'.

BAPIHROBJ[1]-PROOF = 'X'.

BAPIHROBJ[1]-OPERATOR = 'U'.

BAPIHRINF[1]-PLAN_VER = '01'.


BAPIHRINF[1]-OBJ_TYPE = 'P '.

BAPIHRINF[1]-OBJ_ID = '00112233'.

BAPIHRINF[1]-INFOTYPE = '0006'.

BAPIHRINF[1]-SUBTYPE = '1 '.

BAPIHRINF[1]-FROM_DATE = '19980205'.

BAPIHRINF[1]-TO_DATE = '99991231'.


BAPIHRINF[2]-PLAN_VER = '01'.

BAPIHRINF[2]-OBJ_TYPE = 'P '.

BAPIHRINF[2]-OBJ_ID = '00112233'.

BAPIHRINF[2]-INFOTYPE = '0006'.

BAPIHRINF[2]-SUBTYPE = '2 '.

BAPIHRINF[2]-FROM_DATE = '19980304'.


BAPIHRINF[2]-TO_DATE = '19991231'.

EMPLOYEE_PRIVATE_ADDRESS[1]-OBJ_ID = '00112233'.

EMPLOYEE_PRIVATE_ADDRESS[1]-INFOTYPE = '0006'.

EMPLOYEE_PRIVATE_ADDRESS[1]-SUBTYPE = '1 '.

EMPLOYEE_PRIVATE_ADDRESS[1]-TO_DATE = '19980630'.


EMPLOYEE_PRIVATE_ADDRESS[1]-FROM_DATE = '19980205'.

EMPLOYEE_PRIVATE_ADDRESS[1]-CHANGED_ON = '19980701'.

EMPLOYEE_PRIVATE_ADDRESS[1]-CHANGED_BY = 'MODEL USER'.

EMPLOYEE_PRIVATE_ADDRESS[1]-STREET = 'Main Street'.

EMPLOYEE_PRIVATE_ADDRESS[1]-CITY = 'Heidelberg'.


...

EMPLOYEE_PRIVATE_ADDRESS[2]-OBJ_ID = '00112233'.

EMPLOYEE_PRIVATE_ADDRESS[2]-INFOTYPE = '0006'.

EMPLOYEE_PRIVATE_ADDRESS[2]-SUBTYPE = '1 '.

EMPLOYEE_PRIVATE_ADDRESS[2]-TO_DATE = '99991231'.

EMPLOYEE_PRIVATE_ADDRESS[2]-FROM_DATE = '19980701'.


EMPLOYEE_PRIVATE_ADDRESS[2]-CHANGED_ON = '19980701'.

EMPLOYEE_PRIVATE_ADDRESS[2]-CHANGED_BY = 'MODEL USER'.

EMPLOYEE_PRIVATE_ADDRESS[2]-STREET = 'Fisherman Road'.

EMPLOYEE_PRIVATE_ADDRESS[2]-CITY = 'Heidelberg'.

...


EMPLOYEE_PRIVATE_ADDRESS[3]-OBJ_ID = '00112233'.

EMPLOYEE_PRIVATE_ADDRESS[3]-INFOTYPE = '0006'.

EMPLOYEE_PRIVATE_ADDRESS[3]-SUBTYPE = '2 '.

EMPLOYEE_PRIVATE_ADDRESS[3]-TO_DATE = '19991231'.

EMPLOYEE_PRIVATE_ADDRESS[3]-FROM_DATE = '19980304'.


EMPLOYEE_PRIVATE_ADDRESS[3]-CHANGED_ON = '19980304'.

EMPLOYEE_PRIVATE_ADDRESS[3]-CHANGED_BY = 'MODEL USER'.

EMPLOYEE_PRIVATE_ADDRESS[3]-STREET = 'Broadway'.

EMPLOYEE_PRIVATE_ADDRESS[3]-CITY = 'Walldorf'.

Restrictions


If your Human Resources Management System is linked by ALE to anAccounting System, you are advised for technical reasons not to use theBAPI because synchronous validation would lead to a COMMIT. This would prevent a ROLLBACK if a posting error occurs.


If data is posted using the BAPI, ALE change pointers are not written.

Action 'AL', which consists of infotypes 0001 and 0002, is supplied bySAP and must not be modified. It is used to create personnel numbers.Infotype 0000 (Actions) is then overwritten without validation in accordance with the transferred parameters.


Infotype 1000 is also created by the BAPI without validation. Infotype0003 (Payroll Status) is recreated in accordance with the logic for creating HR master data.

If infotypes have time constraint 1, you must ensure that the data records do not contain gaps.


The 'Changed on' and 'Last changed by' fields in all of the infotypescontain the date on which the BAPI was accessed, and the user used to access the BAPI in the target system (RFC user).

Infotypes must not be related to dynamic actions in the system to which data is imported.


To ensure that actions are displayed consistently, you must deactivatethe additional actions (switch 'ADMIN EVSUB' in T77S0 = 0).

The method is not used in the scenario for distributed HR master data.

Notes

If the error messages are not precise enough for you to localize the error, you can import data to the R/3 System using the
HRMaster_Save_Repl_Mult' function module instead of the BAPI. The datarecords for error analysis are displayed online using report 'RHALEBAPIPROOF'.

The data is validated before it is imported, which can lead to runtimeproblems, especially if large amounts of data are imported. One way of
avoiding this problem, for example, is by reducing the size of the dataset for each BAPI access.


11-Dec-2005