Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Block Manual JE for particular accounts

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

Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question