on 02-23-2024 6:08 PM
Hi Experts,
I would like to have the fields displayed in my Fiori Elements List Application optimized by PERCENTAGE as I am told you are able to do using CDS Annotation. However, even though I have this in my CDS view entity as a percentage, it does not work in the application when it is viewed.
Here is my CDS view entity code:
@AbapCatalog.sqlViewName: 'ZUSAGETRACKER'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #CONSUMPTION
@OData.publish: true
@EndUserText.label: 'CDS View for Usage Tracker'
define view ZCDS_USAGE_TRACKER
with parameters
@EndUserText.label: 'Start Date and Time'
@Consumption.defaultValue: '20231210013000'
P_STMP : timestamp,
@EndUserText.label: 'End Date and Time'
@Consumption.defaultValue: '20240315233000' // find way to use formula here
P_ESTMP : timestamp
as select from zusage_tracker as a left outer join
user_addr as b on
a.zuser = b.bname
association [0..1] to ZCDS_ACTION_VH as _ActionValueHelp on $projection.action =_ActionValueHelp.action
{
@UI.hidden: true
key a.guid as guid,
@UI.hidden: true
a.zuser as ZUser,
@UI.lineItem: [{position: 1, label: 'User Name',
// cssDefault.width: '7rem'
cssDefault.width: '10%'
}]
@UI.selectionField: [ { position: 1 } ]
concat_with_space(b.name_first, b.name_last, 1) as uname,
@UI.lineItem: [{position: 18, label: 'Timestamp',
// cssDefault.width: '7rem'
cssDefault.width: '10%'
}]
cast( a.timestamp as char20 ) as TIMESTAMP,
@UI.lineItem: [{position: 22, label: 'Semantic Object',
cssDefault.width: '15%'
// cssDefault.width: '10rem'
//cssDefault.width: '15%'
}]
a.sem_obj as Object,
@UI.lineItem: [{position: 27, label: 'Action',
// cssDefault.width: '10rem'
cssDefault.width: '15%'
}]
@UI.selectionField: [ { position: 27 } ]
@Consumption.valueHelp: '_ActionValueHelp'
a.action as action,
_ActionValueHelp,
@UI.lineItem: [{position: 35, label: 'URL',
// cssDefault.width: '10rem'
cssDefault.width: '20%'
}]
a.url as URL,
@UI.lineItem: [{position: 43, label: 'Session Identification',
// cssDefault.width: '10rem'
cssDefault.width: '15%'
}]
a.session_id as SessionID,
@UI.lineItem: [{position: 48, label: 'Tile Title',
// cssDefault.width: '10rem'
cssDefault.width: '15%'
}]
@UI.selectionField: [ { position: 48 } ]
@EndUserText.label: 'Tile Title'
@Consumption.valueHelpDefinition:
[{ entity:{ element : 'app_title', name : 'ZCDS_TILE_TITLE_SH' } }]
a.app_title as App_Title
} where a.timestamp >= :P_STMP and a.timestamp <= :P_ESTMP;
That code does NOT optimize the columns (see attached).
This is something I tried in my manifest file for the FE app (in VS Code). This also did not work (presumably because "controlConfiguration" is in the wrong place, but I have no idea where it should go.
User | Count |
---|---|
76 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.