Hands-on Lab

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

A hands-on lab is a small project folder on your own computer where you can run the code you read about. The ABAP lab of this documentation lets you write ABAP, run it and test it without an SAP system, an SAP account, a trial or a sign-in of any kind. A free tool called a transpiler translates your ABAP files into JavaScript, and Node.js, a program that runs JavaScript outside a browser, executes the result. This page explains what the lab contains, what you install and under which licences, which commands you run, and what the lab cannot do. The lab is a community project and is not SAP software, so it is a place to learn the language, not a replacement for a real system. It was checked on 2026-11-13 with Node.js 24.21, the abaplint transpiler 2.14.30 and the abaplint checker 2.120.103, and it implements only a subset of Standard ABAP; it has nothing of ABAP Cloud’s released APIs.

Before you read

You need a terminal and a text editor. No ABAP knowledge is needed to install the lab.

Key terms

  • open-abap: a community open-source project that runs a subset of ABAP on Node.js; it is not SAP software.

  • Transpiler: a program that translates source code from one language into another, here ABAP into JavaScript.

  • abaplint: a free checker for ABAP source code that reports style and correctness findings by rule name.

  • abapGit: the file layout, one file per ABAP object, that the lab uses to store its sources.

  • ABAP Unit: ABAP’s built-in framework for writing automatic tests; the lab runs it locally.

  • ABAP SQL: the part of ABAP that reads and changes database tables; the lab runs it on an in-memory SQLite database.

What the lab contains

The lab is the folder modules/ROOT/examples/abap-lab/ of the documentation sources. Its parts work together like this:

  • The sources are in src/, in the abapGit layout: a file name.type.abap holds the code of an object and a file name.type.xml holds its description (for example zhello.prog.abap is the report ZHELLO, and zcl_greeter.clas.abap is the class ZCL_GREETER).

  • The table of the running example is src/zexp_claim.tabl.xml. It is a reduced version of the table ZEXP_CLAIM that the page DDIC Tables and Structures defines: the lab table keeps only the claim number, the status and the amount.

  • abap_transpile.json tells the transpiler where the sources are and which library to add. The library is open-abap-core, the open-source implementation of ABAP’s basic classes and functions, which the transpiler downloads from GitHub on the first run.

  • setup.mjs creates the in-memory SQLite database from the table definitions under src/ before the tests start, so that ABAP SQL has a database to read.

  • abaplint.json holds the rules for the abaplint checker, and lint-demo/ holds one deliberately flawed class that the checker reports on purpose.

Nothing in the lab connects to an SAP system, and nothing asks for an account. The only network traffic is the download from the public npm registry and from GitHub when you install and when the transpiler first runs.

What you install and the licences you accept

The packages are pinned to exact versions in package.json. Installing them means you accept their licences, which are all permissive open-source licences.

Tool Version used Licence

Node.js

22.12 or newer

OpenJS Foundation terms

@abaplint/transpiler-cli and @abaplint/runtime

2.14.30

MIT

@abaplint/database-sqlite

2.14.12

MIT

@abaplint/cli

2.120.103

MIT

open-abap-core, cloned by the transpiler from GitHub

commit a9acc41, 2026-11-12

MIT

Node.js comes from the Node.js download page. The four abaplint packages come from the public npm registry. Copy the folder abap-lab from the documentation sources to a place of your own and run the installation there, so that the generated node_modules and output folders stay out of the documentation sources:

cd abap-lab
npm install

Commands to run

All commands are npm scripts defined in package.json; run them inside the abap-lab folder.

Command What it does

npm test

Transpiles src/ and runs every ABAP Unit test. The exit code is 1 when a test fails and 0 when all pass.

npm run run:hello

Runs the report ZHELLO.

npm run run:first

Runs ZFIRST_PROGRAM, the report of the guide Your First ABAP Program.

npm run run:summary

Runs ZDT_SUMMARY, the report of the guide Data Types, Strings and String Templates.

npm run run:items

Runs ZIT_INTERNAL_TABLES, the report of the guide Work with Internal Tables.

npm run run:claims

Runs ZOO_CLAIMS_REPORT, the report of the guide Classes, Interfaces and Exceptions.

npm run run:sql

Runs ZSQL_CLAIMS, the report of the guide ABAP SQL on a Local Database.

npm run lint

Runs abaplint with the rules of abaplint.json on the sources.

npm run lint:demo

Runs abaplint on the flawed class in lint-demo/; it reports findings on purpose.

This is the real output of the commands in a copy of the lab, checked on 2026-11-13. The transpiler’s own messages, such as the number of files written, change when the lab gains files, so they are cut here.

$ npm test
ZCL_GREETER: running ltcl_greeter->greets_by_name
ZUT_CLAIM_LIMIT: running ltcl_limit->small_amount_is_accepted
ZUT_CLAIM_LIMIT: running ltcl_limit->large_amount_is_rejected
ZUT_CLAIM_LIMIT: running ltcl_limit->amount_at_limit_is_accepted
ZUT_CLAIM_LIMIT: running ltcl_limit->status_text_follows_limit

