Skip to Content
0
Oct 25, 2019 at 03:12 PM

Non Duplicate Vendor Ref. No. for some BP

95 Views

I need to place control to allow duplicate Vendor Ref No. in Sales Order for all BPs but 1

Exception is ABC100

if @object_type='17' and @transaction_type in ('A','U')

begin

if not exists ( select numatcard from ORDR where docentry=@list_of_cols_val_tab_del and (CardCode in ('ABC100') and NumAtCard not in (select distinct NumAtCard from ordr)) or (CardCode not in ('ABC100') ) )

begin

set @error=1

set @error_message='Only Non Duplicate Customer Ref. No. for this BP'

end

end