Skip to Content
avatar image
Former Member

FM to create/update HR infotypes

Hi,

Does anybody can help ?

Thank you.

Marian

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    May 04, 2006 at 11:20 AM

    Hi Marian,

    If you are talking abt inserting updating records to

    infotype then ,

    Please use the below code for inserting records to

    infotype p0006.

    * Lock Pernr
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
           EXPORTING
                number = dt_0006-pernr
           IMPORTING
                return = dg_return_struc0.
    
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
           EXPORTING
                INFTY          = '0006'
                NUMBER         = dt_0006-pernr
                SUBTYPE        = P0006-ANSSA
                VALIDITYEND    = P0006-ENDDA
                VALIDITYBEGIN  = P0006-BEGDA
                RECORD         = P0006
                OPERATION      = 'INS'
           IMPORTING
                RETURN         = dg_return_struc1
                KEY            = dg_record_key
           EXCEPTIONS
                OTHERS         = 0.
      if not  dg_return_struc1 is initial.
        dt_final-mess = dg_return_struc1-message.
      else.
        dt_final-mess = 'Address Record added successfully'(014).
      endif.
    
    
    
    * Unlock Pernr
      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
           EXPORTING
                number = dt_0006-pernr.
    
    
    

    or if you want to create new infotype then see the link below.

    Infotype" target="_blank">http://www.sapdevelopment.co.uk/hr/infotypehome.htm">Infotype modfication

    Thanks&Regards,

    Siri.

    Message was edited by: Srilatha T

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 04, 2006 at 11:16 AM

    check these limks..

    http://www.sap-img.com/human/how-to-create-a-hr-infotype.htm

    http://help.sap.com/saphelp_46c/helpdata/EN/d2/cb455f455611d189710000e8322d00/content.htm

    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-hr/how-to-create-z-infotype-in-organizational-management-745603

    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html

    reward if useful..

    Follow this procedure.

    1. You should create the base structure PSXXXX. You just include the additional fields you want in this structure. The common header data will be created for the tables.

    e.g. PS9919 should just contain the field 'NUMBR' of some data element (e.g. CHAR15 or a new one you create) or just use the built-in definition.

    2. Use transaction PM01, enter infotype number XXXX, maintain infotype settings (time constraint, subtype strategy,etc...). I think you have some documentation for these settings.

    3. To have the infotype listed on PA30 screen you should deal with some customization.

    That's all!

    Also refer this links..

    create-hr-infotype-reference

    how-to-create-a-hr-infotype

    Add comment
    10|10000 characters needed characters exceeded

  • May 04, 2006 at 11:18 AM

    Use the FM:

    HR_INFOTYPE_OPERATION

    This function module enables you to maintain master data for employees

    and applicants. You can transfer one data record. All validation checks

    take place that would take place in the individual maintenance screens

    in the dialog. If necessary, the module returns an error message. The

    error messages are the same as the error messages in the dialog, that

    is, the individual maintenance screen error messages are transferred

    rather than interpreted by this module.

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded