Skip to Content
avatar image
Former Member

ABAP CDS View - Odata- Sharepoint 2013

Hello,

I created a CDS view with OData publishing to see if OData connection to Sharepoint 2013 works.

View itself works fine.

@AbapCatalog.sqlViewName: 'ZPL_SQL_TSMA'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Analytics.dataCategory: #CUBE
@Analytics.dataExtraction.enabled: true
@EndUserText.label: 'TSMA cost unit table'
@OData.publish: true
@VDM.viewType: #CONSUMPTION


define view ZPL_CDS_TSMA 
as select from zco_tsm_costun
association[1] to zco_tsm_costun_t as _zco_tsm_costun_t 
    on  $projection.mandt    = _zco_tsm_costun_t.mandt
    and $projection.costunit = _zco_tsm_costun_t.costunit
{
    key zco_tsm_costun.mandt,
    key zco_tsm_costun.system_typ,
    
    @ObjectModel.text.element: ['text']
    key zco_tsm_costun.costunit,
    key zco_tsm_costun.datab,
    key zco_tsm_costun.werks,
    key zco_tsm_costun.company,
        zco_tsm_costun.datbi,
        zco_tsm_costun.valid,
        zco_tsm_costun.series,
        zco_tsm_costun.product_generation,
        zco_tsm_costun.product_line,
        zco_tsm_costun.business_unit,
        zco_tsm_costun.production_unit,
        zco_tsm_costun.product_type,
        zco_tsm_costun.business_unit_am,
        zco_tsm_costun.business_unit_pr,
        zco_tsm_costun.pick_off,
        zco_tsm_costun.pick_off_mat,
        zco_tsm_costun.product_livecycle,
        zco_tsm_costun.trading_product,
        zco_tsm_costun.product_structure,
        zco_tsm_costun.sypron,
        zco_tsm_costun.line_nr,
        zco_tsm_costun.erdat,
        zco_tsm_costun.modified,
    
        /* Associations */
        @EndUserText.label: 'Kostenträger - Text'
        @Semantics.text: true
        _zco_tsm_costun_t.text,
        
        /* Key Figures */
        @DefaultAggregation: #SUM
        @Semantics.quantity.unitOfMeasure: 'runit'
        1 as value,
        
        @Semantics.unitOfMeasure: true  
        @EndUserText.label: 'Unit' 
        cast( 'PCS' as abap.unit( 3 ) ) as runit
} where _zco_tsm_costun_t.spras = 'D'

Also activation and browser call in Gateway are working fine.

Sharepoint connection string validation is ok.

But select statement and/or data preview don't work

Sharepoint works fine with an OData service created using transaction SEGW but not with this ABAP CDS view odata.

Is there anything else I need to configure for Sharepoint using odata services directly from CDS views? Does anyone know what the error message means?

Thank you,

Alexander Oertel

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Aug 10, 2017 at 11:15 AM

    Hello,

    meanwhile I found the solution. Sharepoint oData connector had to be upgraded to the latest version.

    Regards,

    Add comment
    10|10000 characters needed characters exceeded