Skip to Content
0

CDS View Analytic query

May 24, 2017 at 01:51 PM

259

avatar image
Former Member

Hello,

I've create a CDS view as analytic query.

@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
} 

Using annotations
@ObjectModel.text.element: ['CostUnitText']
key costunit,

@Semantics.text: true
text as CostUnitText,

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)

I already checked tons of blogs and in my opinion it should work or am I missing something?

Thank you,

Alexander Oertel

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member Aug 10, 2017 at 11:18 AM
1

Hello,

meanwhile I found the answer in S4H410 training course. This behaviour works together with annotation

@Analytics.dataCategory: #DIMENSION

Cheers,

Alexander Oertel

Share
10 |10000 characters needed characters left characters exceeded