Investigating a Table Definition

Objectives

After completing this lesson, you will be able to:

  • Investigate a table definition

Database Table Definitions

Every ABAP system runs on a relational database management system (DBMS). Originally, ABAP supported different database management systems from different vendors. Therefore the definition of database objects like tables and views is done in a database independent way.

Note

Newer ABAP releases only support SAP HANA as database. The ABAP Environment on SAP BTP always runs on SAP HANA.

In a relational database, information is stored in two-dimensional tables, in which each row represents one data record whose contents are split up into columns. The database is called a relational database, as there are also relations between tables. For example, the table in the figure contains an airline code. In the database table, there would be a relationship to a further table containing the information that AA stands for American Airlines, JL for Japanese Airline, LH for Lufthansa, and so on.

A sequence of columns at the beginning of each database table forms its key. The key is a combination of values that ensures that each row in the table can be identified uniquely.

In SAP systems, database table definitions are development objects, and as such, are cross-client. However, the vast majority of tables contain business data, which is client-specific. To keep the data separate, client-specific tables have a client field (often named CLIENT or MANDT) as their first key field. The database of SAP accesses statements using ABAP SQL to ensure that a statement only manipulates data from the current client.

Database Table Definitions

ADT provides a dedicated editor for database table definitions.

Let's look at the different parts of the table definition.

Data Preview for Database Tables

You can use the Data Preview tool to display and analyze the content of a database table. To open the Data Preview for a given table, right-click anywhere in the table definition and choose Open WithData Preview. Alternatively, place the cursor anywhere in the database table definition and press F8.

The tool displays the data stored in the database table. Watch the video to learn about some of the most important functions.

How to Analyze a Database Table

Log in to track your progress & complete quizzes