0% found this document useful (0 votes)
9 views

Module 2 - Data Types in the ABAP Dictionary

The document provides an overview of data types in the ABAP Dictionary, including the creation of domains, data elements, flat structures, table types, and deep structures. It outlines the objectives and key concepts related to each topic, such as defining data types, creating structures, and using type groups. The content is intended for educational purposes and emphasizes the importance of complying with copyright laws.

Uploaded by

thoyaja.abap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Module 2 - Data Types in the ABAP Dictionary

The document provides an overview of data types in the ABAP Dictionary, including the creation of domains, data elements, flat structures, table types, and deep structures. It outlines the objectives and key concepts related to each topic, such as defining data types, creating structures, and using type groups. The content is intended for educational purposes and emphasizes the importance of complying with copyright laws.

Uploaded by

thoyaja.abap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

SAP ABAP

(Basics to Advanced)
Data Types in the ABAP Dictionary
www.zarantech.com

© 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 Domains and Data Elements
• Lesson 2 - Creating Flat Structures
• Lesson 3 - Creating Table Types and Deep Structures
• Lesson 4 - Creating Type Groups

© Copyright 2021, ZaranTech LLC. All rights reserved.


2 2.1 Creating Domains and Data Elements

Objectives

• Create domains for data elements


• Create data elements

4
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.1 Creating Domains and Data Elements

Overview of Data Types

you can find the following basic types


• Data element
• Structure
• Table type

5
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.1 Creating Domains and Data Elements

Data Types in the ABAP Dictionary

• Domains - Domains manage the technical


properties of data elements centrally.
Domains cannot be used directly in
programs, tables, and so on.
• A Domain comprises of the settings format
and output characteristics.

6
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.1 Creating Domains and Data Elements

Data Types in the ABAP Dictionary

• Format - In the format specifications, you find the data type and the number of characters that
can be entered in the dependent data object. If the format is numeric, you can also specify the
number of decimal places.
• The data type must be chosen from a built-in list of data types.
• The following are the most frequently used data types:
• CHAR (Character string) - Fields of this type can have a maximum length of 255 characters in
tables.

7
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.1 Creating Domains and Data Elements

Data Types in the ABAP Dictionary

• To use longer Character strings in tables, you have to choose the LCHR data type. In structures,
there are no length restrictions regarding these fields.
• DATS (Date) - The length for this data type is set to eight characters.
• You can define the output template with the user profile.
• DEC (Decimal) - A DEC field can have a maximum of 31 characters.
• This field is the calculation or amount field with decimal point, +/- sign, and thousands
separators.
• NUMC (Numeric) - The length of NUMC field is restricted to a maximum of 255 characters.
This character string can only contain numbers. 8
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.1 Creating Domains and Data Elements

Data Elements

• Data elements define data types which


can be used on screens, search helps,
ABAP programs, and complex data types.
• Data elements contain both semantic
and technical information about the data
type.

9
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.1 Creating Domains and Data Elements

Data Elements: Additional Options

• Documentation - You can create a text that describes the contents of the data element. This
text is displayed for the F1 help in all screen fields that refer to this data element.
• Search help - A search help (F4 key or input help) can be assigned to a data element. The
subject of search helps is discussed in greater detail later in this course.
• Search helps can be integrated at different levels.
• Set/Get Parameter - Assigning a SET/GET parameter to the data element saves the user from
entering the same value several times. A field can be filled with default values from SAP
memory.
10
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.1 Creating Domains and Data Elements

Data Elements: Additional Options

• Default component name - You can assign a default component name to the data element.
However, this is effective only if you use the data element as a component in Business
Application Programming Interface (BAPI) structures.
• Change document - The system logs changed field contents only if you set the Change
document indicator for the data element.
• Input history - The mechanism that the SAP GUI uses to handle the input history of a screen
input field is switched off.
• Bi-directional options
11
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.2 Creating Flat Structures

Objectives

• Create simple and nested structures in the ABAP


Dictionary

12
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.2 Creating Flat Structures

Simple and Nested Structures

Structure consists of components in the


following forms:
• Data elements
• Integrated types
• Table types
• Definition of database tables and
database views
• Other structure types
13
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.2 Creating Flat Structures

Using Simple Structures in ABAP

• The simplest form of a structure is a list of


fields typed with data elements. This form of
structure is called a flat structure.
• A data object based on this structure type is
always one dimensional
• You address the individual elements
(components) of the structure using the name
of the structure, a hyphen, and the name of the
components. 14
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.2 Creating Flat Structures

Nested Structure
• You can include another structured object in the
structure and assign it to a component.
• The component refers to the structured object and
the new data object is described as a nested structure.
• When a structure is included as an include structure, it
can be assigned a name of a group. In ABAP programs,
the name of a group is an additional addressing option
for data objects declared with reference to the
structure.
15
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.3 Creating Table Types and Deep Structures

Objectives

• Create table types in the ABAP Dictionary


• Create deep structures in the ABAP Dictionary

16
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.3 Creating Table Types and Deep Structures

Table Types
• A dictionary structure containing one or more fields using a table type is called a deep
structure.
• You can define table types using an existing dictionary type.
• Database tables, structure definitions, views, data elements, direct type definitions, or
existing table types can be used as line type.
• During runtime, if the ABAP program is referencing any data object using table types,
the system will create a two-dimensional array in the main memory for each of these
objects.

17
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.3 Creating Table Types and Deep Structures

Table Types

18
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.3 Creating Table Types and Deep Structures

Table Type Definition


• A line type that defines the structure and the data type attributes of a line in the internal table.
• Access mode, which determines how to manage and access the data. Possible access
• modes are standard table, sorted table, hashed table, index table, and not specified.
• Primary key definition and key category (Unique/Non-unique/Not specified). Hashed table is
always unique, and sorted table can be unique, non-unique, or not specified.
• Secondary key (optional)
• Secondary keys can be hashed or sorted. A sorted secondary key can be unique or no unique.
• To define a table type, go to the ABAP Dictionary (transaction SE11), enter the table type name,
and fill in the definitions.
19
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.3 Creating Table Types and Deep Structures

Table Type Definition

Tables Types

Special Table Type Ranges Table Type

20
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.3 Creating Table Types and Deep Structures

Deep Structures
• A deep structure contains at least one field with a table
type.
• The component of this table has its own name with which
it can be addressed in the same way as a normal internal
table (LOOP AT..., INSERT... INTO TABLE, ...).
• An internal table, in turn, can have a deep structure as a
line type.
• In this way, you can create multidimensional data types,
since internal tables and structures can be inter-nested
21
several times.
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.4 Creating Type Groups

Objectives

• Define type groups in the ABAP Dictionary

22
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.4 Creating Type Groups

Type Groups
• Type groups can be used to define your own global-complex data types, global constants, and
macros.
• The name of the type group can contain a maximum of five characters. In the type group, you
can use the TYPES statement and the CONSTANTS statement, and you can also use the
predefined ABAP types or global dictionary types.
• A type group is defined as a piece of ABAP code that you maintain either in the ABAP Dictionary
(SE11) or in the ABAP Editor (SE38).

23
© Copyright 2021, ZaranTech LLC. All rights reserved.
2 2.4 Creating Type Groups

Type Groups

24
© Copyright 2021, ZaranTech LLC. All rights reserved.
2

Q&A Session

25
© Copyright 2021, ZaranTech LLC. All rights reserved.
© Copyright 2021, ZaranTech LLC. All rights reserved.
Thank you
Subscribe to our Channel for more Informative Videos.
https://www.youtube.com/user/ZaranTech

You might also like