F4229 Update Contstraint Error

rkaras

Member
The sales update log shows an error -- unique constraint (proddta.f4229_1) violated when it tries to do an update on the F4229 table.

This constraint is:
--CREATE UNIQUE INDEX F4229_1 ON F4229(SSAN8, SMCU, SSDCTO, SSITM, SSLNTY, SSSRP1, SSSRP2, SSRP3, SSSRP4, SSSRP5, SSFY) TABLESPACE PRODDTAI PCTFREE 10 STORAGE(INITIAL 65536 )

It looks like the update SQL is trying to set many fields, including ssfy (fiscal year). The UPDATE SQL tries to set the fiscal year to 1 but the where clause doesn't specifiy a fiscal year so it is select 4 records for this particular customer -- for fiscal year 98,99, 0, and 1.

What is going on? Shouldn't the WHERE clause have a check to see if ssfy = 01? Otherwise it is trying to update the ssfy to 01 for all 4 fiscal years. How do I resolve this?
 
Back
Top