Checking documentation the page help gives the following comment regarding internal orders and shipments:
“Undo customer order delivery of parts delivered from an internal customer order, it is not possibile to cancell the internal customer order delivery when originating purchase order is in status Received or Arrived
For shipment deliveries, you could only cancel the shipment as a whole from the header. This would move the shipment back to Complete state if it was closed. For consolidated shipment, you should undo delivery per shipment.”
So it seems like it should be possible to undo delivery for the whole shipment as long as parts has not been received on demand site.
If parts have already been received on demand site it will not be possible to Undo Delivery and one will need to use the return flow from receipts and then RMA on supply side as described in previous post.
So the main reason here is the internal order transit object in which the system keeps track on inventory stock records being in transit. So when doing undo or RMA the part and quantities that should be cancelled/returned needs to fully be in that internal order transit object.