claude-skills/

Anthropic公式スキル・プラグインの日本語ディレクトリ

last sync 22h ago
スキルOfficialdevelopment

🎨sap-fiori-app-development

プラグイン
sap-fiori-mcp-server
引数
fiori elements application creation or modification

説明

CAPおよびスタンドアロンプロジェクト向けのSAP Fioriアプリ開発に関するガイドライン。 次のような場合に使用: SAP Fiori Elementsアプリケーションを新規作成または修正する場合。

原文を表示

Guidelines for SAP Fiori app development for CAP and standalone projects. Use this skill when creating or modifying SAP Fiori Elements applications.

ユースケース

  • SAP Fioriアプリを新規作成するとき
  • SAP Fioriアプリを修正するとき
  • CAPプロジェクト向けのガイドラインが必要なとき
  • スタンドアロンプロジェクト向けのガイドラインが必要なとき

本文(日本語訳)

SAP Fiori アプリ開発ガイドライン(CAP およびスタンドアロンプロジェクト)

一般ガイドライン(CAP およびスタンドアロン Fiori プロジェクト共通)

  1. 実装を進める前に、ユーザーのリクエストでテクノロジースタックが明示されていない限り、CAP(Cloud Application Programming)向けの Fiori アプリを作成するか、外部 OData サービスに接続するスタンドアロン Fiori プロジェクトを作成するかを必ずユーザーに確認すること
  2. Fiori MCP ツールを使用して、SAP Fiori Elements による Fiori UI を作成すること。
  3. Fiori MCP Server ツールが正常に実行された後、ユーザーに完了を通知すること。結果の確認や再検証は行わず、ツールの正常実行をもって完了の確認とみなすこと。
  4. データモデルは SAP Fiori Elements に適した構造とすること。最低限、アプリケーションのメインエンティティとなるエンティティタイプを1つ定義すること。関連エンティティへのナビゲーションプロパティは任意だが、より豊富な UI パターンを実現できる。
  5. エンティティの各プロパティには、適切なデータ型を設定すること。
  6. コードを直接変更する前に、まず Fiori MCP Server が適切なファンクションまたはツールを提供しているか、または専用のスキル(例: sap-fiori-analytical-chart)が存在するかを確認すること。

利用可能なアプリケーションテンプレート(CAP およびスタンドアロンプロジェクト共通)

Fiori MCP は、CAP・スタンドアロンプロジェクトの両バックエンドに対して、以下のアプリケーションテンプレートを作成できます。

  1. FE_LROP - List Report Object Page(最も一般的、OData V2/V4 対応)
  2. FE_ALP - Analytical List Page(OData V2/V4 対応)
  3. FE_OVP - Overview Page(OData V2/V4 対応)
  4. FE_WORKLIST - Worklist(OData V2/V4 対応)
  5. FE_FEOP - Form Entry Object Page(OData V4 のみ)
  6. FE_FPM - Flexible Programming Model / Custom Page(OData V4 のみ)
  7. FF_SIMPLE - 基本的な SAPUI5 フリースタイルテンプレート(データソースなしでも動作可能)

利用可能なページタイプ

Fiori MCP は、既存のアプリケーションに以下のページタイプを追加できます。

  1. ListReport - フィルタリングおよび検索機能を備えたテーブルビュー
  2. ObjectPage - レコードの表示・編集用の詳細ページ
  3. CustomPage - 独自ビューを持つ完全カスタムページ

アプリケーション構造

  • SAP Fiori Elements アプリの作成を求められた場合、ユーザー入力がテーブルデータまたはフォームを含む1つ以上のページで構成されるアプリケーションとして解釈できるかを確認すること。
  • アプリケーションは通常、テーブルにデータを表示する List Report ページから始まるが、他のテンプレートも利用可能(上記参照)。
  • 特定のテーブル行の詳細は、ベースエンティティに基づく Object Page に表示される。
  • Object Page には、エンティティタイプのナビゲーションプロパティ(1対1(0..1)および1対多のアソシエーションの両方)に基づいたセクションを含めることができる。
  • テーブルセクションの行詳細(1対多のアソシエーション用)は、アソシエーションのターゲットエンティティに基づく別の Object Page に表示できる。

