Open In App
Related Articles

What is SAP ABAP Data Dictionary (DDIC)?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

DDIC is the central storage area that allows users to maintain the repository of objects related to the particular database and contains the central description of all the data used in the SAP system without any redundancy. The data in the DDIC is integrated, consistent, and secured. 

What is the ABAP Data Dictionary?

ABAP Data Dictionary, also known as DDIC, is a central repository in the SAP system where all the metadata related to the database objects are stored. The DDIC is used to manage and maintain the definitions of the database objects such as tables, views, structures, data elements, domains, and search helps.

DDIC Initial Screen
  • The ABAP Data Dictionary provides a graphical user interface (SE11) for developers to create, change, and maintain the database objects and also provides a set of APIs for programmatic access to the metadata stored in the DDIC. 
  • This allows for efficient and centralized management of the data structures and definitions in an SAP system.
  • The DDIC also plays an important role in ensuring data consistency and integrity by enforcing referential integrity constraints and by providing support for data types and data domains. 
  • Additionally, the ABAP Data Dictionary provides tools for generating database-independent ABAP code, which helps to simplify database migrations and improve the portability of SAP applications.

Basic Types in ABAP Dictionary

The basic types in the ABAP Data Dictionary (DDIC) are the fundamental data types that are used to define the structure and organization of the database objects in the SAP system. These basic types include:

1. Character Strings

Character strings are used to represent text or alphanumeric data in the SAP system. In the DDIC, character strings are defined by a data type called “Character” or “String”. The “Character” type is a fixed-length string, while the “String” type is a variable-length string. The “Character” type is defined with a specific length, such as 10 characters, while the “String” type is defined with a maximum length, such as 255 characters.

2. Integers

Integers are used to represent whole numbers in the SAP system. In the DDIC, integers are defined by a data type called “Integer”. The “Integer” type is a signed or unsigned whole number and is defined with a specific length, such as 4 bytes or 8 bytes.

3. Floating Point Numbers

Floating point numbers are used to represent decimal numbers in the SAP system. In the DDIC, floating point numbers are defined by a data type called “Floating Point Number” or “Real”. The “Floating Point Number” type is a signed or unsigned decimal number and is defined with a specific length, such as 4 bytes or 8 bytes. The “Real” type is a single-precision floating-point number, with a length of 4 bytes.

4. Dates

Dates are used to represent dates in the SAP system. In the DDIC, dates are defined by a data type called “Date”. The “Date” type is a date representation that includes the year, month, and day, and is stored as a 4-byte binary value.

5. Time Stamps

Time stamps are used to represent dates and times in the SAP system. In the DDIC, time stamps are defined by a data type called “Time Stamp”. The “Time Stamp” type is a date and time representation that includes the year, month, day, hour, minute, and second, and is stored as an 8-byte binary value.

6. Currency Amounts

Currency amounts are used to represent monetary values in the SAP system. In the DDIC, currency amounts are defined by a data type called “Currency”. The “Currency” type is a signed or unsigned decimal number that is used to represent monetary values and is defined with a specific length and number of decimal places, such as 13 bytes with 2 decimal places.

These basic types provide the foundation for defining the structure and organization of the database objects in the SAP system. By using these basic types, you can define the individual data elements, such as fields in a database table, and the underlying data representation for these elements.

Dictionary Tasks

The ABAP Data Dictionary (DDIC) performs several key tasks in SAP, including:

  • Object Definition: The DDIC provides a central repository for the definition of database objects, such as tables, views, structures, and data elements. This includes the definition of the data types, lengths, and other properties of these objects.
  • Data Integrity: The DDIC enforces referential integrity constraints and data validation rules to ensure the consistency and accuracy of the data stored in the database.
  • Code Generation: The DDIC provides tools for generating database-independent ABAP code, which helps to simplify database migrations and improve the portability of SAP applications.
  • Security: The DDIC provides mechanisms for controlling access to database objects and for protecting sensitive data from unauthorized access.
  • Performance Optimization: The DDIC provides features for optimizing the performance of database objects, such as indexing and caching, which help to improve the performance of database operations in SAP.
  • Data Access: The DDIC provides a centralized and consistent way to access and manage data in the database, which simplifies the process of developing and maintaining SAP applications.
  • User Interface: The DDIC provides a graphical user interface (SE11) for managing and maintaining the definitions of database objects in the DDIC. This interface provides a convenient and user-friendly way to create, change, and maintain database objects in SAP.

