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

Problem with HR_INFOTYPE_OPERATION

Former Member
0 Likes
884

I have the following problem:

I've got a function module in which depending on a parameter 'OPTION' i can either INSERT or DELETE a record in infotype 0007, but i've got this strange behaviour:

When i create a record with INSERT option (which works fine) and i try to delete it inmediatily with DELETE option, the last operation (DELETE) does not work (the record is not deleted)

I've tried COMMIT WORK but doesn't work anyway.

The strange thing is that when i try to DELETE it again with the same FM (after 30 sec - 1 min) it does work.

Any ideas?

I have the following problem:

I've got a function module in which depending on a parameter 'OPTION' i can either INSERT or DELETE a record in infotype 0007, but i've got this strange behaviour:

When i create a record with INSERT option (which works fine) and i try to delete it inmediatily with DELETE option, the last operation (DELETE) does not work (the record is not deleted)

I've tried COMMIT WORK but doesn't work anyway.

The strange thing is that when i try to DELETE it again with the same FM (after 30 sec - 1 min) it does work.

Any ideas?

6 REPLIES 6
Read only

Former Member
0 Likes
824

Might be the pernr is locked .. and after a minute it's unlocked ..

Read only

0 Likes
824

No. It's not the case. I'm locking it and unlocking it after each operation.

Read only

Former Member
0 Likes
824

Srinivas is right.

Check if you are able to insert through program and

delete MANUALLY

Read only

0 Likes
824

I don't think so. I've got no error message after each operation, but is not deleting.

Read only

0 Likes
824

what happens when u insert and delete the record manually

I mean BOTH MANUAL for the same data as your program

What is the result?

Read only

0 Likes
824

In this case, it works.

It's not working only when i run my code as explainde before.

INSERT is working always, but the DELETE operation only fails when there is a little gap between INSERT and DELETE operation., Just this.

Kind of strange ain't it?