Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

(Back to Z-TS Transaction Notification SQL Scripts Posted to Wiki Listing -Z-TS Transaction Notification SQL Scripts Posted to Wiki )

TYPE: Monthly Special

AUTHOR NAME: Neetu Dhami

PURPOSE AND BACKGROUND:  This SQL was created in 2007A SP01 PL08. It can be used to prevent users from entering duplicate barcodes for Items and can be modifed as per the customer requirement.This script can be pasted in transaction notification procedure. 

Copy and Paste this SQL:

--Z-TS Script to prevent enetring duplicate barcodes for Items Ver 1 ND 02 June,2011

--DESCRIPTION:  Transaction notification SQL script can be used to prevent users from entering duplicate barcodes for Items and can be modified as required.

--Version 1 Neetu Dhami 02 June, 2011

If @object_type = '4' and @transaction_type in ( 'A','U')
declare @BarCode nvarchar(16)

set @BarCode=(Select isnull(T0.CodeBars,'') From OITM T0 Where T0.ItemCode  =  @list_of_cols_val_tab_del)
 If @BarCode!='' and
      exists (Select T0.CodeBars From OITM T0  Where T0.CodeBars =  @BarCode and T0.ItemCode ! =  @list_of_cols_val_tab_del)
  Select @error =12, @error_message = 'Bar Code Already exists(Duplicate Barcode)!!'

  • No labels