Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlik-Community!
Within a script execution on our QlikView-Testserver I am getting an script error "Table not found":
The whole script part is:
LOAD %VKORG as %VKORG.VBAK,
num( %VKORG ) as SEC_ORGANISATION
FROM
[..\..\02 Extern\steuernde_Daten_Vertrieb\DistributionGroups.xlsx]
(ooxml, embedded labels, table is Tabelle1)
where exists( %VKORG.VBRK, %VKORG );
;
DistributionGroups:
LOAD %VKORG as %VKORG.VBAK,
Description,
DistributionGroup
FROM
[..\..\02 Extern\steuernde_Daten_Vertrieb\DistributionGroups.xlsx]
(ooxml, embedded labels, table is Tabelle1)
where exists( %VKORG.VBRK, %VKORG );
;
////to delete and move to datamodel:
maratemp:
load *
, if( index( [%PRODH], 'PA0101' ) = 1, 'Vacuette Tubes'
, if( index( [%PRODH], 'PA010711' ) = 1, 'Needles / Luer Adapter / Blood Collection Sets'
, if( index( [%PRODH], 'PA01071211' ) = 1 or index( [%PRODH], 'PA01071204' ) = 1 or index( [%PRODH], 'PA01071205' ) = 1 or index( [%PRODH], 'PA01071206' ) = 1, 'Quickshield'
, if( index( [%PRODH], 'PA01071209' ) = 1, 'Premium Safety Needle System (Tube Touch)'
, if( index( [%PRODH], 'PA010801' ) = 1, 'Mini Collect Tubes'
, 'no Group defined' )))))
as [SalesReportGroupProduct.MARA]
, if( index( [%PRODH], 'PA0101' ) = 1, 1
, if( index( [%PRODH], 'PA010711' ) = 1, 2
, if( index( [%PRODH], 'PA01071211' ) = 1 or index( [%PRODH], 'PA01071204' ) = 1 or index( [%PRODH], 'PA01071205' ) = 1 or index( [%PRODH], 'PA01071206' ) = 1, 3
, if( index( [%PRODH], 'PA01071209' ) = 1, 4
, if( index( [%PRODH], 'PA010801' ) = 1, 5
, 0 )))))
as [SalesReportGroupProductID.MARA]
resident MARA;
drop table MARA;
rename table maratemp to MARA;
The strange thing is, that I have the same qvw.file on our QlikView Productive-system - where the script load works without any errors and the MARA-table is existing in the datamodel...
Thank you for your help!
Best regards,
Barbara
where did you name a table as MARA?
I think it's not the complete script. I am not able to find MARA table.
try to give the exct tablename in ur script
Hi Ali,
I have two qvw.files - one with the datamodel and one with the layout --> the script error occurs within the layout qvw.
In the datamodel qvw, the MARA is loaded first.
LOAD *,
%MATNR as x%MATNR
FROM $(Data)\MARA.QVD (qvd)
Here a screenshot from the table overview in the layout qvw:
Thanks.
Hi Mayrleitner,
As per your code Last 3 lines for table maratemp is getting data from MARA But,Where is this table you didn't mention/gave name to any table name as MARA so first check for Mara table
maratemp:
resident MARA;
drop table MARA;
rename table maratemp to MARA;
the Connection between layout and datamodel qvw happens with the following script part:
the log file has the following entries:
16.03.2016 10:13:00: 0157 Organisation_Security:
16.03.2016 10:13:00: 0158 LOAD %VKORG as %VKORG.VBAK,
16.03.2016 10:13:00: 0159 num( %VKORG ) as SEC_ORGANISATION
16.03.2016 10:13:00: 0160 FROM
16.03.2016 10:13:00: 0161 [..\..\02 Extern\steuernde_Daten_Vertrieb\DistributionGroups.xlsx]
16.03.2016 10:13:00: 0162 (ooxml, embedded labels, table is Tabelle1)
16.03.2016 10:13:00: 0163 where exists( %VKORG.VBRK, %VKORG )
16.03.2016 10:13:00: 2 Felder gefunden: %VKORG.VBAK, SEC_ORGANISATION, 0 Sätze erhalten
16.03.2016 10:13:00: 0167 DistributionGroups:
16.03.2016 10:13:00: 0168 LOAD %VKORG as %VKORG.VBAK,
16.03.2016 10:13:00: 0169 Description,
16.03.2016 10:13:00: 0170 DistributionGroup
16.03.2016 10:13:00: 0171 FROM
16.03.2016 10:13:00: 0172 [..\..\02 Extern\steuernde_Daten_Vertrieb\DistributionGroups.xlsx]
16.03.2016 10:13:00: 0173 (ooxml, embedded labels, table is Tabelle1)
16.03.2016 10:13:00: 0174 where exists( %VKORG.VBRK, %VKORG )
16.03.2016 10:13:00: 3 Felder gefunden: %VKORG.VBAK, Description, DistributionGroup, 0 Sätze erhalten
16.03.2016 10:13:00: 0181 maratemp:
16.03.2016 10:13:00: 0182 load *
16.03.2016 10:13:00: 0183 , if( index( [%PRODH], 'PA0101' ) = 1, 'Vacuette Tubes'
16.03.2016 10:13:00: 0184 , if( index( [%PRODH], 'PA010711' ) = 1, 'Needles / Luer Adapter / Blood Collection Sets'
16.03.2016 10:13:00: 0185 , if( index( [%PRODH], 'PA01071211' ) = 1 or index( [%PRODH], 'PA01071204' ) = 1 or index( [%PRODH], 'PA01071205' ) = 1 or index( [%PRODH], 'PA01071206' ) = 1, 'Quickshield'
16.03.2016 10:13:00: 0186 , if( index( [%PRODH], 'PA01071209' ) = 1, 'Premium Safety Needle System (Tube Touch)'
16.03.2016 10:13:00: 0187 , if( index( [%PRODH], 'PA010801' ) = 1, 'Mini Collect Tubes'
16.03.2016 10:13:00: 0188 , 'no Group defined' )))))
16.03.2016 10:13:00: 0189 as [SalesReportGroupProduct.MARA]
16.03.2016 10:13:00: 0190
16.03.2016 10:13:00: 0191 , if( index( [%PRODH], 'PA0101' ) = 1, 1
16.03.2016 10:13:00: 0192 , if( index( [%PRODH], 'PA010711' ) = 1, 2
16.03.2016 10:13:00: 0193 , if( index( [%PRODH], 'PA01071211' ) = 1 or index( [%PRODH], 'PA01071204' ) = 1 or index( [%PRODH], 'PA01071205' ) = 1 or index( [%PRODH], 'PA01071206' ) = 1, 3
16.03.2016 10:13:00: 0194 , if( index( [%PRODH], 'PA01071209' ) = 1, 4
16.03.2016 10:13:00: 0195 , if( index( [%PRODH], 'PA010801' ) = 1, 5
16.03.2016 10:13:00: 0196 , 0 )))))
16.03.2016 10:13:00: 0197 as [SalesReportGroupProductID.MARA]
16.03.2016 10:13:00: 0198
16.03.2016 10:13:00: 0199 resident MARA
16.03.2016 10:13:00: Fehler: Tabelle nicht gefunden
16.03.2016 10:13:10: 0201 drop table MARA
16.03.2016 10:13:10: Fehler: Tabelle nicht gefunden
16.03.2016 10:13:11: 0202 rename table maratemp to MARA
The strange Thing is, that in the underlined parts should be 14 entries found (according to productive System)- here it finds 0 entries... but the Excel file is exactly the same in both Systems..
this is how the Excel-file Looks like:
I don't see any table named 'MARA' in your script which might be the issue.
do have any binary load in the script ??? if yes , check the tables in the binary load ...if not please share the complete script ...