0% found this document useful (0 votes)
54 views64 pages

ABAP Data Dictionary

The document provides an overview of the ABAP Dictionary, detailing its role as a central repository for data definitions in SAP, including components like Domains, Data Elements, Structures, and Table Types. It outlines the creation processes for various objects such as Domains, Data Elements, Structures, and Database Tables, along with their properties and functionalities. Additionally, it covers Aggregate Objects, Views, and Maintenance Views, emphasizing their importance in managing and accessing data within SAP applications.

Uploaded by

Nancy Gaber
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)
54 views64 pages

ABAP Data Dictionary

The document provides an overview of the ABAP Dictionary, detailing its role as a central repository for data definitions in SAP, including components like Domains, Data Elements, Structures, and Table Types. It outlines the creation processes for various objects such as Domains, Data Elements, Structures, and Database Tables, along with their properties and functionalities. Additionally, it covers Aggregate Objects, Views, and Maintenance Views, emphasizing their importance in managing and accessing data within SAP applications.

Uploaded by

Nancy Gaber
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/ 64

Data Dictionary

1
Overvi
ew
ABAP Dictionary is a tool and central repository to create and maintain data definitions in SAP.

Search Help Aggregate Objects


▪ Views generally for combing data from multiple table/views.
▪ Search Help for F4 functionality of screen fields
View Lock Object
▪ Lock object for synchronizing access to data in the database

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. Click on Syntax Check Button


13. Click on Activate Button

12 13

7 7
Data
Element
Data Elements for defining Technical Properties and Semantic Properties

❑ Technical Properties includes Domain or Predefined Types

❑ Semantic Properties includes


❑ Field Label: it will help us to enter Label for the field in various lengths
❑ Further Characteristics: Help us to assign search help and Parameter IDs

❑ 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

12. Click on Save


Button
13. Enter Package
10 14. Enter Transport
15. Syntax Check
11 16. Activate

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

4. Select Structure Radio 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

5 8. Click on Save Button


9. Enter Package
10. Enter Transport
6 7 11. Check Syntax
12. Click on Activate
Button

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

Field are columns in the table. Each


field having following properties
▪ Field Name
▪ Key Specification
▪ Data Type & Length
▪ Foreign Key relationship
▪ Search Help assignment

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’

Currency: If table has field having data type


‘CURR’ then specify reference table and
reference field which is having data type
‘CUKY’

A field is assigned to the reference field at


program runtime. If a field is filled with
currency amounts/Quantity, the
corresponding currency/Unit of Measure is
determined from the assigned reference field.

21 21
Database Table: Foreign Key
Relationship

Establishing relationship between two tables to


validate entries in one table against other table.

The pair of fields for the two tables must have


the same data type and length.

A foreign key allows you to assign data records


in the foreign key table and check table.

By using the entries in the foreign key fields,


one record of the foreign key table uniquely
identifies one record of the check table.

22 22
Database Table: Foreign Key
Relationship

23 23
Create Database
Table
1. Select Database Table Radio Button 4. Enter Description

2. Enter Database Table Name 5. Select Delivery and Maintenance Tab

3. Click on Create Button 6. Select Delivery Class as ‘A’


7. Select Data Browser/Table View Maintenance
View as ‘Allowed’

1 2
4
5

24 24
Create Database
Table

8. Select Fields Tab


8
9. Enter Field Name in Field

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

It is generated program with one or two


screens to allow the user to
Insert/Modify/Delete records directly onto
the database table/Maintenance View.

▪ Transaction to Maintain Entries: SM30

▪ Create TMG for configuration tables


which are having less number of fields
and less number of entries

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

3 6. Click on Save Button


7. Go to SE16N/SE16 Transaction and check the
Entries

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

It will display all the related table.

8.1 Select Required Tables by selecting the Check


Box
8.2 Click on Copy button

8.2

39 39
Create a
Database View

10. Click on View Fields Tab


11. Click on Table Fields and Select the Table
12. It will open the Popup
10
13. Select the Fields from the Table
11

Fields will be added to View Field Section. Repeat


steps from 11th To 13th for all the Tables

14. Click on Save Button


15. Enter Package Name
16. Enter Transport
17. Syntax Check
18. Activate

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

▪ Create a View of type Maintenance View


▪ Create TMG for Maintenance View

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

4. Select Maintenance View Radio Button and


Enter

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

7 8 9. Enter Field Name in the Search Help


Parameters Column
10. Select IMP Check box for Required Fields
11. Select EXP Check box For Required Fields
12. Specify List Position No in the LPos Column
9 10 11 12 13 14 15
13. Specify Selection Position in the SPos
Column
14. Specify Data Element
15. Repeat the steps from 9th to 14th For
required Field
16. Save, Syntax Check and Activate

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.

2. Pop up Will be displayed. Click in


Enter

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

8. Select Lock Parameters Tab


9. Enter Field Names in the Lock Parameters Column
10. Save
11. Syntax Check
8 12. Activate

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.

Changes for the Key fields include


▪ Making non key fields as key fields
▪ Making key fields as non key fields
▪ Changing data type of the key fields

61 61
Call Database Utility

1. Enter Table Name in the Object 4. Choose Processing Type as Direct


Name
2. Select Tables Radio Button
3. Click on Edit Button

62 62
Call Database Utility
Create database Table: This button enabled only
when table does not exists in the database

Delete database table: if you want to Delete a


table at database then we go for this option. But
table still exits in the Data Dictionary

Activate and Adjust database: when table not


activated properly from SE11 then we will choose
this option to activate at database level

Save Data: when you made any changes to the


table and if table contains entries then you have to
go for this option to retain data in the table

Delete Data: when you don’t want any entry from


the table then you can choose while adjusting table
63 63
Thank You!

64

You might also like