ABAP for Newbies

Get an overview of the ABAP platform core concepts and all basic knowledge for your first development steps.

Why learn ABAP?

What is ABAP?

ABAP technology is the solid longtime foundation for SAP’s solution portfolio. Its proven robustness, scalability and extensibility makes it the platform of choice for running mission-critical business processes.

It is the underlying technology of SAP’s traditional Business Suite, SAP’s flagship solution SAP S/4HANA, and other forthcoming innovative solutions such as next-generation data warehouse SAP BW/4HANA. ABAP technology is also available as a standalone platform for custom development of modern ABAP-based business applications. SAP customers and partners also have a long tradition of building custom code and add-ons that run on the ABAP technology platform.

It is also a complete application development and runtime platform. It combines: the innovation potential of SAP’s in-memory database SAP HANA on the back end; the proven reliability and robustness of the ABAP server; support for clean core through cloud-readiness and upgrade stability with ABAP Cloud; and a digital user experience through SAP’s UI technology SAP Fiori. The ABAP technology is continuously extended to serve new business scenarios and innovative application development in a first approach.

ABAP is a foundation for a large variety of SAP, partner, and customer developments. ABAP runs productively in more than 100,000 SAP customer systems, where it enables enterprise-ready business applications and processes, and reduces total cost of development due to its integrated, self-compiling nature. ABAP has a huge customer and partner community.

ABAP Platform

  • >100.000 installed productive SAP systems based on ABAP
  • >64.000 custom ABAP objects per average SAP system
  • >5 million registered ABAP developers

Highlights

  • ABAP Cloud development model to build cloud-ready business apps, services, and extensions that are compliant to the clean core principles
  • Cloud-optimized modern ABAP language, tailor-made for effective business programming
  • Proven, highly scalable, and robust application server with multi-layer architecture and powerful transaction management
  • Central development on the server with integrated source code and version management
  • Built-in vendor-independent database support
  • Superior development environment and ABAP tools for the whole development lifecycle provided in Eclipse
  • Comprehensive change and transport management for the whole landscape
  • Extensible through custom development with modern extensibility options based on ABAP Cloud development model

Core Concepts

What is the general architecture of ABAP?

The Application Server ABAP (AS ABAP) consists of three layers: presentation, application, and database. The layer division is purely logical. In fact, all three layers can actually run on a single computer.

The database not only contains the user data, but also the entire program code of the ABAP Application Server and application programs, all administrative data etc. The programs you develop are stored in the ABAP schema of the system.

The application layer consists of one or more AS ABAP instances, a single Message Server, which is responsible for communication and load distribution within this layer, and a single Enqueue Server, which manages locks. The ABAP programs and all the development tools run in the application layer. ABAP Dispatcher distributes the requests to the work processes (WP) within an AS ABAP. A WP processes your program and owns a database connection so that you don’t need to take care of database handling (e.g. open/close database connections). A WP is assigned to you only for the time of program processing and afterwards it is free for another user. This architecture is robust and scalable. There is no such thing as crashing the whole engine in ABAP by a severe syntax error in your program. Beyond this ABAP systems and external programs can communicate with one another through different protocols like RFC, TCP/IP, HTTP and OData.

The presentation layer represents UI and is responsible for the screen display. This layer receives user entries – that is, mouse-clicks and keyboard input – and passes them on to the application layer. Furthermore, it receives data from the application layer and displays it to the user. When writing a business application you should use SAP Fiori UI as a state-of-the-art user interface. When developing in ABAP you may also encounter browser-based Web Dynpro ABAP/Floorplan Manager technology or Dynpro technology. Before SAP Fiori, Web Dynpro for ABAP was the SAP standard UI technology for developing Web applications in the ABAP environment. Dynpros are the classical user interfaces of most ABAP-based SAP programs and run in the SAP GUI.

ABAP Platform Layers

Why and how does Application Server ABAP matter for you as developer?

In general, you develop on a central server in ABAP. Thus, you require access and developer authorization for the AS ABAP. All the tools for the whole development lifecycle are integrated there and are also part of the server.

You write your programs using the ABAP Development Tools. When you choose Save, the ABAP editor stores your program in the database. You then retrieve it by name: you don’t have to deal with program files in ABAP; the server does it all for you. Usually many developers are working on the same server. While you write your source code in the editor this development object is locked for you. When you choose the Save-button the inactive version of the development object is created. This is visible for all developers on the server and they can change it. Once you press Activate button an active version of the development object is created and other programs can access it.

