Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CDS View Analytic query

0 Likes
1,957

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

1 ACCEPTED SOLUTION
Read only

924

Hello,

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

@Analytics.dataCategory: #DIMENSION

Cheers,

Alexander Oertel

1 REPLY 1
Read only

925

Hello,

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

@Analytics.dataCategory: #DIMENSION

Cheers,

Alexander Oertel