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

2 - ABAP Dictionary

Gj. Nbj nbb jj. H. N. J. B. B h. Hv h hvb. H v bv bbb fgj. Dharman hack don't be kani sikder is ani DKK Jack if jazz Shen off so let usha wish ISS usen iam icebox vyakhya janta janta Shah Jan it's and she Kenya study Jack ku enti hai it wish hai it Sunday what Jesus Jesus R jj ha Ela krte janta Iranian Krishna kalakari jealous samaj ha ghee DKK jee tisi uttam it Jesus Uranus Ishita idk if ishan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

2 - ABAP Dictionary

Gj. Nbj nbb jj. H. N. J. B. B h. Hv h hvb. H v bv bbb fgj. Dharman hack don't be kani sikder is ani DKK Jack if jazz Shen off so let usha wish ISS usen iam icebox vyakhya janta janta Shah Jan it's and she Kenya study Jack ku enti hai it wish hai it Sunday what Jesus Jesus R jj ha Ela krte janta Iranian Krishna kalakari jealous samaj ha ghee DKK jee tisi uttam it Jesus Uranus Ishita idk if ishan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 77

ABAP Dictionary

1
Introduction to ABAP Dictionary

▪ ABAP Dictionary is also called as Data Dictionary or DDIC.

▪ The transaction code for data dictionary is SE11.

2
ABAP Dictionary Objects
Data Dictionary Objects : SE11
▪ Database table

▪ View

▪ Data type - Data Element , Structure, Table type

▪ Type Group

▪ Domain

▪ Search Help

▪ Lock Object
3
Domain

Domain Link to Field via Data Element


▪ Domain describes the technical attributes

of a field/column.

▪ Technical attributes means data type and length.

▪ Domains are linked to fields via data elements.

4
Data Element

▪ Data element describes the appearance of a field/column to end user.

▪ It is used to provide a meaningful description to a field.

5
Table

▪ Table is a collection of rows and columns.

▪ Tables are containers which stores data in the form of record.

▪ 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.

▪ Tables without MANDT field are called as client independent tables.

▪ MANDT represents the client number of SAP system.

7
Table Maintenance Generator

Table Maintenance Generator


▪ It is also abbreviated as TMG.

▪ TMG is used to maintain(insert, update ,delete)

data into tables.

▪ We can generate the TMG through

SE11 transaction code.

8
Table Maintenance Generator Environment
TMG Environment
▪ The various objects of TMG

environment are as follows:

 Authorization Group

 Function Group

 Maintenance type

 Maintenance Screen No.

9
Table Maintenance Generator Environment(Contd.)

▪ Authorization Group : It is used to specify the users who are authorized to maintain

table or view contents. If a table is maintained by a group of people, an authorization

group is assigned else fill the option ‘&NC&’.

▪ 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

number is assigned to both overview screen and single screen.

1
1
Important Points for Table Maintenance Generator

▪ To generate the TMG , data browser/table view maintenance options needs to be -

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.

We need to delete the TMG and generate it again.

1
2
Important Points for Table Maintenance Generator(Contd.)

▪ Deleting the TMG never delete the table data.

▪ To delete the TMG, open the table in change mode, otherwise delete button does not

appear.

1
3
Types of Data in SAP

▪ SAP consists of 3 types of data.

1. Master data

2. Transaction data

3. Configuration data

1
4
Types of Data in SAP

1. Master data - accessed very frequently, but changed very rarely.

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

business scenario and customer requirements.

1
5
Types of Data in SAP - Example

▪ Suppose there is a company ABC. The example of various types of data in the company

ABC are as follows:

1. Master data - Employee data of the company ABC is the example of master data.

2. Transaction data - Various transactions in the company like banking transactions,

revenue transactions are the examples of transaction data.

1
6
Types of Data in SAP - Example(Contd.)

3. Configuration data - In company ABC, if the employee designation is senior consultant

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

Technical Settings - Data Class


