IBM Support

YFC0001 error when creating multiple UOMs with same name in different UOM Type groups under same organization

Troubleshooting


Problem

Your IBM Sterling FulFillment Suite throws error YFC0001 when you create the UOMCode and UOMDescription as pl for UOM_TYPE='Quantity'.

Symptom

The following entry gets created in YFS_UOM table.

2014093018134034100 DEFAULT QUANTITY pl pl 0 30-SEP-14 30-SEP-14 admin admin YEntityServlet YEntityServlet

The second time, when you create the UOMCode and UOMDescription as pl for UOM_TYPE='Weight' you receive this error.

<Error ErrorCode="YFC0001"
ErrorDescription="Record already exists in the database."
ErrorRelatedMoreInfo="">
<Attribute Name="ErrorCode" Value="YFC0001"/>
<Attribute Name="ErrorDescription" Value="Record already exists
in the database."/>
<Attribute Name="SQLState" Value="23000"/>
<Attribute Name="TransactionIsolationLevel" Value="2"/>
<Attribute Name="Method" Value=""/>
<Attribute Name="SQLStatement" Value="PREPARED STATEMENT -
INSERT /*YANTRA*/ INTO YFS_UOM(UOM_KEY,ORGANIZATION_CODE,UOM_TYPE,UOM,UOM_DESCRIPTION,VOLUME_UOM,LOCKID,CREATETS,MODIFYTS,CREATEUSERID,MODIFYUSERID,CREATEPROGID,MODIFY
PROGID) values ( '2014093018140734103','DEFAULT','WEIGHT','pl','pl','
',0,'2014-09-30T18:14:07','2014-09-30T18:14:07','admin','admin','.YEntit
yServlet','.YEntityServlet' ) "/>
<Attribute Name="DBErrorCode" Value="1"/>
<Stack>

Look at the below sequel where 'DEFAULT', 'pl' is coming for YFS_UOM. (Which is already present as a result of first call). Due to ORGANIZATION_CODE, UOM as unique key for YFS_UOM you are not able to insert the records.

INSERT /*YANTRA*/ INTO YFS_UOM(UOM_KEY,ORGANIZATION_CODE,UOM_TYPE,UOM,UOM_DESCRIPTION,VOLUME_UO
M,LOCKID,CREATETS,MODIFYTS,CREATEUSERID,MODIFYUSERID,CREATEPROGID,MODIFY
PROGID) values ( '2014093018140734103','DEFAULT','WEIGHT','pl','pl','
',0,'2014-09-30T18:14:07','2014-09-30T18:14:07','admin','admin','.YEntit
yServlet','.YEntityServlet' )

Create a UOM with some other name. Current Product Design would not allow to create two UOM's with same name under same organization.

How to create a unit of measure for weight?

  1. Open the Applications Manager and select the application that you want.
  2. From the tree in the application rules side panel, choose Unit of Measure > Weight. The Weight UOMs window displays in the work area.
  3. The Weight UOMs window displays in the work area. Choose the Create New icon. The Unit of Measure Details window displays.
  4. In UOM Code, enter the unit of measure.
  5. UOM Description, enter a brief description of the unit of measure.
  6. Choose the Save icon.

Unit of measure for quantity can be done in similar way.

Cause

Product has the Unique Key as ORGANIZATION_CODE, UOM (INDEX_NAME= YFS_UOM_I1) for YFS_UOM table.

Diagnosing The Problem

Here is the stack trace when you try to create multiple UOMs with same name in different UOMType groups.

<Error ErrorCode="YFC0001"
ErrorDescription="Record already exists in the database."
ErrorRelatedMoreInfo="">
<Attribute Name="ErrorCode" Value="YFC0001"/>
<Attribute Name="ErrorDescription" Value="Record already exists
in the database."/>
<Attribute Name="SQLState" Value="23000"/>
<Attribute Name="TransactionIsolationLevel" Value="2"/>
<Attribute Name="Method" Value=""/>
<Attribute Name="SQLStatement" Value="PREPARED STATEMENT -
INSERT /*YANTRA*/ INTO
YFS_UOM(UOM_KEY,ORGANIZATION_CODE,UOM_TYPE,UOM,UOM_DESCRIPTION,VOLUME_UO
M,LOCKID,CREATETS,MODIFYTS,CREATEUSERID,MODIFYUSERID,CREATEPROGID,MODIFY
PROGID) values ( '2014093018140734103','DEFAULT','WEIGHT','pl','pl','
',0,'2014-09-30T18:14:07','2014-09-30T18:14:07','admin','admin','.YEntit
yServlet','.YEntityServlet' ) "/>
<Attribute Name="DBErrorCode" Value="1"/>
<Stack>
<Stack>com.yantra.yfc.util.YFCException&#xd;
at com.yantra.app.config.YantraConfigMain.
initInitializers(YantraConfigMain.java:1118)&#xd;
at com.yantra.app.config.YantraConfigApplet.showMenu
(YantraConfigApplet.java:166)&#xd;
at com.yantra.app.config.YantraConfigApplet.init
(YantraConfigApplet.java:81)&#xd;
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.
init(Unknown Source)&#xd;
at sun.plugin2.applet.
Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)&#xd;
at java.lang.Thread.run(Unknown Source)&#xd;
</Stack>
</Error>
</Errors>

Resolving The Problem

The problem occurs due to ORGANIZATION_CODE, UOM as unique key (INDEX_NAME= YFS_UOM_I1) for YFS_UOM. Pass UOM as a unique name.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Documentation","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.2;9.1;9.0;8.5","Edition":"Foundation","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
11 February 2020

UID

swg21687028