Hi Experts,
I have a SP and its working fine to check wether project code is entered in the row level of the invoice. Now I have 4 document series named 1) Wholesale 2) Trading 3) Manufacturing 4) General
I want this this stored procedure should only check and give error for the series 1) Wholesale 2) Trading 3) Manufacturing and not for series General. Can it be done for SP to warn for specific series and if there is no Project Code given in General Series then the document should be added to the system.
My SP is as under :
----Project Code
IF @transaction_type IN ('A', 'U') AND @object_type = '13'
begin
if exists (SELECT DISTINCT ISNULL(T0.Project,'') FROM [dbo].[inv1] T0 WHERE T0.Docentry=@list_of_cols_val_tab_del)
begin
SELECT @error = 10, @error_message = N' Project Code is missing....'
end
end
Is there any options by which I can use the same SP for all marketing document by making a single Stored Procedure or I have to make seperate for each individual marketing document.
Regards,
Kamlesh
Edited by: Kamlesh Gupta on Mar 21, 2009 1:15 AM