Subcontracting components in an inbound delivery via DESADV IDoc



Subcontracting purchasing with inbound deliveries used to be a paint due to problems with components provided to vendor processing – see the notes:



That was mostly for batch managed components as their consumption is not executed in a dialog mode during goods receipt posting to a subcontracting inbound delivery. Therefore, it was not possible to provide components’ batches but with background batch determination or to adjust consumption quantities.


One of the workarounds was to decouple subcontracting goods receipt and components consumption with the modification from the note 654613 – Batches and goods receipt for inbound delivery for provision of materials for subcontract order. Not the perfect solution but better than nothing.


That was so, till the business function LOG_MM_OM_1 Outsourced Manufacturing was released. It brought:


Subcontracting Components in Inbound Deliveries

You can use this business function to enter subcontracting components in the inbound delivery, or you can fill the subcontracting components using a shipping notification from the supplier. This enables you to assign information about the batches used and the component quantities in the inbound delivery. Subsequent goods entry is booked automatically with these entries. Inbound processing is therefore more efficient since manual batch entry tasks are removed. This improves batch tracking for the sold-to party.


Subsequently, the IDoc inbound scenario DESADV / DELVRY07 was enhanced to support subcontracting components in inbound deliveries communicated electronically – the note 1397948 – Subcontracting: Components cannot be provided using IDoc /SPE/IDOC_INPUT_DESADV1


So far so good…


Problem statement


The problem with the above solution is that subcontracting components quantities transferred with DESADV / DELVRY07 message get fixed in the inbound delivery. That is confirmed by the note 1397948 – Subcontracting: Components cannot be provided using IDoc /SPE/IDOC_INPUT_DESADV1


The fixed quantity indicator is always set automatically for all components, so that no correlation occurs for the component quantities when changes are made to the inbound delivery quantity.


Why is that a problem…


Business impacts


Imagine the following, quite typical scenario.


A subcontractor provides a product on pallets and they notify a shipment of a full truck load, of say 30 pallets. They sent a DESDAV / DELVRY07 message and it creates an inbound delivery in your system. Now, during unloading you realize that 3 pallets are missing. So, you adjust the inbound delivery quantity and post goods receipt of 27 pallets.


As the components quantities are fixed by SAP standard DESADV processing logic, the goods receipt of 27 pallets consumes the components of the entire 30 pallets!!!


That has the following effects:


  • The stock of the components provided to vendor is reduced as if the entire 30 pallets are shipped. Depending on the case it may be correct or not. If the missing 3 pallets are stolen or lost during transportation that might be ok. However if they have never been shipped due to a loading problem on the subcontractor side, that is definitely not ok.


  • A subcontracting product is valued with the price of the service plus the cost of the components. Therefore the 27 pallets received will be 10% more expensive than planned. Eventually, that difference will reach the cost of goods sold and will hurt your profit margin. Again, that is not necessarily bad, depending on your accounting policies and the specific case. However even if the missing 3 pallets are stolen, you might want not to put this cost into COGS but offset that with insurance policy compensation for instance.




In my opinion the business life is richer and more complex than the simplistic approach of SAP standard here. But SAP does not give here any flexibility. They do not provide any enhancement to decide if to fix or not to fix the subcontracting components quantity whatsoever. Again that is confirmed by the note 1397948 – Subcontracting: Components cannot be provided using IDoc /SPE/IDOC_INPUT_DESADV1:


If, contrary to the standard design, you want an automatic correlation, this is only possible by making a modification in the class CL_SHP_LECOMP_CONTROL, method IF_EX_SHP_DESADV_IN~PROCESS_SEGMENT. (ls_comp-fmeng = abap_true)


It would have been nice if SAP had provided a BAdI enhancement here. Unfortunately they did not.


Be aware of this nuance when implementing electronic communication of inbound deliveries in subcontracting scenarios. It is likely to slip through tests and bite you only down the road. Also it might be quite hard to spot at the first glance.