Skip to main content
ClaudeWave
Skill336 repo starsupdated today

sap-abap

The sap-abap skill provides development guidance for ABAP programming across versions 7.40 SP08 through ABAP Cloud, covering modern syntax features including inline declarations, constructor operators, table expressions, and ABAP SQL functionality. Use this skill when writing ABAP code, refactoring legacy applications, or building applications on SAP systems and the ABAP Cloud environment.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/secondsky/sap-skills /tmp/sap-abap && cp -r /tmp/sap-abap/plugins/sap-abap/skills/sap-abap ~/.claude/skills/sap-abap
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# SAP ABAP Development Skill

## Related Skills

- **sap-abap-cds**: Use when developing CDS views for ABAP-backed Fiori applications or defining data models with annotations
- **sap-btp-cloud-platform**: Use when working with ABAP Environment on BTP or deploying ABAP applications to the cloud
- **sap-cap-capire**: Use when connecting ABAP systems with CAP applications or integrating with OData services
- **sap-fiori-tools**: Use when building Fiori applications with ABAP backends or consuming OData services from ABAP systems
- **sap-api-style**: Use when documenting ABAP APIs or following SAP API documentation standards

## Version Compatibility

This skill covers ABAP syntax from **7.40 SP08** through **ABAP Cloud**. Features requiring
a higher release are annotated with inline comments in code examples using the format
`" [7.xx+]` or noted in reference files. The table below summarizes the key version boundaries.

| Feature | 7.40 SP02 | 7.40 SP05 | 7.40 SP08 | 7.50 | 7.51 | 7.52 | 7.54 |
|---------|:---------:|:---------:|:---------:|:----:|:----:|:----:|:----:|
| Inline declarations `DATA(...)` | x | x | x | x | x | x | x |
| Constructor operators (VALUE, NEW, CONV, COND, SWITCH, REF, EXACT, CAST) | x | x | x | x | x | x | x |
| Table expressions `itab[...]` | x | x | x | x | x | x | x |
| String templates | x | x | x | x | x | x | x |
| `WITH EMPTY KEY` | x | x | x | x | x | x | x |
| `line_exists()`, `line_index()` | x | x | x | x | x | x | x |
| ABAP SQL: `@` host variables | | x | x | x | x | x | x |
| ABAP SQL: comma-separated lists | | x | x | x | x | x | x |
| ABAP SQL: SQL expressions in SELECT | | x | x | x | x | x | x |
| `CORRESPONDING` operator | | x | x | x | x | x | x |
| Table comprehensions (`FOR`) | | x | x | x | x | x | x |
| `LET` expressions | | x | x | x | x | x | x |
| `REDUCE` operator | | | x | x | x | x | x |
| `FILTER` operator | | | x | x | x | x | x |
| `BASE` addition | | | x | x | x | x | x |
| `LOOP AT ... GROUP BY` | | | x | x | x | x | x |
| ABAP SQL: `dbtab~*` in SELECT | | | x | x | x | x | x |
| ABAP SQL: `RIGHT OUTER JOIN` | | x | x | x | x | x | x |
| CDS views with parameters | | | x | x | x | x | x |
| **`FINAL(...)` inline declaration** | | | | x | x | x | x |
| **Host expressions `@( expr )`** | | | | x | x | x | x |
| **`UNION` in SELECT** | | | | x | x | x | x |
| **`IS INSTANCE OF` / `CASE TYPE OF`** | | | | x | x | x | x |
| **`int8` type** | | | | x | x | x | x |
| **CDS table functions** | | | | x | x | x | x |
| **CDS access control (implicit)** | | | | x | x | x | x |
| **`$session.user/client/system_language`** | | | | x | x | x | x |
| **Test seams (`TEST-SEAM`)** | | | | x | x | x | x |
| **Common Table Expressions (`WITH`)** | | | | | x | x | x |
| **`OFFSET` in SELECT** | | | | | x | x | x |
| **`UPPER`/`LOWER` in CDS** | | | | | x | x | x |
| **Enumerated types** | | | | | x | x | x |
| **Internal tables as data source `FROM @itab`** | | | | | | x | x |
| **`WITH PRIVILEGED ACCESS`** | | | | | | x | x |
| **`utclong` type and functions** | | | | | | | x |

**On a 7.40 system**: Replace any `FINAL(...)` with `DATA(...)`, and avoid 7.50+ features
marked in bold above. Most modern ABAP syntax (VALUE, NEW, CONV, inline declarations,
table expressions, REDUCE, FILTER, GROUP BY) is available since 7.40 SP08.

