on 11-12-2008 10:16 AM
Hi
the follwoing code is not updating the SPRPS field in PA0001 infotype. Can you plz let me know if there any mistake.... I have used MOD operation also.
READ TABLE it_p0001 INTO wa_p0001 INDEX 1.
IF sy-subrc EQ 0.
IF wa_p0001-sprps IS INITIAL.
wa_p0001-sprps = 'X'.
ENDIF.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0001'
number = lv_pernr
lockindicator = 'X'
validityend = '99991231'
validitybegin = wa_p0001-begda
record = wa_p0001
operation = 'COP'
IMPORTING
return = return.
Hi raj,
If you want to modify lock indicator ie sprps then while passing to the function module parameter lockindicator value should be '' as it is used to select the existing record for modifying.
therefore correct code will be :
READ TABLE it_p0001 INTO wa_p0001 INDEX 1.
IF sy-subrc EQ 0.
IF wa_p0001-sprps IS INITIAL.
wa_p0001-sprps = 'X'.
ENDIF.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0001'
number = lv_pernr
lockindicator = ''
validityend = '99991231'
validitybegin = wa_p0001-begda
record = wa_p0001
operation = 'MOD'
IMPORTING
return = return.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The issue is resolved, the SPRPS field can be updated in 0023 infotype but not in 0001. Ofcourse, my requirement is met.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.