‎2006 Apr 24 10:08 AM
Can we use HR_MAINTAIN_MASTERDATA to upload data into infotype 015? If possible can you give simple examaple stating the usage of that?
‎2006 Apr 24 10:15 AM
Hi sruthy,
1. HR_INFOTYPE_OPERATION
Its recommended to use this FM
for infotype updation thru abap code.
regards,
amit m.
‎2006 Apr 24 10:20 AM
Hi Sruthy,
For uploading/updating data in any infotype, you can use HR_INFOTYPE_OPERATION.
If you want further info, Plz tell.
*****Do not forget to reward points for useful replies
‎2006 Apr 24 10:32 AM
Hi Sruthy,
You can use the function module HR_INFOTYPE_OPERATION as suggeted above. Just remember to lock & unlock the employee before and after the function call. You can take a look at the following piece of code for reference.
* Enqueue personnel number
call function 'BAPI_EMPLOYEE_ENQUEUE'
exporting
number = pernr
importing
return = return.
if not return is initial.
message id return-id type return-type number return-number
with return-message_v1 return-message_v2
return-message_v3 return-message_v4.
raise action_stopped.
endif.
p0015-pernr = pernr.
p0015-begda = sy-datum.
p0015-lgart = '3351'.
p0015-betrg = '100.00'.
* create a 0015 for the amount
call function 'HR_INFOTYPE_OPERATION'
exporting
infty = '0015'
subtype = '3351'
number = pernr
validitybegin = sy-datum
record = p0015
operation = 'INS'
dialog_mode = '0'
importing
return = return.
if not return is initial.
message id return-id type return-type number return-number
with return-message_v1 return-message_v2
return-message_v3 return-message_v4.
raise action_stopped.
endif.
* Dequeue personnel number
call function 'BAPI_EMPLOYEE_DEQUEUE'
exporting
number = pernr
importing
return = return.
if not return is initial.
message id return-id type return-type number return-number
with return-message_v1 return-message_v2
return-message_v3 return-message_v4.
raise action_stopped.
endif.
Regards,
Suresh Datti