Sap Fiori Tree Table

作者 SAP69e2c50833f1無授權條款收錄於 2026年10月8日更新於 2026年10月8日

Configure hierarchical tree table to SAP Fiori elements application for displaying parent-child recursive hierarchies. Supports CAP and ABAP RAP (OData V4).

AI 產生的概覽

為 CAP 與 ABAP RAP 專案的 SAP Fiori elements 應用程式設定階層樹狀表格。

功能
此技能引導代理在 SAP Fiori elements 應用程式中加入可呈現父子遞迴階層的階層樹狀表格。內容同時涵蓋 CAP(CDS 受控關聯、@hierarchy 註解、manifest 設定、CSV 測試資料)與 ABAP RAP(使用 @OData.hierarchy.recursiveHierarchy 的 CDS 檢視、唯讀或可編輯樹狀檢視、manifest 設定)。它也會蒐集實體名稱、ABAP 套件與傳輸需求等必要輸入,並針對常見錯誤提供疑難排解說明。
適用情境
當 SAP Fiori elements 應用程式需要顯示組織階層、分類樹或巢狀結構等遞迴父子資料時使用。適合使用 OData V4、需要樹狀表格而非平面清單的 CAP 或 ABAP RAP 專案。
執行需求
需要具備 Fiori MCP Server 的代理環境,CAP 情境另需 CDS MCP Server;CAP 工作需使用 VS Code 或 SAP Business Application Studio,ABAP RAP 工作需使用搭載 ABAP Development Tools 擴充功能的 VS Code。CAP 需要 @sap/cds 9.6.0+ 與 OData V4。此技能不含指令碼,僅提供參考文件。

SAP Fiori Tree Table with Recursive Hierarchy

Purpose

Configure hierarchical tree table to display parent-child relationships in a recursive structure (organizational hierarchies, category trees, nested data).

Environment Requirements

CAP Projects:

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

ABAP RAP Projects:

  • ✅ VS Code only - ABAP Development Tools extension is VS Code-specific
  • ✅ Fiori MCP Server - Required for Fiori app generation and 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:

For ABAP RAP Projects:

  1. Package name - Where to create or find backend hierarchy objects ($TMP for local, or specific package like Z_MAINT)
  2. Transport Required: Depends on package type (No for local packages like $TMP, Yes for transportable packages)
  3. Entity name - The entity to make hierarchical (e.g., "Equipment", "Category", "FunctionalLocation")

For CAP Projects:

  1. Entity name - The entity to make hierarchical (e.g., "Travel", "Category", "ProductCategory")

DO NOT proceed with implementation until all inputs are confirmed.


CAP Implementation

📖 Complete CAP Implementation Guide

Quick Summary:

  • 6-step process: Check entity → Add association → Add @hierarchy → Configure manifest → Create data → Test
  • Supports UUID, String, and Integer keys (single key only)
  • Requires @sap/cds 9.6.0+ and OData V4
  • Use CDS MCP to search model before editing

ABAP RAP Implementation

📖 Complete RAP Implementation Guide

Quick Summary:

  • 4-step process: Check existing hierarchy → Implement backend → Configure manifest → Test
  • Decision required: Read-only (List Report only) vs. Editable (with Object Page)
  • For detailed backend implementation:
    • Read-Only Treeviews Guide
    • Editable Treeviews Guide

Quick Troubleshooting

CAP Common Issues

  • "@hierarchy not supported" → Use managed association (no on condition)
  • "table has no column" → Use parent_ID (with underscore) in CSV
  • "TreeTable not rendering" → Check type: "TreeTable" and hierarchyQualifier in manifest

ABAP RAP Common Issues

  • "Element must not be search enabled" → Remove @Search annotations from hierarchy projection view
  • "Primary keys do not match" → Child table needs composite key (child UUID + parent UUID)

📖 Full error reference in implementation guides


Key Differences

CAP:

  • Managed association in entity
  • @hierarchy annotation on service
  • CSV data with parent_ID column
  • Test with npm run watch

ABAP RAP:

  • CDS view with @OData.hierarchy.recursiveHierarchy
  • Qualifier in metadata
  • Test data in database tables
  • Test with npm start or npm run start-mock

來源與署名

來源:SAP/open-ux-tools位於packages/fiori-mcp-server/skills/sap-fiori-tree-table提交69e2c50

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架