Your advantages:

  • You don’t need to deal with version management: the server does it for you
  • You always use the latest sources
  • The incompatibilities become visible very early: at activation of your source code
  • No need for a separate system to test the interaction of source code from different developers

Typical experience when working with the AS ABAP: Many things that developers or quality managers usually must care about are already provided and you can concentrate on your daily job: business programming.

Why and how to connect to integrated software logistics on the ABAP server?

All ABAP development objects are stored in the database of the system. You don’t have to copy a program file manually if you need it elsewhere. The ABAP server provides the built-in mechanism (change and transport management system, CTS) to transport development objects through the system landscape. Besides this, the proper structuring of development objects becomes particularly important if you work in a team on a development project.

Every development object in ABAP belongs to a package. Packages organize development objects and handle their connection to the AS ABAP software logistics. That is a package is like a folder in a way. The transport layer is an important concept in the ABAP software logistics. It refers to the transport path a package should take in a system landscape. The usual landscape has at least three system layers:

ABAP Transport Layers

You develop an object in the development system and test it in the consolidation system. When all tests are successful you transport your tested development objects to the productive system. You define this path (transport layer) as an attribute of a package and in this way the destinations of your development objects are clear from the very beginning of your development.

Besides this you need to assign your package and its content (ABAP development objects) to a particular transport request. As soon as you release the relevant transport request, your object will be transported to the next system on the transport layer. The only exception to this rule is the package $tmp. You can store there your local developments, which don’t need to be transported.

Beyond this the change and transport system is git-enabled (gCTS) in SAP S/4HANA>= 1909 release and enables you to manage your ABAP change and transport management processes using Git as an external version management system. The open-source Git client abapGit allows you to transfer the code across on-premise and cloud ABAP systems.

Learn more: Change and Transport System (CTS) | Software Logistics Community | Lifecycle Management in SAP BTP ABAP Environment | About 3SL for SAP S/4HANA Cloud

What is the ABAP Repository and ABAP Dictionary/Data Dictionary?

The ABAP Dictionary (also called DDIC, which again stands for Data Dictionary) centrally describes and manages all the data definitions (meta data) used in the ABAP system like data types, database tables and views.

Learn more: ABAP Data Dictionary tutorial

ABAP Repository is part of the standard database of ABAP application server that contains all ABAP development objects: programs, classes, etc. Each repository object is assigned to a package and hence is connected to the ABAP transport management system.

Learn more: Exploring the ABAP Repository tutorial

What is the client concept?

As soon as you create your first ABAP project and connect to an ABAP system, you need not only to provide your user data but also a Client. What is it?


An SAP system holds a large bunch of business data and applications that work with this data. These applications represent the business processes of a company. Client concept organizes these data according to organizational units and the business needs of a company. For example, the different international subsidiaries of a global company may need to implement the same business processes differently in their systems.

The client is the highest organizational unit in an SAP system and a self-contained unit with its own master data. The client is the first key field in most relevant tables of an SAP system, you always logon in a SAP system on to a particular client and therefore the client-specific data are automatically selected with SELECT in a program without specifying it in the WHERE-condition. You can even keep the data of different clients in one table and still keep them apart as if they were stored in different tables.

Before Developing in ABAP

What is ABAP Cloud?

With ABAP Cloud, the new development model for building cloud-ready and upgrade-stable business apps, services, and extensions that are compliant to the clean core principles in the cloud and on-premise, SAP offers a set of state-of-the-art technologies and methodologies to its customers and partners. ABAP Cloud developments can be carried out on SAP BTP, ABAP environment and SAP S/4HANA using public local and remote APIs. Essential elements of ABAP Cloud are the cloud-optimized ABAP language, the ABAP development tools for Eclipse, ABAP CDS, and ABAP RESTful Application Programming Model (RAP), public SAP standard APIs and extension points.

Learn more: ABAP Development Community (Developer Resources) | ABAP Cloud FAQ

What is the ABAP RESTful Application Programming Model?

In ABAP you develop using the state-of-the-art object-oriented ABAP language. This contains special efficient features for business programming – such as business data types, mass data handling, and advanced table operations. The ABAP language enables you to write simple and concise expression-oriented ABAP code and supports inline code documentation with ABAP Doc.

