Understanding ABAP

Objectives

After completing this lesson, you will be able to:

  • Understand the basics of ABAP
  • Understand the ABAP Environment
  • Understand the basics of the ABAP RESTful Application Programming Model

The ABAP Programming Language

The Basics of ABAP

When ABAP was first published in 1983, it was designed as a procedural programming language based on statements. Although relatively independent, it was influenced by other popular programming languages of the time, mostly COBOL and Pascal.

By the end of the 1990s, the ABAP language was extended to allow for object-oriented programming. Important concepts of popular object-oriented programming languages, like C++ and Java, were integrated into the ABAP language. ABAP Objects, as the programming language was now called, combined procedural and object-oriented parts in one language.

ABAP was extended again with modern expressions. ABAP combines traditional statement-based syntax elements and modern, expression-based syntax elements in one programming language. Object-oriented and expression-based syntax elements are recommended wherever possible for new ABAP developments.

Let's look at some of the key features of ABAP in the following video.

The ABAP language scope has been adapted to support ABAP cloud development, and the language versions "ABAP for Cloud Development" and "ABAP for Key Users" have been introduced. Details for the ABAP Language versions are available in the SAP Help Portal.

The three ABAP Language Versions are Standard ABAP, ABAP for Cloud Development, and ABAP for Key Users.
Standard ABAPABAP for Cloud DevelopmentABAP for Key Users
Universal versionRestricted ABAP language versionRestricted ABAP language version
Unrestricted ABAP language versionCloud optimizedIntended to implement enhancements by key users
Covers the entire language scope

Uses released public SAP:

  • APIs (local or remote) to access SAP functionality and SAP data
  • Extension points to extend SAP objects
Covers general rules of Classic ABAP with a restricted set of language elements
 Does not support modifications to SAP objects 
ABAP Development Tools (ADT) as ABAP IDE

Note

This course gives a universal introduction to ABAP development. It restricts itself to syntax elements and language features available in all three language versions. An exception is the introduction of the ABAP RESTful Application Programming Model, which is not part of ABAP for key users.

This course will use the SAP BTP, ABAP environment for the exercises and demonstrations.

The ABAP Cloud

ABAP environments

ABAP Cloud is the one common development model for building cloud-ready extensions and applications in on-stack and side-by-side scenarios. It’s available in all SAP S/4HANA editions and the SAP Business Technology Platform (BTP) ABAP Environment.

Note

For more information on SAP S/4HANA, visit https://learning.sap.com/learning-journeys/learn-the-basics-of-sap-fiori and choose ArchitectureDescribing SAP S/4HANA.

ABAP Cloud

The ABAP development model to build cloud-ready business apps, services, and extensions.

It is available with SAP BTP and SAP S/4HANA.

It works with public or private cloud and even any-premise.

ABAP Development Models

The ABAP development model is a comprehensive development approach that covers all end-to-end aspects of the development process. It’s an overarching term encompassing concrete and abstract things, such as the underlying architecture, the tools used for development, development guidelines, and much more.

Let's look at the key concepts on which the ABAP Cloud programming model is built on.

The RESTful Application Programming Model

The ABAP RESTful Application Programming Model defines the architecture for efficient end-to-end development of SAP HANA-optimized OData services (such as SAP Fiori apps) in the ABAP environment. It supports the development of all types of Fiori applications and the publishing of Web APIs. It is based on technologies and frameworks such as Core Data Services (CDS) for defining semantically rich data models and a service model infrastructure for creating OData services with bindings to an OData protocol and ABAP-based application services for custom logic and SAPUI5-based user interfaces.

SAP uses the RESTful Application Programming model to build new standard applications and modernize existing ones. SAP also recommends that its customers and partners use it for custom developments on SAP S/4HANA and the SAP Business Technology Platform (BTP), ABAP Environment.

Structure of the RESTful Application Programming Model consisting of Data Modeling and Behavior, Business Service Exposure and Consumption

Applications developed with the ABAP RESTful Application Programming Model consist of the following building blocks:

Business Objects
Business Objects represent the data model and define the data-related logic, called behavior, independent of specific consumption. RESTful Application Programming business objects are defined through Core Data Service (CDS) data modeling views, CDS behavior definitions, and Behavior implementations in ABAP classes.
Business Object Projections
The Business Object Projection is an approach to project and alias a subset of the business object for a specific business service. The projection enables flexible service consumption as well as role-based service designs. In RESTful Application Programs, a Business Object Projection consists of CDS projection views, CDS Behavior projections, and, if needed, additional or consumption-specific views.
Service Definition
A service definition defines the scope of a business service, particularly the business object projection to be exposed by this service.
Service Binding
A service binding defines the communication protocol, such as OData V2 or OData V4, and the kind of service to be offered to a consumer, such as UI services or a web service.
SAP Fiori UI
SAP Fiori UI provides a designated UI for commonly used application patterns based on OData Services.
Web API
A Web API provides a public interface for any OData client to access the service.

After learning the basics of ABAP programming, you will create an ABAP RESTful Application for a sustainable grocery app. You will use the Repository Objects Generator and create a ready-to-use ABAP RESTful Application Programming Business Object in less than an hour. This application will enable you to keep track of your groceries and their expiration date.

Screenshot of an application built using the RESTful Application Programming Model

Log in to track your progress & complete quizzes