cancel
Showing results for 
Search instead for 
Did you mean: 

CDS Annotation and Preview Issues

melanie_lauber
Active Participant
0 Kudos

Hi,

I've created a simple RAP case using Delivery Header (LIKP) as an example. However, I'm running into several issues where my UI annotations are ignored/not shown and/or the preview from ADT does not work and I have not found anyone else having these issues.

1. @UI.headerInfo is completely ignored/not shown. I have a very simple UI.headerInfo annotation and yet, the Object Page of my Fiori Elements app has no title at all. All other annotations (like the UI.facet in below code extract) work.

Here is the start of my CDS view:

@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Simple Outbound Delivery Planning'
@VDM.viewType: #CONSUMPTION
@Metadata.allowExtensions: true
@Consumption.semanticObject: 'OutboundDelivery'
define root view entity ZI_OutbDelivDates as select from I_OutboundDelivery as Delivery
    association [0..*]  to C_DeliveryShipToPartyVH as _DlvShipToPartyVH on $projection.ShipToParty = _DlvShipToPartyVH.Customer
{
    // key
    @Consumption.semanticObject: 'OutboundDelivery'
    key OutboundDelivery            as Delivery,

Here is the start of my Metadata extension of that CDS view:

@UI.headerInfo: {
   typeName:       'Outbound Delivery',
   typeNamePlural: 'Outbound Deliveries',
   title: {
     type:   #STANDARD,
     value:  'Delivery',
     label: 'Outbound Delivery'
   }
}
annotate view ZI_OutbDelivDates with 
{
    // FACET *******************************************************
    @UI.facet: [ {
        purpose:  #HEADER,
        type:     #FIELDGROUP_REFERENCE,
        targetQualifier: 'FGHeaderItems',
        position: 20 
    }

But despite this, both OData V2 and OData V4 service bindings upon preview from ADT do not show any header info.

This is OData V2:

And this is OData V4:

The UI.headerInfo annotation was there from the very first time I activated the CDS view. So, this cannot be a cache issue. Nevertheless, I have done all the cache cleaning stuff that one can do, backend, frontend and in my browsers and even used new browsers, so please do not suggest that; it doesn't work.

And maybe you've already noticed my 2nd problem...

2. For some reason OData V4 ignores the "update" possibility from my Behavior Definition. You can see in the above OData V4 screenshot that there is only the "Delete" button, and the "Edit" button is missing, while OData V2 does this part correctly. Like, what the heck. Once again, the "update" behavior has been there from the very start, so once again, not a cache issue (in fact, I added the "delete" behavior just recently to test if that one works and well, you can see only that one works on OData V4).

Here is my Behavior Definition:

managed; // implementation in class zbp_i_outbdelivdates unique;

define behavior for ZI_OutbDelivDates //alias <alias_name>
persistent table likp
lock master
//authorization master ( instance )
//etag master <field_name>
{
  update;
  delete;

...
}

-------------------------------------------------------------------

projection;

define behavior for ZC_OutbDelivDates //alias <alias_name>
{
  use update;
  use delete;
}

I'm at a loss. Why does my CDS RAP example totally ignore UI.headerInfo?

Why does my OData V4 ignore "update" but not "delete"? Can anyone help? Any ideas?

View Entire Topic
SowmyaSurekha
Explorer
0 Kudos

hi melanie_lauber_implema,

can you try this for @UI.headerInfo :

capture.png

Thanks&regards,

sowmya.