Skip to Content
-1

issue with BAPI_REQUISITION_DELETE

Jun 05, 2017 at 12:13 PM

96

avatar image

Hi Experts,

I am using BAPI_REQUISITION_DELETE to delete a complete purchase requistion . issue is I am able to delete only the first line item when it comes to deletion of second line item its throwing an error as PURCHASE REQ locked with my id itself.

I am using a loop and passing line item numnber for that PR and a commit work.

thanks,

rg

10 |10000 characters needed characters left characters exceeded

please suggest how to overcome this error

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

avatar image
Former Member Jun 05, 2017 at 12:34 PM
1

Hi,

Can u show the code.I think

BAPI_REQUISITION_DELETE will take all line items to be deleted for a PR in a table using Tables parameter.

So no need to loop for single line item.

Regards,

krishna.

Share
10 |10000 characters needed characters left characters exceeded
Ramya g Jun 07, 2017 at 05:05 AM
0

Hi,

i used standard lock object to lock the PR and the issue is solved.

rg

Share
10 |10000 characters needed characters left characters exceeded
Sandra Rossi Jun 07, 2017 at 05:55 AM
0

If the BAPI uses an update task (usually an asynchronous process triggered at commit work), then the lock may be transmitted there, and is retained until the end of the asynchronous update task, so it may still be there when the BAPI is called again.

You may use either commit work AND WAIT, or deactivate the update task (SET UPDATE TASK LOCAL) to execute the updates synchronously.

And, of course, Krishna's answer is correct too.

Share
10 |10000 characters needed characters left characters exceeded