ABAP

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

ABAP (Advanced Business Application Programming) is the programming language in which SAP writes its business software and the language in which customers and partners extend it. This section is a detailed reference for learning ABAP, from a first program and the classic reports that still run in many companies to ABAP Cloud, ABAP CDS and the ABAP RESTful Application Programming Model (RAP). No SAP knowledge is assumed: the first group of pages explains the programming ideas, the tools and the vocabulary, and the hands-on guides run on your own computer without an SAP system or an account.

ABAP comes in two flavors that the pages keep apart. Standard ABAP is the full language as it runs on an SAP S/4HANA on-premise or Private Edition system, including classic features such as reports, dynpros and WRITE output. ABAP for Cloud Development, used together with released APIs and called ABAP Cloud, is a smaller language set that can call only interfaces that SAP has released. A page that describes something available only in Standard ABAP says so near its start.

The concept map

flowchart LR GS["Getting started
programs, tools, versions"] LB["Language basics
types, expressions, strings"] IT["Internal tables"] SQ["ABAP SQL
read and write data"] DD["ABAP Dictionary
tables, types, locks"] CD["ABAP CDS
data models"] OO["ABAP Objects
classes, interfaces, exceptions"] MO["Modularization
function modules, calls"] UI["Classic user interfaces
reports, dynpros, ALV"] RP["RAP
business objects, OData services"] RT["Transactions, integration
and runtime services"] QD["Quality, tools and delivery
ABAP Unit, ATC, transports"] EV["Evolution and reference
clean core, migration"] GS --> LB --> IT --> SQ SQ --> DD --> CD --> RP LB --> OO --> RP OO --> MO --> UI RP --> RT UI --> RT RT --> QD --> EV
Figure 1. How the groups of pages build on each other

An arrow points from a group to a group that builds on it. The classic path goes through modularization and the classic user interfaces; the ABAP Cloud path goes through ABAP CDS and RAP; both meet in the runtime services and in quality and delivery.

Version baseline

Area Baseline used on the pages

Standard ABAP

Release 8.16, as described in the release news of the ABAP Keyword Documentation for Standard ABAP.

ABAP for Cloud Development

Release 9.20 (2608), the ABAP release of the SAP BTP ABAP environment and of SAP S/4HANA Cloud Public Edition 2608. The documentation lists later releases as planned; the pages do not describe them.

SAP S/4HANA

2025 FPS02 on premise and Private Edition; Cloud Public Edition 2608.

ABAP Development Tools (ADT)

The Eclipse release that SAP recommends on its ADT update site at the time you install. The page ABAP Development Tools (ADT) shows where to read it.

Local lab

Node.js with the abaplint transpiler and open-abap; the exact versions and licences are on Hands-on Lab.

Where an individual page and this baseline ever disagree after a later update, the baseline is the one to trust. Books and articles written before release 7.40 (2013) describe an older style of ABAP; each page that touches a changed feature says what is different today, and Obsolete Language Elements collects the elements that should no longer be used.

What’s covered

The pages are grouped the same way as the navigation.

Getting started

What ABAP is and where it runs, the programming ideas a complete beginner needs first, the tools you work in (the local lab, ABAP Development Tools and the classic SAP GUI transactions), the language versions, and how ABAP has changed.

Step-by-step guides

Hands-on guides that you can follow on your own computer with free tools: no SAP system, no SAP account and no sign-in are needed. They build a small program step by step, and the reference pages they exercise link back to them.

Language basics

Data types and data objects, expressions and assignments, constructor expressions, strings and templates, control flow, dates and built-in functions, currencies and units, messages, and text elements.

Internal tables

The in-memory tables that ABAP programs use everywhere: table kinds and keys, table expressions and secondary keys, and looping, grouping and control levels.

ABAP SQL

Reading and writing database data from ABAP, joins and common table expressions, native SQL and AMDP, and code pushdown to SAP HANA.

ABAP Dictionary

Domains, data elements, database tables, structures, foreign keys, indexes, views, search helps and lock objects.

ABAP CDS

Core Data Services in ABAP: view entities, associations and compositions, annotations and metadata extensions, access control and the advanced features.

ABAP Objects

Classes and objects, interfaces and inheritance, events, class-based exceptions, runtime type services, design patterns and object services.

Modularization and program calls

Splitting a program into reusable units, function modules and function groups, and calling programs, transactions and memory.

RAP

The ABAP RESTful Application Programming Model: business objects, behavior definitions, managed and unmanaged implementation, EML, draft handling, services and OData V4, authorization and concurrency, and business events.

Transactions, integration and runtime services

SAP LUW and update tasks, authorization checks, background processing, RFC, BAPIs and IDocs, HTTP clients, ABAP channels, enhancements and BAdIs, modifications, batch input and files.

Quality, tools and delivery

ABAP Unit, debugging, performance and trace tools, the ABAP Test Cockpit, packages and transports, and coding standards.

Evolution and reference

Clean core and cloud readiness, obsolete language elements, migrating classic code to ABAP Cloud, and the glossary.

Reading path

Pick the path that matches your job. Every path starts with the same two pages, and each page links to the next ones it needs.

Functional consultant who reads code

For someone who configures SAP and needs to follow what a developer wrote, without writing large programs.

The SAP subsection Start Here: SAP from Zero puts this section next to the business side of SAP.

Running example

Most pages use one small application, Expense claims, so that a reader meets the same objects again and again. All names are examples made for this site; they are not SAP-delivered objects.

Piece What it is Where it is built

ZEXP_CLAIM

The claim header table: client, claim number, employee, status, currency, total amount and an included audit structure.

Database Tables and Structures

ZEXP_ITEM

The item table of a claim, linked to the header by a foreign key.

Foreign Keys, Check Tables and Indexes

Claim items in memory

Internal tables filled with VALUE, read with table expressions and totalled with REDUCE.

Internal Tables and Constructor Expressions

ZI_ExpClaim

The CDS interface view entity on the claim tables, with associations to the items.

CDS View Entities and CDS Associations and Compositions

ZC_ExpClaim

The projection view with the annotations that a Fiori elements app reads.

CDS Annotations and Metadata Extensions and Projections, Service Definitions and OData V4 Bindings

Claim business object

The behavior definition with the alias Claim and its behavior pool zbp_i_expclaim.

Behavior Definitions and Implementations

ZSD_ExpClaim and ZUI_ExpClaim_O4

The service definition and the OData V4 service binding that publish the projection.

Projections, Service Definitions and OData V4 Bindings

A listing that needs a real SAP system says "requires an SAP system; not run here". The listings that run in the local lab use a reduced version of the claim table (claim number, status and an integer amount), and each of those pages says so.

Existing page How the ABAP section uses it

SAP

The business and platform side: the landscape, SAP BTP, CAP, SAPUI5 and Fiori elements, OData and integration, with links back to the ABAP pages for code.

Finance

The developer topics of SAP Finance (APIs, BAPI_ACC_DOCUMENT_POST, substitutions and BAdIs) link here for the language.

Human Resources

The HR ABAP pages (logical databases, infotypes, reports and forms) build on the language pages of this section.

SQL

Plain SQL, which ABAP SQL resembles; the ABAP SQL pages say where ABAP SQL differs.

COBOL

The other long-lived business language; useful for readers who move between the two.

Java

Object-oriented programming in a mainstream language, for comparison with ABAP Objects.

OAuth

The sign-in and token flows behind the HTTP and OData pages.

Bibliography

The section draws on SAP’s official documentation (the ABAP Keyword Documentation for Standard ABAP and for ABAP Cloud, the RAP and ABAP Data Models guides and the ADT user guide), the SAP-samples ABAP cheat sheets, the Clean ABAP style guide, the abaplint and open-abap projects, SAP Learning, and a small number of books consulted for concept coverage, each cited through its publisher’s page. A bibliography page lists every source used in the section, grouped, each linked to its official website.