Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
antoinelaviron
Partner - Contributor III
Partner - Contributor III

Script fails when loading attributes from BW

Hello Qlikview Gurus,

In my QVD Generator, I have a connection to BW via a QVSAPOLAP connector.

I am accessing a query and want to get some attributes from it.

Here is what is autogenerated by QV

[QMTXX/QMT_QRY_XX]:

Load *;

Select PseudoMDX D (

Dimensions ( 

  [QMTMLADED] (),

[QMTMMBAU] ([1QMTMMBAU], [2QMTMMBAU], [4QMTMMTOGP], [2QMTMMTOGP]), // Attributes

  [QMTMQBAU] ([1QMTMQBAU], [2QMTMQBAU], [2QMTMPRSUB], [4QMTMPRDVA], [1QMTMPRDVA], [2QMTMPRDVA]), // Attributes

  [QMTMUMFNG] (),

  [QMTMUMFVA] (),

  [TBWCFALMN] (),

  [TBWCSOPJR] ()),

Measures (

  [3QOZGTBG2FIKCINKKJYEU8BKW].[3STPM5A1FT98HOU4S7NXOJYQO],

  [3QOZGTBG2FIKCINKKJYEU8BKW].[4X87P8UH3NKF816T84PT7Z8V4]), /

From (QMTXX/QMT_QRY_XX));

The script is executed and the result is stored into a qvd file

Then I am loading this qvd file into my Datamodel application.

With the QV preview, I can see values stored in the attributes.

Then here is the code generated by QV for the attributes.

[Motorbaureihe - Motorbaureihe Stufe 01 (Key)],

[Motorbaureihe - Motorbaureihe Stufe 01 (Text)],

[Motorbaureihe - Motorbaureihe Stufe 01 - [1QMTMMBAU]]],

[Motorbaureihe - Motorbaureihe Stufe 01 - [2QMTMMBAU]]],

[Motorbaureihe - Motorbaureihe Stufe 01 - [4QMTMMTOGP]]],

[Motorbaureihe - Motorbaureihe Stufe 01 - [2QMTMMTOGP]]],

[Q-Baureihe - Q-Baureihe Stufe 01 (Key)],

[Q-Baureihe - Q-Baureihe Stufe 01 (Text)],

[Q-Baureihe - Q-Baureihe Stufe 01 - [1QMTMQBAU]]],

[Q-Baureihe - Q-Baureihe Stufe 01 - [2QMTMQBAU]]],

[Q-Baureihe - Q-Baureihe Stufe 01 - [2QMTMPRSUB]]],

[Q-Baureihe - Q-Baureihe Stufe 01 - [4QMTMPRDVA]]],

[Q-Baureihe - Q-Baureihe Stufe 01 - [1QMTMPRDVA]]],

[Q-Baureihe - Q-Baureihe Stufe 01 - [2QMTMPRDVA]]],

QV Script editor does not give me any syntax error but when I'm executing the script, I have an error message ( FROM statement is misplaced) and the script execution stop.

Do you have ever encountered this problem?

Is there a solution?

Thanks in advance

Antoine

1 Reply
Not applicable

Hi Antoine,

I faced a similar issue.Try the below code(replaced [sample] by "sample" for attributes)

[Motorbaureihe - Motorbaureihe Stufe 01 (Key)],

[Motorbaureihe - Motorbaureihe Stufe 01 (Text)],

"Motorbaureihe - Motorbaureihe Stufe 01 - [1QMTMMBAU]",

"Motorbaureihe - Motorbaureihe Stufe 01 - [2QMTMMBAU]",

"Motorbaureihe - Motorbaureihe Stufe 01 - [4QMTMMTOGP]",

"Motorbaureihe - Motorbaureihe Stufe 01 - [2QMTMMTOGP]",

[Q-Baureihe - Q-Baureihe Stufe 01 (Key)],

[Q-Baureihe - Q-Baureihe Stufe 01 (Text)],

"Q-Baureihe - Q-Baureihe Stufe 01 - [1QMTMQBAU]",

"Q-Baureihe - Q-Baureihe Stufe 01 - [2QMTMQBAU]",

"Q-Baureihe - Q-Baureihe Stufe 01 - [2QMTMPRSUB]",

"Q-Baureihe - Q-Baureihe Stufe 01 - [4QMTMPRDVA]",

"Q-Baureihe - Q-Baureihe Stufe 01 - [1QMTMPRDVA]",

"Q-Baureihe - Q-Baureihe Stufe 01 - [2QMTMPRDVA]"

This worked for me.Hope this helps:)