From the previous article on how to quickly create a Fiori Elements application in SAP BTP from a CDS view, we have created a CDS view and based on this CDS view, we have created a Fiori Elements application:

As shown in the figure above, we expect that when we click the “>” symbol in the figure above, we will jump to the corresponding Object Page page of this item. This paper introduces the implementation method.

The main annotations of this CDS view are all extracted into the metadata Extension named Z_Travel_Metadata_Jerry by means of metadata extraction. For details, see my article on how to quickly create a Fiori Elements application with a CDS View in SAP BTP

In the header of the extension, add the following comment to declare a UI Object Page:

We then annotate the two fields TravelID and AgencyID with identification, indicating that we want to configure these two fields on the Object Page:

This metadata extension contains the following code:

@Metadata.layer: #CORE

@UI: {
  headerInfo: {
    typeName: 'Travel',
    typeNamePlural: 'Travels',
    title: {
      type: #STANDARD,
      label: 'Travel',
      value: 'TravelID'
    }
  }
}

annotate view Z_C_TRAVEL_DATA_JERRY with
{
  @UI.facet: [ { id:              'Travel',
                purpose:         #STANDARD,
                type:            #IDENTIFICATION_REFERENCE,
                label:           'Travel',
                position:        10 } ]
                
  @UI           : {
      lineItem      : [{position: 10, importance: #HIGH}],
      selectionField: [{position: 10 }],
      identification:[ { position: 10, label: 'Travel' } ]
  }
  TravelID;
  @UI           : {
      lineItem      : [{position: 15, importance: #HIGH}],
      selectionField: [{position: 20 }],
      identification: [ { position: 20 } ]
  }
  @Consumption.valueHelpDefinition: [{  entity: {name: '/DMO/I_Agency', element: 'AgencyID'}  }]
  AgencyID;
  @UI           : {
      lineItem      : [{position: 60, importance: #HIGH}]
      }
  Memo;
}

The Object Page reached after clicking “>” from the Fiori Elements List Report table control:

More of Jerry’s original articles can be found on “Wang Zixi “: