i want to read a BW Query into an Dataset. In the Examples from the BI SDK i only found a method to execute mdx statements.
String queryName = "Z_technicalName";
dataset = olap.execute(queryName);
But this dosnt works. Can anybody help me with this?
BI SDK uses MDX to access data so you need to build a MDX query for BW connector to access your query. Look at it as building a view on top of your query.
There is a transaction MDXTEST that can help you to build an initial MDX query and help to test variations. You need to select catalog and cube then click on "Generate Default MDX" button ( little wheels, 6th button in the row under "Query" drop-down list ). That will give you a MDX to start from and you'll need to modify it and/or supply parameters.
Here is an example I've created for a demo cube 0D_SD_C03_Q009 in catalog 0D_SD_C03:
[Measures].MEMBERS ON AXIS(0) ,
NON EMPTY [0D_SOLD_TO].MEMBERS * [0CALMONTH].MEMBERS ON AXIS(1)
I've deleted SAP_VARIABLES part and now I can run this MDX without worrying about parameters.
Hope it helps,