From sap-fiori-mcp-server
Add analytical chart and table hybrid views to SAP Fiori Elements List Reports with aggregated data. Supports CAP and ABAP RAP (OData V4).
How this skill is triggered — by the user, by Claude, or both
Slash command
/sap-fiori-mcp-server:sap-fiori-analytical-chart Entity, dimension, measure, aggregationEntity, dimension, measure, aggregationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Add **analytical chart + table (hybrid view)** to visualize aggregated data.
Add analytical chart + table (hybrid view) to visualize aggregated data.
STOP and ASK the user for ALL of these inputs if ANY are missing from the prompt:
DO NOT proceed with implementation until all inputs are confirmed.
@Aggregation.ApplySupported: {
Transformations: ['aggregate','groupby'],
AggregatableProperties: [{Property: Amount}],
GroupableProperties: [Category]
}
Analytics.AggregatedProperty #Amount_avg: {
AggregatableProperty: Amount,
AggregationMethod: 'average'
}
UI.Chart #AnalyticalChart: {
$Type: 'UI.ChartDefinitionType',
Title: 'Chart Title',
ChartType: #Column,
Dimensions: [Category],
DynamicMeasures: ['@Analytics.AggregatedProperty#Amount_avg'],
MeasureAttributes: [{
$Type: 'UI.ChartMeasureAttributeType',
DynamicMeasure: '@Analytics.AggregatedProperty#Amount_avg',
Role: #Axis1
}],
DimensionAttributes: [{
$Type: 'UI.ChartDimensionAttributeType',
Dimension: Category,
Role: #Category
}]
},
UI.PresentationVariant #ChartView: {
$Type: 'UI.PresentationVariantType',
Text: 'Chart View',
Visualizations: ['@UI.Chart#AnalyticalChart']
},
UI.PresentationVariant #TableView: {
$Type: 'UI.PresentationVariantType',
Text: 'Table View',
Visualizations: ['@UI.LineItem']
}
✅ Uses DynamicMeasures
Missing ANY of these will cause the app to fail/not load:
@OData.applySupportedForAggregation: #FULL on projection view (ZC_*)@Aggregation.default: #AVG (or #SUM, #MIN, #MAX) on measure field@UI.chart annotation with correct qualifier in metadata extensionviews.paths configuration⚠️ CRITICAL: @OData.applySupportedForAggregation annotation is MANDATORY
WITHOUT this annotation:
Placement:
TRANSACTIONAL_QUERY contractCORRECT Example:
@OData.applySupportedForAggregation: #FULL ← MANDATORY! Must be present!
define root view entity ZC_ENTITY
provider contract TRANSACTIONAL_QUERY
as projection on ZR_ENTITY
{
@Aggregation.default: #AVG ← Specify aggregation method for measure
Amount;
Category; ← Dimension field (no aggregation annotation needed)
}
WRONG Example:
// ❌ WRONG - Don't put on interface view
@OData.applySupportedForAggregation: #FULL ← WRONG PLACE!
define root view entity ZR_ENTITY
as select from TABLE
@UI.chart: [{
qualifier: 'AnalyticalChart',
title: 'Chart Title',
description: 'Chart description',
chartType: #COLUMN,
dimensions: ['Category'],
measures: ['Amount'],
dimensionAttributes: [{
dimension: 'Category',
role: #CATEGORY
}],
measureAttributes: [{
measure: 'Amount',
role: #AXIS_1
}]
}]
@UI.presentationVariant: [{
qualifier: 'ChartView',
text: 'Chart View',
visualizations: [{
type: #AS_CHART,
qualifier: 'AnalyticalChart'
}]
},
{
qualifier: 'TableView',
text: 'Table View',
visualizations: [{
type: #AS_LINEITEM
}]
}]
annotate view ZC_ENTITY with
{
// Other field annotations...
@EndUserText.label: 'Amount'
Amount;
@EndUserText.label: 'Category'
Category;
}
Manifest:
"views": {
"paths": [
{
"primary": [
{ "annotationPath": "com.sap.vocabularies.UI.v1.Chart#AnalyticalChart" }
],
"secondary": [
{ "annotationPath": "com.sap.vocabularies.UI.v1.LineItem" }
],
"defaultPath": "both"
}
]
}
Manifest:
"views": {
"paths": [
{
"key": "ChartView",
"annotationPath": "com.sap.vocabularies.UI.v1.PresentationVariant#ChartView"
},
{
"key": "TableView",
"annotationPath": "com.sap.vocabularies.UI.v1.PresentationVariant#TableView"
}
]
}
npm run watch-<app-name> # e.g., npm run watch-manage-travel
# or use generic watch script if available
cds watch
npm run start-mock # Needs metadata refresh
npm start # No refresh needed - fetches metadata from live backend at runtime
Follow this sequence to avoid errors:
Modify Projection View (ZC_ENTITY)
@OData.applySupportedForAggregation: #FULL at top@Aggregation.default: #AVG to measure fieldModify Metadata Extension
@UI.chart annotation@UI.presentationVariant annotationsUpdate Fiori App Manifest
views.paths configurationTest
npm start (fetches live metadata - no republishing needed)Cause 1: Missing @OData.applySupportedForAggregation: #FULL
Cause 2: Annotation on wrong view
Cause 3: Measure field not numeric
Cause 4: Wrong qualifier in manifest
@UI.chart: [{ qualifier: 'AnalyticalChart' }]Cause 5: Missing @Aggregation.default on measure
@Aggregation.default: #AVG (or #SUM, #MIN, #MAX) to measure fieldCause: Wrong aggregation method
@Aggregation.default value (#AVG, #SUM, #MIN, #MAX)CAP:
RAP:
General:
RAP-Specific:
@OData.applySupportedForAggregation: #FULL → App won't load@Aggregation.default on measure fieldTRANSACTIONAL_QUERY)PresentationVariant for separate view tabs (chart or table)npx claudepluginhub anthropics/claude-plugins-official --plugin sap-fiori-mcp-serverAdds chart-based visual filters (Bar/Line) to SAP Fiori Elements filter bar or value help dialog using CAP or ABAP RAP annotations.
Generates CDS analytical star schema (cube, dimension, text views) from RAP business objects or DDIC tables for SAP analytics.
Guides CDS view entity development in ABAP Cloud: data modeling, annotations, associations, compositions, access controls, expressions, and input parameters.