Skip to Content

Consumption of CDS views in Analysis for Office

What is Analysis for Office?

SAP Business Objects Analysis, edition for Microsoft Office, is a Microsoft Office Add-In that allows multidimensional analysis of OLAP sources. It connects to SAP NetWeaver BW and SAP HANA.
Analysis plug-in includes versions for Microsoft Excel where Analysis for Microsoft Excel is a reporting tool.

CDS View to be consumed by Analysis for Office

Here we will learn through top down approach i.e. understanding the consumption view first and then going down to the interface views consumed in consumption view. After consuming the view, we will learn ways to view the latest data and to change value of input parameters without launching analysis for Office again.

Consumption View

Below is your consumption view Z_C_SFLIGHT_SCARR which is using interface view Z_I_SCARRFLIGHT_DEMO

Interface View(s)

Z_I_SCARRFLIGHT Is Association of two Views Z_I_SCARRDEMO and Z_I_FLIGHTDEMO on carrier ID

Interface view Z_I_FLIGHTDEMO

Interface view Z_I_SCARRDEMO

Steps to consume CDS view in Analysis for Office

Insert a data source (in our case a CDS view) and display the results in Analysis for Office

Skip the Logon to SAP Business Objects BI Platform

Select the system

Search with SQL view name of CDS view

Annotation @Consumption.filter is used to apply filter on the fields of a view. Marking multiple selection as true allows multiple inputs on the field. Also a field can be marked as optional or mandatory using the same annotation.

Refer line number 16 in Fig. 1
Here, @consumption.filter is applied on CarrierId.

Use value help and select Airline AA

Press OK and you will be able to view the data in Analysis for Office

This excel sheet can be saved and provided as a template for the end user. End user can change the input parameter via prompts and view data accordingly.
Also, Refresh All button can be used to view the latest data.

Click on Prompts from Data Source

This simple example demonstrated how easy it is to create user friendly reports using CDS View and its annotations.


You must be Logged on to comment or reply to a post.
  • Hello Priyanka,


    Nice blog!  I tried it, but the CDS view does not show up when I search for it in Analysis for Excel.  Is this a release specific functionality?  Is the system you are working with an R/3 system or a BW system?

  • Hello Priyanka,


    thank you for this blog, but please add some info about which ABAP (Netweaver) release you are working on and which Analysis Office version you used.

    It seems you used Netweaver 7.51, as the "@ClientHandling" annotation is only available since this version.


    Thanks and Regards


      • Hi Priyanka,


        Thank you for the blog.


        We followed the same and was able to  get the output we always have the technical name of the infoprovider to the dimensions. How can we have  remove the technical name of infoprovider?.




  • Hello Priyanka,

    thanks for your blog!

    I followed your steps but couldn't find the consumption views in the search.

    Are there any more settings requested?


    Thanks and regards,




    • Hi Birgit,


      Please check the annotation

      @VDM.viewType: #CONSUMPTION.

      It should be set to #Consumption to make it visible in the input source in Analysis for Office.




  • Hi Priyanka,

    I am facing the same issue, Consumption view is not showing up in Analysis office version 2.5. Another interesting issue is when I use case statement in my composite view corresponding measures are not coming in the analysis office. Do you face similar issue??



        Hi Priyanka,

        Thanks for your input. Facing another problem while integrating consumption view in AFO. Report has selection prompt as system date which should be editable prompt.

        Through F4 help if we change the date means then new date value is not updating the prompt whereas the same is working in RSRT.

        Please provide your input.


      • BO - AfO can consume both transient provider queries (@Analytics.query:true) and SAP BW transient providers (@Analytics.dataCategory:#CUBE).

        SAP BW transient providers and SAP BW transient provider queries will have names in the form 2C<CDS_SQL_VIEW>




      • Hi Priyanka,


        Thanks for you input. But i'm facing the same issues

        From rsrt i find my cds query but from Analysis For Office i don't find the query...


        I process like this :

        . I copied the cds view C_ProfitAndLossPlanActQ2903 -> 2CCFIPLPLANACT


        my cds view name is :


        @AbapCatalog.sqlViewName : 'ZCPROFLO2'
        @AbapCatalog.compiler.compareFilter: true
        @EndUserText.label: 'ZP&L - Plan/Actual'
        @VDM.viewType: #CONSUMPTION
        @Analytics.query: true
        @AccessControl.authorizationCheck: #PRIVILEGED_ONLY

        @Analytics.settings.maxProcessingEffort: #HIGH
        @ClientHandling.algorithm: #SESSION_VARIABLE
        @AbapCatalog.buffering.status: #NOT_ALLOWED
        @Metadata.ignorePropagatedAnnotations: true

        @ObjectModel.usageType.sizeCategory: #XXL
        @ObjectModel.usageType.serviceQuality: #D
        @ObjectModel.usageType.dataClass: #MIXED


        S4HANA 1909


      Yes issue is resolved.Thanks for your input. Facing another problem while integrating consumption view in AFO. Report has selection prompt as system date which should be editable prompt.

      Through F4 help if we change the date means then new date value is not updating the prompt whereas the same is working in RSRT.

      Please provide your input.


      • Hi Muruga,


        Please attach the screen shot of where you are trying to edit the input parameter.

        Is it only with DATE as input parameter or did you try it with an input parameter other than date?




  • Hello Priyanka,

    Firstly thank you so much for your blog appreciate all your effort you put into CDS View .

    I have couple of live issues running in my project ..

    1. Can you help me in how to activate or step involved for F4 help or LOV in the variable screen in S4HANA.I was trying to create  prompts ( Variable) in query designer and then publish to AO(as I have no option for optional prompts in CDS).
    2. And also help us out how to publish my CDS view in the folder structure in AO ( in Area Tab). I was able to find my CDS view in search option but not able to find in the folder structure in AO.

    AO >> Analysis Office




  • Hi Priyanka,

    I am using a CDS View in Analysis for Office .The view contains a few Input parameters and a few  fields marked as Filter.

    Below is the annotation I am using to bring the fields in the AO Prompt:

    @Consumption.filter: { selectionType : #SINGLE, multipleSelections: true }

    Now, I want to sequence the filter fields and the input parameters in a particular order.

    What is the annotation for sequencing fields in the Prompt?

    Also, how do we modify the Labels appearing in the Prompt? It is by default taking the text from Data element. Can we alter this by any Annotations ?






  • Hi Priyanka,

    I created a consumption CDS view with annotation "@Analytics.query:true " inside.

    And expect to run it from Analysis for Office.

    But I can't find it from the AFO search of "Select Data Source" by loging into my sandbox S4H system.

    However, I can see consumption views with annotation "@Analytics.query:true " delivered by SAP in AFO.

    So I copied a SAP consumption view C_SalesOrderItemQry and activate it under another name, still can't find it from AFO.

    Then to make a consumption view available in AFO, any further setting required besides the annotation of @Analytics.query:true ?

    I'm using:

    AFO 2.3

    S4HANA on Premise 1809





    • Hi Matt,


      Did you try to search with 2C*? Please try with 2C* and if it still does not work then we can keep a meeting to check.


      Thanks and regards,

      Priyanka Sadana

  • Hi Priyanka,


    I created a consumption CDS view, with the parameters:

    @Analytics.query: true
    @OData.publish: true

    And I am not able to find the CDS in Analysis for Office, I tried to find it with 2C*, also the query is available in Fiori.

    Do you have any idea witch can be the problem?




    • ​Got reply from SAP:

      From S/4HANA 1809, a CDS query (CDS view with annotation @AnalyticsDetails.query:true) is available in Open Query dialog box only when it is set as C1-released (As a developer on customer-site, you can use the Use System-Internally (C1) release contract to make custom objects available for use in key user apps. The other release contracts are only relevant for SAP development.).

      Refer to SAP Knowledge Base Article 2733553 for details.

      If tab ‘API State’ of the view properties is not available in your Eclipse ABAP Development Tool, you can install/upgrade to the latest version after adding URL into “Available Software Sites”.

      Tested the suggested solution, now my consumption views with @AnalyticsDetails.query:true are visible in AFO.

      Another test in S4HANA 1610 shows that there is no such “feature”, which again confirmed that this is something new from 1809 as mentioned above.

  • Thank you a lot!

    It helped. There is also explanation about use state for SAP objects

  • It is a nice Blog ...


    Could you please help anyone as I am new to CDS Views and my requirement is as follows;

    I want to enhance FSV (GL Hierarchy) in current Consumption CDS View.




  • Hello Priyanka,


    Looking for answer similar to question Matt Zhou  above. More or less we have same issue. We are unable to see the  CDS view folders - Info areas in AO. SAP suggested to use check in RSRT, still the same issue. The folders are not showing up in the RSRT or AO. We followed all the steps Matt Zhou - mentioned ( Suggested by SAP ). Unable to find the FOLDER. Is there any way to transport the application component/ Infoarea. We are looking for infoarea - BI in S/4 system RSRT and in AO . Could you please let us know when you get a chance. All auth are provided.



    Ramakrishnan Ramanathaiah

    • Hi Ramakrishnan,


      Try searching for any consumption CDS view with 2C* and then check the path of this CDS. This will give you the exact folder. In case you still face the issue we can keep a call to resolve it.




  • Hi Priyanka,

    Thanks for this Great blog!!

    I have one scenario; I have to build an AO report with ranges/multi-select of inputs in AO prompts, but the reporting requirement is complex, so I will have to use AMDP basically I will create CDS Table function, now data will not be fetched straight forward from the table based on what user provides input in AO input prompt, but I have to do some calculation and return the summarised data to AO, for this case I need to have what user has given input in AO input screen.

    So I can capture the input values(of AO) into CDS table function(or AMDP) so that I can manipulate the data in AMDP.

    Please give me some direction.



  • Very informative blog Priyanka, Thank you...!!!


    I am having a date range selection on my CDS view and so am using

    @Consumption.filter : {selectionType : #RANGE, multipleSelections : true, mandatory: true }

    The date range selection is coming up fine on the selection prompt, however, I want to default the operator to range [] instead of = that Analysis for office prompt shows by default.

    This way both From and To input boxes will be enabled by default and users will not have to change the operator selection. Please let me know if you have any thoughts on this. Thanks.