1. Home
  2. DevOps
  3. SAP ABAP

SAP ABAP: the language that runs SAP, from 1983 to AI

What ABAP is, how a report writer for the R/2 mainframe became ABAP Cloud, how one task looks in four generations of code, where AI fits in 2026, and a few curiosities that even veterans miss.

  • ABAP Objects
  • ABAP SQL
  • CDS
  • RAP
  • ABAP Cloud
  • ABAP AI

What is ABAP?

ABAP (Advanced Business Application Programming) is SAP’s own programming language, and SAP calls it its first and only proprietary one. The business logic of SAP ERP, from R/3 and ECC to SAP S/4HANA, is written in ABAP, and so are the custom reports, interfaces, enhancements and apps that companies add on top.

It is built for business data. SQL is part of the language, internal tables take the place of arrays, and every program runs on the ABAP application server, which looks after the database connection, users, authorizations and the transport of code from development to production.

More than forty years on, the same server runs a report written in 1995 and a cloud-ready app written today. What changed is how ABAP is written: shorter syntax, logic pushed down to SAP HANA, released APIs instead of modifications and, since 2025, AI that explains and writes code.

ABAP in four numbers

  • 1983

    ABAP appears as the report language of SAP R/2. It turned 40 in 2023.

  • 5 million

    registered ABAP developers worldwide, about 2 million of them active, according to SAP in 2026.

  • 250 million

    lines of ABAP, plus 30 million lines of CDS, used to train SAP-ABAP-1, SAP’s own ABAP model.

  • 255

    characters is the longest line ABAP accepts. Older releases stopped at 72.

Four decades in six eras

Pick an era to see what changed in the language and the milestones that defined it.

Era
1983 – 1991

A report language for R/2

ABAP starts as a way to write reports on the R/2 mainframe and grows into a full development environment.

Platform: SAP R/2 on mainframes

Milestones

  1. 1983ABAP appears as the report language of SAP R/2. The name is German: Allgemeiner Berichts-Aufbereitungs-Prozessor, a general report preparation processor.
  2. 1989SAP ships a friendlier R/2 interface and new tools, among them the ABAP/4 programming environment. The 4 stands for fourth-generation language.
1992 – 2005

The language of R/3

Client-server R/3 runs its business logic on ABAP application servers, and ABAP learns object orientation.

Platform: SAP R/3 client-server, SAP GUI

Milestones

  1. 1992SAP R/3 introduces three tiers, SAP GUI and the ABAP application server.
  2. 1990sThe acronym is reread as Advanced Business Application Programming.
  3. 1999ABAP Objects adds classes, interfaces and events with R/3 release 4.6.
  4. 2001All but the most basic functions of SAP’s software are written in ABAP.
2006 – 2014

NetWeaver, Eclipse and HANA

Enhancements without modifications, a modern IDE, a much shorter syntax and the first steps of code pushdown.

Platform: SAP NetWeaver 7.0 to 7.40, SAP ERP 6.0 (ECC)

Milestones

  1. 2006Release 7.0 brings the enhancement framework and the switch framework.
  2. 2012ABAP Development Tools for Eclipse arrive, and release 7.40 adds constructor expressions such as NEW, VALUE and CONV, plus table expressions.
  3. 2013Release 7.40 SP05 introduces CDS views and ABAP Managed Database Procedures (AMDP) to push logic into SAP HANA.
  4. 2014Release 7.40 SP08 adds FOR and REDUCE expressions and GROUP BY for internal tables.
2015 – 2021

Code to data, and to the cloud

SAP S/4HANA arrives, more of the work moves into the database, and ABAP goes to the cloud.

Platform: SAP S/4HANA on SAP HANA; SAP Cloud Platform

Milestones

  1. 2015The year of SAP S/4HANA. Release 7.50 adds the INT8 type, host and string expressions and UNION to Open SQL.
  2. 2018Release 7.53 renames Open SQL to ABAP SQL. In September SAP announces “Steampunk”, ABAP on SAP Cloud Platform.
  3. 2019The ABAP RESTful Application Programming Model (RAP) becomes available in the cloud and with SAP S/4HANA 1909.
  4. 2020Release 7.55 introduces CDS view entities.
  5. 2021SAP announces “Embedded Steampunk” at SAP TechEd: cloud ABAP inside SAP S/4HANA.
2022 – 2024

ABAP Cloud and the clean core

One development model for the cloud and on-premise: released APIs, CDS, RAP and a restricted language version.

Platform: SAP BTP, SAP S/4HANA Cloud, SAP S/4HANA 2022 and later

Milestones

  1. 2022SAP unveils ABAP Cloud at SAP TechEd. It runs on SAP BTP, in SAP S/4HANA Cloud Public Edition and, from release 2022, in private cloud and on-premise.
  2. 2023ABAP turns 40. Release 7.58 adds CDS scalar functions and simple and enumerated CDS types.
  3. 2024At SAP TechEd, SAP adds ABAP to SAP Build and announces Joule for generating and explaining ABAP code.
2025 – 2026

ABAP meets AI

AI explains and writes ABAP, four levels define a clean core, and ABAP development reaches VS Code.

Platform: ADT for Eclipse and VS Code, SAP generative AI hub

Milestones

  1. Feb 2025Joule for Developers brings ABAP AI to ADT: explain code, predict and generate code, create unit tests.
  2. Mar 2025GitHub Copilot for Eclipse adds ABAP code completion and chat.
  3. Aug 2025SAP replaces the three-tier extensibility model with clean core levels A to D.
  4. Jan 2026SAP-ABAP-1, SAP’s own ABAP model, goes live on the generative AI hub.
  5. Jun 2026ABAP Development Tools reach the VS Code Marketplace, with a built-in ABAP MCP server for AI agents.

One question, four generations of code

How many seats has Lufthansa sold? Every ABAP developer learned on SFLIGHT, SAP’s flight demo table, so here it answers the question four ways. The last one uses its ABAP Cloud successor, the /DMO/ flight reference scenario.

Generation
ZLH_SEATS · reportAny release
REPORT zlh_seats. DATA: lt_flights TYPE STANDARD TABLE OF sflight,      ls_flight  TYPE sflight,      lv_seats   TYPE i. SELECT * FROM sflight  INTO TABLE lt_flights  WHERE carrid = 'LH'. LOOP AT lt_flights INTO ls_flight.  lv_seats = lv_seats + ls_flight-seatsocc.ENDLOOP. WRITE: / 'Seats sold:', lv_seats.

What changed

  • Every variable is declared up front, with a type.
  • SELECT * reads every column of every Lufthansa flight into an internal table.
  • A loop adds the seats one row at a time on the application server.

Data sent from the database

Every column of every row

Runs on

Every ABAP release, from R/3 to SAP S/4HANA. Still valid today.

ZLH_SEATS · report7.50 and later
REPORT zlh_seats. SELECT FROM sflight  FIELDS connid, fldate, seatsocc  WHERE carrid = 'LH'  INTO TABLE @DATA(flights). DATA(seats) = REDUCE i( INIT s = 0                        FOR flight IN flights                        NEXT s = s + flight-seatsocc ). WRITE: / 'Seats sold:', seats.

What changed

  • Inline declarations: DATA(…) and @DATA(…) create variables where they are first used.
  • Only the three columns needed leave the database.
  • REDUCE adds the seats in one expression instead of a loop.

Data sent from the database

Three columns of every row

Runs on

Release 7.40 introduced the expressions; the SELECT FROM … FIELDS order needs 7.50.

ZLH_SEATS · report7.50 and later
REPORT zlh_seats. " The database adds up the seatsSELECT FROM sflight  FIELDS SUM( seatsocc ) AS seats  WHERE carrid = 'LH'  INTO @DATA(seats). WRITE: / 'Seats sold:', seats.

What changed

  • The database does the sum: on SAP HANA this is what “code to data” means.
  • One value comes back, however many flights there are.
  • The same ABAP SQL runs on any database SAP supports.

Data sent from the database

One number

Runs on

Any SAP S/4HANA or SAP ERP on release 7.50 or later.

ZI_SEATSSOLD · CDS view entityABAP Cloud
@AccessControl.authorizationCheck: #NOT_REQUIRED@EndUserText.label: 'Seats sold per airline'define view entity ZI_SeatsSold  as select from /dmo/flight{  key carrier_id             as Airline,      sum( seats_occupied )  as SeatsSold}group by carrier_id

What changed

  • A CDS view entity defines the answer once, as a reusable data model.
  • ABAP code, SAP Fiori apps, analytics and APIs can all read it.
  • Written in ADT, using only what ABAP Cloud allows.

Data sent from the database

One row per airline

Runs on

SAP BTP ABAP environment, SAP S/4HANA Cloud and SAP S/4HANA 2022 or later.

The three reports still run in classic ABAP on a current SAP S/4HANA system. ABAP Cloud accepts only the fourth version: it has no reports, and SFLIGHT is not released for it.

