Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HR_INFOTYPE_OPERATION Function Buffer Issue

Former Member
0 Likes
3,303

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?

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
1,833

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

7 REPLIES 7
Read only

Former Member
0 Likes
1,833

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

Read only

0 Likes
1,833

Sorry did not work. There are actually no internal tables at that are sent when using function "HR_INFOTYPE_OPERATION"

Thanks

Read only

Former Member
0 Likes
1,833

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...

Read only

0 Likes
1,833

Sorry did not work.

Thanks

Read only

suresh_datti
Active Contributor
1,834

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

Read only

0 Likes
1,833

The code is exactly as you have mentioned. But the problem is still there.

Thanks

Read only

0 Likes
1,833

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.