Free Goods determination happens in Sales Order based on Free Goods Condition Records maintain in T-Code VBN1.
Now while creating Delivery, system just copies the Main Item quantity & Free Goods Item Quantity from Sales Order & does not access the Free Goods condition again.
In case of complete (single) Delivery for one Sales Order, there is no problem because full quantity of main & free item is delivered at one go.
But let us imagine a scenario where partial deliveries are done.
For Example, say in a Sales Order:
Main Item – 100 Tons
Free Item – 10 Tons
Main Item – 50 Tons (system proposes 100 Tons, which is reduced to 50 Tons)
Free Item – 10 Tons (system does not reduce the Free Goods proportionately)
As seen above, system does not reduce the Free Goods quantity even if the Main Item quantity is reduced in Delivery.
To control this situation SAP System has given following options to control partial Deliveries (to be maintained in under “Free Goods delivery Control” VBN1 Condition Record):
– Delivery takes place regardless of main item
A – Delivery only if main item is partially delivered
B – Delivery only if main item is fully delivered
C – Delivery if main item is part. delivered, only with main itm
E – Delivery proportional to quantity in main item
Normally E “- Delivery proportional to quantity in main item” is maintained to ensure that any reduction to main item will make proportionate reduction in Free Items. But the Main Item & Free Item quantity field is modifiable & user can further increase the Free Goods Item quantity to Sales Order Free Goods quantity.
To control the above, we have recently made the Free Goods Item Quantity Non-Modifiable in Delivery document by inserting a ABAP code in Badi – LE_SHP_DELIVERY_PROC.
…. sy-tcode = ‘VL01N’ OR sy-tcode = ‘VL02N’.
…. IF screen-name = ‘LIPSD-G_LFIMG’.
IF is_lips-pstyv = ‘TANN’.
screen-input = 0.
screen-active = 1.
This will ensure that the Free Good Item in Delivery Document is Non-Modifiable & any reduction to Main Item quantity will reduce the Free Item Quantity proportionately, which cannot be changed by the users.