Symptom
An outbound delivery or an outbound delivery item is created wrongly and has to be cancelled. Because of the integration with warehouse management, the outbound delivery can only be updated with quantity to zero.
But then the Outbound Delivery with zero quantity is still liable for billing which might not be the desired system behavior.
Environment
SAP S/4HANA Public Cloud Edition
Resolution
If the delivery has IM relevant delivery items and EWM relevant delivery items, you want to avoid billing for the IM relevant delivery items which have 0 quantities. You are able to delete the IM relevant items because the EWM items has already distributed to EWM.
There is a late change feature since CE2302, you can delete the IM relevant delivery items. Please refer the SAP Help portal page.
SAP S/4HANA Cloud Warehouse Management (WM)
- Delete & Re-Create Delivery: The Outbound Delivery Order (+ LE Outbound Delivery) can be deleted after distribution to Warehouse Management with help of the Run Outbound Process App. If it is already picked, packed or goods issued, please reverse the process. After deletion, Re-Create the Delivery with the usual LE Outbound Delivery Creation Apps.
- Implement a BADI: If delivery items have been still updated with quantity to zero, please implement the BADI LE_SHP_MODIFY_ITEM to avoid billing for quantity 0. A sample code is attached. The implementation is working for the following scenarios:
- Outbound Delivery with all items having quantity 0
- Outbound Delivery with some items having quantity 0 and other items with quantity > 0
- Outbound Delivery with batch items with quantity 0
- Outbound Delivery with batch items with quantity > 0 and quantity on batch main item
- Outbound Delivery with batch items with quantity > 0 and quantity on batch sub item
Integration to Third-Party Warehouse Management Systems
- Implement a BADI: If delivery items have been still updated with quantity to zero, please implement the BADI LE_SHP_MODIFY_ITEM to avoid billing for quantity 0. A sample code is attached. The implementation is working for the following scenarios:
- Outbound Delivery with all items having quantity 0
- Outbound Delivery with some items having quantity 0 and other items with quantity > 0
- Outbound Delivery with batch items with quantity 0
- Outbound Delivery with batch items with quantity > 0 and quantity on batch main item
- Outbound Delivery with batch items with quantity > 0 and quantity on batch sub item
Sample BADI code:
* Do not bill zero quantities! Changing Billing Relevance on item level!
*
* Absolutely necessary/moving data
move-corresponding delivery_document_in to delivery_document_out.
move-corresponding delivery_doc_changed_item_in to delivery_doc_changed_item_out.
* Check Delivery quantities
if delivery_doc_changed_item_out-actualdeliveryquantity = 0
and delivery_doc_changed_item_out-originaldeliveryquantity > 0
and delivery_doc_changed_item_out-materialisintbatchmanaged = 'X'
and delivery_doc_changed_item_out-bomexplosion = ''.
case delivery_doc_changed_item_out-itemisbillingrelevant.
when 'A'.
delivery_doc_changed_item_out-itemisbillingrelevant = 'H'. "or 'M'"
when 'K'.
delivery_doc_changed_item_out-itemisbillingrelevant = 'O'.
when 'Q'.
delivery_doc_changed_item_out-itemisbillingrelevant = 'R'.
when 'T'.
delivery_doc_changed_item_out-itemisbillingrelevant = 'U'.
when 'V'.
delivery_doc_changed_item_out-itemisbillingrelevant = 'W'.
when 'D'.
delivery_doc_changed_item_out-itemisbillingrelevant = 'L'. "or 'N'"
when others.
delivery_doc_changed_item_out-itemisbillingrelevant = ''.
endcase.
endif.
Keywords
billing document, billing due list, delivery item, VL03, outbound delivery, 0 quantity, EWM, 3party WM, scope item 1ZQ, delete delivery, billing relevance , KBA , LE-SHP-DL-2CL , Delivery Processing (Public Cloud) , SD-BIL , Billing , SCM-EWM-DLP , Delivery Processing , Problem
SAP Knowledge Base Article - Public