Preface – This post is part of the ABAP Beginner series.
Table of Contents
What is ABAP?
A general interview question: “What is ABAP?”. ABAP stands for Advanced Business Application Programming. It is a 4th Generation (because it is domain specific language) programming language developed by SAP. The ABAP kernel is implemented in C++.ABAP is a hybrid programming language that supports both a procedural and an object-oriented programming model.
All ABAP programs also called Reports reside inside SAP database. In the database all ABAP code exists in two forms: source code, which can be viewed and edited with the ABAP Workbench tools; and generated code, a binary representation somewhat comparable with Java byte code.
When you write a code in ABAP editor, it is saved in two files. One is the exact what you have written and other is the code converted in Binary format. The Binary code is the one actually executed by the computer.
ABAP has both compiler and Interpreter. Firstly, the ABAP compiler translates an ABAP program it into an intermediate language called an ABAP load. Then the ABAP virtual machine, an interpreter for ABAP loads (i.e. it can execute ABAP loads) comes into the picture. SAP has two tables to store these files, ABAP reports in D010S table and ABAP Loads in D010L table.
ABAP on Application Server ABAP
ABAP is the programming interface of Application Server ABAP (AS ABAP) in SAP NetWeaver. A prerequisite to use the ABAP programming language is to install an Application Server ABAP. The components of an Application Server ABAP can be organized in the layers (presentation, application, and database) of three-tier client-server architecture in accordance with their tasks.
- The presentation layer represents the user interface of an AS ABAP (SAP GUI or Web browser)and it is distributed to the workstations of individual users.
- The application layeris implemented by utilizing one or more application servers. The application layer contains the ABAP runtime environment in which ABAP programs are executed.
- The database layerconsists of a database system in which the central dataset of an Application Server ABAP is saved.
ABAP supports the following:
- An object-oriented programming model based on classesand interfaces
- A procedural programming model based on function modulesand subroutines
Both modules offer interoperability.
Types of ABAP programs
ABAP distinguishes two types of executable programs:
- Reports : Simple Programs which provides Input/output option to user
- Module pools: Complex Programs which provides different screens for better user experience.
The non-executable program types are:
- INCLUDE modules : It gets included automatically at generation time; it is often used to subdivide large programs
- Subroutine pools: It contains ABAP subroutines (enclosed by FORM/ENDFORM statements and invoked via PERFORM).
- Function groups: These are libraries of self-contained FMs (enclosed by FUNCTION/ENDFUNCTION and invoked via CALL FUNCTION)
- Object classes: similar to Java Classes &define a set of methods and attributes
- Interfaces: It contain method definitions without implementations for which any class implementing the interface must provide explicit code.
- Type pools: Type pools define collections of data types and constants.
There are two possible ways to develop in ABAP.
The ABAP Workbench is part of the SAP ABAP system and is accessed via SAPgui. It contains different tools for editing programs. The most important of these are (transaction codes are shown in parentheses):
- ABAP Editor(SE38): It is used to write and edit reports, module pools, includes and subroutine pools
- ABAP Dictionary(SE11): It is used to process database table
- Menu Painter(SE41): It is used to design the user interface (e.g. menu bar & standard toolbar)
- Screen Painter(SE51): It is used to design screens and flow logic
- Function Builder(SE37): for function modules
- Class Builder(SE24): It is used to construct ABAP Objects classes and interfaces
The Object Navigator (SE80) provides a single integrated interface to access various tools (including all tools mentioned above).
ABAP Development Tools
- Using certain set of plug-in in the Eclipse platform we can develop ABAP programs in eclipse, these are formally known as “ABAP in Eclipse” or ABAP Development Tools (ADT).
- In this scenario, the ABAP developer installs the required tools on his computer and works locally, whereas a continuous synchronization with the backend is performed.