on 02-23-2010 9:42 AM
Hi all,
I need an SP where i can block any manual JE if the inventry accounts are selected. This is the query that i have but it returns errors;
IF @transaction_type = 'A' AND @object_type = '30'
BEGIN
if exists(Select '141010','141020' from [dbo].[JDT1] T0
Where T0.BaseEntry IS NULL
AND T0.DocEntry=@list_of_cols_val_tab_del)
begin
SELECT @error = 1, @error_message = 'Manual JE for these accounts not permitted !'
end
END
Please assist.
Thanks,
Joseph
Hi!
Try this
IF @transaction_type = 'A' AND @object_type = '30'
BEGIN
if exists(Select T0.Transid from dbo.JDT1 T0
Where T0.Account in ('141010','141020' )
AND T0.Transid=@list_of_cols_val_tab_del)
begin
SELECT @error = 1, @error_message = 'Manual JE for these accounts not permitted !'
end
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear,
Try this:
IF @transaction_type = 'A','U' AND @object_type = '30'
BEGIN
if exists(Select T0.Transid from dbo.JDT1 T0
Where (T0.Account = '141010' or T0.Account=' 141020' )
AND T0.Transid=@list_of_cols_val_tab_del)
BEGIN
SELECT @error = 1, @error_message = 'Manual JE for not permitted '
END
END
Hope this will solve your problem.
regards,
Neetu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this
IF @transaction_type = N'A' AND (@Object_type = N'30')
BEGIN
if Exists ( select t1.account from jdt1 t1
where t1.account = '141010' and t1.transid = @list_of_cols_val_tab_del)
BEGIN
SELECT @Error = 1, @error_message = N'Manual JE for these accounts not permitted !!'
END
END
Hope this help,
Son.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
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.