Today, the ABAP platform also comes with the modern and efficient ABAP RESTful application programming model (RAP) for the development of SAP Fiori business apps and Web APIs in SAP BTP, SAP S/4HANA, and SAP S/4HANA Cloud, optimized for the SAP HANA database.

Learn more: Modern ABAP Development with the ABAP RESTful Application Programming Model (RAP)

What ABAP tools are there for the development lifecycle?

You write your ABAP code in the Eclipse-based integrated development environment ABAP Development Tools (ADT). ADT offers you superior open and extensible ABAP toolset for your whole development lifecycle, which enables you to develop with high productivity: powerful source code editor with fast search and navigation, Quick Fixes and Quick Assists, refactoring support, test-driven development with ABAP Units and ABAP Test Doubles, integrated quality assurance and troubleshooting tools, version management and lifecycle management tools which help to transport your code through the system landscape. In some development projects, you may also get in touch with the classic SAP GUI-based ABAP Workbench.

Learn more: Get started with the ABAP Development Tools| ABAP Development Tools for Eclipse on SAP Help Portal

ABAP Platform offers you a broad variety of tools which support you during the whole development lifecycle. Most of them are integrated into ADT. With ABAP Test Cockpit (ATC) you can run static code checks to find functional, performance and security bugs in your code. No matter what sort of problem you face in ABAP, the ABAP powerful troubleshooting tools like ABAP Debugger, ABAP Profiler, ABAP Feeds for short dumps, runtime SQL performance analysis in productive ABAP systems with SQL Monitor help you to track down and understand the cause and find the solution.

Learn more: ABAP Testing and Analysis Community

What extensibility options are there?

Extensibility options allow you to add value to ABAP applications either by doing easy changes directly in the application (key user extensibility), or implementing cloud-ready and upgrade-stable extensions on-stack (developer extensibility), or by developing side by side extensions on SAP Business Technology Platform.

Learn more: ABAP Extensibility Community

What is SAP S/4HANA Cloud ABAP Environment (aka Embedded Steampunk)?

SAP S/4HANA Cloud ABAP Environment (aka Embedded Steampunk) offers SAP customers and partners the opportunity to build tightly coupled extensions running directly on the S/4HANA Cloud technology stack. This new extensibility option complements the existing key user extensibility and side-by side extensibility options.

Learn more: SAP S/4HANA Cloud ABAP Environment Community

ABAP Environment in SAP Business Technology Platform (BTP)

SAP BTP ABAP Environment is the SAP Platform-as-a-Service (PaaS) offering for ABAP development that enables developers to leverage their traditional on-premise ABAP know-how to develop and run ABAP applications in the SAP Business Technology Platform, either as an extension to SAP software or as standalone applications.

Learn more: SAP BTP ABAP Environment Community 

Start Developing in ABAP

How do I get access to a free trial?

Ready to start with ABAP development? Then you definitely need access to the free developer edition. You can either try ABAP developer edition on SAP HANA database as Cloud appliance or download ABAP developer edition on SAP ASE database.

Get it in the ABAP Development Community

Get started with ABAP development

Now you can start to develop in ABAP. By executing the small set of simple and short online tutorials such as Get started with ABAP development, you can learn how to create your first ABAP project, display database content and tune SQL statements by using Data Preview and SQL Console, create your first “Hello World” ABAP application, your first ABAP class and DDIC structures and elements and document your ABAP code using ABAP Doc.

Create your first Core Data Service (CDS)

CDS is an extension of the ABAP Dictionary that allows you to define semantically rich data models in the database and to use these data models in your ABAP programs. CDS is a central part to delegate the processing of data-intensive computation from the application server to the database (i.e. SAP HANA) in ABAP applications. Execute the online tutorial Create a CDS View to create your first CDS View.

Where can I get more information?
  Where can I get more help

Where can I get more help

Learn how to use the ABAP Documentation: Go to SAP Help Portal and type “ABAP" in the search field.

The ABAP node provides a link to the ABAP Keyword Documentation, which describes the syntax and meaning of the keywords of the ABAP language, its frameworks and the associated system classes. This is the most relevant look up documentation source to accompany you during development. One way to access it is by marking the relevant command in the ABAP editor and pressing the F1 button.

The product related link e.g. SAP S/4HANA offers product-related (like application help) and release-dependent (like release notes) documentation, also installation and upgrade guides and so on.

For you as developer the Development Information under Developíng on the ABAP platform is the most relevant entry point, where you get detailed information about all components of ABAP Application Server, its core concepts, features and tools.