Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello together,
I try to execute the folowing code and get the errormessage, that is shown in the screenshot in the bottom of this article. Can someone help me, please. I don't habe any more ideas.
CU Florian
SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=',';
SET MoneyFormat='#.##0,00 €;-#.##0,00 €';
SET TimeFormat='hh:mm:ss';
SET DateFormat='DD.MM.YYYY';
SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]';
SET MonthNames='Jan;Feb;Mrz;Apr;Mai;Jun;Jul;Aug;Sep;Okt;Nov;Dez';
SET DayNames='Mo;Di;Mi;Do;Fr;Sa;So';
// DataConnect zur SAP JP6 Datenbank (SAP Connector 5.2)
CUSTOMCONNECT TO "Provider=QvSAPConnector;ASHOST=HOSTNAME;SYSNR=01;CLIENT=400;XUserId=CLZcXDFISSVGVZAZZZ;XPassword=QMYQSaJOMLYKHRBGZJDZ;";
let vStartJahr = 2006;
let vAktJahr = 2009;
for j = $(vStartJahr) to $(vAktJahr)
[VBAP_$(j)]:
Load
*;
SQL
SELECT * FROM VBAP
where mid(ERDAT,7,4) = $(j);
// QVD Datei mit neuen Zeilen speichern
store VBAP_$(j) into VBAP_$(j).qvd;
drop table VBAP_$(j);
next
I think the MID function will not work in your SQL.
Either you put MID function in your LOAD statement,
OR you modify the SQL such as WHERE ERDAT LIKE '%2006%' something like that.
Rgds,
You want to create only the staging QVDs. Try by removing the LOAD *; only SQL SELECT is required?
--Arun
I want to save all SAP-data from table ...
vbap in year 2008 into vbap_2008.qvd
vbap in year 2009 into vbap_2009.qvd
... and so on.
Then following is not working?
for j = $(vStartJahr) to $(vAktJahr)
[VBAP_$(j)]:
SQL SELECT * FROM VBAP
where mid(ERDAT,7,4) = $(j);
store VBAP_$(j) into VBAP_$(j).qvd;
drop table VBAP_$(j);
next
Did u try loading someother table from the SAP Connector. Like a Simple table
"T000 ". I have a doubt that you dont have a role in the System.
PS: Ich meine die Berechtigung für Qlikview von SAP, die Daten zu holen
This one should work:
for j = $(vStartJahr) to $(vAktJahr)
[VBAP_$(j)]:
SQL SELECT * FROM VBAP
where ERDAT LIKE '$(j)%';
store VBAP_$(j) into VBAP_$(j).qvd;
drop table VBAP_$(j);
next
Yes, you are right. It works. Thank your for your support/help. Now I must wait, there are a lot of data in SAP.
I hope that the SQL only store the data in the correct QVD-File.
Sravan, if there is a connection issue, that should be flagged during connect execution itself?
@ Arun
You are right.