/sap-ux-fiori-tools:sap-fiori-analytical-chart Entity, dimension, measure, aggregationfrom sap-ux-fiori-tools
Adds an analytical chart (chart + table hybrid) to SAP Fiori Elements List Reports using aggregated data. Supports CAP and ABAP RAP (OData V4).
Ships in sap-ux-fiori-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Add analytical chart + table (hybrid view) to visualize aggregated data.
CAP Projects:
ABAP RAP Projects:
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: {
Name: 'Amount_avg',
AggregatableProperty: Amount,
AggregationMethod: 'average',
![@Common.Label]: 'Average Amount'
}
Valid AggregationMethod values (lowercase string):
sum - Sum of the non-null valuesmin - Smallest of the non-null valuesmax - Largest of the non-null valuesaverage - Sum of non-null values divided by count of non-null valuescountdistinct - Count of distinct values, omitting null values⚠️ CRITICAL: Must be a lowercase string (e.g., 'sum'), NOT an enum (e.g., #SUM). Using an enum will cause SQL generation errors.
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 extensiontargets.<ListReport>.options.settings.views.paths configuration⚠️ CRITICAL: @OData.applySupportedForAggregation annotation is MANDATORY
WITHOUT this annotation:
Placement:
TRANSACTIONAL_QUERY contractCORRECT Example:
// MANDATORY! Must be present!
@OData.applySupportedForAggregation: #FULL
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
// WRONG PLACE!
@OData.applySupportedForAggregation: #FULL
define root view entity ZR_ENTITY
as select from TABLE
⚠️ CRITICAL: @UI.chart and @UI.presentationVariant are ENTITY-LEVEL (header) annotations.
Place them in the header block — BEFORE annotate view ZC_ENTITY with (alongside @UI.headerInfo.*), NOT inside the { ... } field block and NOT on a field (e.g. the dimension field).
Attaching @UI.chart to a field fails activation with: Annotation 'UI.chart.qualifier' used at wrong position (wrong scope).
// ↓↓↓ HEADER SCOPE: these go BEFORE `annotate view`, never on a field ↓↓↓
@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;
}
After activating both DDLS and DDLX, verify the changes are live:
⚠️ IMPORTANT: DDLS and DDLX are Separate Objects
The projection view (DDLS file) and metadata extension (DDLX file) are separate ABAP development objects that happen to share the same entity name.
Key points:
Activation:
Verification Steps:
Verify Activation Status:
Check OData $metadata:
<service-url>/$metadata<Annotation Term="UI.Chart" Qualifier="AnalyticalChart"><Annotation Term="UI.PresentationVariant" Qualifier="ChartView">Manifest:
"targets": {
"<ListReport>": { // Replace with your actual List Report target name
"type": "Component",
"name": "sap.fe.templates.ListReport",
"options": {
"settings": {
"contextPath": "/<YourEntity>", // Replace with your entity set path
"views": {
"paths": [
{
"primary": [
{ "annotationPath": "com.sap.vocabularies.UI.v1.Chart#AnalyticalChart" }
],
"secondary": [
{ "annotationPath": "com.sap.vocabularies.UI.v1.LineItem" }
],
"defaultPath": "both"
}
]
}
}
}
}
}
Manifest:
"targets": {
"<ListReport>": { // Replace with your actual List Report target name
"type": "Component",
"name": "sap.fe.templates.ListReport",
"options": {
"settings": {
"contextPath": "/<YourEntity>", // Replace with your entity set path
"views": {
"paths": [
{
"key": "ChartView",
"annotationPath": "com.sap.vocabularies.UI.v1.PresentationVariant#ChartView"
},
{
"key": "TableView",
"annotationPath": "com.sap.vocabularies.UI.v1.PresentationVariant#TableView"
}
]
}
}
}
}
}
Refer to the Application Preview Guidelines section in the sap-fiori-app-development skill for detailed testing instructions, including:
Follow this sequence to avoid errors:
Modify Projection View (ZC_ENTITY) - DDLS file
@OData.applySupportedForAggregation: #FULL at top@Aggregation.default: #AVG to measure fieldModify Metadata Extension (ZC_ENTITY) - DDLX file
@UI.chart annotation with qualifier@UI.presentationVariant annotationsVerify Annotations are Active (see Step 3 in ABAP RAP Implementation section above)
Update Fiori App Manifest
views.paths under targets.<ListReport>.options.settings (NOT inside controlConfiguration)Test
npm start (fetches live metadata - no republishing needed)Full error message:
Annotation Path for the primary visualization com.sap.vocabularies.UI.v1.Chart#AnalyticalChart not found
Cause: The metadata extension (DDLX) is NOT active, so the @UI.chart annotation is not exposed in the OData $metadata.
Solution:
<service-url>/$metadata (search for Chart#AnalyticalChart)npm startNote: Even if you edited the DDLX, it won't take effect until explicitly activated. The DDLS and DDLX are separate objects.
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 6: DDLX not activated (see console error above)
Cause: 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)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sap-fiori, analytical-chart, list-report, aggregated-data, odata-v4
Generated from the plugin's indexed repository (sap/open-ux-tools) — no native marketplace selected
npx claudepluginhub p/sap-sap-ux-fiori-tools-plugins-coding-agents-fiori9 skills in this plugin
/sap-fiori-add-visual-filterAdd visual filters (chart-based) to SAP Fiori Elements filter bar or value help using CAP or ABAP RAP. Use when asked to add chart filters, bar chart selectors, or visual filter bars to a Fiori Elements application./sap-fiori-app-developmentGuidelines for SAP Fiori app development for CAP and standalone projects. Use when creating or modifying SAP Fiori Elements applications, adding a List Report, Object Page, or Worklist, or connecting a Fiori app to a CAP service or OData endpoint./sap-fiori-building-blocksOther plugins' skills for the same job