2008 Jun 05 12:20 PM
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?
2008 Jun 05 12:23 PM
Might be the pernr is locked .. and after a minute it's unlocked ..
2008 Jun 05 12:25 PM
No. It's not the case. I'm locking it and unlocking it after each operation.
2008 Jun 05 12:25 PM
Srinivas is right.
Check if you are able to insert through program and
delete MANUALLY
2008 Jun 05 12:28 PM
I don't think so. I've got no error message after each operation, but is not deleting.
2008 Jun 05 12:31 PM
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?
2008 Jun 05 12:37 PM
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?
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |