Symptom
- An outbound delivery or an outbound delivery item is created incorrectly and needs to be canceled. Due to integration with warehouse management, the outbound delivery can only be updated with a quantity of zero.
- However, the outbound delivery with zero quantity remains relevant for billing, which may not be the intended system behavior.
Environment
- SAP S/4HANA Cloud Public Edition 2302 and higher.
- Delivery Processing (Public Cloud).
Resolution
If the delivery has IM and EWM relevant delivery items, avoid billing for the IM relevant delivery items that have zero quantities. The IM relevant items can be deleted because the EWM items have already been distributed to EWM.
There is a late change feature beginning with SAP S/4HANA Cloud Public Edition 2302 that allows deleting the IM relevant delivery items. Please refer to Configuration for Changing Deliveries After Initial Distribution in Warehouse Management in the SAP Help Portal for more details about the required configuration.
SAP S/4HANA Cloud Warehouse Management (WM)
- Delete and re-create the 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 picking, packing, or goods issue has already been performed, please reverse all relevant processes. After deletion, re-create the delivery with the usual LE outbound delivery creation apps.
- Implement a BADI: If delivery items have been updated with quantity to zero, please implement the BADI LE_SHP_MODIFY_ITEM to avoid billing for quantity zero. A sample code is attached. The implementation is valid for the following scenarios:
- Outbound delivery with all items having quantity zero
- Outbound delivery with some items having quantity zero and other items with quantity > zero
- Outbound delivery with batch items with quantity zero
- Outbound delivery with batch items with quantity > zero and quantity on batch main item
- Outbound delivery with batch items with quantity > zero and quantity on batch sub item
Integration to Third-Party Warehouse Management Systems
- Implement a BADI: If delivery items have been updated with quantity to zero, please implement the BADI LE_SHP_MODIFY_ITEM to avoid billing for quantity zero. A sample code is attached. The implementation is valid for the following scenarios:
- Outbound delivery with all items having quantity zero
- Outbound delivery with some items having quantity zero and other items with quantity > zero
- Outbound delivery with batch items with quantity zero
- Outbound delivery with batch items with quantity > zero and quantity on batch main item
- Outbound delivery with batch items with quantity > zero 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.
endcase.
endif.
Keywords
billing document, billing due list, delivery item, VL03, outbound delivery, zero quantity, EWM, third-party logistics warehouse management, 3PL, SAP S/4HANA Cloud Warehouse Management, scope item 1ZQ, delete delivery, billing relevance, outbound delivery order, LE outbound delivery, Run Outbound Process app, IM relevant delivery items, EWM relevant delivery items , KBA , LE-SHP-DL-2CL , Delivery Processing (Public Cloud) , SD-BIL , Billing , SCM-EWM-DLP , Delivery Processing , Problem
SAP Knowledge Base Article - Public