Dear All,
I have this SP for not allowing duplicate serial number to be created as follows
IF @transaction_type = 'A' AND @object_type = '176' BEGIN
If Exists (SELECT Distinct 'ERROR' FROM OINS O1 where o1.internalSN in (select o2.internalSN from OINS o2 where o2.insID <> @list_of_cols_val_tab_del and o2.internalSN = o1.internalSN ) and o1.insID = @list_of_cols_val_tab_del )
Begin SET @error = -1 SET @error_message = N'Duplication of serial Number!!!' End END
While doing A/R Invoice the SP works when there is a duplicate serial number taken. However when we do a Goods Receipt PO , the duplicate serial number is taken and the error doesn't show even if there is a duplicate serial number added. What changes needs to done for the SP, so that during the stage of GRPO only system should disallows taking the duplicate serial number. Thanks&Regards Darshan Desai