• Data Class is the part of technical settings

of a table.

• Data Class determines in which

portion of the database the

table data is stored.

1
8
Data Class(Contd.)

Various Data Class


• The widely used data class are

as follows:

 APPL0 - Master data

 APPL1 - Transaction data

 APPL2 - Configuration data

1
9
Size Category

Technical Settings - Size Category


• Size category is also the part of

technical Settings of a table.

• The Size category describes the

space requirement of the table

in the database.

2
0
Delivery Class

• It is the part of delivery and maintenance tab of the table.

• It is used for controlling data transport of tables during installation, upgrade and

transporting between customer systems.

2
1
Delivery Class(Contd.)

Delivery Class
• The widely used delivery class are as

follows:

 A - Application table

 C - Customizing table

 L - Table for storing temporary data

2
2
Data Browser/Table View Maintenance

• It is the part of delivery and maintenance tab of the table.

• Data browser/table view maintenance specifies whether it is possible to

display/maintain a table.

2
3
Data Browser/Table View Maintenance Options
Data Browser/ Table View Maint. Options

• The various data browser/table view

maintenance options are as follows

 Display/Maintenance allowed

 Display/Maintenance not allowed

 Display/Maintenance allowed with restrictions

2
4
Data Browser/Table View Maintenance Options (Contd.)

Summary of Data Browser/ Table View Maintenance Options

2
5
Primary-Foreign Key Relationship
Foreign Keys button in SE11
▪ Primary-Foreign key relationship

is also called as parent-child relationship.

▪ Primary key of one table acts as a

foreign key into another table.

▪ For primary-foreign key relationship tables

must have a common field/column.

2
6
Primary-Foreign Key Relationship(Contd.)
Assigning Primary-Foreign Key Relationship
▪ The purpose of primary-foreign key

relationship is to achieve the

data consistency.

▪ While maintaining the primary-foreign

key relationship, we need to pass

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

particular entry is called as cardinality.

2
8
Types of Database Tables

Types of Database Tables


• There are 3 types of database tables.

1. Transparent table

2. Pooled table

3. Cluster table

2
9
Transparent Table

• In case of transparent table, there is 1:1

relationship between the ABAP dictionary

and the database

3
0
Pooled Table

Pooled Table
• In case of pooled table, there is N:1(many

to one) relationship between the ABAP

dictionary and the database.

• For pooled tables, primary-foreign key

relationship is not required.

• Table pool structure - Tabname Varkey Dataln Vardata

3
1
Cluster Table

Cluster Table
• In case of cluster table, there is N:1(many

to one) relationship between the ABAP

dictionary and the database.

• For cluster tables, primary-foreign key

relationship is mandatory.

• Table cluster structure - Key Pageno Vardata

3
2
Structures

▪ Structure is collection of fields of same data type or different data type.

▪ There are 2 types of structures in SAP

1. Include

2. Append

3
3
Include Structure

▪ It is a reusable structure.

▪ We can insert the include structure at any point.

▪ It is applicable to customer specific tables(name starting with Z,Y). It is not applicable to

SAP specific tables.

3
4
Append Structure

▪ It is not a reusable structure.

▪ It always inserts at the last.

▪ It is applicable to both customer specific tables (name starting with Z,Y) and SAP tables.

3
5
Views

▪ A view is a virtual table.

▪ A view is a logical database.

▪ A view combines the data

distributed in several tables.

▪ The difference between table and view is -

table has data whereas view does not have any data.

3
6
Types of Views

▪ There are 4 types of views:

1. Database view

2. Projection view

3. Maintenance view

4. Help view

3
7
Database View

▪ Database view is a collection of one or more database tables.

▪ Database view always implements an inner join.

▪ Pre-requisite : Tables must have a relationship between them.

3
8
Projection View

▪ Projection view is applicable for single table.

▪ We take only those fields which are required. It means the data that is actually required

is exchanged when the database is accessed.

