on 10-29-2019 12:19 PM
Function implementation description:
Batch import of employee data into employee data through EXCEL,information 0000,0001,0002;
Problems encountered:
1、HR_MAINTAIN_MASTERDATA and HR_INFOTYPE_OPERATION, I don't know which FM is more appropriate to choose?
2、The personnel number is internal give the number, need how to realize?
3、HR_MAINTAIN_MASTERDATA Can provide a complete sample reference。
annotate:SAP HCM is self-taught, please help me with your help. Thank you
Hi
We use both!
HR_INFOTYPE_OPERATION for inserting/copying etc individual infotypes
HR_MAINTAIN_MASTERDATA to process simple actions.
If we wanted to hire employees (internal number range) and populate 0000,0001,0002 etc etc we would use HR_MAINTAIN_MASTERDATA to process the hire and just populate 0000 and 0001.
the remainig required info types would then be processed thru HR_INFOTYPE_OPERATION
If you do a where used in these thru SE37 you will find examples in the system of calls to these function modules
bg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear friend,
Thank you for your support. I came to China。
The following is a summary of the problem, which can be helped by those who see it later。
The following code can be executed in full。
The MASSN parameter feels what information types this function needs to execute (configuration related)
GS_PPROP-INFTY = '0000'.
GS_PPROP-FNAME = 'P0000-MASSG'.
GS_PPROP-FVAL = 'A1'.
*GS_PPROP-SEQNR = 1 .
APPEND GS_PPROP TO GT_PPROP.
GS_PPROP-INFTY = '0001'.
GS_PPROP-FNAME = 'P0001-BTRTL'.
GS_PPROP-FVAL = '1010'.
*GS_PPROP-SEQNR = 1 .
APPEND GS_PPROP TO GT_PPROP.
GS_PPROP-INFTY = '0001'.
GS_PPROP-FNAME = 'P0001-ABKRS'.
GS_PPROP-FVAL = '01'.
*GS_PPROP-SEQNR = 1 .
APPEND GS_PPROP TO GT_PPROP.
GS_PPROP-INFTY = '0001'.
GS_PPROP-FNAME = 'P0001-BUKRS'.
GS_PPROP-FVAL = '9900'.
*GS_PPROP-SEQNR = 1 .
APPEND GS_PPROP TO GT_PPROP.
GS_PPROP-INFTY = '0001'.
GS_PPROP-FNAME = 'P0001-SBMOD'.
GS_PPROP-FVAL = '9900'.
*GS_PPROP-SEQNR = 1 .
APPEND GS_PPROP TO GT_PPROP.
"函数调用,用于创建人员的信息类型
"----------------begin of----------------------
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = '00000000' "人员编号
MASSN = 'ZA' "操作类型
ACTIO = 'INS' "信息类型操作
TCLAS = 'A' "数据保留的事务类
BEGDA = SY-DATUM "开始日期
ENDDA = '99991231' "结束日期
* OBJPS = "对象标识
* SEQNR = "有相同代码的信息类型记录数
* SPRPS = "人力资源主数据记录的锁定标志
* SUBTY = "子信息类型
WERKS = '9900' "人事范围
PERSG = 'F' "员工组
PERSK = 'F1' "员工子组
PLANS = '50000475' "职位
DIALOG_MODE = '1'
LUW_MODE = '1'
NO_EXISTENCE_CHECK = 'X'
NO_ENQUEUE = 'X'
IMPORTING
RETURN = GS_RETURN
RETURN1 = GS_RETURN1
HR_RETURN = GS_HR_RETURN
TABLES
PROPOSED_VALUES = GT_PPROP
MODIFIED_KEYS = GT_PSKEY
.
"----------------end of----------------------
WRITE:/ GS_RETURN1-MESSAGE.
LOOP AT GT_PSKEY INTO GS_PPROP .
WRITE : / GS_PSKEY-PERNR , GS_PSKEY-INFTY .
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.