## Table of Contents
- [Version Compatibility](#version-compatibility)
- [Quick Reference](#quick-reference)
- [Bundled Resources](#bundled-resources)
- [Common Patterns](#common-patterns)
- [Error Catalog](#error-catalog)
- [Performance Tips](#performance-tips)
- [Source Documentation](#source-documentation)

## Quick Reference

### Data Types and Declarations

```abap
" Elementary types
DATA num TYPE i VALUE 123.
DATA txt TYPE string VALUE `Hello`.
DATA flag TYPE abap_bool VALUE abap_true.

" Inline declarations
DATA(result) = some_method( ).
FINAL(immutable) = `constant value`.              " [7.50+] Use DATA(...) on 7.40

" Structures
DATA: BEGIN OF struc,
        id   TYPE i,
        name TYPE string,
      END OF struc.

" Internal tables
DATA itab TYPE TABLE OF string WITH EMPTY KEY.
DATA sorted_tab TYPE SORTED TABLE OF struct WITH UNIQUE KEY id.
DATA hashed_tab TYPE HASHED TABLE OF struct WITH UNIQUE KEY id.
```

### Internal Tables - Essential Operations

```abap
" Create with VALUE
itab = VALUE #( ( col1 = 1 col2 = `a` )
                ( col1 = 2 col2 = `b` ) ).

" Read operations
DATA(line) = itab[ 1 ].                    " By index
DATA(line2) = itab[ col1 = 1 ].            " By key
READ TABLE itab INTO wa INDEX 1.
READ TABLE itab ASSIGNING FIELD-SYMBOL(<fs>) WITH KEY col1 = 1.

" Modify operations
MODIFY TABLE itab FROM VALUE #( col1 = 1 col2 = `updated` ).
itab[ 1 ]-col2 = `changed`.

" Loop processing
LOOP AT itab ASSIGNING FIELD-SYMBOL(<line>).
  <line>-col2 = to_upper( <line>-col2 ).
ENDLOOP.

" Delete
DELETE itab WHERE col1 > 5.
DELETE TABLE itab FROM VALUE #( col1 = 1 ).
```

### ABAP SQL Essentials

```abap
" SELECT into table
SELECT * FROM dbtab INTO TABLE @DATA(result_tab).   " @ syntax: 7.40 SP05+

" SELECT with conditions
SELECT carrid, connid, fldate                          " comma syntax: 7.40 SP05+
  FROM zdemo_abap_fli
  WHERE carrid = 'LH'
  INTO TABLE @DATA(flights).

" Aggregate functions
SELECT carrid, COUNT(*) AS cnt, AVG( price ) AS avg_price
  FROM zdemo_abap_fli
  GROUP BY carrid
  INTO TABLE @DATA(stats).

" JOIN operations
SELECT a~carrid, a~connid, b~carrname
  FROM zdemo_abap_fli AS a
  INNER JOIN zdemo_abap_carr AS b ON a~carrid = b~carrid
  INTO TABLE @DATA(joined).

" Modification statements
INSERT dbtab FROM @struc.
UPDATE dbtab FROM @struc.
MODIFY dbtab FROM TABLE @itab.
DELETE FROM dbtab WHERE condition.
```

### Constructor Expressions

```abap
" VALUE - structures and tables
DATA(struc) = VALUE struct_type( comp1 = 1 comp2 = `text` ).
DATA(itab) = VALUE itab_type( ( a = 1 ) ( a = 2 ) ( a = 3 ) ).

" NEW - create instances
DATA(dref) = NEW i( 123 ).
DATA(oref) = NEW zcl_my_class(
claude-automation-recommenderSkill

Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.

claude-md-improverSkill

Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".

dependency-upgradeSkill

Secure dependency upgrades with supply chain protection, cooldowns, and staged rollout. Use when upgrading deps, configuring security policies, or preventing supply chain attacks.

grill-meSkill

Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".

sap-abap-cdsSkill

Comprehensive SAP ABAP CDS (Core Data Services) reference for data modeling, view development, and semantic enrichment. Use when creating CDS views or view entities, defining data models with annotations, working with associations and cardinality, implementing input parameters, using built-in functions, writing CASE expressions, implementing access control with DCL, handling CURR/QUAN data types, troubleshooting CDS errors, querying CDS views from ABAP, or displaying data with SALV IDA. Covers ABAP 7.4+ through ABAP Cloud.

sap-ai-coreSkill

|

sap-api-styleSkill

|

sap-btp-best-practicesSkill

|