cancel
Showing results for 
Search instead for 
Did you mean: 

Missing annotations in metadata

Lee3
Active Participant
0 Kudos
163

Hi Experts,

We are trying to create one app, that only show the data from different tables, this is to avoid having to create a separate (fiori element) app for each table. Or creating a new app for a new table. 
To achieve this we have several CDS view (for each table a CDS view) which will be expose in one oData service V2. For each table there is an interface (entity) view, a consumption (root enitty) view, metadata extension. Service definition looks like

@EndUserText.label: 'Service definition for different tables'
define service /UI_TABLES {
expose /C_Table1 as Table1;
expose /C_Table2 as Table2;
expose /C_Table3 as Table3;
......}

The xml view looks like

<mvc:View controllerName="test.controller.ListReport"
    xmlns:mvc="sap.ui.core.mvc"
    xmlns="sap.m"
     xmlns:core="sap.ui.core"
  xmlns:smartTable="sap.ui.comp.smarttable"
  xmlns:smartFilterBar="sap.ui.comp.smartfilterbar">

    <Page id="page" title="{i18n>title}">
        <smartFilterBar:SmartFilterBar
            id="smartFilterBar"
            entitySet="Table1"  -> will be set/bind in the controller
            useToolbar="true"
            persistencyKey="SmartFilter"
            header="Filter">
        </smartFilterBar:SmartFilterBar>

        <smartTable:SmartTable
            id="smartTable"
            tableType="ResponsiveTable"
            enableExport ="true"
            useVariantManagement="true"
            useTablePersonalisation="true"
            entitySet="Table1"    -> will be set/bind in the controller
            smartFilterId="smartFilterBar"
            header="Dynamic List Report"
            editable="false"
            enableAutoBinding="true" />
    </Page>
</mvc:View>

The problem we are facing is we are missing the annotations in the metadata file. The annotation @Metadata.ignorePropagatedAnnotations is not set. Even when we set the annotations directly in the consumption view the annotations won't become visible in the metadata. 
The view looks like

@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'test'
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED}

@search.searchable: true
@ui: {headerInfo: {
typeName: 'Option2',
typeNamePlural: 'test',
title: { type: #STANDARD, value: 'LastName' }
}}

define root view entity /C_OPTION2  as select from /I_OPTION2
{
@ui: {
lineItem: [ { position: 10, importance: #HIGH, label: 'ReportDate' } ]}
@search.defaultSearchElement: true
key SystemId,
@ui: {lineItem: [ { position: 20, importance: #HIGH, label: 'ReportDate' } ]}
@search.defaultSearchElement: true
key SysteemMandant,
@ui: {lineItem: [ { position: 30, importance: #HIGH, label: 'FullName' } ]}
@search.defaultSearchElement: true
FirstName,
@ui: {lineItem: [ { position: 50, importance: #HIGH, label: 'Days2exp' } ]}
@search.defaultSearchElement: true
LastName
}

We've tried:

  • annotations in consumption view / annotations in metadata extension
  • with and without @odata.publsh : true
  • with and without @vdm.viewType: #CONSUMPTION

Checking the oData service in segway client  xxxx /UI_TABLES_O2/$metadata no annotations are found for tableX. after changes we cleared the caches /IWBEP/CACHE_CLEANUP and /IWFND/CACHE_CLEANUP.

What are we missing? 

Thanks in advance

Lee

 

View Entire Topic
junwu
SAP Champion
SAP Champion

/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='******',Version='0001')/$value/

your annotation has another url.

junwu
SAP Champion
SAP Champion
0 Kudos
UI_TABLES_O2_VAN is probably the TechnicalName
Lee3
Active Participant
0 Kudos
/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='%2TEST%2FUI_TABLES_O2_VAN',Version='0001')/$metadata?sap-language=EN returns with Resource not found for URI segment 404 not found
Lee3
Active Participant
0 Kudos
checking the calls we could see that the /sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='%2TEST%2FUI_TABLES_O2_VAN',Version='0001')/$value?sap-language=EN is working fine, but after this call another call is made /sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='%2FTEST%2FUI_TABLES_O2_VAN',Version='0001')/$value/$metadata?sap-language=EN and that fails because The request URI is not valid. The segment '$value' must not be the last segment No idea why this call is made probably because of the rebinding of the smarttable(?)
Lee3
Active Participant
0 Kudos
get now a 400 bad request when we test the annotation in gateway client. Routing error for Annotation File xxxx_VAN' Version '0001' based on Service XXXX_0001 in /n/IWBEP/REG_VOCAN it's all good and clearing the caches • /n/IWFND/CACHE_CLEANUP • /n/IWBEP/CACHE_CLEANUP did help either. No GENFLAG is set In ST01 the 400 bad request is shown but no stil no idea how to solve this. Removed the service and reregister the service wihout any luck