Skip to Content
avatar image
Former Member

Problems using the SAP OLE DB for OLAP Provider to access BW data

I'm using the SAP OLE DB for OLAP provider (MDRMSAP) to access BW data from a Windows platform. My MDX query will execute but I am not getting the results that I was expecting. My result set contains subtotals which I do not want. However, when I run the query using BEx the subtotals are not displayed.

For example:

My OLE DB for OLAP Output (this is what I don't want)-

Customer Product $

All All 1,000

Customer A All 1,000

All Product A 500

All Product B 500

My Output from BEx (which is what I want) -

Customer Product $

Customer A Product A 500

Customer A Product B 500

I'm wondering if I am not constructing my MDX query properly. Or, if there is a setting that I should change to get the SAP OLE DB for OLAP provider (MDRMSAP) to "flatten" the data properly.

Are there any examples (or How-To's) showing the use of the SAP OLE DB for OLAP provider in Visual Basic or any other scripting language?

Is there a reference for SAP's implementation of MDX (I haven't been able to find it on help.sap.com)?

Is there a way to see the MDX command that BEx is generating to execute my queries?

Ideally I would like to do the following:

1. Design the the BEx query that I need using the BEx query designer

2. Execute the query from my Windows platform using ADO / ADO-MD in Visual Basic via the SAP OLE DB for OLAP Provider.

3. Save the results into a file or table

I think I can do all of this if I can get the data "flattened" properly.

Thanks for your help,

Trent Andrews

htandrews@yahoo.com

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Feb 27, 2004 at 08:16 AM

    Hi,

    first of all BEx itself doesn't use MDX to execute Queries in Web or Analyzer.

    You probably created your mdx-statement with

    [IOBJNM].MEMBERS as you can see in transaction mdxtest,

    [IOBJNM].MEMBERS will also include the ALL member.

    You can for example go down one level. For example

    [IOBJNM].[LEVEL01].MEMBERS to get rid of the ALL-member.

    I'm not sure what kind of documentation you need. I would suggest to have a look on

    http://help.sap.com/saphelp_bw33/helpdata/en/d9/ed8c3c59021315e10000000a114084/frameset.htm

    Regards

    Heike

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 16, 2004 at 08:46 PM

    I am having a similar problem with extracting data from an infocube to a flat file from within BW (actually APO).

    I see there is a function module to generate MDX dynamically based on a query but what is used to execute the MDX from within a SAP environment?

    I used mdxtest and agree it is great but what to do with the mdx statement within a SAP environment? I am able to execute the mdx and see results but would like to export those results to a flat file.

    Any guidance?

    Thanks

    Andrew

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 17, 2004 at 04:10 PM

    Thanks Heike

    rscrm_bapi does not exist in APO - there is a transaction called rscrm_report which uses a query to generate a MDX statement then allows for the download or transport to a SAP table. Users can select any query that was selected for OLE DB for OLAP and add additional selection criteria to the execution. SAP dropped support for this and there are several bugs in it. I am working on making this transaction usable but there are so many function modules to work with and alot of unnecessary crm code. I was looking for an easier way but it looks

    like rscrm_report is more dynamic and does not require the prior creation of MDX statements as they are created at run time.

    Thanks

    Andrew

    Add comment
    10|10000 characters needed characters exceeded