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: 

how to update data for pa2002..

Former Member
0 Kudos

hi,

how to update data for pa2002..

here i am using hr_infotype_Operation...(function module)

how to pass parameter in this.

Please help me.

2 REPLIES 2

Former Member
0 Kudos

use FM HR_INFOTYPE_OPERATION with operation as MOD ...

OR

I would suggest that you look at sap enhancement PBAS001 especially EXIT_SAPFP50M_002. This PAI . Your logic in ZXPADU02 would be something like this.

I would also suggest that you drive this user exit of IT0000 as this holds the status of an employee.

venkat_o
Active Contributor
0 Kudos

Hi, Try to use HR_INFOTYPE_OPERATION function module like below

DATA:p2002           TYPE STANDARD TABLE OF p2002 WITH HEADER LINE,
     return          LIKE bapireturn1,
     personaldatakey LIKE bapipakey.

START-OF-SELECTION.
  "Get the data for Infotype into table p2002
  LOOP AT p2002.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty         = '2002'
        number        = p2002-pernr
        subtype       = p2002-subty
        validityend   = p2002-endda
        validitybegin = p2002-begda
        record        = p2002
        operation     = 'MOD' "MOD = Modify or update
        nocommit      = space
      IMPORTING
        return        = return
        key           = personaldatakey
      EXCEPTIONS
        OTHERS        = 0.
  ENDLOOP.
  "You need write the logic for all infotype which are used in creating employee
Thanks venkat.O