I'm looking for the equivalent of GETDATE() in SQL Server, but for ABAP Open SQL.
I have tried CURRENT_DATE, sy-date but with no success.
I've also tried CURDATE() and NOW(), but receive an error on specifically the open parenthesis for each.
AFAIK there is no ABAP Open SQL function to get the current date or time on the database server. But you can pass the date and time from the application server using the global variables
sy-datumandsy-uzeit. Example:Note that
sy-datumandsy-uzeitgive you the date and time according to the timezone of the application server. If you want to convert those to the timezone of the user (according to the preferences of their user account), then there are andsy-datloandsy-timlo. More information on the time-related fields of structuresyin the documentation.