▪ Projection view is equal to database view, if the database view also contains single table.

3
9
Maintenance View

▪ Maintenance view is used to maintain the multiple tables collectively.

▪ Data is entered by the view and then distributed to the tables.

▪ We need to generate the TMG( table maintenance generator) of the maintenance view.

▪ We can maintain the data through transaction code SM30.

4
0
Maintenance View(Contd.)

▪ The various pre-requisites of maintenance view are as follows:

 Tables must have a relationship between them.

 Take MANDT field in the view.

 Not more than one record should flow to dependent/secondary table.

4
1
Help View

▪ Help view is used in search helps.

▪ In help view contents tab is disabled , but when we use help view in search help, then it

display the contents.

▪ The various pre-requisites of help view are as follows:

 Tables must have a relationship between them.

 Not more than one record should flow to dependent/secondary table.

4
2
Indexes

▪ An index can be considered a copy of a database table that has been reduced to certain

fields. This copy is always in sorted form.

▪ Sorting provides faster access to the data records of the table.

▪ Index is created to speed up the selection process from database table which helps to

achieve good performance.

▪ Index name is 3 characters long.

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.

▪ Disadvantage - Index occupy memory/space on the database.

4
4
Types of Indexes

▪ There are 2 types of Indexes:

1. Primary Index - By default, primary key acts as primary index. This index is created

automatically on the database.

2. Secondary Index - Secondary indexes are created by user on a table in the ABAP

dictionary.

4
5
Various options in Non-unique Index

Various options in Non-unique Index


▪ There are 3 options available in

non-unique index:

1. Index on all database systems

2. For selected database systems

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.

2. For selected database systems - Index is created on selected database systems.

3. No database index - Index is removed from the database, but It’s definition still exists.

4
7
Search Help

▪ Search help is also called as value help or F4 help.

▪ It provides the various possible values for any input field/column.

4
8
Types of Search Help

▪ There are 2 types of search help:

1. Elementary search help - It is a single search help.

2. Collective search help - It is a combination of elementary search helps.

4
9
Various options in Search Help
Various options in Search Help
▪ The various options while creating the

search help are as follows:

 Selection method

 Dialog type

 Search help parameter

 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.

▪ Dialog type - It is of 3 types.

1. Display values immediately - The hit list appears immediately.

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

dialog with value restriction.

▪ Search help parameter - Parameters which we want to include in the search help. They

will be used to send and receive values.

▪ 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.)

▪ SPos - Screen position. It is the position of parameters on the dialog box.

▪ LPos - List position. It is the position of parameters on the hit list.

▪ SDI’s - Its purpose is to make search help parameters as display(read) only.

▪ Modified - The purpose of modified is to change the data element.

▪ Default value - To provide the default value to search help parameter. To provide the

default value importing needs to be unticked.

5
4
Table Buffering

▪ Buffer is a temporary storage on the application layer.

▪ 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.

▪ Accessing records directly from a database table can be very time-consuming.

▪ To overcome this drawback, the frequently accessed records of a table can be placed in

a buffer from which they can be accessed easily.

5
5
Buffering Options

▪ Table buffering is the part of technical settings of the table.

▪ The various buffering options are as follows:

 Buffering not allowed - Table buffering is not performed for the table.

 Buffering switched on - Table buffering is performed for the table.

 Buffering allowed, but switched off - Buffer is allowed but it is switched off and can be

switched on anytime according to the requirement of customer.

5
6
Types of Table Buffering

▪ There are 3 types of table buffering:

1. Single record buffering

2. Full buffering

3. Generic area 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

accessed by specifying the complete key.

▪ Advantage - This type of buffering requires less memory on application layer.

▪ Disadvantage - There is no significant reduction in number of database access.

5
8
Full Record Buffering

▪ In case of full buffering full table records load in the buffer.

▪ 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.

▪ Advantage - There is significantly reduction in number of database access.

▪ Disadvantage - This type of buffering requires more memory on application layer.