Under the hood: from source code to the database

ABAP never talks to the operating system or the database directly. The application server sits in between, which is why the same program runs unchanged on any platform SAP supports.

  1. Editor

    You write source in ADT, in Eclipse or VS Code, or in the classic SAP GUI tools such as SE80.

  2. Repository

    Source and its compiled load live in the database, in the ABAP repository, not in files.

  3. ABAP runtime

    The kernel runs the load in a work process, much as a Java virtual machine runs bytecode.

  4. Database interface

    Turns ABAP SQL into the database’s own SQL and keeps buffered tables in the server’s memory.

  5. Database

    SAP HANA for SAP S/4HANA. SAP ERP (ECC) also runs on Oracle, IBM Db2, SQL Server, SAP ASE and MaxDB.

Transports. Code is never copied by hand between systems. The Change and Transport System records every change in a transport request and moves it from development to quality assurance and production.

The building blocks

The objects you meet in any SAP system, the classic transaction that maintains each one, and what changes when you work in ABAP Cloud.

ObjectWhat it isClassic toolIn ABAP Cloud
Program (report)An executable program with a selection screen and a list or ALV output.SE38Not allowed. A class can print to the ADT console, and RAP apps with SAP Fiori take the place of screens.
Class and interfaceThe unit of ABAP Objects: attributes, methods and events, the main way to structure code today.SE24The main building block.
Function moduleA reusable routine with a fixed interface, stored in a function group; can be called remotely (RFC).SE37Allowed with restrictions; only SAP function modules released for cloud use can be called.
ABAP DictionaryTables, views, data elements and domains: the shared definitions of data.SE11Your own tables are created in ADT. SAP data is read through released CDS views, not SAP tables.
BAPIA business API on a business object, such as creating a sales order, implemented as a remote-enabled function module.BAPIA classic API (clean core level B). Use a released API instead, or a wrapper around the BAPI.
BAdIBusiness Add-In: an object-oriented hook where SAP lets you add your own logic without changing its code.SE18SE19Only BAdIs that SAP has released for ABAP Cloud.
Enhancement point and sectionPlaces in SAP code where custom code can be inserted, or a block of SAP code replaced, without a modification.SE80Not available. Implicit enhancements are clean core level D.
CDS view entityA data model defined in the database: joins, associations, calculations, annotations and access control.ADT onlyThe core of every data model.
RAP business objectCDS model plus behavior definition and implementation: create, update, delete, actions, validations and drafts.ADT onlyThe way to build transactional apps and APIs.

Clean core: levels A to D

In 2025 SAP replaced its three-tier extensibility model with four clean core levels. The level of each extension says how safely it will survive the next upgrade. The ABAP test cockpit (ATC) checks code against them.

  • Level A: Fully compliant

    Extend with SAP Build

    Only publicly released, stable SAP interfaces. On the stack that means ABAP Cloud with released APIs; side by side, apps on SAP BTP.

    Example: a RAP app built on released CDS views.

  • Level B: Compliant

    Leverage classic APIs

    Everything in level A, plus SAP’s classic APIs and technologies, which are documented and generally stable across upgrades.

    Example: custom code that calls a BAPI.

  • Level C: Partially compliant

    Accesses internal objects

    Uses SAP internal objects, for legacy scenarios. SAP plans a changelog of its objects to help plan each upgrade.

    Example: reading an SAP table that is not released.

  • Level D: Not clean

    Not recommended

    Modifications, writing to SAP tables, implicit enhancements and other techniques SAP advises against. The highest upgrade risk.

    Example: a modification of SAP standard code.

ABAP and AI

Most ABAP code lives inside company systems, not in public repositories, so general AI models have seen far less of it than of Java or Python. Since 2025 SAP has closed that gap with its own tools and its own model.

  • February 2025

    Joule for Developers, ABAP AI

    Inside ADT for Eclipse: explains ABAP objects, predicts the next lines, generates code and ABAP Unit tests. In 2026 SAP extended it to SAP S/4HANA Cloud Private Edition from release 2021 and offered it as a side-by-side service.

  • March 2025

    GitHub Copilot speaks ABAP

    Microsoft added ABAP to GitHub Copilot’s code completion and chat in Eclipse. It uses Copilot’s general models, with no ABAP-specific training.

  • January 2026

    SAP-ABAP-1

    SAP’s own foundation model for ABAP, on the generative AI hub, trained on more than 250 million lines of ABAP and 30 million lines of CDS. The first release explains code, legacy code included.

  • June 2026

    ADT for VS Code and the ABAP MCP server

    ABAP Development Tools on the VS Code Marketplace, for ABAP Cloud first. A built-in Model Context Protocol server lets AI agents such as Copilot work with ABAP objects.

