“ABAP is not Cologne rock” was recently written on an IT service provider’s advertising poster. It’s a shame, actually – because if SAP’s own programming language was as quick and easy to learn as the lyrics of a carnival hit, it would be much easier for ABAP newbies. In this blog series, you will learn how to program with SAP ABAP with the help of practical instructions.

Table of contents

What exactly is ABAP?

ABAP (short for Advanced Business Application Programming) is the SAP programming languagewhich is used specifically for developing business applications within the SAP system. Since ABAP, like any other programming language, involves a certain level of complexity, it takes time and patience to learn this language. This is especially true for beginners in programming.

During my business studies, I had hardly any contact with computer science, let alone programming. In my day-to-day work as an SAP consultant, however, I am always fascinated by how much you can help shape the SAP standard software through your own developments. The software can be customized down to the smallest detail. adapt to the individual needs of customers.

The more you understand about the actual programming, the better and more targeted you can advise. Basics of ABAP programming are only useful to you if you work in the SAP environment.

SAP consulting with CONET

As a long-standing SAP consultant, CONET offers holistic SAP consulting – from process consulting and strategy development to architecture and technology consulting, implementation and continuous optimization.

About our services

Good prospects also for career changers

For interested students, trainees or non-specialists who want to get a foot in the door of the software development profession as a career changer, it can also pay off to acquire knowledge of ABAP. SAP is in demand: At the beginning of 2020, the software company had over 440,000 customers and held the largest market shares in enterprise applications ERP (Enterprise Resource Planning). Worldwide, 77 percent of all transaction revenues pass through SAP systems.

ABAP programming skills can be useful for consultants.

The widespread use of SAP ERP software means there is a high demand for qualified developers who can implement and adapt the applications to suit individual business processes. Coupled with the currently rather sparse labor market, especially in the IT sector, ABAP development offers good prospects for (prospective) programmers.

With my blog series, I would like to make it easier for beginners and those switching to programming with SAP ABAP to get started with practical instructions, supplemented by the necessary theoretical part.

Programming with SAP ABAP

Programming with ABAP always serves the Illustration or evaluation of business datathat are recorded in a company using SAP software. Related data is stored in a structured form in a dedicated database table.

Even in the standard delivery of the SAP system, there are thousands of ready-made database tables (for example, for the administration of various customer, material or personnel master data). However, SAP customers regularly require additional tables that meet their very own cover specific requirements.

The second and third parts of this blog series, which will be published soon, are connected practical parts. In these, a case study will be used to explain how you can Create your own customer-specific database table and fill it with some practice data records. You can use these later as a data basis in your ABAP program.

A central role is played by the ABAP DictionaryThis first part of the blog series is intended to explain to you how this tool works in theory. This will give you the necessary knowledge to carry out the practical exercises later. To keep the dictionary in front of you while you read, you can call it up at any time using the transaction code SE11.

What can the ABAP Dictionary do?

The ABAP Dictionary or Data Dictionary (DDIC for short) is an elementary tool for working in SAP. The data definitions used in the system are centrally described and managed there. The functions of the ABAP Dictionary can essentially be divided into three categories:

Functions of the ABAP Dictionary

Functions of the ABAP Dictionary

Just as a craftsman regularly uses the tools and hardware from his well-stocked toolbox at work and renews and expands these tools as needed, the ABAP developer uses and supplements the data stored in the dictionary.

Type definitions

In the dictionary, user-defined types (data elements, structure and table types) as well as domains can be created.

ABAP Dictionary initial screen

Initial screen of the ABAP Dictionary (transaction SE11)

As you may already know, user-defined types can also be defined directly in an ABAP program using the TYPES statement. In this case, they are local The typewhich can initially only be recognized and used in this one program. In order to be able to use them in another application, these types would also have to be defined locally there.

The types created in the dictionary, however, are global Typewhich can be used equally in all programs without having to redefine them each time. The predominant use of global types significantly reduces the maintenance effort and at the same time increases transparency.

Since the types defined in the dictionary partly serve as the basis for the initial creation of database tables, they are briefly explained here:

    • In one domain the technical properties of a data element are defined. These include the data type (DATS, NUMC, CHAR, etc.), the number of digits and, if applicable, decimal places, and the output length. Furthermore, a value range can be specified if required to restrict the valid values ​​for the table field described by the data element. Different data elements and fields can be based on the same technical characteristics. Let's assume there is a “date of birth” field and a “date of driving test” field. Since both fields contain dates, they could both be based on the eight-digit DATS data type, for example, and thus be defined by one and the same domain.
    • In addition to the technical information, each field also has semantic properties. These include a meaningful name and a short description that provide information about the content meaning of the field. This semantic information is stored in the Data element deposited.
    • Structure types are used to group individual fields and data elements according to content criteria. A structure type can be used to type the columns of a table, i.e. you can imagine a structure type as the totality of all column headings in a table.
    • While a structure type initially describes only a single row of a table (i.e. exactly one data record), a Table type a table with any number of rows or data records. All data records are based on the same structure type.

Database tables

In addition to the type definition, the ABAP Dictionary also offers the possibility Create or modify database tables. How exactly should one imagine such a database table? In SAP's relational database system, data is represented in the form of tables with any number of columns and rows. Existing data elements from the dictionary can be used to define the “column headings”. Alternatively, suitable data elements can also be created directly when the table is created.

Elements of the ABAP Dictionary in context

The graphic shows what the individual elements of the ABAP Dictionary are and how they relate to each other:

The specified column structure then applies to all table rows, i.e. to all data records that are stored in the table. Determination of a so-called primary key The individual table entries can be distinguished from one another. Key fields can be used as a sorting and search aid when working with tables during development and enable the unique identification (or “address”) of each individual data record in the database table.

ABAP Dictionary Tools

For the sake of completeness, the third function of the ABAP Dictionary will also be briefly described. This gives users access to Tools for field preparation on the user interface (see first figure). For example, an input help with possible fill-in values ​​can be created for the user, which can be called up by pressing F4. Example: For a field for querying eye color, values ​​such as “blue”, “brown” or “green” could be stored in the ABAP Dictionary.

This assignment of “value sets” can be done via fixed values ​​of domains (as in the example above) or via so-called foreign key relationships The latter are references to other database tables that contain the possible entries for the field. By defining search help, certain “evaluation rules” can be created that are to be executed when the F4 help is called.

In the second part of this blog series, we will look at a case study to get started with the practical use of the ABAP Dictionary and to start programming with SAP ABAP.

SAP consulting with CONET

As a long-standing SAP consultant, CONET offers holistic SAP consulting – from process consulting and strategy development to architecture and technology consulting, implementation and continuous optimization.

About our services

Was this article helpful for you? Or do you have further questions about SAP ABAP? Write us a comment or give us a call.


Franziska Georg, SAP HCM Consultant at CONET

Franziska Georg is involved in the Workplace Solutions division, developing solution modules within the framework of Microsoft 365. She adapts standard products such as SharePoint Online or Microsoft Teams using components she has developed herself to create an individually tailored work environment.

Source: https://www.conet.de/blog/programmieren-mit-sap-abap-das-abap-dictionary/

Leave a Reply