$ npm run run:hello
Hello from the local ABAP playground

$ npm run lint
abaplint: 0 issue(s) found, 35 file(s) analyzed

$ npm run lint:demo
lint-demo/src/zlint_claims.clas.abap[3, 11]  - Avoid hungarian notation (no_prefixes) [E]
lint-demo/src/zlint_claims.clas.abap[6, 17]  - Prefer RETURNING to EXPORTING (prefer_returning_to_exporting) [E]
lint-demo/src/zlint_claims.clas.abap[11, 10] - Variable "lv_unused" not used (unused_variables) [E]
lint-demo/src/zlint_claims.clas.abap[12, 10] - Prefer Inline Declarations, LV_AMOUNT (prefer_inline) [E]
lint-demo/src/zlint_claims.clas.abap[15, 5]  - Keyword should be upper case: "loop" (keyword_case) [E]
abaplint: 5 issue(s) found, 2 file(s) analyzed

The 35 files in the npm run lint line are the number the lab had on the day of the check; the count grows when guides add files.

The guides that use the lab

Every ABAP guide runs in this lab. Do them in this order, because each one builds on the files of the one before:

  1. ABAP Guide: Set Up a Local ABAP Playground creates the project and runs a first report and test.

  2. ABAP Guide: Your First ABAP Program writes a report and meets the first error message.

  3. ABAP Guide: Data Types, Strings and String Templates declares data, builds strings and splits text.

  4. ABAP Guide: Work with Internal Tables fills, reads, sorts and filters tables in memory.

  5. ABAP Guide: Classes, Interfaces and Exceptions writes classes, an interface and an exception class.

  6. ABAP Guide: Write ABAP Unit Tests writes a passing and a failing test and reads the exit codes.

  7. ABAP Guide: Check Code against Clean ABAP Rules runs abaplint and fixes a class until it is clean.

  8. ABAP Guide: ABAP SQL on a Local Database reads and changes rows of the in-memory table.

What open-abap supports and what it does not

The checks below were run in the lab on 2026-11-13, one statement at a time, each in a test that asserts the result. A statement in the second list is not taught in the guides; its reference page describes it and labels the examples "requires an SAP system; not run here".

Runs correctly in the lab:

  • local and global classes, interfaces, exception classes, RAISE EXCEPTION and TRY with CATCH;

  • inline declarations, VALUE, CONV, CORRESPONDING, REDUCE and FILTER on a sorted table;

  • string templates, the string functions to_upper, condense, replace, strlen, substring and find with a regular expression, and SPLIT ... INTO TABLE;

  • table expressions, line_exists, SORT, READ TABLE, AT NEW and lines;

  • ABAP Unit with cl_abap_unit_assert, where a failing assertion ends the run with exit code 1;

  • reports with WRITE;

  • ABAP SQL SELECT (with WHERE, IN, BETWEEN, LIKE, ORDER BY, DISTINCT, UP TO n ROWS, COUNT( * ), INNER JOIN, FOR ALL ENTRIES), INSERT, UPDATE, DELETE and MODIFY on tables defined as abapGit .tabl.xml files.

Not supported or wrong in the lab:

  • LOOP AT ... GROUP BY, which the transpiler rejects, and COLLECT, which gives a wrong result;

  • the SQL functions SUM, AVG, MIN and MAX, the SQL clause GROUP BY and the SQL CASE expression;

  • sy-dbcnt after an UPDATE, which returns 0 instead of the number of changed rows;

  • the formatting option WIDTH with ALIGN = RIGHT in a string template, which aligns left;

  • output with out->write of IF_OO_ADT_CLASSRUN, because open-abap-core has no output class for it; the guides print with WRITE in a report;

  • everything that needs an SAP system: the ABAP Dictionary tools, CDS views, RAP, SAP GUI, ABAP Development Tools, authorization checks and released SAP APIs.

Why the lab uses no SAP system

The ways to get an SAP system to learn on usually involve an account, a trial tenant or a container image, and this documentation keeps every step account-free so that you can follow it with nothing but a computer. The price is the list of limits above. A program that passes here proves that the statement works in open-abap, not that it works on an SAP system, so check a program on a real system before you rely on it there.

Summary

  • The ABAP lab runs a subset of ABAP on Node.js with the abaplint transpiler and the open-abap runtime; it is community software, not SAP software.

  • You install it with npm install from the public npm registry; the packages are MIT-licensed and nothing asks for an account.

  • npm test runs the ABAP Unit tests, npm run run:hello and its siblings run the reports of the guides, and npm run lint runs abaplint.

  • The database is an in-memory SQLite database created from .tabl.xml table definitions.

  • Grouping, SQL aggregates, out->write, CDS, RAP and everything that needs an SAP system are outside the lab.

  • Eight guides use the lab, in a fixed order starting with the set-up guide.

Try it

To do this by hand, follow the guide Set Up a Local ABAP Playground: it installs the free local playground and runs a first sample without an SAP system or an account.