SAP Knowledge Base Article - Public

2845652 - Batch not entered when creating inbound delivery via inbound ASN

Symptom

When creating an inbound delivery from CPI using API „Integration of Procurement with External Suppliers” and artifact „Advance Shipping Notification”, the field batch is empty in the inbound delivery.

Instead, the field supplier batch is filled with batch record.

Environment

  • Sales And Distribution (SD)

  • LogisticsExecution (LE)

  • SAP S/4HANA Cloud

Reproducing the Issue

Batch and Supplier Batch are transferred from ECC to S4HC in the inbound XML file:

<Batch>YYYYMMddV</Batch><BatchBySupplier>YYYYMMdd</BatchBySupplier><ShelfLifeExpirationDate>YYYY-MM-dd</ShelfLifeExpirationDate>

In the inbound delivery, the field batch is empty, instead, supplier batch is filled with batch record.

Cause

This is standard behavior of SAP. As the receiver side (Inbound ASN) does not know the batch of the sender side (Outbound ASN), so the field batch for inbound delivery will remain empty.

Resolution

If you want this field to be populated in the inbound delivery with the exact batch record as in the outbound delivery, there are two ways to do it:

  • If there is no batch split item existed, insert the batch record in the purchase order, then the batch record will be filled in the inbound delivery.
  • If there are batch split items exist, implement cloud BAdI: LE_SHP_SAVE_DOCUMENT_PREPARE (Modify Standard and Custom Fields for Delivery Header and Items) or LE_SHP_DELIVERY_FINAL_CHECK, so that the value can be filled for "Batch" based on "BatchBySupplier" in inbound delivery.

See Also

KBA 2967374 - no error message is logged by BADI LE_SHP_SAVE_DOCUMENT_PREPARE

Keywords

Inbound Delivery, Batch, CPI, API, BAdI, Advanced Shipping Notification (ASN), lips-charg , KBA , LE-SHP-DL-LA , Inbound Delivery , LE-SHP-DL-LA-2CL , Inbound Delivery (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions