Troubleshooting
Problem
Attempts to run createChainedOrder in IBM Selling and Fulfillment Suite leads to the error Record already exists in the database.
Symptom
Steps to reproduce:
- Create a bundle Item and two child items.
- Keep the shipnode as Drop ship type for the child item. Individual child item for the bundle parent should be sourced from different drop ship nodes.
- Create a sales order with Bundle item.
- Schedule and Release the order. The order moves to Awaiting Chained Order status.
- Run createChainedOrder to create Purchase Order for the sales Order. The below error is seen in the log file:
ErrorCode="YFC0001" ErrorDescription="Record already exists in the database."
....
ErrorCode="java.sql.SQLIntegrityConstraintViolationException" ErrorDescription="" ErrorRelatedMoreInfo="ORA-00001: unique constraint (SSFS94.YFS_ORDER_LINE_SCHEDULE_I1) violated
Cause
This is working as designed.
Diagnosing The Problem
Consider an order with one parent line and two child lines
SalesParent1
SalesChild1
SalesChild2
Now when create chained order runs, it tries to create two chained orders.
ChainedOrder1 with
POParent1
POChild1
ChainedOrder2 with
POParent1
POChild2
Now Sterling is trying to reuse the same orderlinekey it generated while creating ChainedOrder1 into ChainedOrder2 as well. This is resulting in the unique constraint violation observed and the whole transaction rolls back.
Resolving The Problem
Workaround:
- Implement BeforeCreateOrderUE and remove the bundle parent from input
xml.
<BundleParentLine OrderLineKey="" PrimeLineNo="" SubLineNo=""
TransactionalLineId=""/>
The enhancement request 43337 has been raised to source child components from difference vendors.
Was this topic helpful?
Document Information
Modified date:
11 February 2020
UID
swg21992879