on 2019 Nov 12 1:06 PM
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.
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
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.