2 - ABAP Dictionary
2 - ABAP Dictionary
1
Introduction to ABAP Dictionary
2
ABAP Dictionary Objects
Data Dictionary Objects : SE11
▪ Database table
▪ View
▪ Type Group
▪ Domain
▪ Search Help
▪ Lock Object
3
Domain
of a field/column.
4
Data Element
5
Table
▪ Table must have a primary key which is used to identify a record uniquely.
6
Client Dependent and Client Independent tables
▪ Tables having MANDT field are called as client dependent or client specific tables.
7
Table Maintenance Generator
8
Table Maintenance Generator Environment
TMG Environment
▪ The various objects of TMG
Authorization Group
Function Group
Maintenance type
9
Table Maintenance Generator Environment(Contd.)
▪ Authorization Group : It is used to specify the users who are authorized to maintain
▪ Function Group : Here, the name of the function group can be same as that of
table/view.
1
0
Table Maintenance Generator Environment(Contd.)
▪ Maintenance type - One step and two step. In case of one step only overview screen is
applicable. In case of two step, both overview screen and single screen are applicable.
▪ Maintenance screen No - Overview screen and single screen. In case of one step, a
screen number is assigned only to overview screen. In case of two step, a screen
1
1
Important Points for Table Maintenance Generator
display/maintenance allowed.
▪ Whenever we add new columns/fields to the table after generation of TMG, the newly
added fields do not appear automatically while maintaining data with the help of SM30.
1
2
Important Points for Table Maintenance Generator(Contd.)
▪ To delete the TMG, open the table in change mode, otherwise delete button does not
appear.
1
3
Types of Data in SAP
1. Master data
2. Transaction data
3. Configuration data
1
4
Types of Data in SAP
2. Transactional data - can change very often and are not constant.
3. Configuration data - is that data which we can customize. Customizing depends on the
1
5
Types of Data in SAP - Example
▪ Suppose there is a company ABC. The example of various types of data in the company
1. Master data - Employee data of the company ABC is the example of master data.
1
6
Types of Data in SAP - Example(Contd.)
the vehicle allowance is applicable, if the employee designation is other than senior
consultant then the vehicle allowance is not applicable. This is one of the example of
configuration data.
1
7
Data Class
of a table.
1
8
Data Class(Contd.)
as follows:
1
9
Size Category
in the database.
2
0
Delivery Class
• It is used for controlling data transport of tables during installation, upgrade and
2
1
Delivery Class(Contd.)
Delivery Class
• The widely used delivery class are as
follows:
A - Application table
C - Customizing table
2
2
Data Browser/Table View Maintenance
display/maintain a table.
2
3
Data Browser/Table View Maintenance Options
Data Browser/ Table View Maint. Options
Display/Maintenance allowed
2
4
Data Browser/Table View Maintenance Options (Contd.)
2
5
Primary-Foreign Key Relationship
Foreign Keys button in SE11
▪ Primary-Foreign key relationship
2
6
Primary-Foreign Key Relationship(Contd.)
Assigning Primary-Foreign Key Relationship
▪ The purpose of primary-foreign key
data consistency.
the cardinality.
2
7
Primary-Foreign Key Relationship(Contd.)
▪ Number of records in one table corresponds to number of records in second table for a
2
8
Types of Database Tables
1. Transparent table
2. Pooled table
3. Cluster table
2
9
Transparent Table
3
0
Pooled Table
Pooled Table
• In case of pooled table, there is N:1(many
3
1
Cluster Table
Cluster Table
• In case of cluster table, there is N:1(many
relationship is mandatory.
3
2
Structures
1. Include
2. Append
3
3
Include Structure
▪ It is a reusable structure.
3
4
Append Structure
▪ It is applicable to both customer specific tables (name starting with Z,Y) and SAP tables.
3
5
Views
table has data whereas view does not have any data.
3
6
Types of Views
1. Database view
2. Projection view
3. Maintenance view
4. Help view
3
7
Database View
3
8
Projection View
▪ We take only those fields which are required. It means the data that is actually required
▪ Projection view is equal to database view, if the database view also contains single table.
3
9
Maintenance View
▪ We need to generate the TMG( table maintenance generator) of the maintenance view.
4
0
Maintenance View(Contd.)
4
1
Help View
▪ In help view contents tab is disabled , but when we use help view in search help, then it
4
2
Indexes
▪ An index can be considered a copy of a database table that has been reduced to certain
▪ Index is created to speed up the selection process from database table which helps to
4
3
Indexes(Contd.)
▪ Index stores on the database with the name as tablename~Indexname. Example - table
name is ZEMP and index name is Z01, then the index name on the database is
ZEMP~Z01.
4
4
Types of Indexes
1. Primary Index - By default, primary key acts as primary index. This index is created
2. Secondary Index - Secondary indexes are created by user on a table in the ABAP
dictionary.
4
5
Various options in Non-unique Index
non-unique index:
3. No database index
4
6
Various options in Non-unique Index(Contd.)
1. Index on all database systems - Index is created on all the database systems.
3. No database index - Index is removed from the database, but It’s definition still exists.
4
7
Search Help
4
8
Types of Search Help
4
9
Various options in Search Help
Various options in Search Help
▪ The various options while creating the
Selection method
Dialog type
Import
Export
5
0
Various options in Search Help(Contd.)
LPos
SPos
SDi’s
Modified
Default value
5
1
Various options in Search Help(Contd.)
▪ Selection method - It is the source of hit list. It is name of the table or name of the view.
2. Dialog with value restriction - Before displaying the hit list, one restriction pop-up
appears.
5
2
Various options in Search Help(Contd.)
3. Dialog depends on set of values - If the hit list has less than 100 entries, it behaves like
display values immediately. If the hit list has more than 100 entries, it behaves like
▪ Search help parameter - Parameters which we want to include in the search help. They
▪ Import - Input.
▪ Export - Output. It is used to export the values from the hit list to the screen fields.
5
3
Various options in Search Help(Contd.)
▪ Default value - To provide the default value to search help parameter. To provide the
5
4
Table Buffering
▪ It improves the performance when accessing the data records contained in the table.
▪ Sometimes, we need to access a particular set of records more frequently than others.
▪ To overcome this drawback, the frequently accessed records of a table can be placed in
5
5
Buffering Options
Buffering not allowed - Table buffering is not performed for the table.
Buffering allowed, but switched off - Buffer is allowed but it is switched off and can be
5
6
Types of Table Buffering
2. Full buffering
5
7
Single Record Buffering
▪ In case of single record buffering single record loads in the buffer at a time.
▪ When to use - Single record buffering should be used for tables where single records are
5
8
Full Record Buffering
▪ When to use - Tables that are best suited to full buffering are frequently accessed and
rarely changed. A table which stores transaction data should not be opted for full
buffering.
5
9
Generic Area Buffering
▪ In case of generic area buffering the records matches the generic key are loaded in the
buffer.
▪ In case of generic area buffering we need to pass the number of key fields.
▪ The number of key field for a generic area buffering is less than the primary keys of the
table.
6
0
Important Points for Table Buffering
▪ Whenever we want to stop the buffering of a table , choose the radio button buffering
▪ Never use the transaction code /$TAB to reset the buffer of specific tables, as this
transaction code reset the buffer of all the tables. Pass the specific table in AL12
transaction code to reset the buffer. ( Edit - Reset Buffer - Table Buffer ).
6
1
Transaction Codes for Table Buffering
(Monitor-Buffers-Table Buffer)
6
2
Lock Objects
▪ If multiple users want to change the same data at the same time ,then at a time only
▪ When we want to create customized lock objects, the name must start with EZ or EY.
6
3
Lock Modes
1. Read lock.
2. Write lock.
6
4
Read Lock
▪ In case of read lock, other users can display the data, but they can not change the data.
6
5
Write Lock
▪ In case of write lock - other users can not display and change the data.
▪ Write lock can be requested several times from the same transaction and are processed
successively.
6
6
Enhanced Write Lock
▪ In case of enhanced write lock - other users can not display and change the data.
▪ Enhanced Write lock can be requested only once from the same transaction and can not
be processed successively.
6
7
Lock Modes Summary
6
8
Lock Object Function Modules
▪ Whenever we activate a lock object, SAP generates 2 function modules. One with
▪ Example - Suppose lock object name is EZ_VBELN , then the 2 generated function
▪ Enqueue function module is used for locking and dequeue function module is used for
unlocking.
6
9
Table Maintenance Generator(TMG) Events
▪ The example of specific actions are mouse click, pressing a key etc. The example of
▪ The same concept of events is applicable to TMG events. Some events trigger by specific
7
0
Table Maintenance Generator(TMG) Events
▪ Depends upon the requirement, we can add our own custom code using these TMG
events.
7
1
Concept of Text Tables
▪ We create text tables, when we want to store explanatory text in multiple languages.
▪ The text table has the key fields of primary table and must have an additional language
field.
▪ In the primary key table, we can check the text in logon language for the non-key fields
of text table.
database.
7
3
Concept of Initial Values Checkbox in Tables(Contd.)
▪ Many databases, by default initialize the value of a field as NOT NULL even if the initial
7
4
Database Utility
Database Utility
▪ The database Utility acts as a interface
7
5
Important Transaction Codes
7
6
Thank You
7
7