Skip to Content
1
Jul 05, 2023 at 11:20 AM

Annotation to hide criticality variable from UI display

274 Views

Hello,

In Restful abap programming application, I have created a field p_date and assigned criticality 'Crt_date' to it . I want to display only P date on fiori app and not criticality variable crt_date. But both values are getting displayed on application. If I use @UI.hidden:true for Crt_date then this variable gets hidden but p date is not getting colored as per the criticality set. I have already tried exclude option in lineitem but didn't work.

Please let me know the solution to this problem. Below is the sample code for your reference.

@UI.lineItem: [{ label : 'P Date', position: 44, importance: #HIGH, criticality: 'Crt_date' }]

p_date,

@UI.lineItem: [{hidden: true, importance: #LOW }]

@ObjectModel.readOnly: true

@ObjectModel: { virtualElement,

virtualElementCalculatedBy: 'class_name' }

cast( '' as abap.sstring( 1 ) ) as Crt_date,