Hi.... ,
Well i am stucked with a problem regarding updation of pa0002 .
I have browsed through threads and developed a zprog . for updating
pa0002,however i am not able to update all records of a particular pernr i.e
if there are 5 records my prog is updating only 3 of them . For some pernrs it is not even updating single record.
I am not getting what is the condition that F.M is checking for?
Here is my code:
&----
*& Report ZTEST_14
*&
&----
*&
*&
&----
REPORT ZTEST_14.
infotypes : 0002.
tables :pernr.
return structure
data: rec_return type bapiret1. "return code
start-of-selection.
get pernr.
*rp-provide-from-last P0002 space SY-DATUM SY-DATUM.
provide * from p0002 between pn-begda and pn-endda.
p0002-nachn = 'test'.
call function 'BAPI_EMPLOYEE_ENQUEUE
exporting
number = p0002-pernr
importing
return = rec_return.
call function 'HR_INFOTYPE_OPERATION'
exporting
infty = '0002'
number = p0002-pernr
subtype = p0002-subty
objectid = p0002-objps
recordnumber = p0002-seqnr
validityend = p0002-endda
validitybegin = p0002-begda
record = p0002
operation = 'MOD'
*tclas = ''
lockindicator = p0002-sprps
*nocommit = ''
importing
return = rec_return.
call function 'BAPI_EMPLOYEE_DEQUEUE'
exporting
number = p0002-pernr
importing
return = rec_return.
endprovide.
end-of-selection.
Reply Pls.
John