ABAP

ABAP logo
ABAP (Advanced Business Application Programming) is a high-level programming language developed by SAP for the development and maintenance of applications running on the SAP NetWeaver platform. The language was originally based on COBOL, but has since been extended with object-oriented and other modern programming language features. It's used to write applications for the SAP ERP software suite – programs for implementing business processes and providing data access.

ABAP

ABAP (Advanced Business Application Programming) is a high-level programming language created specifically for the development of business applications. It was first developed by SAP in 1980 and has since grown to become the most widely used programming language in the SAP platform.

ABAP, which stands for Advanced Business Application Programming, is an object-oriented programming language used to create business applications and programs that can be used in the SAP system. It enables users to develop data-intensive applications and to integrate different components of a system. ABAP library is a collection of ABAP components that provides a range of functions and features for building software solutions.

ABAP libraries are composed of objects such as classes, procedures, methods and functions. This collection of components makes it easier for programmers to develop complex, high-performance applications. The library also provides tools for handling data, such as data conversion, data manipulation, and formatting. In addition, it allows developers to create graphical user interface elements.

History of ABAP Library

ABAP was first developed in 1970s by IBM as part of its System/38 operating system. In 1982, SAP released ABAP as part of its R/3 system. It was then redesigned and improved during the 90s.

Since then, ABAP library has been continually developed and improved over the years. In 1996, SAP introduced the first version of the ABAP Development Workbench. This workbench allowed developers to write and manage source code and to build custom versions of SAP applications.

In 2002, SAP released the ABAP Object Oriented Language (AOOP), which allowed developers to create and manipulate objects within ABAP programs. This marked a major shift from procedural programming to object-oriented programming. AOOP made it easier to create complex programs by allowing developers to manipulate objects while they were manipulating the code.

In 2011, SAP announced the release of the ABAP Platform and ABAP Library. This platform was designed to give developers the capability to create highly efficient applications and to make those applications available to both customers and partners. The ABAP Library is included as part of this platform and provides developers with a rich set of tools and components.

ABAP was first released in 1993 as part of SAP R/2, the predecessor of what is now known as the SAP ERP software suite. Since its inception, it has been modified and improved to keep up with the changing times, adding support for object-oriented programming, graphical user interfaces and more.

Initially, ABAP was designed and written in German, with many IT experts convinced that object-oriented technology was too complex and slow to be used in production systems. As a result, SAP decided to develop ABAP as a hybrid programming language, combining procedural and object-oriented features.

Since its introduction, ABAP has become one of the most popular languages for SAP developers, with over 800,000 developers using it worldwide.

ABAP was originally developed by SAP AG in 1983 as a high-level programming language for the development of applications on the SAP R/3 system. Its design was driven by the need to provide a language suitable for the development of business applications that could integrate with the underlying databases and modules of the SAP system. It was the first language specifically developed to meet the needs of the SAP environment and established a new era of development on the platform.

The language continued to evolve over the following decades, adding support for many of the major changes in the SAP platform. In 2001, SAP launched a new version of the language - ABAP Objects - that embraced the object-oriented paradigm and included features such as inheritance and encapsulation. This allowed for the creation of complex software programs that could be easily maintained.

Early History of ABAP

When SAP was founded in 1972, they had no need for a dedicated programming language. The software they created was based on the existing languages of the time, such as Assembly and COBOL. However, it soon became clear that these languages were not up to the task. In response, SAP began developing its own language and by 1980 they had a working version. This first version of ABAP was released in 1982.

Features

ABAP is a high-level language that is easy to use and is suited for both rapid development and long-term projects. Its syntax is very similar to that of other programming languages, making it easy for experienced developers to pick up.

ABAP supports object-oriented programming, allowing developers to define and reuse code in various ways. It also has powerful tools for debugging code, so bugs can be easily identified and fixed.

ABAP provides direct access to SAPs database, allowing developers to easily query, manipulate, and update data. It also allows developers to build user interfaces, and provides an extensive library of libraries, functions, and classes, making it easy to perform complex tasks.

Developing and Extending ABAP

The first version of ABAP was only suitable for simple programming tasks, so SAP continued to develop and extend the language over the next few years. By the end of the 1980s, ABAP had become a fully functional language for developing applications for the SAP Platform. It was officially released as SAP R/2 in 1992.

Since then, ABAP has been constantly improved and extended. In 1999, with the launch of the SAP R/3 system, ABAP was completely rewritten as an Object Oriented Programming Language (OOPL). This enabled developers to write code that was more powerful, efficient and maintainable.

In 2004, ABAP was further enhanced with the introduction of the ABAP Objects feature. This allowed for greater code reuse and the creation of applications with a component-based architecture.

Usages

ABAP is used to create and maintain applications that are run on the SAP NetWeaver platform. These applications could be anything from customer orders, to inventory management, to banking transactions.

ABAP is also used to build custom interfaces, such as a web portal, to the SAP system. This allows organizations to offer tailored solutions to their customers, using the same SAP system.

ABAP can be used to create reports, giving companies real-time insight into their business operations. This helps managers to make informed decisions about the direction of the organization.

ABAP is also used for process automation – automating everyday tasks within an organization. This helps to increase efficiency and reduce costs, allowing companies to focus on their core activities.

ABAP is a powerful language used by developers of all types, from those working on mission-critical applications to those developing simple web-based solutions. It provides a range of features to help developers build robust and reliable programs that are easy to maintain.

It is most commonly used for enterprise software development and is often used to build systems for large organizations. ABAP is used to develop programs that interact with databases, financial systems, and other technologies. It is also used to create custom programs that are tailored to a company’s specific needs.

ABAP is also used by developers of smaller applications and is often used by people who don’t have much experience in programming. The language provides an intuitive and easy-to-learn syntax that allows even novice developers to quickly build small applications. This makes ABAP a great choice for those who need to quickly prototype and test ideas.

Examples of Usage

ABAP library can be used to create a variety of different types of applications. A few examples of common uses of the library include:

  • Developing complex data-driven applications
  • Creating advanced graphical user interface elements
  • Manipulating and formatting data
  • Integrating components of a system
  • Implementing business logic
  • Creating custom versions of SAP applications

Web Dynpro

Web Dynpro is a component-based web application framework for the development of user interfaces for SAP applications, using ABAP. It is used to design dynamic and interactive web-based UIs, and consists of two components: the Visual Editor, which is a graphical user interface, and the ABAP Workbench, which is a development component.

Using Web Dynpro, developers can create complex user interfaces that consist of multiple UI elements, such as forms, tables, lists, menus, and more. The framework also supports the integration of web services and automated testing.

SAP Gateway

SAP Gateway is a service layer that enables communication between business applications and the SAP ecosystem. It uses RESTful web services to transfer data between different systems, and is used to extend the reach of SAP applications to mobile devices and other third-party systems.

The gateway is powered by ABAP, allowing developers to create custom services that can be used to send and receive data from external sources. It also provides a robust security layer, ensuring that only authorized users have access to the data.

BAPIs

BAPIs (Business Application Programming Interfaces) are the main way of interacting with SAP applications. They provide a set of standardized APIs that can be used to access and manipulate data stored in SAP systems.

BAPIs are written in ABAP, and can be used to build custom applications that interact with SAP systems. They are also used to access and modify data stored in SAP databases.

Code Examples

The following is an example of an ABAP program that displays a message box on the screen:

REPORT zmessage_box.

DATA message TYPE string VALUE 'Hello World!'.

CALL METHOD cl_gui_frontend_services=>show_message_box
  EXPORTING
    title           = 'Message Box'
    message_type    = 'S'
    message_text    = message.

The code above begins with a REPORT statement, followed by a declaration of a variable called message, which contains the string value Hello World!.

The CALL METHOD statement then calls a method of the cl_gui_frontend_services class, which displays a message box on the screen, with the title Message Box and the message Hello World!.

Today, ABAP is used to develop the majority of applications running on the SAP platform. The language is used to create everything from simple reports to complex enterprise applications. The language is also popular among Universities, who use it to teach students about business application development.

ABAP is incredibly powerful, and its feature set continues to expand year after year. The language now offers support for server-side scripting, web services, database access and much more.

Below is a basic example of an ABAP program. This code will print out the message “Hello World” to the screen.

REPORT ZHELLO_WORLD.
WRITE 'Hello World'.

The syntax of ABAP is similar to other programming languages. It is an object-oriented language and supports a variety of data types, such as characters, integers, floating point numbers, and internal tables.

Some of the most common keywords used in ABAP include SELECT, WRITE, MODIFY, LOOP and ENDLOOP. These keywords are used to create, modify, and read data from SAP databases.

The following code example demonstrates how to create a basic program using the ABAP Library:

CLASS lcl_app DEFINITION.
    PUBLIC SECTION.
        METHODS:
            constructor IMPORTING i_name TYPE string,
            run.
ENDCLASS.

CLASS lcl_app IMPLEMENTATION.
    METHOD constructor.
        DATA: lv_welcome TYPE string.
        lv_welcome = 'Welcome to ' && i_name.
        WRITE lv_welcome.
    ENDMETHOD.

    METHOD run.
        WRITE 'This is the start of the program.'.
    ENDMETHOD.
ENDCLASS.

START-OF-SELECTION.
    DATA: lr_app TYPE REF TO lcl_app.
    CREATE OBJECT lr_app
        EXPORTING
            i_name = 'My Program'.
    lr_app->run( ).

In the example above, the lcl_app class is declared and implemented. The constructor method is used to pass a name to the program, which will be used when printing a welcome message. The run method is used to execute the program. Finally, an instance of the lcl_app class is created and the run method is called.

Here is an example of basic ABAP code that can be used to create a program that displays “Hello World” in the output window:

REPORT z_hello_world.

WRITE 'Hello World'.

This code will output the string “Hello World” in the output window. To execute the program, you must first compile it using the transaction code “SE38”. Once the program is successfully compiled, you can execute it using the transaction code “SA38”.

Here is an example of an advanced program that uses an internal table to store data:

DATA: BEGIN OF table1 OCCURS 0,
   name(20) TYPE c,
   age(3) TYPE c,
END OF table1.

WRITE: 'Name', 'Age'.

SELECT * FROM student INTO TABLE table1.

LOOP AT table1.
   WRITE: table1-name, table1-age.
ENDLOOP. 

This program will select data from the “student” table and store it into an internal table. It then loops through the table and displays the name and age of each student. This program illustrates how ABAP can be used to manipulate and display data from within a database.

Conclusion

ABAP is a powerful and robust language used for enterprise software development. It has been around for more than three decades and continues to be one of the leading languages used for the SAP platform. ABAP provides a range of features for developers, from creating simple programs to building large and complex applications. With its intuitive syntax and powerful features, it is a great choice for any type of development project.

May 5, 2022 by blog.released.info