abap-dev
Use when working on SAP ABAP development tasks — provides specialized workflows for BAPI exploration, transport management, unit testing, performance analysis, impact architecture analysis, and documentation audits. Trigger on any SAP/ABAP coding, debugging, or system analysis task.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-14
- Stars
- ★ 25
- Forks
- 9
01 前言 Front Matter
- name
- abap-dev
- owner
- code-writer
- scope
- co-abap
- status
- active
- version
- 1.2.0
- metadata
- { "type": "core", "triggers": [ "abap-dev", "BAPI", "transport", "ABAP Unit", "performance analysis", "impact analysis" ] }
- relates_to
- [ { "type": "follows", "skill": "sap-fi" }, { "type": "composes_with", "skill": "sap-co" }, { "type": "composes_with", "skill": "sap-sd" }, { "type": "composes_with", "skill": "sap-mm" }, { "type": "composes_with", "skill": "sap-le" }, { "type": "composes_with", "skill": "sap-pp" }, { "type": "composes_with", "skill": "dump-monitor" }, { "type": "composes_with", "skill": "research-analysis" }, { "type": "composes_with", "skill": "sap-fi" }, { "type": "composes_with", "skill": "sap-co" }, { "type": "composes_with", "skill": "sap-sd" }, { "type": "composes_with", "skill": "sap-mm" }, { "type": "composes_with", "skill": "sap-le" }, { "type": "composes_with", "skill": "sap-pp" } ]
- description
- Use when working on SAP ABAP development tasks — provides specialized workflows for BAPI exploration, transport management, unit testing, performance analysis, impact architecture analysis, and documentation audits. Trigger on any SAP/ABAP coding, debugging, or system analysis task.
- last_reviewed
- 1791763200000
- prerequisites
- vsp MCP server
03 SKILL.md 正文
ABAP Development Skills (vsp)
This skill defines the ABAP development capabilities and optimized workflow patterns for Claude Code and AI agents using the vsp MCP server.
Core Capabilities
- Surgical Edits: Use
EditSourcefor changes under 50 lines to ensure syntax safety and atomicity. - Context Awareness: Use
GetContextwhen analyzing large classes to save tokens and focus on structural understanding. - Graph Analysis: Perform impact analysis via
AnalyzeCallGraphbefore refactoring. - SQL Accuracy: See ABAP SQL rules in
sap:performance-analyzerbelow.
Best Practices
- Always execute
SyntaxCheckafter any modification to verify quality. - Focus operations primarily within
Z*and$TMPpackages. - File Isolation: Task handoff files live in
scratch/tasks/, local.abapworking copies live underscratch/, and version-controlled framework infrastructure assets live inscratch/stable/. Upstream source comments, annotations, or TODOs withinscratch/stable/(e.g.zabapgit_standalone) are exempt from standard project documentation and quality gates.
sap:bapi-explorer
Purpose: Discover, evaluate, and document standard SAP BAPIs for integration use cases.
Trigger: When searching for integration APIs, standard function modules, or BAPI alternatives to custom development.
Workflow:
- Use
SearchObjectwithtype=FUNCand a keyword pattern (e.g.BAPI_SALESORDER_*) to locate candidate function modules. - For each candidate, call
GetSourceto read the function module signature (importing/exporting/tables parameters). - Use
GetFunctionGroupto understand the group the BAPI belongs to and related functions. - Call
GetTableon the relevant parameter structures (e.g.BAPIORDERS,BAPISDORDER) to understand field definitions and types. - Document findings: BAPI name, parameters, return code structure (BAPIRET2), known limitations.
Output format:
BAPI: <name>
Function Group: <group>
Purpose: <one-line>
Key Parameters:
IN: <param> (<type>) — <description>
OUT: <param> (<type>) — <description>
Return: BAPIRET2 (check TYPE = 'E' for errors, TYPE = 'S' for success)
Usage pattern: CALL FUNCTION '<BAPI>' ... COMMIT WORK.
Limitations: <known issues or missing fields>
sap:transport-manager
Purpose: Create, populate, and release SAP Transport Requests (CTS) for object deployment.
Trigger: When working on dev/production systems, deploying objects, or managing change management.
Workflow:
- Check existing transports: Call
ListTransportsto see open requests. Reuse an existing request if the task is part of an ongoing change. - Create a new request (if needed): Call
CreateTransportwith a clear description (feat: <summary>). - Add objects: After each
WriteSource/EditSource/Activate, callAddToTransportwith the object URL and transport number. - Pre-release gate: Before
ReleaseTransport, verify:SyntaxCheck→ 0 errors on all objectsRunUnitTests→ 0 failuresRunATCCheck→ 0 Priority-1 findings
- Release: Call
ReleaseTransport. Log the transport number inmemory/YYYY-MM-DD.md.
Slash command: Use /transport for all steps above.
Golden rule: Never release a transport with Priority-1 ATC findings. If blocked, escalate to PM.
sap:unit-architect
Purpose: Design and implement ABAP Unit test classes that satisfy the Acceptance Criteria from Business Analysis.
Trigger: When writing quality code, implementing new features, or ensuring test coverage.
Workflow:
- Map each Acceptance Criterion (AC-01, AC-02 …) to one or more test methods.
- Identify dependencies (DB tables, function modules, BAPIs) and design TEST-SEAMs and TEST-INJECTIONs for isolation.
- Write the test class using
WriteSourcewithFOR TESTING,RISK LEVEL HARMLESS,DURATION SHORT. - Run
RunUnitTests— all methods must pass before considering the task complete.
Test class skeleton:
CLASS ltc_<object_name> DEFINITION FOR TESTING
RISK LEVEL HARMLESS DURATION SHORT.
PRIVATE SECTION.
DATA: cut TYPE REF TO <class_under_test>.
CLASS-METHODS: class_setup.
CLASS-METHODS: class_teardown.
METHODS: setup.
METHODS: teardown.
METHODS: test_<ac_id>_<scenario> FOR TESTING.
ENDCLASS.
CLASS ltc_<object_name> IMPLEMENTATION.
METHOD setup.
cut = NEW #( ).
ENDMETHOD.
METHOD test_<ac_id>_<scenario>.
" Arrange — inject mock data via TEST-INJECTION
" Act — call cut->method( )
" Assert — cl_abap_unit_assert=>assert_equals( )
ENDMETHOD.
ENDCLASS.
Coverage target: Every AC must have at least one test method. Priority-1 ATC findings of type "No unit test" must be resolved.
sap:performance-analyzer
Purpose: Identify and resolve performance bottlenecks in ABAP code and SQL queries.
Trigger: When optimizing code, profiling slow reports, or reviewing SQL for efficiency.
Workflow:
- Identify hot paths: Use
AnalyzeCallGraphon the suspect object to see call frequency and depth. - Inspect SQL: Extract all
SELECTstatements fromGetSource. Check for:- Missing
WHEREclause or missing index fields in WHERE SELECT *instead of field list- Nested SELECTs inside loops (N+1 problem)
- Missing
UP TO N ROWSon large tables
- Missing
- Validate with data: Use
RunQueryto measure actual row counts on the relevant tables. - Check CDS: Use
GetCDSDependenciesto see if a CDS view with built-in aggregation can replace the ABAP logic. - Apply fixes using
EditSource— replace problem patterns with:SELECT field1, field2 INTO TABLE @DATA(lt_result) FROM table WHERE ...- Single JOIN instead of nested SELECT
FOR ALL ENTRIES IN lt_driver— only whenlt_driveris guaranteed non-empty; always guard withIF lt_driver IS NOT INITIALto prevent full-table read
- Run
SyntaxCheckandRunUnitTestsafter every change.
ABAP SQL rules:
- Use
DESCENDINGnotDESC;ASCENDINGnotASC - Use
max_rowsparameter, notLIMIT - Always specify field list — avoid
SELECT *in production code FOR ALL ENTRIES IN: guard withIF <table> IS NOT INITIAL— an empty driving table reads the entire target table
sap:impact-architecture
Purpose: Analyse the full impact of a proposed change before implementation, to prevent regressions.
Trigger: When modifying core BAPIs, CDS views, or widely-used objects. Run before any significant refactoring.
Workflow:
- Call graph analysis: Call
AnalyzeCallGraphon the target object. Record all direct and transitive callers. - CDS dependency tree: Call
GetCDSDependenciesandGetCDSImpactAnalysisto identify all CDS views, OData services, and Fiori apps downstream of any changed CDS view. - Cross-package scan: Call
GrepPackageswith the object name pattern to find references outside the primary package. - Risk matrix: For each caller/dependent, classify:
- Low: Test-only or rarely-called utility
- Medium: Core business logic — requires regression test
- High: Real-time interface, batch job, or external API consumer — requires stakeholder sign-off
- Gate: Present findings to PM. Do not proceed to Technical Design until PM approves.
Output format — produce both sections below:
Section A — Impact Summary table:
| <ObjectName> | <Type> | <N callers> | Low / Medium / High |
Section B — Risk Assessment:
- Scope: <N objects affected>
- Downtime required: Yes / No
- Transport needed: Yes / No
- Rollback plan: <describe or "N/A">
sap:globalization
Purpose: Keep user-facing behavior correct across time zones, countries, and languages — code that works in a single-zone test system and breaks in a global landscape.
Trigger: Whenever implemented code has user-facing output (reports, messages, interfaces, forms) or computes dates, amounts, quantities, or deadlines.
Rules (full pass/fail checklist: docs/sap-globalization-checklist.md):
- Time: store instants as UTC timestamps (
GET TIME STAMP FIELD); display withCONVERT TIME STAMP ... TIME ZONE sy-zonlo(user master zone).SY-DATUM/SY-UZEITare application-server time — never the basis for user-facing dates. No hardcoded UTC offsets or zone abbreviations (DST zones shift twice a year). - Money & numbers: monetary output always
WRITE ... CURRENCY <waers>(TCURX decimals — KRW/JPY 0, USD 2). Never assemble dates/numbers as concatenated text. In batch, print, and file-interface contexts, fix the output country and language explicitly (SET COUNTRY/SET LANGUAGE) instead of inheriting the job user's profile. - Units: T006 internal codes with T006A display texts; convert via standard function units — never hardcoded factors; quantity and unit inseparable.
- Calendars: working-day/deadline logic uses factory + holiday calendars parameterized by country, not weekday arithmetic.
- Texts: user-visible literals in text symbols and message classes; maintain translations — or record the deferral as a known limitation in the implementation and release reports.
- Output: choose spool device type / form page size (A4 vs US Letter) by where the document is printed, not by its language; global forms need country variants. Per-market expectations:
docs/countries/<CODE>.md.
sap:documentation-audit
Purpose: Ensure all project documentation is cross-platform compatible, links are valid, and absolute paths are avoided.
Trigger: Before finalization/sync, or before running /sync command.
Workflow:
- Run the audit script:
bun scripts/co-abap/vsp-audit.ts - Analyze Results:
- If audit passes: proceed to
/sync. - If audit fails: identify the specific issue and fix it in the source
.mdor script.
- If audit passes: proceed to
- Re-run: Repeat until the audit returns 0 errors.
Gate: A passing audit is required before running the final /sync command.
Context
This skill provides the core ABAP development workflow patterns for AI agents operating against an SAP system via the vsp MCP server. It covers the full development lifecycle from BAPI discovery and transport management through unit testing, performance analysis, impact assessment, and documentation auditing. Each sub-section maps to a specialized capability that can be invoked independently or as part of an end-to-end delivery chain.
When to Use
- Working on any SAP ABAP coding, debugging, or system analysis task
- Searching for BAPIs or standard function modules for integration scenarios
- Creating, populating, or releasing SAP transport requests (CTS)
- Writing or running ABAP Unit tests for custom objects
- Investigating slow ABAP programs or expensive SQL queries
- Analyzing the impact of a proposed change before implementation
- Running documentation audits before finalization or sync
Execution Steps
- BAPI Exploration — Use
sap:bapi-explorerto discover, evaluate, and document standard SAP BAPIs for integration use cases. - Transport Management — Use
sap:transport-managerto create, populate, and release transport requests via CTS. - Unit Test Architecture — Use
sap:unit-architectto design and implement ABAP Unit test classes mapped to acceptance criteria. - Performance Analysis — Use
sap:performance-analyzerto identify and resolve SQL and code performance bottlenecks. - Impact Assessment — Use
sap:impact-architectureto analyze the full call-graph and CDS dependency impact of a proposed change. - Globalization Check — Apply
sap:globalizationrules (time zones, currency/number formatting, units, calendars, texts) whenever the code has user-facing output; record the outcome in the Code Writer Report. - Documentation Audit — Use
sap:documentation-auditto verify documentation quality before finalization.
Output Format
Each sub-section produces its own structured output:
- BAPI Explorer: Standardized BAPI documentation block with name, function group, parameters, return structure, and limitations.
- Transport Manager: Transport number logged in
memory/YYYY-MM-DD.mdwith object list and release confirmation. - Unit Architect: Test class skeleton code with method-per-AC mapping and coverage report from
RunUnitTests. - Performance Analyzer: Finding list with problem patterns, recommended fixes, and before/after metrics.
- Impact Architecture: Impact Summary table (object, type, caller count, risk level) and Risk Assessment block.
- Documentation Audit: Pass/fail result from
bun scripts/co-abap/vsp-audit.tswith error details if applicable.
Related Skills
- post-write-chain — Mandatory QA gate after every ABAP write operation
- dump-monitor — System health monitoring for ABAP short dumps
- performance-tuning — Standardized performance analysis workflow for large-table scenarios
- desktop-app-fallback — Manual QA chain for Claude Code Desktop App sessions
04 同仓库更多 Skills
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.