SAP ABAP
(Basics to Advanced)
Database Tables
[Link]
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 Disclaimer
• This presentation, including examples, images, and references are provided for
informational purposes only.
• Complying with all applicable copyrights laws is the responsibility of the user.
• Without limiting the rights under copyright, no part of this document may be
reproduced, stored or introduced into a retrieval system, or transmitted in any
form or by any means.
• Credits shall be given to the images taken from the open-source and cannot be
used for promotional activities.
© Copyright 2021, ZaranTech LLC. All rights reserved.
3 Agenda
• Lesson 1 - Creating Transparent Tables
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Objectives
• Create transparent tables
• Define INCLUDE structures
• Create tables in the ABAP Dictionary
4
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Transparent Tables
• The structure of the objects used in application development is mapped to tables in the
database system.
• The attributes of these objects correspond to the fields of the table.
• A table consists of columns (fields) and rows (entries). The table has a name and different
• general attributes, such as delivery class and maintenance authorization.
• A field has a unique name and attributes; for example, a key field.
• A table has one or more key fields.
• The values of these key fields uniquely identify a table entry.
• These key fields collectively are called as a primary key. 5
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Transparent Tables & Fields
6
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Basics objects of ABAP Dictionary
• Tables - A transparent table is used to define database
tables on the database system.
• You can store business data in database tables.
• Domains - A domain is used for the technical definition
of a table field (for example, field type and length).
• It also describes the value range of a field by its data
type and length.
• The value range can be limited by specifying fixed
values. 7
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Basics objects of ABAP Dictionary
Data element
• A data element is used for the semantic definition, for example, a short description of a
table field.
• A data element also describes the meaning of a domain in a certain business context.
• The data element primarily contains the field help (F1 documentation) and the field
labels on the screen.
8
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Example of Two-Level Domain Concept
9
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Transparent Tables and Structures
10
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Technical Settings for Transparent Tables
11
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Table Fragmentation in the Database
12
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Fragmented Tables
• To reduce the fragmentation of database tables, one of the possible solutions is to rebuild the
tables.
• During the rebuild process, the SAP system creates a new table and transfers the data to this
table.
• Afterwards the system deletes the old, fragmented table and replaces it with the new one.
• In case the table has been grown unexpectedly fast, you should check and adjust the size
category in the technical settings before converting the table.
• To minimize fragmentation, you must choose the correct data class and size category in the
technical settings of the table 13
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Data Class
• The database system has different
physical storage areas.
• The data class defines where the table
resides within the database system.
14
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Most Important Data Classes
• Master data - Master data is data that is seldom modified. An example of master data is the
customer master data, which includes customer name, company address, and company
details.
• Transaction data - Transaction data is the data that is frequently modified. An example is the
material stock of a warehouse, which can change after each purchase order.
• Organizational data - Organizational data is the data you can define when you customize and
install the system, and is seldom modified afterwards. The country keys are an example.
• System data - System data is the data that the SAP system needs. The system configurations
are an example. 15
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Size Category
• The size category describes the expected storage
requirements for the table in the database.
• When the system creates a table in the database, it
reserves an initial extent.
• The size of the initial extent is identical for all size
categories. If the table needs more space for data
at a later time, further extents are added. These
further extents have a fixed size that depends on
the size category specified in the ABAP Dictionary. 16
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Log Data Changes
17
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Log Data Changes
• The data modifications are logged independently of the update. You can display the logs with
the Table History transaction ( SCU3).
18
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Write Access Only with Java
• Using the indicator Write access only with Java , you can define that contents of the table may
be changed only from within Java.
• If you implement changes (INSERT, UPDATE) to the table content through ABAP programs,
there is no guarantee that this data can be read correctly from the Java side.
• If the data written by ABAP is ASCII data, it can be read from the Java side.
19
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 3.1 Creating Transparent Tables
Technical Settings: DB-Specific Properties
• A relational database table is a two-dimensional data structure, with cells organized in rows and
columns.
• SAP NetWeaver 7.4 uses both the column and row store of SAP HANA.
• If you use the data dictionary to create a table for SAP HANA, it will be a table in column store
by default, in which the database serializes all of the values of a column together, then the
values of the next column, and so on.
• You can change this setting in SE11 under DB-Specific Properties.
20
© Copyright 2021, ZaranTech LLC. All rights reserved.
2
Q&A Session
21
© Copyright 2021, ZaranTech LLC. All rights reserved.
© Copyright 2021, ZaranTech LLC. All rights reserved.
Thank you
Subscribe to our Channel for more Informative Videos.
[Link]