Skip to Content
-1

Examples of the use of HR_MAINTAIN_MASTERDATA

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Oct 30, 2019 at 10:28 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 31, 2019 at 09:49 AM

    Hi,

    pernr.jpg(28.7 kB)

    Also I do not include PERNR in PROPOSED_VALUES

    proposed.jpg(41.0 kB)

    bg


    pernr.jpg (28.7 kB)
    proposed.jpg (41.0 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 01, 2019 at 01:16 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.