Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

(Back to Z-TS Transaction Notification SQL Scripts Posted to Wiki Listing -Z-TS Transaction Notification SQL Scripts Posted to Wiki )

TYPE: Useful

AUTHOR NAME: Balakumar Viswanathan

PURPOSE AND BACKGROUND:  This SQL was created in SAP 8.8 PL19. It can be used to Restrict negative balance for Cash account in Outgoing Payment.This script can be pasted in transaction notification procedure. 

Copy and Paste this SQL:

--Z-TS Script to Restrict negative balance for Cash account in Outgoing Payment Ver 1 VB 08 June,2011

--DESCRIPTION:  Transaction notification SQL script can be used to restrict negative balance for Cash account in Outgoing Payment.

--AUTHOR(s):
--Version 1 Balakumar Viswanathan 08 June, 2011
-- Restrict negative balance for Cash account in Outgoing Payment
IF @transaction_type = N'A' AND @Object_type = N'46'
BEGIN
   IF EXISTS (SELECT T0.currtotal FROM oact T0 INNER JOIN ovpm T1 ON T0.AcctCode = T1.CashAcct
   WHERE T0.currtotal < 0 and T1.DocEntry=@list_of_cols_val_tab_del)
   BEGIN
       SELECT @Error = 10, @error_message = 'Insufficient Cash in Cash Account!'
   END
END

  • No labels