These are some of the key tasks performed by the ABAP Data Dictionary. The DDIC is a critical component of the SAP system, providing centralized and consistent management of database objects and data in SAP.

ABAP Dictionary 3 Levels

The ABAP Data Dictionary has three levels:

  • Domain level: The domain level defines the data type and attributes of individual fields. This includes the type of data (such as numeric, alphanumeric, or date/time), the size of the field, and any constraints or validation rules that apply.
  • Data element level: The data element level provides a higher level of abstraction over domains. Data elements combine one or more domains to define a specific semantic meaning for a field, such as “material number”, “customer name”, or “sales order date”.
  • Table level: The table level is the highest level of abstraction in the ABAP Data Dictionary. Tables define the structure and relationships between data elements and domains, allowing for the creation of complex data models that can be used to store and retrieve data in the SAP system.

Each of these levels plays an important role in defining and managing the data in the SAP system, and the three levels work together to provide a flexible and powerful data modeling framework that can be used to support a wide range of business requirements.

Aggregated Objects of ABAP Dictionary

Aggregate objects in SAP ABAP Data Dictionary (DDIC) are objects that are created by grouping other DDIC objects together. The purpose of aggregate objects is to provide a higher level of abstraction and encapsulation of the underlying objects, making it easier to manage and reuse data definitions.
There are several types of aggregate objects in ABAP DDIC, including tables, views, search help and lock objects. Each type of aggregate object serves a specific purpose and has its own unique characteristics. For example, tables are used to store data in the SAP system, views provide a consolidated view of data stored in one or more tables, and domains define the data type and rules for a specific field in a table. Each of the aggregated objects is explained in detail below:

1. Database Tables

In SAP ABAP, database tables are used to store data in the SAP system. The data is stored in rows and columns, similar to a spreadsheet. Tables can be defined in the ABAP Data Dictionary (DDIC) using the SE11 transaction. The DDIC provides a set of tools to define tables and their fields, including field properties, keys, and indexes.

  • Types of Tables: There are two types of tables in SAP ABAP: transparent tables and pooled tables. Transparent tables have a one-to-one relationship between the fields in the table and the columns in the database, while pooled tables have a one-to-many relationship between the fields in the table and the columns in the database.
  • Creating Tables: Tables can be created in the ABAP Data Dictionary (DDIC) using the SE11 transaction. The DDIC provides a set of tools for defining the fields, keys, and indexes of the table. The structure of a table can be changed using the ALTER statement, but this should be done with caution, as changes to the table structure can affect existing programs that use the table.
  • Storing Data: Data is stored in tables in rows and columns, similar to a spreadsheet. Data can be added to tables using the INSERT statement and can be retrieved from tables using the SELECT statement. Tables can also be joined with other tables to retrieve data from multiple sources.

2. Views

A view in SAP ABAP is a virtual table that provides a view of the data stored in one or more database tables. Views can be used to simplify data access, as they provide a single, consolidated view of the underlying data. Views can be defined in the ABAP DDIC using the SE11 transaction.

  • Types of Views: There are two types of views in SAP ABAP: database views and maintenance views. Database views provide a virtual representation of the data stored in one or more tables, while maintenance views provide a simplified interface for maintaining data in a table.
  • Creating Views: Views can be created in the ABAP DDIC using the SE11 transaction. The DDIC provides a set of tools for defining the fields, keys, and indexes of the view. The structure of a view can be changed using the ALTER statement, but this should be done with caution, as changes to the view structure can affect existing programs that use the view.
  • Using Views: Views can be used to simplify data access by providing a consolidated view of the underlying data. Data can be retrieved from views using the SELECT statement, just like with tables. Views can also be joined with other views or tables to retrieve data from multiple sources.

3. Data Types

