on 01-05-2015 4:20 PM
Hi ALL
How to Prevent to duplicate vendor Ref.no by vendor wise By SP Notification in sap B1. (FOR AP Invoice )
For Example
Vendor Code Ref,no
VEN1001 100
VEN1002 100
So SP should work like this.
my SP as following
if @object_type = '18'
and (@transaction_type = 'A' or @transaction_type = 'U')
Begin
declare @venno as varchar (100)
declare @vennam as varchar (100)
if (@object_type = '18')
Begin
select @venno = NumAtCard from OPCH T0 where docentry = @list_of_cols_Val_tab_del
select @vennam = CardCode from OPCH T0 where docentry = @list_of_cols_Val_tab_del
Begin
if (@venno is not null)
Begin
if 1!= (select count (docentry) from OPCH with (nolock)where (NumatCard = @venno) and (cardcode = @vennam))
Begin
select @error = 2
select @error_message = 'Duplicate Vendor Ref Number!'
End
End
End
End
End
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.