Javatpoint Logo
Javatpoint Logo

SAP ABAP Tutorial

SAP ABAP Tutorial

ABAP is the fourth-generation programming language and technical module of SAP, which is used to develop the applications related to SAP. With the help of ABAP, one can customize SAP according to the requirement. It is now used along with Java as the main programming language for the SAP application server.

Our ABAP tutorial explains the key concepts of ABAP, such as ABAP workbench, ABAP Dictionary, ABAP Editor, Internal Tables, Objects, Classes, Operators, Variables, etc. It is designed for beginners who want to familiarize themselves with the SAP ABAP technology as it begins with basics and moves to the complex topics. It is also suitable for professionals who want to enhance their skills in ABAP programming and development.

What is ABAP?

  • ABAP Stands for Advanced Business Application Programming. It is a high-level programming language, which is developed and maintained by the SAP AG Software Company for the development of SAP applications.
  • ABAP is the core programming language that is used in SAP ERP software. Since it is the fourth-generation language, hence also known as ABAP/4.
  • The syntax of ABAP language is very simple and much similar to the COBOL.
  • The ABAP was originally developed for generating the SAP R/2 reports. The SAP R/2 was used to enable the corporations to develop mainframe business applications, which are mainly used for financial accounting and material Management.
  • It supports the concept of logical databases that are used for achieving high-level abstraction from basic database levels.
    SAP ABAP Tutorial
  • A non-programmer cannot directly use the ABAP language as it requires programming skills to work on it, but it can be easily learned by the programmers.
  • To create the ABAP programs, it is necessary to have knowledge of relational database design and Object-oriented Concepts.
  • The ABAP can be executed by the transaction codes that are entered in the command field of SAP GUI.
  • Nowadays, it is used along with the JAVA for programming the SAP NetWeaver Application Server. The application server is a part of the NetWeaver Platform and used for developing various SAP applications.

Why learn ABAP?

Below are some reasons that explain the reason to learn ABAP:

  • ABAP is the core language used in the SAP R/3 platform.
  • As a programming language, ABAP is easy to learn that provides both procedural and object-oriented concepts of programming.
  • It is the main technology that ABAP developers work on to develop various SAP applications.
  • ABAP provides various important features such as data sharing, exception handling, data persistence, enable to make enhancements, etc.
  • Developers can use ABAP language to make any changes in applications of ERP systems.
  • The SAP functional modules are written in the ABAP language.

Process of ABAP in SAP kernel

We can understand the process of ABAP in SAP by using 3 tier architecture of SAP. Consider the below image:

SAP ABAP Tutorial

The ABAP application server is present on the Application layer of the SAP architecture. The application layer is the most important component of the SAP architecture as ABAP programs execute in this layer, and it communicates with both layers.

The application server is responsible for interpreting the ABAP/4 programs. An ABAP program can start on the presentation server, but it can only execute at the application server.

Each ABAP program is stored in the SAP database tables of the database layer, unlike the other C or Java, where programs are stored in other large files.

The SAP database stores program in two forms, which are source code and generated code. The source code can be viewed and edited by the Workbench editing tools such as ABAP Editor, and the generated code is the binary representation of the source code.

ABAP Runtime Environment

ABAP Runtime Environment is a part of SAP kernel, and all the ABAP codes are processed under the control of the runtime environment. Since it is responsible for executing the ABAP Statements, controlling the flow logic, and responding to an event, so we can compare it with the Java virtual machine or JVM.

Consider the below image to understand the processing of different processing blocks of an ABAP program:

SAP ABAP Tutorial

Database Interface is one of the important components of the ABAP runtime systems. It is responsible for converting the database-independent ABAP statements (Open SQL) to the underlying DBMS (Native SQL).All the communication of ABAP programs with RDBMS is handled by the database interface.

ABAP Programs

The ABAP programs are executable unit or library that provides reusable code to other programs. These programs are executed on the SAP NetWeaver Application Server.An ABAP program contains several processing blocks that can be occurred in any order within source code.

