‎2006 Oct 12 5:58 AM
I am using HR_INFOTYPE_OPERATION to update a custom infotype. Following is what I am doing in the user exit (international transfer).
1. Delete record for custom infotype (9005) for OLD_PERNR = 50
- HR_INFOTYPE_OPERATION with "DEL"
- CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
- COMMIT WORK and WAIT.
2. Create record for Costom infotype (9005) for NEW_PERNR = 51
- HR_INFOTYPE_OPERATION with "INS"
- CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
- COMMIT WORK and WAIT.
After complete processing one can see records created for both PERNR (50 and 51) with same data sent to function in step 2.
There seems to be a buffer issue any ideas?
‎2006 Oct 12 4:20 PM
Hi Deep,
You cannot use a COMMIT WORK inside the User exit.. Plcae the function call to HR_INFOTYPE_OPERATION in a separate Report program & SUBMIT that report from the User exit.. this will isolate the two workprocesses & eliminate the COMMIT WORK conflicts..
~Suresh
‎2006 Oct 12 6:17 AM
after each process REFRESH all the internal tables,
like this
operation one : DELETE and commit work
refresh all FM data ,
operation two : Insert and commit work.
regards
Prabhu
‎2006 Oct 12 7:20 AM
Sorry did not work. There are actually no internal tables at that are sent when using function "HR_INFOTYPE_OPERATION"
Thanks
‎2006 Oct 12 9:36 AM
Hi, The problem seems to be with
CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
- COMMIT WORK and WAIT.
Do it the other way:
- COMMIT WORK and WAIT.
CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
Tell me if it works...
I can give you the reason...
‎2006 Oct 12 4:13 PM
‎2006 Oct 12 4:20 PM
Hi Deep,
You cannot use a COMMIT WORK inside the User exit.. Plcae the function call to HR_INFOTYPE_OPERATION in a separate Report program & SUBMIT that report from the User exit.. this will isolate the two workprocesses & eliminate the COMMIT WORK conflicts..
~Suresh
‎2006 Oct 12 5:37 PM
The code is exactly as you have mentioned. But the problem is still there.
Thanks
‎2006 Oct 12 7:48 PM
Problem is solved. There is a switch in table "V_T582A" (prosposed) that was "on" and copy infotype switch was "on". After switching those switches off the User exit worked.
Plus I implemented steps recommended above.
Thanks.