When creating a Fiori app with RAP you have to give the two annotations above for every field. At least if you want a detail view.
This is tedious for views with many fields (even when using templates) and is cluttering the CDS views which makes them hard read.
Most of my use cases are
Is there a general annotation which refers to the whole view which handles this and spares the 2 annotations per field ?
From so:
define view entity z_test
as select from zt_test
{
@UI.lineItem: [{ position: 10 }]
@UI.identification: [{ position: 10 }]
key kokrs as Kokrs,
@UI.lineItem: [{ position: 20 }]
@UI.identification: [{ position: 20 }]
finve as Finve,
@UI.lineItem: [{ position: 30 }]
@UI.identification: [{ position: 30 }]
vrwdg as Vrwdg,
@UI.lineItem: [{ position: 40 }]
@UI.identification: [{ position: 40 }]
versi as Versi,
@UI.lineItem: [{ position: 50 }]
@UI.identification: [{ position: 50 }]
waers as Waers,
.......
To so:
@UI.lineItem.position.allInOrderOfAppearance
@UI.identification.position.allInOrderOfAppearance
define view entity z_test
as select from zt_test
{
key kokrs as Kokrs,
finve as Finve,
vrwdg as Vrwdg,
versi as Versi,
waers as Waers,
.......