Error message 06269 'This item can only be deleted via the associated sales document' is generated when you delete a purchase requisition created from a customer order. The purchase requisition cannot be deleted.
In the meantime, the purchase requisition has been ordered. The purchase requisition was not automatically deleted when the sales order was changed/deleted.
Use the following program to permit the purchase requisition to be deleted:
PROGRAM ZZTEST10.
TABLES: EBAN.
PARAMETERS: BANFNR LIKE EBAN-BANFN OBLIGATORY.
SELECT-OPTIONS: BANFPOS FOR EBAN-BNFPO. " Banfposition
SELECT * FROM EBAN WHERE BANFN = BANFNR
AND BNFPO IN BANFPOS.
IF SY-SUBRC = 0.
EBAN-ESTKZ = SPACE.
UPDATE EBAN.
WRITE: / 'Bestellanforderung', EBAN-BANFN, EBAN-BNFPO, 'geƤndert'.
ENDIF.
ENDSELECT.
This program removes the link to the SD order, allowing the purchase requisition to be deleted normally with Transaction ME52.
As a basic rule, in future you should first delete the purchase orders and then the corresponding purchase requisitions. If you use this sequence, everything will work properly.
Additional key words
FV45EFBA, LOEKZ, FV45EFMA
No comments:
Post a Comment