sap-abap

A development guide for SAP ABAP, the programming language used to customise SAP business systems. It covers reports, services, extensions, forms, testing, performance checks, and troubleshooting, with choices based on the SAP release and deployment model.

In plain words
What is it for?
Use it to build or debug ABAP reports, classes, BAdIs, user exits, ALV screens, forms, CDS views, RAP and OData services, ABAP Unit tests, and short-dump fixes.
Why use it?
It helps an agent avoid incompatible extension methods and account for constraints such as Clean Core, cloud deployment, package naming, and transport routes. It also provides patterns for implementing and testing ABAP code.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/boxlogodev/sapstack/sap-abap
Any agent
npx skills add BoxLogoDev/sapstack --skill sap-abap
Clone the repo
git clone --depth 1 https://github.com/BoxLogoDev/sapstack

Made for: Claude Code, Codex.

Per session 156 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,519 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00156 $0.02519
Opus 5 $0.00078 $0.01260
Sonnet 5 $0.00031 $0.00504
Haiku 4.5 $0.00016 $0.00252

Measured 2d ago against content hash d451f8099803, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sap-abap scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/sap-abap/skills/sap-abap/SKILL.md · 313 lines

How it starts

The opening of the file, as written. The whole thing — 313 lines — stays where its author put it; the contents beside it link to each section on GitHub.

1. Environment Detection

Ask before writing any code:

□ ABAP release? (7.02 ECC / 7.40 / 7.50 / 7.57 S/4HANA 2023)
□ Clean Core required? (on-premise CBO allowed vs BTP side-by-side only?)
□ Package / naming convention? (Z* / Y* prefix, package structure)
□ Transport landscape? (DEV → QAS → PRD, how many systems?)
□ S/4HANA deployment? (on-premise / RISE / Cloud PE — affects what's allowed)

2. Enhancement Framework — Decision Table

Scenario Recommended Approach Notes
Classic user exit exists SMOD / CMOD ECC only — avoid in new S/4HANA dev
BAdI definition exists New BAdI (SE19 / GET BADI) All releases — preferred approach
No exit/BAdI, on-premise Enhancement Spot (SE18/SE19) CBO allowed on-premise
S/4HANA Clean Core / Cloud PE BTP side-by-side extension (RAP + Events) No on-stack modifications

3. Code Patterns with Full Examples

New BAdI (All Releases — Preferred)

" Step 1: Find BAdI via SE19 or BADI Explorer (SPRO)
" Step 2: Create enhancement implementation
" Step 3: Implement interface method

DATA lo_badi TYPE REF TO badi_name.
GET BADI lo_badi.
CALL BADI lo_badi->method_name
  EXPORTING iv_input  = lv_value
  IMPORTING ev_output = lv_result.

ALV — OO Approach (Recommended Over REUSE_ALV_GRID_DISPLAY)

DATA: lo_alv    TYPE REF TO cl_salv_table,
      lt_result TYPE TABLE OF your_structure.

" ... populate lt_result ...

TRY.
    cl_salv_table=>factory(
      IMPORTING r_salv_table = lo_alv
      CHANGING  t_table      = lt_result ).

    " Optional: configure columns
    lo_alv->get_columns( )->set_optimize( abap_true ).

    " Optional: add sort
    DATA(lo_sorts) = lo_alv->get_sorts( ).
    lo_sorts->add_sort( columnname = 'FIELD1' ).

    lo_alv->display( ).
  CATCH cx_salv_msg INTO DATA(lx_err).
    MESSAGE lx_err->get_text( ) TYPE 'E'.
ENDTRY.

BAPI with Complete Error Handling

DATA lt_return TYPE TABLE OF bapiret2.

CALL FUNCTION 'BAPI_NAME'
  EXPORTING
    iv_param1 = lv_value1
    iv_param2 = lv_value2
  IMPORTING
    ev_result = lv_result
  TABLES
    return    = lt_return.

" ALWAYS check return table — never assume success
IF line_exists( lt_return[ type = 'E' ] )
OR line_exists( lt_return[ type = 'A' ] ).
  " Error — do NOT commit; handle or raise
  LOOP AT lt_return INTO DATA(ls_err) WHERE type CA 'EA'.
    MESSAGE ls_err-message TYPE 'E'.
  ENDLOOP.
ELSE.
  " Success — commit
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING wait = abap_true.
ENDIF.

Read the full file on GitHub · 313 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 313 lines · 156 tokens per session scan A d451f8099803

Subscribe to this mod's changes

sap-abap is a skill published in the GitHub repository BoxLogoDev/sapstack (18 stars, last pushed 3d ago), licensed MIT. It adds 156 tokens to every session and 2,519 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

explore-ui

Standalone Phase 2 of SAP UI testing. Opens the target transaction in a real browser (SAP WebGUI) and explores it live to produce tests/ /test-cases/screens.md — the authoritative map of every on-screen control, its accessible name/label as Playwright will see it, and its initial state. This is about how the UI…

marcellourbani/vscode_abap_remote_fs · 112 tokens

sap-testing

Entry point for the SAP UI test-automation environment. Explains project layout, the configured test folder, available tools, phase workflows, and bounded agent delegation. Use when the user asks about SAP UI testing, Playwright for SAP, writing tests for any ABAP report/transaction/process, generating test evidence…

marcellourbani/vscode_abap_remote_fs · 73 tokens

helpers-reference

Reference for the bundled SAP Testing runtime (SapSession, SapArtifacts, resolveTestData, buildFixture, format helpers), importable in specs as "@sap-testing/runtime". Use when the user asks how a helper works or why a capability seems missing. Load sap-webgui for rendering, locator, theme, iframe, and…

marcellourbani/vscode_abap_remote_fs · 73 tokens

clean-abap

Clean ABAP coding standards and best practices. Use when writing ABAP code, reviewing ABAP code, or refactoring ABAP code to ensure it follows SAP's official Clean ABAP style guide. Covers naming conventions, modern language constructs, class/method design, error handling, formatting, comments, and unit testing…

marcellourbani/vscode_abap_remote_fs · 69 tokens

sap-customizing

Navigate and understand SAP Customizing (SPRO/IMG). Use when the user asks about customizing settings, SPRO activities, configuration tables, maintenance views, view clusters, or needs to read/understand any customizing data. This skill teaches how to systematically trace from an SPRO activity to the actual tables…

marcellourbani/vscode_abap_remote_fs · 103 tokens

sap-system-personality-report

Generate a comprehensive SAP System Personality Report. Analyzes custom code landscape, functional footprint, development activity, health metrics, and package breakdown. Use when a user asks to characterize a system, understand a system, get a system overview, system report, system personality, or "what does this…

marcellourbani/vscode_abap_remote_fs · 82 tokens