What comes next

SAP pictures three circles: ABAP Cloud at the centre, an ABAP AI layer that explains, generates and completes code, and agents for multi-step work such as custom code migration and clean core transformation.

A custom code management agent shipped in June 2026, but SAP itself describes agentic AI for ABAP as still at an early stage.

Curiosities: true or false?

Nine facts about ABAP. Some are well known, some surprise people who have written it for twenty years.

  1. The A in ABAP originally stood for “Advanced”.

    Right.Not quite. False. It stood for Allgemeiner Berichts-Aufbereitungs-Prozessor, German for “general report preparation processor”. Advanced Business Application Programming came later, in the 1990s.

  2. ABAP has no arrays.

    Right.Not quite. True. Internal tables are the only way to hold many values in one variable. They can be sorted, hashed and read by key, so ABAP never needed arrays.

  3. ABAP keywords are case-sensitive.

    Right.Not quite. False. SELECT, select and Select are the same statement. Teams choose upper or lower case and let the Pretty Printer apply it.

  4. In ABAP date arithmetic, 5 October 1582 does not exist.

    Right.Not quite. True. Dates count days from 1 January 0001 and follow the switch from the Julian to the Gregorian calendar: 4 October 1582 is day 577,736 and the next day, 15 October 1582, is day 577,737.

  5. An ABAP source line can be as long as you like.

    Right.Not quite. False. The maximum is 255 characters, and older releases stopped at 72. SAP’s own programming guidelines still recommend much shorter lines.

  6. ABAP can run without an SAP system.

    Right.Not quite. True. The open-source abaplint transpiler turns ABAP into JavaScript. One developer solved all 25 days of Advent of Code 2020 in ABAP and ran 49 of the 50 puzzles on Node.js.

  7. “Steampunk” was SAP’s official name for ABAP in the cloud.

    Right.Not quite. False. It was an internal project name that leaked and stuck, because the official names, such as SAP Cloud Platform ABAP Environment, were hard to say. Today it is the SAP BTP ABAP environment.

  8. Open SQL and ABAP SQL are two different languages.

    Right.Not quite. False. Same language, new name: release 7.53 renamed Open SQL to ABAP SQL. The database interface still translates it into the native SQL of each database.

  9. After a SELECT, sy-subrc = 0 means something went wrong.

    Right.Not quite. False. Zero means success. After a SELECT, 4 means no rows were found, the classic check that follows almost every read in ABAP.

Pick True or False on each card.Your score: right out of answered, 9 questions in all.

Frequently asked questions

Is ABAP dying?

No. SAP counts about 5 million registered ABAP developers, around 2 million of them active, and in 2025 and 2026 it brought ABAP to VS Code and built AI tools for it. What is fading is the old way of writing it: modifications, direct access to SAP tables and screens built with dynpros. ABAP Cloud, released APIs and a clean core take their place.

What is the difference between ABAP and ABAP Cloud?

ABAP Cloud is a development model, not a new language. It uses a restricted language version, ABAP for Cloud Development, together with released SAP APIs, CDS, RAP and ADT. Classic ABAP, called Standard ABAP, still allows everything, including reports, dynpros and reading any table. From SAP S/4HANA 2022 both run side by side on the same system.

What does sy-subrc mean?

It is the system field with the return code of the last statement that sets it. Zero means success. Other values depend on the statement: after a SELECT or a READ TABLE, 4 means nothing was found.

Can I write ABAP in Visual Studio Code?

Yes, since 2026. ABAP Development Tools for VS Code started with ABAP Cloud objects such as classes, CDS and RAP artefacts, with classic objects to follow. ADT for Eclipse remains the complete toolset, and SAP GUI tools such as SE80 still work for classic objects.

What is RAP?

The ABAP RESTful Application Programming Model, available since 2019. A CDS data model, a behavior definition with its implementation, and a service definition and binding together become an OData service for a SAP Fiori app or an API.

Do I need to rewrite my custom code for SAP S/4HANA?

Not all of it. Much classic ABAP moves to SAP S/4HANA with small fixes, but code that relies on simplified tables or functions, or modifies SAP objects, needs work. A common approach is to retire code nobody uses, fix what the checks flag, and move new development to ABAP Cloud, using the clean core levels to decide.