ABAP Data Dictionary
ABAP Data Dictionary
1
Overvi
ew
ABAP Dictionary is a tool and central repository to create and maintain data definitions in SAP.
Table Table
Table Types
Technical Objects
▪ Domains used only in Data Elements
▪ Data Elements used in Structures and Tables and also used
Structure
in ABAP Programs
▪ Structures used in Table also used in ABAP Programs
Data
▪ Table Types used in ABAP Programs
Element
▪ Predefined Types given by SAP and can be used in Domains |
Data Elements | Structures and Tables
Domain
Predefined Type
2
❑ Technical Object
❑ Domain
❑ Data Elements
❑ Structures
❑ Table Types
3
Doma
in
Domain describes the
▪ Technical properties s like data type and length, Decimal Places
▪ Semantic Properties like Output Length, Possible values
4 4
Create
Domain
1. Select Domain Radio Button 4. Enter Description
2. Enter Domain Name 5. Click on Definition Tab
3. Click On Create Button 6. Enter Data Type and Length
4
5
1 2
5 5
Create
Domain 9. Click on Save Button
7. Select Value Range Tab
8. Enter Values in the Single Values 9
Section
7
10. Enter Package Name
8
10
6 6
Create
Domain
11. Enter Transport and Click on Enter
11
12 13
7 7
Data
Element
Data Elements for defining Technical Properties and Semantic Properties
❑ We can Data Elements in Structure Creation, Table Creation, User Defined Types declaration and
Variable Declaration
8 8
Create Data
Element
1. Select Data Type Radio Button
2. Enter Data Element
4. Select Data Element Radio 5. Enter Description
3. Click On Create Button
Button 6. Select Data Type Tab
7. Select Elementary Type Radio Button
4 8. Select Domain Radio Button
9. Enter Domain Name
5
1 2
6
7
9
8
9 9
Create Data
Element
10. Select Field Label Tab
11. Enter Short | Medium | Long | Heading
Text
10 10
Struct
ure
Structure is Dictionary object to group the fields
Its reusable component and
▪ Can be used to define Table Types
▪ Can be used in Tables
▪ Can be used in ABAP Programs to declare Work areas and Internal Tables
▪ Can be used to specify type in the Interface parameters of Forms, Function Modules, Methods
11 11
Create
Structure
1. Select Data Type Radio Button
2. Enter Structure Name
3. Click On Create Button
1 2
12 12
Create
Structure
5. Select Components Tab
6. Enter Field Name in the Component
Column
7. Enter Data Element in the Component
Type
13 13
Table
Type
Table Type is Dictionary object and reusable component
▪ Can be used in ABAP Programs to declare Internal Tables
▪ Can be used to specify type in the Interface parameters of Forms, Function Modules, Methods
14 14
❑ Tables
❑ Overview
❑ Types of Tables
❑ Delivery and
Maintenance
❑ Field Settings
❑ Technical Settings
❑ Currency and
Quantity Fields
❑ Foreign Key
15
Database
Table
Database Table is dictionary as well as
Database object. Structure or definition of
database table is created and with this
structure of physical database table is created
in the underlying database system.
Table Properties:
▪ Delivery and Maintenance
▪ Fields and its Properties
▪ Key
▪ Currency and Quantity
▪ Help
▪ Technical Settings
▪ Indexes
▪ Append Structures
16 16
Database Table: Delivery and
Maintenance
Delivery
▪ A – Application Data: It can be Master Data or Transaction Data
▪ C – Customizing Data: Configuration Data
Browser and Maintenance Type
To enable of disable maintenance of the entries in the table using SM30
▪ Allowed: Display and Maintenance Allowed
▪ Allowed with Restriction:
▪ Not Allowed: Not allowed to display as well from SE16
17 17
Database Table: Fields and
Properties
18 18
Database Table:
Index
Querying the records of the database table using Index fields would be faster than querying using non Index Fields.
Types of Indexes
▪ Primary Index
▪ Secondary Index
Primary Index: When a field is set at Primary Key | Primary Index then data in the field would be unique and always
stored in Sorted Order.
Secondary Index: When secondary indexes created for the non index fields, separate table will be created with
specified fields and data will be stored in sorted Order.
When Querying data using Index Fields, Binary search will be performed to access the data.
When Querying data on non Index fields, Linear search will be performed to retrieve the data.
19 19
Database Table:
Buffering
Technical Setting:
Buffering
SELECT…
Application
It speeds of the data access by temporarily stores
Server
the more frequently accessed data in the buffer. i.e.
Database Buffer
In the memory of application server. Interface
Database
Buffering Types
▪ Single Buffering: It will buffer only one record
▪ Generic Buffering: It will buffer multiple records
based on key fields
▪ Full Buffering: it will buffer all the accessed records
20 20
Database Table:
Overview
Quantity: If table has field having data type
‘QUAN’ then specify reference table and
reference field which is having data type ‘UNIT’
21 21
Database Table: Foreign Key
Relationship
22 22
Database Table: Foreign Key
Relationship
23 23
Create Database
Table
1. Select Database Table Radio Button 4. Enter Description
1 2
4
5
24 24
Create Database
Table
9 10 Column
10. Select Key Check Box if it has
11 12 to be Key Field
11. Select Initial Check Box if
needed
12. Specify Data Element in the
Data Element Column
13. Repeat Steps from 9th to 12th
for all the Fields
25 25
Create Database
Table
14. Select Technical Setting 15. Enter Data Class as ‘APPL1’
Button
16. Specify Size Category as 3
17. Select Buffering Type as ‘Buffering Not
14
Allowed’
15
18. Save
16
19. Enter Package
20. Enter Transport
17
21. Syntax Check
22. Activate
26 26
❑ Aggregate Objects
❑ TMG
❑ Views
❑ Lock Objects
❑ Search Helps
27
TMG
Overview
28 28
Create
TMG
1. Open Table in Change Mode 3. Enter Authorization Group as ‘&NC&’
2. Go to Menu Option Utilities 🡪 Table 4. Enter Function Group Name as ‘ZT001W_09’
Maintenance generator 5. Enter Package
6. Enter Maintenance Type as One Step
7. Enter Screen Number as 1
8. Select No or User Recording Routine Radio
Button
9. Click on Create Button
29 29
Maintain Records in TMG
via SM30
1. Enter Table Name in the Table/View Input 4. Click on New Entries Button
Field 5. Enter Record
2. Select No Restriction Radio Button
3. Click on Maintain Button 4
30 30
❑ Views
❑ Projection Views
❑ Database Views
❑ Maintenance
Views
31
Vie
ws ▪ By defining a view, you can define an application-dependent view that combines the data which
can be distributed among multiple tables
▪ The structure of such a view is defined by specifying the tables and fields used in the view.
▪ Fields that are not required can be hidden, thereby minimizing interfaces
Types of Views
▪ Projection View
▪ Database View
▪ Maintenance View
32 32
Project
View
Projection views to hide fields of a table. This can minimize interfaces. A projection view contains exactly one
table. You cannot define selection conditions for projection views.
Image: https://help.sap.com/doc/saphelp_nw70/7.0.31/en-US/cf/21ecc5446011d189700000e8322d00/content.htm?no_cache=true
33 33
Create Projection
View 5. Select View Fields Tab
1. Select View Radio Button 4. Select View Type as Projection 6. Enter Table Name in the Base
2. Enter View Name View Table
3. Click on Create Button 7. Click on Table Fields Button and
Select the Fields
3
1 2 5
7
2
8. Click on Save
9. Enter Package 7
10. Enter Transport
11. Syntax Check
1 12. Activate
34 34
Database
View
▪ Data about an application object is often distributed on several database tables. A database view provides an
application-specific view on such distributed data.
▪ Database views are defined in the ABAP Dictionary. A database view is automatically created in the underlying
database when it is activated
Image: https://help.sap.com/doc/saphelp_nw70/7.0.31/en-US/cf/21ecab446011d189700000e8322d00/content.htm?no_cache=true
35 35
Create a
Database View
Example:
Let us assume application data distributed among tables ZEKKO_09 and ZEKO_09 and both are linked via
Foreign key relationship
36 36
Create a
Database View
1. Select View Radio Button 4. Select Database View Radio Button
2. Enter View Name And Click on Enter
3. Click on Create Button
1 2
37 37
Create a
Database View
5
7 9
5. Enter Description
6. Select Table/Join Condition Tab
7. Enter list of tables to be included in
the Database View
8. Optionally we can click on
Relationship Button to Open list of
Related Tables
9. Enter Join Condition
38 38
Create a
Database View
8.1
When Clicking on the Relationships Button then
Pop up Screen will be displayed
8.2
39 39
Create a
Database View
40 40
Maintenance
View
A maintenance view permits you to maintain the data of an application object together. Maintenance view is
combination of View and Maintenance Generator. It involves Two steps
Image: https://help.sap.com/doc/saphelp_nw70/7.0.31/en-US/cf/21ecab446011d189700000e8322d00/content.htm?no_cache=true
41 41
Create a
Maintenance View
1. Select View Radio Button
2. Enter Maintenance View Name
3. Click on Create Button
1 2
4
42 42
Create a
Maintenance View
5. Enter Description
6. Select Table/Join Conditions Tab
5 7. Enter Tables to added in the View
8. Specify Join Condition among the
6
Tables
Note:
7 8
When adding the Tables in the step 7,
Enter Foreign key table first and then
enter check table by selecting Relation
ship button in bottom. Join Condition
automatically proposed
43 43
Create a
Maintenance View
9. Select View Fields Tab 11. Select Maintenance Status Tab
10. Select the Fields from the Table by 12. Select Appropriate Access. In our case select Read,
clicking on the Table Fields button and Change, Delete and Insert Radio Button
Select the Fields 13. Select Delivery Class as ‘C’
14. Data Browser/ Table View Maintenance
Display/Maintenance Allowed
11
9 12
10
13
14
44 44
Create a
Maintenance View 16. Enter Authorization Group
Generate TMG for Maintenance View. Open Maintenance 17. Enter Function Group
view in Change mode 18. Enter Package
15. Go to Menu Option Utilities 🡪 Table Maintenance 19. Specify Maintenance Type Two Step
Generator 20. Maintain Screen Numbers
21. Select No, or User Recording Routine
15
16
17
18
19
20
21
45 45
❑ Search Help
❑ Elementary Search
Help
❑ Collective Search
Help
46
Search
Help
Search help allows the user to see all the possible values for the field in the screen by clicking the F4 Function key.
Search can be created in the ABAP Dictionary can be attached to Data Element or table Field. If screen field referring
to the either Data Element or Table field then Search Help functionality can be attached to the field
Image: https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/cf/21ee2b446011d189700000e8322d00/content.htm?no_cache=t
rue
47 47
Search
Help
There are two types of search helps
▪ Elementary search helps
▪ Collective search helps: Collective search helps combine several elementary search helps. A collective
search help can offer several alternative search paths.
Search help is the database object to provide value help functionality. It involves following steps
❑ Create search help
❑ Assign Search Help
▪ We can assign at Data Element Level
▪ We can assign at Table Field Level
48 48
Search Help: Example
Example: Step#2: Select appropriate Tab and hit Step#3: Find the customer and
Step#1: Open Transaction Code VA05 enter. It will display all the customer Double click on it. Selected Customer
and Click on F4 function key on Sold-To- based on Criteria will be populated on Input Field
Party Input Field. Popup will be displayed
49 49
Search Help: Example
1. Select Search Help Radio
Button
2. Enter Search Help Name 4. Select Elementary Search Help Radio
Button
3. Click on Create Button
1 2
50 50
Search Help: Example
5. Enter Description
6. Select Definition Tab
7. Enter Table Name T005S in the Selection
5 Method Field
8 Select Dialog Type Display Values
6
Immediately
51 51
Search Help: Test
Search Help
Test the Search Help.
1. Click on Execute Button 3. Data from Table will be displayed as
Popup.
Note: When any row selected then Corresponding value will be populated on
screen field
52 52
Search Help: Assigning Search Help to
Data Element
Step#1: Open Data Element ‘ZLAND1_09’ Step#2: Select ‘Further Characteristics’ tab and Enter
in Change Mode. Search Help Name ‘ZLAND1’ and Parameter Name ‘LAND1’
Enter Data Element Name and Click on the
Change Button Step#3: Save and Activate
53 53
Collective Search Help: Example
Collective Search help consist of Several elementary or other collective Search helps. Following the screen shot for
Collective Search help of Material. It will pick the Value help from several other search helps
54 54
❑ Lock Object
❑ Types of Locks
❑ Enqueue FM
❑ Dequeue FM
55
Lock Object
Synchronizes several users' simultaneous access to the same data records with a lock mechanism
Types of Locks
▪ Shared Lock: User request for display - S
▪ Exclusive Lock: User request for modify - E
▪ Exclusive But not cumulative: allow the user to run single instance of transaction - X
▪ Optimistic Lock: It is behaves as shared lock initially later it will be converted as Exclusive Lock - O
When you activate a lock object in the ABAP Dictionary, the system automatically creates function modules for
▪ Setting (ENQUEUE_<lock object name>) and
▪ Releasing (DEQUEUE_<lock object name>) locks
56 56
Create Lock Object
1. Select Lock Object Radio Button 4. Enter Description
2. Enter the Lock Object Name 5. Select Tables Tab
3. Click on Create Button 6. Enter the table Name
7. Select Lock Mode
1
2
57 57
Create Lock Object
9
System will Generate Two Function Modules
Note:
System automatically propose all the key fields of the table as Lock parameters. We can add additional fields as lock
Parameters or can remove existing proposed fields
58 58
❑ Others
❑ Text Tables
❑ Database Utility
59
Text Table
Text Table:
Text table is a table to maintain language specific text to the entries of check table
Example:
MARA – Material Master Data
MAKT – Language specific text for Each Material
Rule:
Key fields of the Text table are
❑ All Key fields of Check table and
❑ Language field SPRAS
60 60
Database Utility
Database Utility is used to carry the changes in the table from Data Dictionary to Underlying Database.
When you make any changes to key fields in the table then it is necessary to run the database utility to adjust the
tables in the underlying database tables.
61 61
Call Database Utility
62 62
Call Database Utility
Create database Table: This button enabled only
when table does not exists in the database
64