06-21-2007 2:15 PM
hi
im uploading the infotype 21 (family details) through function module hr_infotype_operations. i found that infotype 0106 (family/related person)
is a secondary infotype and that a record is created for 0106 ,everytime you create a record in 21. so i upload the family data of an employee using the function module for infotype 21 initially. and then fetch the same record from the table pa0106 and modify the same record with other information.
for example : u have the address details of a dependent(father subtype 11) in infotype 21. this address data is stored in the table pa0106 . im not able to modify the record for infotype 0106 using the function module 0106.
i would like to know the reason for the same. Is it because that infotype 0106 is a secondary infotype and u cannot modify the record using the fn module..?/
thanks
sridharan
06-21-2007 2:22 PM
check the RETURN table of that FM ? are u getting any Errors ?
Regards
Peram
06-21-2007 3:11 PM
06-21-2007 4:08 PM
i would like to know about the parameter SECONDARY_RECORD in the fn module HR_INFOTYPE_OPERATIONS
06-26-2007 6:28 AM
The problem is solved. u need to specify the secondary infotype table for this parameter
07-30-2007 7:00 AM
Hi Sir,
I am also facing the same issue...i need to update dependents Information Date Of Birth n Perid(Which is stored in IT0106)...in IT 0021..
Kindly correct my code....
I am using the following code for this...
data: w_return type bapireturn1.
data: p0021_struc TYPE p0021,
p0106_struc TYPE p0106,
p_pskey TYPE pskey.
start-of-selection.
get pernr.
p0021_struc = p0021.
p0021_struc-favor = 'Gaurav'.
p0021_struc-fgbdt = '05/10/1955'.
Move p0021_struc-favor to p0021-favor.
p0106_struc = p0106.
p0106_struc-stras = '2235 BOmbay Road'.
p0106_struc-perid = '123456789'.
MOVE p0106_struc-stras to p0106-stras.
Enqueue personnel number
call function 'BAPI_EMPLOYEE_ENQUEUE'
exporting
number = pernr-pernr
importing
return = w_return.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = p_pskey-infty
number = p_pskey-pernr
subtype = p_pskey-subty
objectid = p_pskey-objps
lockindicator = p_pskey-sprps
validityend = p0021-endda " '99991231'
validitybegin = p0021-begda
record = p0021_struc
operation = 'mod'
tclas = 'A'
dialog_mode = '2'
nocommit = p_test
VIEW_IDENTIFIER = '07' "p0003-viekn
secondary_record = p0106_struc
IMPORTING
return = w_return
key = familykey
EXCEPTIONS
OTHERS = 0.
Enqueue personnel number
call function 'BAPI_EMPLOYEE_DEQUEUE'
exporting
number = pernr-pernr
importing
return = w_return.