5
9
Generic Area Buffering

▪ In case of generic area buffering the records matches the generic key are loaded in the

buffer.

▪ When to use : For generic areas like - language dependent tables.

▪ 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

allowed but switched off rather than buffering not allowed.

▪ 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

▪ Transaction code to check the table buffer : AL12

(Monitor-Buffers-Table Buffer)

▪ The transaction code to reset the table buffer : /$TAB

6
2
Lock Objects

▪ The purpose of lock objects is to achieve synchronization.

▪ If multiple users want to change the same data at the same time ,then at a time only

one user can change the data.

▪ Lock objects name starts with a prefix ‘E’.

▪ When we want to create customized lock objects, the name must start with EZ or EY.

▪ The transaction code to see the lock entries is SM12.

6
3
Lock Modes

▪ There are 3 lock modes:

1. Read lock.

2. Write lock.

3. Enhanced write lock.

6
4
Read Lock

▪ Read lock is also called as shared lock.

▪ The default value of read lock is ‘S’.

▪ In case of read lock, other users can display the data, but they can not change the data.

6
5
Write Lock

▪ Write lock is also called as exclusive lock.

▪ The default value of write lock is ‘E’.

▪ 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

▪ Enhanced Write lock is also called as exclusive lock without cumulation.

▪ The default value of write lock is ‘X’.

▪ In case of enhanced write lock - other users can not display and change the data.

Additionally, it protects the further access of the same transaction.

▪ Enhanced Write lock can be requested only once from the same transaction and can not

be processed successively.

6
7
Lock Modes Summary

▪ The summary of various lock modes are as follows :

6
8
Lock Object Function Modules

▪ Whenever we activate a lock object, SAP generates 2 function modules. One with

ENQUEUE_lock object name and another with DEQUEUE_lock object name.

▪ Example - Suppose lock object name is EZ_VBELN , then the 2 generated function

modules are - ENQUEUE_EZ_VBELN , DEQUEUE_EZ_VBELN.

▪ Enqueue function module is used for locking and dequeue function module is used for

unlocking.

6
9
Table Maintenance Generator(TMG) Events

▪ Event is always triggered by a specific action or a specific occurrence(when a particular

time has been reached).

▪ The example of specific actions are mouse click, pressing a key etc. The example of

specific occurrence is running out of memory etc.

▪ The same concept of events is applicable to TMG events. Some events trigger by specific

user action and some events trigger at specific occurrence.

7
0
Table Maintenance Generator(TMG) Events

▪ Depends upon the requirement, we can add our own custom code using these TMG

events.

▪ We can navigate to TMG events through SE11 or SE54 transaction code.

(Utilities-Table Maintenance Generator-Environment-Modification-Events)

7
1
Concept of Text Tables

▪ We create text tables, when we want to store explanatory text in multiple languages.

▪ It is not advisable to store the texts in primary key table.

▪ 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.

▪ In text table, we can check the text in all the languages.


7
2
Concept of Initial Values Checkbox in Tables
Initial Values Checkbox in Tables
▪ We can select the checkbox Initial values

for table fields, then the type dependent

NOT NULL value be assigned to that field

and the flag for NOT NULL is set to true on

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

value checkbox is not ticked.

▪ The Path to check the Initial values of a field is : Utilities-Database object-Display.

7
4
Database Utility
Database Utility
▪ The database Utility acts as a interface

between the ABAP dictionary and the database.

▪ The database utility allows you to edit database objects.

▪ The transaction code for database utility is SE14.

▪ Precaution : Do not perform any database operation

on the table while performing the database utility.

7
5
Important Transaction Codes

▪ SE11 - Transaction code for Data Dictionary

▪ SE16 - Transaction code for Data Browser

▪ SE16N - Transaction code for New Data Browser

▪ SE14 - Transaction code for Database Utility

▪ SM12 - Transaction code for Lock Entries

7
6
Thank You

7
7

You might also like