アプリケーションプレビューのガイドライン

  • package.json 内のアプリに最も適したスクリプトを使用すること。
  • CAP の場合: watch スクリプトを使用する(例: npm run watch-manage-travel
  • スタンドアロン Fiori プロジェクトの場合: npm start(ライブバックエンド)または npm run start-mock(モックデータ)を使用する

CAP 固有のガイドライン

  1. Fiori アプリは、cds init 操作によって事前に作成された CAP アプリケーションルートフォルダ配下の app フォルダ内に作成すること。このルートフォルダは常にワーキングディレクトリ直下のサブフォルダとなる。
  2. CAP アプリケーションのサマリーに従って UI アプリケーションを作成する際は、ユーザーから明示的に別途指示がない限り、サマリーのプロジェクト構造に記載された UI アプリケーション名を使用すること。
  3. フルスタック CAP アプリケーションの UI を変更・修正するフォローアップリクエストが来た場合は、サービス側の変更が真に必要な場合を除き、まず Fiori アプリ側での変更を試みること。
  4. すべてのエンティティに対して UUID 型のプライマリキーを提供すること。
  5. CSV ファイルにサンプルデータを作成する場合、すべてのプライマリキーおよび外部キーは必ず UUID 形式にすること(例: 550e8400-e29b-41d4-a716-446655440001)。

スタンドアロン Fiori プロジェクトのガイドライン

  1. 外部サービスをベースとするスタンドアロン Fiori プロジェクトは、Fiori MCP ツールによってルートレベルに作成される。
  2. デスティネーションまたは SAP システム名: ユーザーがデスティネーション名または SAP システム名を指定しない場合は、Fiori MCP Server を使用して利用可能なデスティネーション/システムの一覧を取得し、ユーザーに提示して選択を促すこと。
  3. OData サービスメタデータの取得: Fiori MCP Server を使用して、設定済みのデスティネーションまたは SAP システムからサービスを検索・選択すること。サービスメタデータが取得できない場合は、代替として Service Center MCP Server を試みること。
  4. アノテーションは主にバックエンドサービス側で管理し、アプリ固有の UI カスタマイズまたはオーバーライドのみをローカル(フロントエンド)アノテーションに記述すること。
  5. フロントエンドアノテーションはアプリ固有の UI 調整にのみ使用すること(例: /webapp/annotations/annotation.xml)。 manifest.json 内で urilocalUri の値が一致するよう参照すること:
    "annotation": {
      "type": "ODataAnnotation",
      "uri": "annotations/annotation.xml",
      "settings": {
        "localUri": "annotations/annotation.xml"
      }
    }
    
  6. スタンドアロン Fiori プロジェクトは、リモートの OData V2 または V4 サービス(manifest.jsondataSources で定義)に接続する。
  7. OData サービスメタデータは読み取り専用: manifest.json で参照されるサービスメタデータファイル(/webapp/localService/mainService/metadata.xml)はローカルで編集してはならない。エンティティ定義・プロパティ・サービス構造への変更は、必ずバックエンドのソース側で行うこと:
    "dataSources": {
      "mainService": {
        "uri": "/path/to/odata/service/",
        "type": "OData",
        "settings": {
          "annotations": ["annotation"],
          "localUri": "localService/mainService/metadata.xml",
          "odataVersion": "4.0"
        }
      }
    }
    
原文(English)を表示

SAP Fiori App Development Guidelines (CAP & Standalone Projects)

General Guidelines (Applicable to CAP and Standalone Fiori Projects)

  1. Always ask the user whether they want to create a Fiori app for CAP (Cloud Application Programming) or a standalone Fiori project connected to an external OData service before proceeding with implementation, unless the technology stack is explicitly specified in the user's request.
  2. Use the Fiori MCP tools to create the Fiori UI using SAP Fiori Elements.
  3. After the Fiori MCP Server tools execute successfully, inform the user of completion. Do not verify or double-check - treat successful tool execution as confirmation.
  4. The data model should be suitable for SAP Fiori elements: at minimum one entity type that serves as the main entity for the application. Navigation properties to related entities are optional but enable richer UI patterns.
  5. Each property of an entity must have a proper datatype.
  6. Before modifying the code directly - first check whether Fiori MCP server provides a suitable function or tool, or if a specialized skill exists (e.g.sap-fiori-analytical-chart).

Available Application Templates (Both CAP and Standalone Projects)

The Fiori MCP can create the following application templates for both CAP and standalone project backends:

  1. FE_LROP - List Report Object Page (most common, OData V2/V4)
  2. FE_ALP - Analytical List Page (OData V2/V4)
  3. FE_OVP - Overview Page (OData V2/V4)
  4. FE_WORKLIST - Worklist (OData V2/V4)
  5. FE_FEOP - Form Entry Object Page (OData V4 only)
  6. FE_FPM - Flexible Programming Model / Custom Page (OData V4 only)
  7. FF_SIMPLE - Basic SAPUI5 Freestyle template (can work without a data source)

Available Page Types

The Fiori MCP can add the following page types to existing applications:

  1. ListReport - Table view with filtering and search
  2. ObjectPage - Detail page for viewing/editing records
  3. CustomPage - Fully custom page with your own views

Application Structure

  • When asked to create a SAP Fiori elements app, check whether the user input can be interpreted as an application organized into one or more pages containing table data or forms.
  • Applications typically start with a List Report page showing data in a table, but other templates are available (see above).
  • Details of a specific table row are shown in an Object Page based on the base entity.
  • An Object Page can contain sections based on navigation properties (both to-one (0..1) and to-many associations) of its entity type.
  • Details of a table section row (for to-many associations) can be shown in another Object Page based on the association's target entity.

Application Preview Guidelines

  • Use the most specific script for the app in package.json.
  • For CAP: Use watch scripts (e.g., npm run watch-manage-travel)
  • For standalone Fiori projects: Use npm start (live backend) or npm run start-mock (mock data)

CAP-Specific Guidelines

  1. The fiori app must be created in the app folder under the CAP application root folder created before with cds init operation. This root folder is always a subfolder directly under working directory.
  2. When creating UI applications following a CAP application summary, make sure to use UI application names as described in the project structure of the summary, unless user explicitly requested otherwise.
  3. On any follow-up request to change or modify the UI of the full stack CAP application, always try first to make the change in the fiori app unless really required in service.
  4. Provide primary keys of type UUID for all entities.
  5. When creating sample data in CSV files, all primary keys and foreign keys MUST be in UUID format (e.g., 550e8400-e29b-41d4-a716-446655440001).

Standalone Fiori Project Guidelines

  1. For standalone Fiori projects based on external services, the application is created at the root level by Fiori MCP tools.
  2. Destination or SAP System Name: If the user doesn't provide a destination name or SAP system name, use the Fiori MCP Server to retrieve and present available destinations/systems for user selection.
  3. Fetching OData Service Metadata: Use the Fiori MCP Server to discover and select services from the configured destination or SAP system. If the service metadata cannot be retrieved, try the Service Center MCP Server as an alternative.
  4. Annotations should primarily be maintained in the backend service, and only app-specific UI customizations or overrides should be placed in local (frontend) annotations.
  5. Use frontend annotations only for app-specific UI tweaks (e.g., /webapp/annotations/annotation.xml) referenced in manifest.json with matching uri and localUri values:
    "annotation": {
      "type": "ODataAnnotation",
      "uri": "annotations/annotation.xml",
      "settings": {
        "localUri": "annotations/annotation.xml"
      }
    }
    
  6. Standalone Fiori projects connect to remote OData V2 or V4 services (defined in manifest.json dataSources).
  7. OData Service Metadata is Read-Only: The service metadata file (/webapp/localService/mainService/metadata.xml) referenced in manifest.json must not be edited locally. Any changes to entity definitions, properties, or service structure must be made at the backend source:
    "dataSources": {
      "mainService": {
        "uri": "/path/to/odata/service/",
        "type": "OData",
        "settings": {
          "annotations": ["annotation"],
          "localUri": "localService/mainService/metadata.xml",
          "odataVersion": "4.0"
        }
      }
    }
    

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。