Skip to Content

Comparisons of consuming BI web services using different methods

If the purpose of your project is to send some data from BW infocubes/BEx queries to other applications via web services, there are a few options available to you.

Without going into too much detail (there are some pretty detailed Howto documents on SDN), I will briefly go over the options, providing some MDX samples to retrieve data from the BW cubes, followed by some of the performance metrics/time that it takes to retrieve the BW data.


Option 1: XML for Analysis :


Using this method, you write custom MDX statements, and pass them to SAP BW.

I’ve used a third party tool to test the MDX/Web service. You can also use transaction MDXTEST in BW to test the MDX statements.



Fig 1: Screenshot of third party tool to pass MDX statements to SAP BW.


Click on ‘select file’ and select the XML file that has the MDX statement as shown in Fig 2.



Fig 2: XML file. MDX statement in Execute method.



MDX samples :

SELECT{ [Measures].[ZHRS] } ON AXIS(0) ,







, [0CALDAY].[20CALDAY] > 20110101) 






FROM [$Infocubename]

WHERE [0EQUIPMENT].[0000000000123456789]







properties [0EQUIPMENT].[20EQUIPMENT] ON axis(1)

FROM [$infocubename]

WHERE {[0SHIP_TO].[0012345],


{( [ZME_ORDER].&[001234567], [ZME_ITEM].&[000010] ),

 ( [ZME_ORDER].&[001234569], [ZME_ITEM].&[000010] )} 



Option 2 :XMLA: Write MDX statement based on BEx query

It’s very similar to option 1. The only difference being this time you first create a BEx Query and write your MDX statement as shown in the sample below: The MDX statement can also be auto generated in transaction MDXTEST in SAP BW after the query is created.














[0I_DAYS] INCLUDING [0CALDAY].[20100508]:[0CALDAY].[20110518]

[0I_EQUI] INCLUDING [0EQUIPMENT].[0000000000123456]

[0I_EQUI] INCLUDING [0EQUIPMENT].[0000000000123457]

[0I_EQUI] INCLUDING [0EQUIPMENT].[0000000000123458]


YDCCSA30 – Infocube name.

YSUMMARY – BEx query name.

You can also use SAP variables (0I_DAYS) as you can see from the MDX statement above.

For reference please check the below link:


Option 3: Using query_view_data

Using this method, you do not need to write any MDX statements.


You would need to create a BEx query and the web service takes some input parameters such as the query name, query variables etc..,

TIP: When using these web services the data is received in an XML list output form. Depending on the number of records that are retrieved the XML list output size can be really large (~MB).  In transaction SICF, you have an option of turning on compression for the service, which would dramatically reduce the size of the file that needs to be transferred to the application that is consuming the web service. By turning compression on you will see significant improvements in response times.



Comparison of the 3 options discussed above:

  • Same queries/data set for all 3 options discussed above were executed.
  • Data was not cached during the run.

















Without   Compression/Average response time



With   Compression/Average response time



Option   1: XMLA-custom MDX



~   60 seconds



~26   seconds



Option   2:XMLA with BEx query-custom MDX



~15   seconds



~8   seconds



Option 3: query_view_data: No MDX





~2   seconds



The figures above represent only the time that elapses between the call to BW and the caching of the resulting data to the application.

Using query_view_data is a clear winner. It does not require any custom MDX and can be used to pass different selection criteria. And don’t forget to turn on compression.

You must be Logged on to comment or reply to a post.
    • 1)Yes both are web services –
      XML/A uses the MDX processor and
      query_view_data uses BICS.
      2) Easy Query uses BICS as well. Very similar to query_view_data. In fact, easy query appears to be much more easier to parse when I look at the API.
      – my blog was based on 3.5 system hence i’ve used query_view_data. Correct me if I’m wrong but I think Easy query is from 7.3 ???

      The take away is anything that goes through BICS is a winner in terms of the response times for retrieving the data.