Skip to Content
-1

issue with BAPI_REQUISITION_DELETE

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

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

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 07, 2017 at 05:05 AM

    Hi,

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

    rg

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 07, 2017 at 05:55 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded