ABAP Core
ABAP Developmentbeginner

ABAP Core Part 1: Your First ABAP Program and the Development Tools

Key takeaway

Start ABAP the right way: what ABAP is, where programs run, the main program types, SE38/SE80 vs ADT, and your first executable program on the flight demo data — step by step.

What this complete series covers

Learn ABAP Core in a clear, practical sequence — from the basic idea to real project use, troubleshooting, and interview-ready understanding.

Who it is for
Best for SAP consultants, developers, and learners who want a practical understanding of ABAP Core.
Prerequisites
Basic SAP navigation and ABAP syntax help. For hands-on practice, use an ABAP system with ADT or the relevant ABAP development tools.
Final outcome
By the end, you should be able to explain ABAP Core clearly, follow the main end-to-end flow, apply it in a project scenario, and troubleshoot the most common issues.
  1. Part 1: ABAP Core Part 1: Your First ABAP Program and the Development Tools

    Understand classical ABAP report flow so initialization, selection-screen validation, data retrieval and output happen in the correct event, while keeping business logic outside pr

  2. Part 2: ABAP Core Part 2: DATA, TYPES, CONSTANTS, Work Areas and Internal Tables

    Use semantic ABAP types and constants to express business meaning, and use VALUE constructor expressions to initialize structures or tables clearly without losing domain conversion behavior.

  3. Part 3: ABAP Core Part 3: Data Types and Literals

    Choose ABAP data types from business semantics and interface contracts, using built-in, DDIC and reference types deliberately while avoiding implicit conversions that hide truncati

  4. Part 4: ABAP Core Part 4: Control Flow and Building Output Texts

    Use modern ABAP control flow and string templates to make business logic clearer, safer and easier to maintain, while understanding loop semantics, field-symbol updates and formatting behavior.

  5. Part 5: ABAP Core Part 5: Selection Screens — PARAMETERS, SELECT-OPTIONS and Validation

    Build safe ABAP selection screens by choosing PARAMETERS for single values, SELECT-OPTIONS for ranges and validating mandatory scope before database access so users cannot accident

  6. Part 6: ABAP Core Part 6: System Fields — sy-subrc, sy-tabix, sy-datum and More

    Use ABAP system fields only for the statement or runtime context they actually represent, checking values immediately and avoiding assumptions such as SY-TABIX on hashed-table acce

  7. Part 7: ABAP Core Part 7: Operators, Calculations and Type Conversion

    Use ABAP operators and constructor expressions to make intent explicit while treating type conversion as a boundary concern, especially for SAP keys, amounts, dates and externally supplied text.

  8. Part 8: ABAP Core Part 8: Messages and User-Friendly Error Handling

    Design ABAP error handling so business users receive clear actionable messages while support retains structured technical context, row-level detail and message IDs for diagnosis.

  9. Part 9: ABAP Core Part 9: TRY, CATCH and Exception Handling Basics

    Use TRY-CATCH for exceptional failure states that prevent an operation from completing, catch the most specific exceptions you can handle and preserve technical root cause while pr

  10. Part 10: ABAP Core Part 10: Clean ABAP Basics for Maintainable Code

    Write maintainable ABAP by making business intent obvious: use meaningful names, short cohesive methods, early returns, explicit dependencies and clear separation between validatio

System and release assumptions: Examples follow modern ABAP practices. Exact syntax, available APIs, and tools can vary by SAP release, so release-dependent points are called out where needed.

Explanation

📌 KEY POINTS
✅ ABAP runs on the SAP application server and works directly with the SAP database and business data.

✅ Main program units: executable programs (reports), classes, function groups, and CDS/RAP objects.

✅ Classic development happens in SAP GUI: SE38 (programs), SE80 (object navigator), SE24 (classes), SE37 (function modules); ADT (Eclipse) is needed for CDS/RAP.

⚠️ Every object belongs to a package and (outside $TMP) to a transport request.

━━━━━━━━━━━━━━━━━━━━
▶ WHAT THIS SERIES COVERS

  • Part 1 — first program and tools (this lesson)
  • Part 2 — DATA, TYPES, CONSTANTS, work areas and internal tables
  • Part 3 — data types and literals
  • Part 4 — control flow and building output texts
  • Part 5 — selection screens
  • Part 6 — system fields
  • Part 7 — operators, calculations and conversions
  • Part 8 — messages
  • Part 9 — exceptions with TRY/CATCH
  • Part 10 — clean ABAP basics

Running example: SAP's flight demo model — SCARR (airlines), SPFLI (connections), SFLIGHT (flights), SBOOK (bookings). Fill it once with report SAPBC_DATA_GENERATOR if it is empty.

━━━━━━━━━━━━━━━━━━━━
▶ WHAT ABAP IS

ABAP (Advanced Business Application Programming) is SAP's language for business applications. It runs inside the ABAP application server, next to SAP's own code, with direct access to the database through ABAP SQL, to authorizations, transactions, and the transport system. You use it to build reports, interfaces, enhancements, forms, services and RAP applications.

━━━━━━━━━━━━━━━━━━━━
▶ PROGRAM TYPES YOU WILL MEET

  • Executable program (report) — started with SE38/F8 or a transaction; has a selection screen. Classic reports.
  • Class (global class in SE24/ADT) — the modern home for logic.
  • Function group with function modules — classic reusable/remote-enabled logic (BAPIs, RFCs).
  • Include — a code part inserted into other programs.
  • CDS views, behavior definitions, service definitions — modern data and service objects (see RAP module).

