Date value is not populating while using Native SQL in SAP to insert an Order

SAPMySQLDatabase

I think you need to put a colon (before variable as below:

EXEC SQL.
   INSERT INTO order VALUES('2', :sy-datum)
ENDEXEC.

I would also suggest you to use OpenSQL instead of Native SQL here. Native SQL is used when you try to use any features that are database specific.

The query you have used is very generic and not exclusive for backend database.

raja
Published on 14-Dec-2017 06:12:33
Advertisements