Just thinking how to analyse our #SAPSupport on SAP OSS messages. Is there a Analytics Dashboard around or CDS ?. Sometimes it would help to see the "sleeper" and why are they "sleeper" 🙂
At #vSAPWorkSpace we were checking the http://me.sap.com site to explore the #SAPOSS structure. We looked for a KPI like "number of contacts of a incident". With some inspiration we found the OData source to extract the json 🙂 It was awesome Thx
using {incidentws as external} from '../srv/external/incidentws.csn';
// persist the re-used external enity
@cds.persistence.skip : false
@cds.persistence.table
// analytical annotation
@Aggregation.ApplySupported.PropertyRestrictions : true
// reuse the imported data model
entity MessageHeaderSet : external.MessageHeaderSet {
// add aditional field that is always filled with 1 to calculate the
// number of messages in aggregations. This is our analytic measure
@Analytics.Measure : true
@Aggregation.default : #SUM
numberOfMessages : Integer default 1 @(title : '{i18n>numberOfMessages}');
}
// Annotate analytic dimensions
annotate MessageHeaderSet with {
@Analytics.Dimension : true
PriorityTxt @(title : '{i18n>PriorityTxt}');
@Analytics.Dimension : true
Status @(title : '{i18n>Status}');
@Analytics.Dimension : true
StatusTxt @(title : '{i18n>StatusTxt}');
@Analytics.Dimension : true
SystemId @(title : '{i18n>SystemId}');
};
// View with distinct values for search help
view PriorityTxtView as select distinct PriorityTxt from MessageHeaderSet;
// Entity for search help is filled with custom logic
@readonly
@cds.odata.valuelist
entity PriorityTxtVH {
key PriorityTxt : external.MessageHeaderSet : PriorityTxt;
};
srv.on ('READ', "PriorityTxtVH", async req => {
return SELECT.from(PriorityTxtView)
})
Chart #PriorityTxt : {
ChartType : #Column,
Dimensions : [PriorityTxt],
DimensionAttributes : [{
Dimension : PriorityTxt,
Role : #Category
}],
Measures : [numberOfMessages],
MeasureAttributes : [{
Measure : numberOfMessages,
Role : #Axis1
}]
},
PresentationVariant #PriorityTxt : {
Visualizations : ['@UI.Chart#PriorityTxt', ],
},
@Common : {ValueList #PriorityTxtVisualFilter : {
$Type : 'Common.ValueListType',
CollectionPath : 'MessageHeaderSet',
PresentationVariantQualifier : 'PriorityTxt',
Parameters : [{
$Type : 'Common.ValueListParameterInOut',
LocalDataProperty : 'PriorityTxt',
ValueListProperty : 'PriorityTxt'
}]
}}
PriorityTxt @(ValueList.entity : 'PriorityTxtVH', );
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 |