cancel
Showing results for 
Search instead for 
Did you mean: 

Block Transcation - reg

former_member205766
Active Contributor
0 Kudos
49

Hi Experts

My Accounts department want to block transaction if cash in hand account deviates cash amount to below 0.

Can anybody help me how to block the outgoing payment in this scenario.

Thanks in Advance

Balaji Sampath

Accepted Solutions (1)

Accepted Solutions (1)

former_member206488
Active Contributor
0 Kudos

Hi ,

Try this in transaction notification procedure:

IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'46')
BEGIN 
IF exists (SELECT T0.DocEntry   FROM OVPM T0 
                   INNER JOIN OACT T1 on T0.CashAcct =T1.AcctCode 
           WHERE T1.Finanse ='Y' and T1.CurrTotal < 0 AND T0.DocEntry  = @list_of_cols_val_tab_del)
BEGIN
Select @Error = -5002, @error_message = 'Cash In Hand account deviates cash below 0!!'
END
END  

Thanks,

Neetu

former_member205766
Active Contributor
0 Kudos

Hi Neetu

Where I store this stored procedure.

thanks in Advance

Balaji

former_member206488
Active Contributor
0 Kudos

open SQL server

drill down databases > select your database and under programmability>stored procedures>select SBO_SP_transaction notification >right click and select mofify.

It will show some code and text mentioning add your code here.

Paste this in that section and press F5.

Answers (0)