Skip to content
Development
Skill

/sap-fiori-analytical-chart

Add analytical chart (chart + table hybrid) to SAP Fiori Elements List Report using aggregated data. Supports CAP and ABAP RAP (OData V4). Use when asked to add a chart section, aggregated data visualization, or Analytical List Page chart to a List Report.

From plugin
open-ux-tools
1628 skills

Claude Code

$ npx -y skills add SAP/open-ux-tools --skill sap-fiori-analytical-chart --agent claude-code

SKILL.md

sap-fiori-analytical-chart.SKILL.md
name: sap-fiori-analytical-chart
description: Add analytical chart (chart + table hybrid) to SAP Fiori Elements List Report using aggregated data. Supports CAP and ABAP RAP (OData V4). Use when asked to add a chart section, aggregated data visualization, or Analytical List Page chart to a List Report.
argument-hint: Entity, dimension, measure, aggregation
metadata:
  author: sap-fiori-tools
  version: "0.0.5"

SAP Fiori Analytical Chart

Purpose

Add **analytical chart + table (hybrid view)** to visualize aggregated data.

---

Prerequisites

**CAP Projects:**

  • ✅ **VS Code or SAP Business Application Studio (BAS)** - Both environments supported
  • ✅ **Fiori MCP Server** - Required for Fiori app modification (VS Code only)

**ABAP RAP Projects:**

  • ✅ **VS Code only** - ABAP Development Tools extension is VS Code-specific
  • ✅ **Fiori MCP Server** - Required for Fiori app modification
  • ✅ **ABAP Development Tools for VS Code extension** - Required for backend development (includes ADT MCP server for RAP operations)

---

MANDATORY: Gather Required Inputs First

**STOP and ASK the user for ALL of these inputs if ANY are missing from the prompt:**

1. **Entity** - Which entity to add the analytical chart to 2. **Dimension field** - The field to group by (e.g., Category, Status, Destination) 3. **Measure field** - The numeric field to aggregate (e.g., Amount, TotalPrice, ReservationPrice) 4. **Aggregation method** - How to aggregate (see valid values below) 5. **Chart type** - Bar, Column, Line, Pie, HeatMap, Waterfall, HorizontalWaterfall 6. **Display mode** - How the chart should be shown:

  • **Separate tabs** (Approach 2)
  • **Hybrid view** (Approach 1)

**DO NOT proceed with implementation until all inputs are confirmed.**

---

CAP Implementation

Enable Aggregation

@Aggregation.ApplySupported: {
  Transformations: ['aggregate','groupby'],
  AggregatableProperties: [{Property: Amount}],
  GroupableProperties: [Category]
}

Aggregated Property

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 values
  • `min` - Smallest of the non-null values
  • `max` - Largest of the non-null values
  • `average` - Sum of non-null values divided by count of non-null values
  • `countdistinct` - 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.

Chart

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**

---

ABAP RAP Implementation (3 Steps + Manifest Configuration)

CRITICAL: NEVER EDIT metadata.xml - IT IS READ-ONLY!

⚠️ PRE-FLIGHT CHECKLIST - Verify BEFORE Implementation

**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 extension
  • [ ] Manifest `targets.<ListReport>.options.settings.views.paths` configuration
  • [ ] All CDS objects **activated**

---

1. Backend Projection View (MANDATORY) - Enable Aggregation Support

⚠️ **CRITICAL: @OData.applySupportedForAggregation annotation is MANDATORY**

**WITHOUT this annotation:**

  • OData service will NOT support aggregation
  • App will FAIL TO LOAD (blank screen/errors)
  • Chart annotations will be ignored

**Placement:**

  • ✅ **MUST be on PROJECTION view** (ZC_* or ZZZC_*) with `TRANSACTIONAL_QUERY` contract
  • ❌ **NOT on interface view** (ZR_* or ZZZR_*)

**CORRECT 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

2. Backend Metadata Extension (MANDATORY) - Add Chart, PresentationVariant Annotations

⚠️ **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'
Read more
@sap
Ships withopen-ux-tools

The Open UX tools project aims to provide open source modules that make the development of SAP Fiori applications more efficient. The project is maintained by the same team that is responsible for SAP Fiori tools and driven by the SAP community.

Stars on GitHub

Momentum

stars in total
162
Star history of SAP/open-ux-tools on GitHub, a chart by star-history.com

Other skills on open-ux-tools.

sap-fiori-create-cli

sap-fiori-create-cli

Invokes the @sap-ux/create CLI — generate, add, convert, remove, update, change, list, get commands for SAP Fiori projects. Use…

@sap@sapInstall Skill
sap-fiori-eslint-plugin

sap-fiori-eslint-plugi…

Configure, migrate, or run ESLint with @sap-ux/eslint-plugin-fiori-tools in SAP Fiori projects (standalone or CAP). Use when…

@sap@sapInstall Skill
sap-fiori-text-and-id

sap-fiori-text-and-id

Hide technical UUID/GUID keys and show business IDs or descriptive text in SAP Fiori elements apps. Use when asked to display…

@sap@sapInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills4w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc4w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2w252k
@facebook@facebookInstall Skill

Questions about sap-fiori-analytical-chart.

Which coding agents can use sap-fiori-analytical-chart?
sap-fiori-analytical-chart installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.