Skip to content

Repository files navigation

ABAPGuide — A Practical SAP ABAP Engineering Reference

A working reference for SAP ABAP as it is actually written in productive landscapes — from classic procedural and dynpro code through ABAP Objects to modern expression syntax and ABAP SQL. Built from accumulated real SAP project notes, patterns and examples, and organised so that each technology carries an explicit lifecycle status: what is current, what is classic but still live, and what is there for historical reference.

That last part is the point. Real SAP systems run several generations of ABAP at once. A reference that shows only the newest syntax is no help when you open a twelve-year-old pricing routine; one that shows everything without saying which is which is no help either.

Scope

  • Covers: ABAP language fundamentals, internal tables, ABAP SQL, modularization, ABAP Objects, classical reports, selection screens and dynpro, three generations of ALV, BAPIs, BAdIs and the enhancement framework, messages and exceptions, and performance — including the modern (7.40-generation) expression syntax throughout.
  • Does not cover: RAP, CDS, AMDP, ABAP Unit, or ABAP Cloud beyond the boundary explained in Chapter 21. That is a deliberate boundary, not an oversight.
  • Examples are illustrative. They are written to teach a pattern, not to be dropped into production unchanged. See How to Use.
  • Not official SAP documentation. For anything version-sensitive, the ABAP Keyword Documentation is the authority.

✨ Highlights

  • 21 structured chapters plus a quick-reference Examples section
  • 100+ annotated ABAP examples drawn from real project work
  • Explicit classic-to-modern lifecycle guidance on every major technology
  • Internal tables and modern expressionsVALUE, FOR, REDUCE, FILTER, COND, table expressions, secondary keys
  • ABAP SQL in depth — joins, subqueries, aggregation, FOR ALL ENTRIES and its pitfalls, dynamic SQL
  • Three ALV generations side by sideCL_SALV_TABLE, REUSE_ALV_*, CL_GUI_ALV_GRID
  • Integration and extensibility — BAPIs, BAdIs, enhancements, BDC, RFC, with the transaction and authorization implications spelled out

🧭 Classic vs Modern ABAP

Chapter 21 — Classic vs Modern ABAP

The chapter that ties the rest together: why productive landscapes contain several ABAP generations, what to use for new on-premise development, what remains classic but relevant, what is historical reference, and what changes under ABAP Cloud. Includes a decision table for the common maintenance and greenfield scenarios.

🔍 Find It Fast

I need to…Chapters
Get the language fundamentals right01 · 02 · 03 · 04 · 05
Work with internal tables and modern expressions06 · 07
Read or write database data safely08 · 15
Structure and reuse code09 · 10
Build a report or a screen11 · 12 · 13
Integrate or extend standard SAP14 · 15 · 16 · 17
Handle errors, log, and tune18 · 19
Review code against a checklist20
Decide between classic and modern21

🏷️ Lifecycle Legend

Chapters and examples are labelled with one of these. Full definitions in Chapter 21.

LabelMeaning
CURRENT / RECOMMENDEDReach for this in new on-premise development
CLASSIC BUT STILL RELEVANTWidespread and supported; you must be able to maintain it
LEGACY / HISTORICAL REFERENCESuperseded — read it, don't write it
ABAP CLOUD / MODERN CONTEXTBelongs to, or explains, the ABAP Cloud development model
VERSION-DEPENDENTAvailability depends on your release — verify before relying on it

📂 Chapter Reference

