Application Development 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: 

ABAP CDS View: odata service with no annotations

b_deterd2
Active Contributor
0 Kudos

Hello All,

ABAP System 7.50.

I have an ABAP CDS view like here:

  1. @AbapCatalog.sqlViewName: 'z_cds_test_1' 
  2. @AbapCatalog.compiler.compareFilter: true 
  3. @AccessControl.authorizationCheck: #CHECK 
  4. @EndUserText.label: 'Test 2 CDS' 
  5. @OData.publish: true 
  6. @Search.searchable: true 
  7. define view ZMYFLIGHTS 
  8.     as select from spfli 
  9.     association [1..1] to scarr as spfli_scarr 
  10.     on spfli.carrid = spfli_scarr.carrid 
  11.     { 
  12.        @UI.selectionField: [ { position: 10 } ] 
  13.        @UI.lineItem: [ { position: 10 } ] 
  14.        key spfli.carrid as id, 
  15.        @UI.lineItem: [ { position: 20 } ] 
  16.        @Search.defaultSearchElement: true 
  17.        key spfli_scarr.carrname as carrier, 
  18.         @UI.lineItem: [ { position: 40 } ] 
  19.        key spfli.connid as flight, 
  20.        @EndUserText:{ quickInfo:'Some info22' } 
  21.         @UI.lineItem: [ { position: 50 } ] 
  22.        spfli.cityfrom as departure, 
  23.         @UI.lineItem: [ { position: 60 } ] 
  24.        spfli.cityto as destination 
  25.     } 

The odata service is created because of the annotation @OData.publish: true.

My service (metadata ) is showing no annotation-related data however.

My smart table (Fiori control) is not working and raising the error "Select at least one column to perform the search".

I set the @UI.lineItem annotation though so I would expect this would be enough for the smart table.

There is not a single column in the table.

Any one encountered this problem?

Any help will be appreciated.

Regards,

Bert

1 ACCEPTED SOLUTION

pfefferf
Active Contributor
0 Kudos

Hello Bert,

the metadata.xml does not contain the annotation information, because the annotation information is delivered in an own annotation file via a service call (e.g. "/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='<technical name of annotation service>',Version='<version of annotation service>')/$value/".

The UI.lineItem and UI.selectionField annotation are ok, but the @Search.* annotations are not released yet for customer usage (check note in Search Annotations - Reference - SAP Library).

Best Regards,

Florian

1 REPLY 1

pfefferf
Active Contributor
0 Kudos

Hello Bert,

the metadata.xml does not contain the annotation information, because the annotation information is delivered in an own annotation file via a service call (e.g. "/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='<technical name of annotation service>',Version='<version of annotation service>')/$value/".

The UI.lineItem and UI.selectionField annotation are ok, but the @Search.* annotations are not released yet for customer usage (check note in Search Annotations - Reference - SAP Library).

Best Regards,

Florian