A data type in SAP ABAP is a definition of the type of data that can be stored in a field. The DDIC provides a set of predefined data types, such as character, numeric, and date, as well as the ability to define custom data types. Data types are used to define the fields in tables and structures.

  • Predefined Data Types: The ABAP DDIC provides a set of predefined data types, such as character, numeric, and date. These data types can be used to define the fields in tables and structures.
  • Custom Data Types: The ABAP DDIC also provides the ability to define custom data types. Custom data types can be used to define data that has unique characteristics not covered by the predefined data types.
  • Using Data Types: Data types are used to define the fields in tables and structures. The data type of a field determines the type of data that can be stored in the field, as well as the size and format of the data.

4. Type Groups

A type group in SAP ABAP is a collection of data types that are grouped together for easier management and reuse. The data types within a type group can be used in multiple programs, making it easier to maintain consistency in data definitions. Type groups can be defined in the ABAP DDIC using the SE11 transaction.

  • Purpose of Type Groups: Type groups in SAP ABAP are used to group data types together for easier management and reuse. The data types within a type group can be used in multiple programs, making it easier to maintain consistency in data definitions.
  • Creating Type Groups: Type groups can be created in the ABAP DDIC using the SE11 transaction. The DDIC provides a set of tools for defining the data types within the type group and for assigning the type group to programs.
  • Using Type Groups: The data types within a type group can be used in multiple programs, reducing the need to repeat the same data type definition in multiple programs. This makes it easier to maintain consistency in data definitions across the SAP system.

5. Domain

A domain in SAP ABAP is a data type definition in the DDIC that is used to define a specific field in a table. It provides a set of rules that govern the values that can be entered into the field, such as the data type, length, and number of decimal places. Domains can be defined in the ABAP DDIC using the SE11 transaction.

  • Purpose of Domains: A domain in SAP ABAP is a data type definition in the DDIC that is used to define a specific field in a table. A domain defines the data type and rules for a specific field, such as the size, format, and allowed values of the data.
  • Creating Domains: Domains can be created in the ABAP DDIC using the SE11 transaction. The DDIC provides a set of tools for defining the data type, size, and format of the domain, as well as any additional rules or restrictions for the data.
  • Using Domains: Domains are used to define the data type and rules for specific fields in tables. By using domains, data definitions can be standardized and reused across multiple tables, making it easier to maintain consistency in data definitions.

6. Search Help

Search help in SAP ABAP is a tool that helps the user find a specific value within a data field. It is a type of input help that is used to display a list of valid values for a field. Search helps can be assigned to fields in the DDIC to provide the user with a list of valid values during data entry. Search helps can be defined in the ABAP DDIC using the SE11 transaction.

  • Purpose of Search Help: Search help in SAP ABAP is used to provide a list of possible values for a specific field in a transaction. The search help can be used to simplify data entry by providing a list of allowed values, rather than requiring the user to enter data manually.
  • Creating Search Help: Search help can be created in the ABAP DDIC using the SE11 transaction. The DDIC provides a set of tools for defining the fields, data sources, and search logic for the search help.
  • Using Search Help: Search help is used in transactions to provide a list of possible values for a specific field. The search help can be used to simplify data entry and ensure that only allowed values are entered for a specific field.

7. Lock Objects

A lock object in SAP ABAP is a mechanism used to synchronize access to shared data in a multi-user environment. It is used to ensure that multiple users do not simultaneously update the same data record, which can result in data inconsistencies. The DDIC provides tools to define lock objects and assign them to specific tables or fields. Lock objects can be defined in the ABAP DDIC using the SE11 transaction.

  • Purpose of Lock Objects: Lock objects in SAP ABAP are used to synchronize access to shared data. Lock objects are used to prevent concurrent access to the same data by multiple programs, which can cause data inconsistencies and errors.
  • Creating Lock Objects: Lock objects can be created in the ABAP DDIC using the SE11 transaction. The DDIC provides a set of tools for defining the lock object and the data that it protects.
  • Using Lock Objects: Lock objects are used in programs to synchronize access to shared data. The lock object is used to prevent concurrent access to the same data by multiple programs, ensuring that data inconsistencies and errors are prevented.


Last Updated : 28 Nov, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads