<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic CDS View Analytic query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-analytic-query/m-p/468886#M15026</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've create a CDS view as analytic query.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;@AbapCatalog.sqlViewName: 'ZPL_SQL_TSMA2'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Analytics.query: true
@EndUserText.label: 'TSMA analytical query'
@VDM.viewType: #CONSUMPTION


define view ZPL_CDS_TSMA2 
as select from ZPL_CDS_TSMA 
{
    key system_typ,
    @AnalyticsDetails.query.axis: #ROWS
    @ObjectModel.text.element: ['CostUnitText']
    key costunit,
    key datab,
    key werks,
    key company,
        datbi,
        valid,
        series,
        product_generation,
        product_line,
        business_unit,
        production_unit,
        product_type,
        business_unit_am,
        business_unit_pr,
        pick_off,
        pick_off_mat,
        product_livecycle,
        trading_product,
        product_structure,
        sypron,
        line_nr,
        erdat,
        modified,
        @Semantics.text: true
        text as CostUnitText,
        
        /* Key Figures */
        @AnalyticsDetails.query.axis: #COLUMNS
        @DefaultAggregation: #FORMULA
        value
} 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Using annotations &lt;BR /&gt;@ObjectModel.text.element: ['CostUnitText']&lt;BR /&gt;key costunit,&lt;/P&gt;&lt;P&gt;@Semantics.text: true&lt;BR /&gt;text as CostUnitText,&lt;/P&gt;&lt;P&gt;I was under the impression that COSTUNIT and TEXT  would behave in the same way as BI characteristics with Key - Text values in RSRT and Analysis for Office. But COSTUNIT and TEXT don't seem to be connected (screenshot from AO2.4)&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/35782-2017-05-24-15-43-32-book1-excel.png" /&gt;&lt;/P&gt;&lt;P&gt;I already checked tons of blogs and in my opinion it should work or am I missing something?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Alexander Oertel&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2017 13:51:05 GMT</pubDate>
    <dc:creator>alexander_oertel2</dc:creator>
    <dc:date>2017-05-24T13:51:05Z</dc:date>
    <item>
      <title>CDS View Analytic query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-analytic-query/m-p/468886#M15026</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've create a CDS view as analytic query.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;@AbapCatalog.sqlViewName: 'ZPL_SQL_TSMA2'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Analytics.query: true
@EndUserText.label: 'TSMA analytical query'
@VDM.viewType: #CONSUMPTION


define view ZPL_CDS_TSMA2 
as select from ZPL_CDS_TSMA 
{
    key system_typ,
    @AnalyticsDetails.query.axis: #ROWS
    @ObjectModel.text.element: ['CostUnitText']
    key costunit,
    key datab,
    key werks,
    key company,
        datbi,
        valid,
        series,
        product_generation,
        product_line,
        business_unit,
        production_unit,
        product_type,
        business_unit_am,
        business_unit_pr,
        pick_off,
        pick_off_mat,
        product_livecycle,
        trading_product,
        product_structure,
        sypron,
        line_nr,
        erdat,
        modified,
        @Semantics.text: true
        text as CostUnitText,
        
        /* Key Figures */
        @AnalyticsDetails.query.axis: #COLUMNS
        @DefaultAggregation: #FORMULA
        value
} 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Using annotations &lt;BR /&gt;@ObjectModel.text.element: ['CostUnitText']&lt;BR /&gt;key costunit,&lt;/P&gt;&lt;P&gt;@Semantics.text: true&lt;BR /&gt;text as CostUnitText,&lt;/P&gt;&lt;P&gt;I was under the impression that COSTUNIT and TEXT  would behave in the same way as BI characteristics with Key - Text values in RSRT and Analysis for Office. But COSTUNIT and TEXT don't seem to be connected (screenshot from AO2.4)&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/35782-2017-05-24-15-43-32-book1-excel.png" /&gt;&lt;/P&gt;&lt;P&gt;I already checked tons of blogs and in my opinion it should work or am I missing something?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Alexander Oertel&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 13:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-analytic-query/m-p/468886#M15026</guid>
      <dc:creator>alexander_oertel2</dc:creator>
      <dc:date>2017-05-24T13:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View Analytic query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-analytic-query/m-p/468887#M15027</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;meanwhile I found the answer in S4H410 training course. This behaviour works together with annotation&lt;/P&gt;
  &lt;P&gt; @Analytics.dataCategory: #DIMENSION&lt;/P&gt;
  &lt;P&gt;Cheers,&lt;/P&gt;
  &lt;P&gt;Alexander Oertel&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 11:18:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-analytic-query/m-p/468887#M15027</guid>
      <dc:creator>alexander_oertel2</dc:creator>
      <dc:date>2017-08-10T11:18:33Z</dc:date>
    </item>
  </channel>
</rss>

