on 06-15-2015 9:26 PM
Hi,
Is there any way we can prevent duplicate vendor invoice entry into SAP business one 2007 version?
Hi,
You have to use SP to block duplicate vendor invoice entry, on the basis of docentry get vendor code and doctotal and apply condition.
revert back if you are not aware of SP I will send you code.
Regards
Kamlesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have placed some code inside that procedure but I am getting an error: "Procedures sbo_sp_transactionnotification has too many arguments specified"
USE [FSDB_ACSCORP]
GO
/****** Object: StoredProcedure [dbo].[SBO_SP_TransactionNotification] Script Date: 06/19/2015 09:27:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(20),
@transaction_type nvarchar(1),
@venno as varchar(100),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
declare @error int /* Result (0 for no error) */
declare @error_message nvarchar (200) /* Error string to be displayed */
select @error = 0
select @error_message = N'Ok'
/* -- NWARE TECHNOLOGIES CODE START -- */
/* FILTRER LES TRANSACTIONS */
/** block duplicate Vendor Invoice number **/
if (@object_type = '20' or @object_type = '18')
and (@transaction_type= 'A' or @transaction_type= 'U')
begin
if @object_type = '20'
begin
select @venno = NumAtCard
from opdn
where docentry =@list_of_cols_val_tab_del
if 1 != (select count(docentry) from opdn with(nolock) where NumAtCard = @venno)
begin
select @error = 1
select @error_message = 'Duplicate vendor ref no in PO Receipts. ! '
end
end
else
if @object_type = '18'
begin
select @venno = NumAtCard
from opch
where docentry =@list_of_cols_val_tab_del
if 1 != (select count(docentry) from opch with(nolock) where NumAtCard = @venno)
begin
select @error = 2
select @error_message = 'Duplicate vendor ref no in AP Invoices. ! '
end
end
end
end
Hi,
Try:
if @object_type in ('20','18') and @transaction_type in ('A', 'U')
BEGIN
if @object_type = '20'
begin
select @venno = NumAtCard
from opdn
where docentry =@list_of_cols_val_tab_del
if 1 != (select count(docentry) from opdn with(nolock) where NumAtCard = @venno)
begin
select @error = 1
select @error_message = 'Duplicate vendor ref no in PO Receipts. ! '
end
end
else
if @object_type = '18'
begin
select @venno = NumAtCard
from opch
where docentry =@list_of_cols_val_tab_del
if 1 != (select count(docentry) from opch with(nolock) where NumAtCard = @venno)
begin
select @error = 2
select @error_message = 'Duplicate vendor ref no in AP Invoices. ! '
end
end
END
Only change where this SP allow you to add your code part.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
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.