Hi,
I have enhanced the infotype IT0008 to create a new column to store the wage type amount to 6 dec . places.
Now, the requirement is to move the contents of amount field ( BETRG) into new field( 6 decimal places).
I am using the FM HR_INFOTYPE_OPERATION to modify table PA0008.
The code is below.
SELECT *
FROM pa0008
INTO TABLE lt_p0008
WHERE pernr IN s_pernr
AND subty = '9'
AND begda NE '20100501'.
LOOP AT lt_p0008 INTO ls1_p0008 .
MOVE-CORRESPONDING ls1_p0008 TO ls_p0008.
PERFORM move_parts.
ls_p0008-infty = '0008'.
CLEAR ls_return.
*lock the record
CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
EXPORTING
number = ls_p0008-pernr
validitybegin = ls_p0008-begda
IMPORTING
return = ls_return.
IF NOT ls_return-type = 'E'.
CLEAR ls_return.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0008'
number = ls_p0008-pernr
subtype = ls_p0008-subty
OBJECTID =
LOCKINDICATOR =
validityend = ls_p0008-endda
validitybegin = ls_p0008-begda
recordnumber = ls_p0008-seqnr
record = ls_p0008
operation = 'MOD'
tclas = 'A'
DIALOG_MODE = '1'
nocommit = 'X'
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
return = ls_return
key = lt_key
.
ENDLOOP.
FORM move_parts .
ls_p0008-zparts1 = ls1_p0008-bet01.
ls_p0008-zparts2 = ls1_p0008-bet02.
ls_p0008-zparts3 = ls1_p0008-bet03.
ls_p0008-zparts4 = ls1_p0008-bet04.
ls_p0008-zparts5 = ls1_p0008-bet05.
ls_p0008-zparts6 = ls1_p0008-bet06.
ls_p0008-zparts7 = ls1_p0008-bet07.
ls_p0008-zparts8 = ls1_p0008-bet08.
ls_p0008-zparts9 = ls1_p0008-bet09.
ls_p0008-zparts10 = ls1_p0008-bet10.
and so on upto 40.
EDNFORM.
This is working well for few of the employees but for others, it is not updating the new fields( ZPARTS1, ZPARTS2 and so on.)
Also, for few of the pernrs, the source field(BETRG) is getting the cleared (value 0.00) in PA0008.
Please help.