Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Updating the job attributes and Position attributes - Infotypes 1610 and 1613

sanath1
Explorer
0 Kudos

Hello Experts,

We have a requirement to update the job attributes and position attributes from a custom program (i.e. excel file). We tried using the BDC option but it was quite unstable Some times it goes and enters the attributes properly but some times it goes to some other screen where in we have to enter the new entries button manually and hence the bdc is getting failed.

Also we tried using the function modules RH_PNNNN_MAINTAIN but it is of no help.

Any inputs are really helpful.

Thanks,

Sanath.

2 REPLIES 2

shaik_sajid
Active Contributor
0 Kudos

Hi,

Try to use the following Function Modules

BAPI_EMPLOYEE_ENQUEUE

HR_INFOTYPE_OPERATION

BAPI_EMPLOYEE_DEQUEUE

Also go through below Links

http://scn.sap.com/thread/3240436

https://scn.sap.com/message/10141790

Regards

Sajid

former_member184958
Active Participant
0 Kudos

Hi,

Go through the following sample code for modify the records of employee,

CONSTANTS: change TYPE pspar-actio VALUE 'MOD'.

      "This code is requred and locks the record ready for modification

      CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'

        EXPORTING

         number = p_pernr.

      "loop at p0071 into p_p0071.  "added to put code in context

      validitybegin = p_record-begda.

      validityend   = p_record-endda.

      p_record-endda = pn-begda - 1.

      CALL FUNCTION 'HR_INFOTYPE_OPERATION'

        EXPORTING

          infty         = '0071'

          subtype       = p_record-subty

          objectid      = P_record-objps

          number        = p_record-pernr     "employeenumber

          validityend   = validityend

          validitybegin = validitybegin

          record        = p_record

          recordnumber  = p_record-SEQNR

          operation     = change

          nocommit      = nocommit

          dialog_mode   = '0'

        IMPORTING

          return        = return_struct

          key           = personaldatakey

        EXCEPTIONS

          OTHERS        = 0.

       "endloop.

     "unlock record after modification

     CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'

       EXPORTING

        number = p_pernr.

Regards,

John.