‎2015 Oct 04 5:21 AM
Hi Friends,
I have upload program to upload the infotype 2 Master Data to SAP, following FMs I am using,
I would like to modify the data if the record is already existing with Pernr, start date and end date.
If the Record is not available, I want to create new record.
BAPI_EMPLOYEE_ENQUEUE
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0002'
number = ls_infotype0002-pernr
subtype = ''
record = ls_infotype0002
operation = 'MOD'
nocommit = ''
tclas = 'A'
dialog_mode = '0'
IMPORTING
return = ls_return.
BAPI_EMPLOYEE_DEQUEUE
Above code is not working for updating the existing record.
Thanks,
Prasad.
‎2015 Oct 04 6:03 AM
Hi Prasad,
In case of modification, you need to provide the complete key for that record.
In this case, you have to pass BEGDA and ENDDA as a key value along with PERNR.
Pass the BEGDA to VAlidityStart Date and ENDDA to validity end date parameters.
Also, let me know what is the error value it shows in ls_return (in your error case )
Regards,
Venkat
‎2015 Oct 04 6:03 AM
Hi Prasad,
In case of modification, you need to provide the complete key for that record.
In this case, you have to pass BEGDA and ENDDA as a key value along with PERNR.
Pass the BEGDA to VAlidityStart Date and ENDDA to validity end date parameters.
Also, let me know what is the error value it shows in ls_return (in your error case )
Regards,
Venkat
‎2015 Oct 04 10:25 AM
Hi Venkat,
Thank you, I was passing begda and endda in the record parameter.
Regards,
Prasad.
‎2015 Oct 05 5:40 AM
Hi,
Try and change the dialogue mode = 2 and see where the error is coming, and then try to pass the correct data,
Hope this helps.
‎2015 Oct 05 5:54 AM
Dear Prasad,
Your discussion is marked as Answered. If so, can you please update the solution.
If not, let me know what it the value in ls_return parameter you get.
Regards,
Venkat