FolderTopicDescriptionContext
01-ABAP-BasicsABAP BasicsProgram structure, report events, syntax fundamentalsCurrent
02-Data-TypesData TypesElementary types, structures, type conversionsCurrent
03-VariablesVariablesDATA, CONSTANTS, inline declarations, FORM/PERFORMCurrent + legacy
04-OperatorsOperatorsArithmetic, comparison, built-in math functionsCurrent
05-Control-StatementsControl StatementsIF, CASE, CHECK, COND, SWITCHCurrent
06-LoopsLoopsLOOP, DO, WHILE, control breaks, GROUP BY, COLLECT, rangesCurrent + classic
07-Internal-TablesInternal TablesTable types, keys, VALUE/FOR/REDUCE/FILTER, field symbolsCurrent
08-Open-SQLABAP SQLSELECT, joins, aggregation, CRUD, SAP LUW & transaction ownershipCurrent + version-dependent
09-ModularizationModularizationFunction modules, conversion exits, RFC, macros, SUBMITClassic + legacy
10-ObjectsObjects / OOPClasses, visibility, inheritance, static vs. instanceCurrent
11-Classical-ReportsClassical ReportsList events, WRITE, dynamic tables + authorizationClassic
12-Selection-ScreensSelection Screens & DynproSelection screens, PBO/PAI, screen modification, popupsClassic
13-ALVALVCL_SALV_TABLE, REUSE_ALV_*, CL_GUI_ALV_GRID, field catalogs, eventsCurrent + classic
14-Function-ModulesBDC / Batch InputCALL TRANSACTION, BDC tables, message handling, authorizationClassic
15-BAPIsBAPIsBAPIRET2, transaction control, standard call patternClassic, still relevant
16-BADIsBAdIsClassic vs. new BAdIs, filters, implementation patternCurrent + classic
17-EnhancementsEnhancementsUser exits vs. customer exits, enhancement points, modificationsClassic + legacy
18-DebuggingMessages & ExceptionsMESSAGE, exception handling, application logCurrent
19-PerformancePerformance & MemoryInternal table tuning, ABAP Memory, database accessCurrent
20-Best-PracticesBest PracticesNaming conventions, code review checklistCurrent
21-Classic-vs-Modern-ABAPClassic vs ModernLifecycle map, ABAP Cloud boundary, decision tableStart here for context
ExamplesExamplesStrings, dates/times, conversionsCurrent + legacy

🚀 How to Use

  1. Jump to the chapter matching your need via Find It Fast, or read Chapter 21 first for the lifecycle map.
  2. Each chapter follows the same shape: introduction → examples → best practices → common mistakes → interview & review checkpoints → related transaction codes.
  3. Understand what kind of snippet you are reading:
    • Complete examples — self-contained programs or classes (for instance the ALV reports in Chapter 13). These show a full working structure.
    • Contextual snippets — the majority. They demonstrate one statement or pattern and assume surrounding declarations. Adapt the names and types to your own program.
  4. Examples are illustrative, not production-ready as-is. They are simplified to make the pattern visible: error handling, authorization checks and locking are shown where they are the point being made, and abbreviated where they are not. Review any snippet against your own standards before using it, and syntax-check it in your target system.

⚙️ Compatibility & Version Notes

  • This guide uses the modern expression syntax introduced across the ABAP 7.40 generation — inline declarations, VALUE, NEW, CONV, CORRESPONDING, COND, SWITCH, REDUCE, FILTER, FOR, table expressions and string templates.
  • Individual ABAP SQL features require later releases. SQL expressions in the field list, host expressions, and internal tables as data sources all arrived progressively across the 7.4x/7.5x releases, not all at once. These are flagged VERSION-DEPENDENT where they appear.
  • This guide deliberately states no exact minimum release or support-package numbers. Verify each feature against the ABAP Keyword Documentation for your target system before relying on it.
  • Terminology: SAP's current umbrella term for the SQL statements is ABAP SQL; "Open SQL" is the historical name and is still in wide use. Both appear here. The chapter folder keeps its 08-Open-SQL name so existing links continue to work.
  • Tooling: ABAP Development Tools (ADT) for Eclipse is recommended; the classic workbench (SE38/SE80/SE24/SE37) is assumed knowledge where transaction codes are referenced.

👥 Who This Is For

  • SAP developers maintaining productive ABAP who need a working example fast, with the context to know whether the pattern is still the right one.
  • Engineers modernizing classic ABAP who need to tell deliberate legacy from accidental legacy before they change anything.
  • Developers working across SAP GUI and modern ABAP syntax, where both generations sit in the same program.
  • Technical leads reviewing implementation patterns — the per-chapter review checkpoints and the Chapter 20 checklist are written for that use.

Newcomers to ABAP will find the chapters readable in order, but the reference is written for people who already program.

🤝 Contributing

Corrections and additions are welcome — particularly anything that fixes a technical inaccuracy or clarifies a lifecycle classification.

  1. Fork the repository and create a branch (git checkout -b improvement/topic-name).
  2. Keep the existing chapter structure and lifecycle labelling.
  3. For anything version-sensitive, cite the ABAP Keyword Documentation rather than asserting a release number.
  4. Open a pull request describing the change.

📄 License

Licensed under the MIT License — free to use for learning, teaching and reference.

👤 Author

Serhat Mercan — SAP Technical Lead · Enterprise SAP Engineering · ABAP / ABAP Cloud · SAP BTP

About

Practical SAP ABAP engineering reference covering classic, object-oriented and modern ABAP, with explicit lifecycle guidance for enterprise landscapes.

Topics

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors