You are not using the SAP Connector, you seem to be querying a SAP SQL DB directly.
The SAP Connector uses a SQL version called OpenSQL to query the SAP SQL interface. One of the distinctive features of OpenSQL is that you cannot separate column names by comma's. Which you are doing in your example.
To correct your basic SELECT, you can use the ScriptBuilder to generate an appropriate OpenSQL query. The preceding LOAD will be included (if you want) and can be used to perform any rename you'ld like.
I don't have a SAP Connector om my laptop, unfortunately. But if you installed the SAP Connector on a server, you can find the ScriptBuilder in C:\ProgramData\QlikTech\Custom Data\QvSAPConnector\ScriptBuilder. Open and configure the connections in ReloadSAPDD.qvd, save and reload. This document will load the SAP metadata and store it in a couple of local QVDs.
Then open the ScriptBuilder.qvw document and reload. If all goes well, navigate to tab "Generate Script" to create a correct script for any tzble you whish to extract. Add JOINs and WHERE conditions after the transfer to your document or script file.
Unfortunatly Qlik SAP connector only allow you to load and rename fields from only one table.
The solutions (and in the end will be the same as I wanted to do) is:
We load the first table, for example VBRK (header sales) and rename de fields as you wish.
Then do a LEFT JOIN with VBRP (sales lines) rename de fields also as you want and make sure the the field which will make the connection between this two table is equal (has the same name). Then, Will be created a table Sales_SAP as you want in only one QVD.
VBELN AS NumeroDoc,
Date#(Date(ERDAT, 'DD/MM/YYYY'), 'DD/MM/YYYY') AS CriadoEmCab,
Date#(Date(AEDAT, 'DD/MM/YYYY'), 'DD/MM/YYYY') AS AlteradoEmCab,
Time#(Time(ERZET, 'HH:MMS'), 'HH:MMS') AS CriadoEmCab_Hora,