IBM Support

Geting error 'ShipmentLine quantity cannot be less than sum of tagged quantity of the line and containerized quantity' while executing confirmShippment API in Sterling Order Management

Question & Answer


Question

Getting error 'ShipmentLine quantity cannot be less than sum of tagged quantity of the line and containerized quantity' for confirmShippment API

Cause

Below error could be observed while trying to confirm a shippment using confirmShippment API,
<Errors>
 <Error ErrorCode="YDM00120" ErrorDescription="ShipmentLine quantity cannot be less than sum of tagged quantity of the line and containerized quantity" ErrorRelatedMoreInfo="" ErrorUniqueExceptionId="192.168.100.715520405403120000000000012">
  <Attribute Name="ErrorCode" Value="YDM00120" />
  <Attribute Name="ErrorDescription" Value="ShipmentLine quantity cannot be less than sum of tagged quantity of the line and containerized quantity" />
  <Attribute Name="ShipmentSubLineNo" Value="0" />
  <Attribute Name="ShipmentLineNo" Value="1" />
  <Attribute Name="ContainerDetails Quantity" Value="5.0" />
  <Attribute Name="Tagged Quantity" Value="0.0" />
  <Attribute Name="ShipmentLine OverShipQuantity" Value="0.0" />
  <Attribute Name="ShipmentLine Quantity" Value="3.0" />
  <Attribute Name="ErrorUniqueExceptionId" Value="192.168.100.715520405403120000000000012" />
  <Stack>com.yantra.yfc.util.YFCException at com.yantra.ydm.business.YDMChangeShipmentImpl.doValidations(YDMChangeShipmentImpl.java:4235)
This issue is observed when a client is trying to split quantity for a shipment line in two shipment lines having the same shipment key in two different containers, sample confirmShippment input XML,
<Shipment ActualShipmentDate="" CarrierServiceCode="CODE" NumOfCartons="2" OverrideModificationRules="Y" ShipNode="NODE1" ShipmentKey="SHIPMENTKEY" >
<ShipmentLines>
<ShipmentLine OrderNo="ORDERNO1" Quantity="3" ShipmentLineNo="1" />
<ShipmentLine OrderNo="ORDERNO2" Quantity="4" ShipmentLineNo="2" />
</ShipmentLines>
<Containers>
<Container TrackingNo="TRACKINGNO1">
<ContainerDetails>
<ContainerDetail Quantity="5">
<ShipmentLine OrderNo="ORDERNO1" Quantity="3" ShipmentKey="SHIPMENTKEY" ShipmentLineNo="1" />
<ShipmentLine OrderNo="ORDERNO2" Quantity="2" ShipmentKey="SHIPMENTKEY" ShipmentLineNo="2" />
</ContainerDetail>
</ContainerDetails>
</Container>
<Container TrackingNo="TRACKINGNO1">
<ContainerDetails>
<ContainerDetail Quantity="2">
<ShipmentLine OrderNo="ORDERNO2" Quantity="2" ShipmentKey="SHIPMENTKEY" ShipmentLineNo="2" />
</ContainerDetail>
</ContainerDetails>
</Container>
</Containers>
</Shipment>
Here the ShipmentLine 2, ORDERNO2 is having in total 4 quantities for an item, while confirming shipment this quantity is being split in half and shared in two container details having different Tracking no TRACKINGNO1 and TRACKINGNO1.

Answer

confirmshipment API allows clients to create a container and each ContainerDetail is linked to only one shipment line. ShipmentLineKey is passed   along with Quantity. The validation check works as, if the actual shipment line quantity [shipment line quantity + over ship allowed quantity] is less than the container quantity then a client is trying to over containerize and above error will be observed.
Sample confirmShipment input xml:
<ContainerDetail Action="" ContainerDetailsKey="" Quantity="" ShipmentLineKey="">
<ShipmentLine DocumentType="" ItemID="" OrderHeaderKey="" OrderLineKey="" OrderNo="" OrderReleaseKey="" PrimeLineNo="" ProductClass="" ReleaseNo="" ShipAdviceNo="" ShipmentLineNo="" ShipmentSubLineNo="" SubLineNo="" UnitOfMeasure="">
</ShipmentLine>
</ContainerDetail>
In Sterling OMS linking containerDetail to multiple shipment lines is not allowed, hence, observed behavior is actually working as design. If one containerDetail is linked with only one shipment line then this error will not be observed and shipment will be confirmed.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Component":"confirmShipment, API","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9,1,9.2,9.3,9.4,9.5,10","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
27 May 2019

UID

ibm10879039