Each program in ABAP has its type that specifies how that program will run. There are mainly two types of ABAP programs, which are:

  • Executable Programs: The executable programs can run directly or can start directly by entering the name of the program. These are of two types:
    • Reports
    • Module Pools
  • Non-executable Programs: The non-executable programs cannot be run directly. These programs contain the source code that can only be used by the other application programs. These are of following types:
    • Interface Pools
    • Include Programs
    • Function Groups
    • Subroutine Pools
    • Object Classes
    • Class Pools

Note: The ABAP programs are explained in later chapters.

Transactions/Transaction code in ABAP

The execution of a program in SAP is known as the transaction. The SAP system provides a specific four-character code for all the transactions that take place in SAP, and these codes are known as the transaction codes or TCode.

Any ABAP program can be directly executed by entering the transaction code in the command field of the SAP screen.

In ABAP programming, the transaction can be invoked programmatically by using statements CALL TRANSACTION and LEAVE TO TRANSACTION. Below is a list of few important TCodes used in ABAP:

Transaction code Used for
SE11 ABAP/4 Dictionary
SE38 ABAP Editor/ ABAP program development
SE41 Menu Painter
SE51 Screen Painter
SE80 ABAP Development Workbench
SE91 Maintain Messages
ABAPHELP Keyword Documentation

Note: All the transaction codes are available in the TSTCT table in the SAP system.

ABAP Development Environment

The development environment is where we can develop ABAP based applications, and there are two ways to develop any application in ABAP. These ways are:

  • ABAP Workbench
  • ABAP Development Tools

ABAP Workbench

It is part of the SAP ABAP system that contains various tools for editing in ABAP programs. It can be accessed using the SAP GUI. Some important tools of ABAP Workbench are given below:

  • ABAP Editor: It is used to edit reports, or writing the source code for an application object.
  • ABAP Dictionary: It is mainly used to access the database tables in SAP.
  • Menu Painter: It is used to customize the user interface such as the menu bar, toolbar, etc.
  • Screen Painter: It is similar to the menu painter but used to customize the designing screen.
  • Function Builder: It is used for the function modules.
  • Class Builder: It is used to access the ABAP objects, classes, and interfaces.

ABAP Development Tool:

ABAP development tools or ADT are used to run ABAP on the Eclipse platform, hence also known as "ABAP in Eclipse." ADT provides various plug-ins to develop ABAP applications on eclipse.

History of ABAP

The ABAP is the core programming language of SAP System, which was first developed in the year 1980 by the SAP AG company in Germany. This language was first designed to develop the reports in the SAP R/2 system that made large corporations capable of building mainframe business applications for MM(Material Management) and FI(Financial Accounting). Over the years, SAP has added various new features to ABAP, such as ABAP Objects, ADT, etc.

Below are some milestones in the development of ABAP:

  • First developed in 1980 as a fourth-generation language and mainly developed for the reports in the SAP R/2 system.
  • In the year 1990, SAP introduced the object-oriented extension for ABAP and called as ABAP Objects.
  • In the year 2006, the ABAP 7.0 version was released with the switch framework feature.
  • In the year 2012, a new version was released that offered a table expression.
  • In the year 2015, ABAP came with a new release of 7.50 version that started supporting Open SQL expressions.
  • In the year 2017, version 7.52 released with virtual sorting of internal table features.
  • In the year 2019, version 7.54 released with various features such as Response information, business service, authorization checks in the update, etc.

Prerequisite

Before learning ABAP, you must have the basic knowledge of any Object-oriented programming language such as C++, Java, etc., so that you can easily understand the ABAP programming.

You should also have a basic idea about the database related concepts such as PL/SQL.

Audience

Our ABAP tutorial is designed to help beginners and professionals.

Problems

We assure you that you will not find any difficulty while learning our ABAP tutorial. But if there is any mistake in this tutorial, kindly post the problem or error in the contact form so that we can improve it.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA