cancel
Showing results for 
Search instead for 
Did you mean: 

How to flag deletion indicator as 'X' for line item of "Purchase Requestion"

ysh_1
Explorer
0 Kudos
103

Hello,

I want to flag the deletion indicator (EBAN-LOEKZ) as 'X' for the line item of Purchase Requestion.

I've used FM "BAPI_REQUISITION_DELETE" in one report, but it is not working properly. It is throwing me an error - " 06269 : This item can only be deleted via the associated sales document "
(When i debugged the BAPI i found that at one line debugger is not going on this perform  "PERFORM requisition_delete TABLES xeban "  because of "EXIT" keyword used.)

I have already see many threads on internet, but not working.

I want any solution that would update the EBAN-LOEKZ as 'X' by using any function module, or any other way.

View Entire Topic
DominikTylczyn
SAP Champion
SAP Champion
0 Kudos

Hello @ysh_1 

The long text of the message 06269 explains the situation clearly:

Short Text
This item can only be deleted via the associated sales document

Diagnosis
This purchase requisition item was generated from a sales document (third-party order). However, the requisition item has not yet been converted into a purchase order. If it were now deletable, the relevant sales document could not be closed.

System Response
This purchase requisition item cannot be deleted until a purchase order has been created for it.

Procedure
If you want to delete the purchase requisition item without generating a purchase order from it, you can do so via the relevant sales document (you will find the latter in the account assignment for this item). If you maintain the "reason for rejection" in this sales document or delete the relevant schedule line, the purchase requisition item will also be deleted.

You can't delete the purchase requisition directly as it is generated from a sales document. You need to delete the sales document instead. A sales order can be changed or deleted with the BAPI_SALESORDER_CHANGE function.

Best regards

Dominik Tylczynski