━━━━━━━━━━━━━━━━━━━━
▶ THE TOOLS

  • SE38 / SE80 / SE24 / SE37 (SAP GUI): the classic editors used in most ECC and S/4HANA projects for reports, classes and function modules.
  • ADT (ABAP Development Tools in Eclipse): code completion, refactoring and ABAP Unit; required for CDS views and RAP.
  • SE11: data dictionary (tables, data elements, structures).

━━━━━━━━━━━━━━━━━━━━
▶ PACKAGES AND TRANSPORTS

  • $TMP = local objects, never transported — only for experiments.
  • Real work: a Z package (e.g. ZTRAINING) and a transport request; objects move DEV → QAS → PRD with the transport.

━━━━━━━━━━━━━━━━━━━━
▶ YOUR FIRST PROGRAM — STEP BY STEP

  1. SE38: enter ZFLIGHT_FIRST → Create, type "Executable program", package ZTRAINING (or $TMP / Local Object for practice).
  2. Paste the code example and activate (Ctrl+F3). Inactive code does not run.
  3. Run with F8.
  4. Enter an airline (e.g. LH) on the selection screen and execute.
  5. Change the airline; see how sy-subrc tells you whether data was found.

✅ CHECKPOINT: you can create, activate and run an ABAP program and know where it lives (package, transport).

Code example

ABAP Code
REPORT zflight_first.* ===== Your first ABAP report on the flight demo model (SE38) ===== * ===== Step 1: selection screen - user input =====PARAMETERS p_carr TYPE s_carr_id DEFAULT 'LH'.      " airline code, e.g. LH, AA * ===== Step 2: data declarations =====DATA: gt_flights TYPE STANDARD TABLE OF sflight,     " internal table      gs_flight  TYPE sflight.                       " work area START-OF-SELECTION.* ===== Step 3: read data from the database =====  SELECT * FROM sflight    INTO TABLE gt_flights    UP TO 20 ROWS    WHERE carrid = p_carr. * ===== Step 4: check the result with sy-subrc (0 = found) =====  IF sy-subrc <> 0.    WRITE: / 'No flights found for airline', p_carr.    RETURN.  ENDIF.   SORT gt_flights BY fldate. * ===== Step 5: simple list output =====  WRITE: / 'Flights for airline', p_carr.  ULINE.  LOOP AT gt_flights INTO gs_flight.    WRITE: / gs_flight-connid,             gs_flight-fldate,             gs_flight-price CURRENCY gs_flight-currency,             gs_flight-currency,             gs_flight-seatsocc, '/', gs_flight-seatsmax.  ENDLOOP. * Tip: no data? Run report SAPBC_DATA_GENERATOR once to fill the demo tables.* 💡 Modern syntax (7.40+): LOOP AT gt_flights INTO DATA(ls_flight) declares the*    work area inline; SELECT ... INTO TABLE @gt_flights uses host variables with @.

Real project scenario

A new team member created all his practice programs in $TMP and later built a real correction for a production issue there as well. When the fix had to go to QAS, it could not be transported, and the change had to be recreated in a proper package under time pressure.
The team now starts every trainee with a small ZTRAINING package, explains local vs transportable objects on day one, and uses ADT as the default editor so that ATC checks and unit tests are part of the daily flow.

Common mistakes

  • Building real changes as local $TMP objects.
  • Forgetting to activate before running.
  • Ignoring sy-subrc after reading data.
  • Using only SE38 and missing ADT features (quick fixes, ATC, unit tests).
  • Hard-coding values instead of using selection screen parameters.

Best practices

  • Use ADT as the main development environment.
  • Create objects in a proper package with a transport request.
  • Follow naming conventions (Z/Y namespace, meaningful names).
  • Check sy-subrc after database reads.
  • Keep practice code separate from project code.

Interview angle

Questions: "What is ABAP and where does it run?", "What program types exist?", "What is the difference between $TMP and a transportable package?"
Strong answer: ABAP runs on the SAP application server with direct access to the database, authorizations and transport system; program types include executable programs, classes, function groups, includes and CDS/RAP objects; ADT is the recommended IDE; $TMP objects are local and not transportable, while real development uses Z packages and transport requests moving DEV → QAS → PRD.

Practice this lesson

Quick check

1. Where should a new ABAP object that must go to production be created?

2. What best characterizes the fundamental difference between a FORM subroutine and a METHOD in ABAP?

3. What is the maximum length of an ABAP variable name?

Interview questions

1. How do you decide between a report, a Fiori app or a background job?

Answer it in your own words first, then compare.

2. You need to build a report that reads flight bookings, applies business rules, and outputs an ALV. Describe the modularisation you would choose and why.

Answer it in your own words first, then compare.

Practice more with Interview AI →

Reference-verified: the steps are checked against official SAP documentation and tutorials, and object and field names in the sample code are checked for consistency. The code has not been compiled or run on an SAP system by ERPClimb. Syntax marked release-dependent varies by SAP release, so check it in your own system.

More lessons in this topic

Interview questions on this topic

Related SAP topics