The following works for me:
// SAP uses the format 20171001 for dates
// Subtracting 1 is the same as subtracting 1 day, since there's no yesterday() function in QV.
LET date = Date(Today(1) - 1 , 'YYYYMMDD');
SELECT AUDAT // Doc. Date
WHERE AUDAT >= '$(date)';
// Make sure to quote the date
// Thomas Örnmarker
SAP Connectors Developer
Is the field AEDAT of data type DATS? If so it should be written like:
SQL SELECT * FROM TABLE WHERE AEDAT >= '20171001';
SAP stores dates like '20171001' so the user setting for displaying dates should not matter.
You can test the statement in the transaction n/QTQVC/SQL in SAP. Online help: