cancel
Showing results for 
Search instead for 
Did you mean: 

Check date Transaction Notification

former_member641972
Discoverer
0 Kudos
547

Hi, so I am trying to create a transaction notification that throws an error when a check's Due Date inside "Payment Methods" for "Outgoing Payments" and "Incoming Payments" is previous to the current date. I've tried lots of different solutions yet they don't seem to work. I tried to join OVPM to VPM1 and compare the duedate to current_date with days_between.

Also tried using ORCT and RCT1.

View Entire Topic
domigichuhi
Explorer

This code for incoming payment works if you consider the current date to be previous date too. This is SQL server syntax and not HANA.

IF @transaction_type IN ('A','U') AND @object_type = '24'
	    BEGIN
    IF EXISTS (SELECT T0.DocEntry FROM [dbo].[ORCT] T0
	 INNER JOIN RCT1 T1 ON T0.[DocEntry] = T1.[DocNum]
WHERE T1.[DueDate] < GETDATE() AND T0.DocEntry = @list_of_cols_val_tab_del)
	    BEGIN 
SELECT @Error = 5005, @error_message = 'Check is previous to the current date'
	    END
    END