In previous post I've shown how to re-explode subcontracting components of purchase requisition using FM ME_COMPONENTS_MAINTAIN and ME_COMPONENTS_UPDATE_PREPARE . Using very similar code you can delete ...
... button, but I needed to do this from ABAP side. I started with IF_PURCHASE_REQUISITION but although there is a method "explode_bom" for item, then it was calling the screen with the results ...
...
data: fo_req type ref to if_purchase_requisition.
data: f_document type mepo_document.
data: fo_resetable type ref to if_releasable_mm.
data: f_success type mmpur_bool. ...