You are on page 1of 37

SAP ABAP Consultant sanaimaan336@gmail.

com

WHAT IS SAP ABAP


DATA DICTIONARY
(SE11)

1
SAP ABAP Consultant sanaimaan336@gmail.com

Transaction code SE11


SAP Menu Path Tools > ABAP Workbench > Development > SE11 – ABAP Dictionary

2
SAP ABAP Consultant sanaimaan336@gmail.com

ABAP data dictionary is a tool provided by sap for centrally create, view and
maintain data definitions, related to database. We can use data dictionary to create objects
like table and view and it is also use to create and maintain global user define types like data
elements, domain, structure, table type etc. which can be used by abap program.

3
SAP ABAP Consultant sanaimaan336@gmail.com

WHAT ARE THE DIFFERENT COMPONENTS OF


ABAPDATA DICTIONARY?

4
SAP ABAP Consultant sanaimaan336@gmail.com

1. Database Tables : – Database tables are the collection of fields which contain physical data
It is an object that stores data in the form 0f rows and columns.

The different types of tables are


1. Transparent tables
2. Pooled tables
3. Cluster tables

5
SAP ABAP Consultant sanaimaan336@gmail.com

Transparent Table : When we create and activate the transparent table with abap dictionary
i.e with SE11, in the underlying database a table is created with same name and data
definition, it has one to one relation with table in database.

Pool Table : Pool tables are used to hold the large number of small tables ( customizing or
system data tables).

Cluster Table : They are used to hold the few number of large table.

6
SAP ABAP Consultant sanaimaan336@gmail.com

Transparent Table :

Pool Table :

Cluster Table :

7
SAP ABAP Consultant sanaimaan336@gmail.com

Understanding sap standard table MARA, MAKT – Table design done considering
normalization to avoid data redundancy i.e replication of same piece of data in multiple
places

8
SAP ABAP Consultant sanaimaan336@gmail.com

Understanding sap standard table MARA, MAKT

9
SAP ABAP Consultant sanaimaan336@gmail.com

Table Components

• All fields in a single table must be unique


• Same data element can be assigned to different fields of a single table
• One single domain can also be assigned to different domain

Field -> Data element -> Domain (data type is assign at domain level)
Field -> Data element (data type is assign at data element level)
10
Field -> data type is assign at field level with pre define data type
SAP ABAP Consultant sanaimaan336@gmail.com

Key field define the unique combination of a record , which get stored in a data base
table. A maximum of 16 key field we can define in an table, Key fields must be maintain
together at the beginning of a table.

11
SAP ABAP Consultant sanaimaan336@gmail.com

Lets create a table – Top down/Bottom up approach - ZEMPLOYEE_MASTER


All custom table – should start either with ‘Z’ or ‘Y’.

Sr. No. Field Name Data Type Length Description


1 MANDT C 3 Client
2 EMPLOYEE_ID C 10 Employee ID
3 Title C 8 Title
4 First_Name C 30 First Name
5 Last_Name C 30 Last Name
6 DOJ D Date of joining
(CDATE_INV)
7 DEPARTMENT C 30 Department
8 CTC CURR CTC 12
9 CURRENCY CUKY 5 Currency Key
SAP ABAP Consultant sanaimaan336@gmail.com

Lets create a table - ZEMPLOYEE_COM – Communication details

Sr. No. Field Name Data Type Length Description


1 MANDT C 3 Client
2 EMPLOYEE_ID C 10 Employee ID

3 MOBILE1 NUMC 10 Mobile No.


4 MOBILE2 NUMC 10 Mobile No.
5 ADDRESS C 100 Address
6 CITY C 35 City (ORT01_GP_

7 PIN C 10 Postal code


8 STATE C 35 state 13
9 COUNTRY C 30 Country
SAP ABAP Consultant sanaimaan336@gmail.com

14
SAP ABAP Consultant sanaimaan336@gmail.com

A data type defines the technical characteristics (properties) of a variable or we can say
of a field of a table. Any programing language will not be able differentiate the data until the
type is define at operating system level .
Every language has its own predefine data type to categories and process the data.

Examples
• Name ‘ MS Dhoni’ here a name contain the characters between a to z , so for name we
use the data type as ‘C’ i.e. character.
• Monthly earning of employee is 100000 ( 1 lakh ) – here for amount field in abap we use
type CURR which is equivalent to DEC
• For defining a date we use data type ‘D’ or ‘DATS’

15
SAP ABAP Consultant sanaimaan336@gmail.com

ABAP data types are classified in 3 types :


• Elementary data types
• Complex data types
• Reference data types

▪ Elementary types are further divided into 2 types


➢ Fixed length
➢ Variable length

16
SAP ABAP Consultant sanaimaan336@gmail.com

➢ Fixed length

Keyword Data Type

C Text field It is a text field for alphanumeric characters

Numerical text field for only numeric


N Numeric characters
D Date Date field allows in format YYYYMMDD
T Time Time field allows in format HHMMSS
P Packed Number Packed decimal numbers
I Integer For Integers (Whole numbers)
17
F Float point number For floating point number
SAP ABAP Consultant sanaimaan336@gmail.com

➢ Variable Length

Keyword Type
STRING Character Sequence
XSTRING Byte Sequence

• Complex types : – Complex types includes structures types and table types.

• Reference Types : – Reference types are use in abap oops concept to refer to the instances
of classes, interfaces and runt time data items.

18
SAP ABAP Consultant sanaimaan336@gmail.com

19
SAP ABAP Consultant sanaimaan336@gmail.com

Data Elements : It specify the semantic information of a table field. Data elements gives the
detail information of the field.
• It is use to define the data type of the field like, char, curr, dats, etc.
• We can also maintain field label at data element level.
• Data element information is available to all the screen fields that refer to the specific data
elements
• Data elements can be define either elementary type or reference type.
• The elementary type is define either by a domain or by built in data type.
• Reference type can be use in case we want to assign the reference of an existing field.
• In further characteristics , we can also mark as change document, if we want to capture
the changes, which are made at field level.

20
SAP ABAP Consultant sanaimaan336@gmail.com

21
SAP ABAP Consultant sanaimaan336@gmail.com

One data element can be used and assigned to multiple table fields.

22
SAP ABAP Consultant sanaimaan336@gmail.com

Structure : A structure is a group of components under a name. A structure can hold the data
a single record only at time in program run time it acts as a work area, but it cannot stored
the data like a table.

• we can use it to perform internal table operation at program run time.


• It can also be use to display the data on the screen
23
SAP ABAP Consultant sanaimaan336@gmail.com

Structure can be define with three types.


• Flat structure : define with elementary types , individual components one after another .
• Nested structure : Define with elementary type along with another structure.
• Deep structure : Define with table types

24
SAP ABAP Consultant sanaimaan336@gmail.com

Nested structure :

Deep structure :

25
SAP ABAP Consultant sanaimaan336@gmail.com

Table type : A table type , we can use to describe the structure and functional attributes of
an internal table. If we have define any table type in SE11 i.e abap dictionary that we can
refer in abap programs for creating a internal table.
A table type is define by its line type , that define the structure and data type attributes
of a line of internal table.

26
SAP ABAP Consultant sanaimaan336@gmail.com

A domain is a object in abap, which is assigned to data element, it defines the


technical information about the field i.e the type of data and its length , along with this we
can also set the attributes at domain level like if sign are allowed for amount /quantity field,
lower case , conversion routine, fixed values and value table, We can use one domain with
multiple fields instead of creating new domain every time

27
SAP ABAP Consultant sanaimaan336@gmail.com

28
SAP ABAP Consultant sanaimaan336@gmail.com

• A type group we can say as it is abap program, managed by data dictionary , which is use
for global visible data type, constant, structures which can be use by abap program in run
time.

29
SAP ABAP Consultant sanaimaan336@gmail.com

A view is a logical table, that actually does not stored any physical data, it extracts data
from one or multiple tables at run time.

Different view types are


1. Data base view
2. Maintenance view
3. Help view
4. Projection view
30
SAP ABAP Consultant sanaimaan336@gmail.com

1. Data base view : A database view is created on two or more tables using inner join
concept , we can only read the data from database view.

2. Maintenance view : A maintenance view are use for sap internal purpose, in real time,
we do not create maintenance views, in this data is maintain and distributed into several
tables.

3. Help view : Help view are created on two or more tables using outer join concept, we
cannot directly execute help views ,we have to include the help view inside the search
help, and it is display when user press F4 i.e search help on a field.

4. Projection view : A projection view is created on single table, it is used in case if we have
large number of field and we want to provide only some of the fields as interface, in that
case we can use Projection view.

31
SAP ABAP Consultant sanaimaan336@gmail.com

1. Data base view : A database view is created on two or more tables using inner join
concept , we can only read the data from database view.

2. Maintenance view : A maintenance view are use for sap internal purpose, in real time,
we do not create maintenance views, in this data is maintain and distributed into several
tables.

3. Help view : Help view are created on two or more tables using outer join concept, we
cannot directly execute help views ,we have to include the help view inside the search
help, and it is display when user press F4 i.e search help on a field.

4. Projection view : A projection view is created on single table, it is used in case if we have
large number of field and we want to provide only some of the fields as interface, in that
case we can use Projection view.

32
SAP ABAP Consultant sanaimaan336@gmail.com

Search helps are objects that you can use to assign input help (F4 Help) to screen
fields. If we press F4 on any field , it will populate and give us a list of available values through
the assigned database table.

33
SAP ABAP Consultant sanaimaan336@gmail.com

There are 2 types of search help


1. Elementary search help : specify a single search help, it will give only single tab of
selection.
2. Collective search help : It is collection of multiple search , with this on pressing of F4, we
get multiple tabs for providing selection criteria for a field value.

34
SAP ABAP Consultant sanaimaan336@gmail.com

Lock objects gives the synchronize access to the same data by multiple user. Lock objects
are used in SAP to avoid the inconsistency when data is inserted into or changed in the
database. Tables whose data records are to be locked must be defined in a Lock Object, along
with their key fields.

35
SAP ABAP Consultant sanaimaan336@gmail.com

When we create Lock objects system generates 2 Function Modules, which are called by
the program at run time. A lock request is generated by the program , then the request goes
to enqueue server and the lock is created in the lock table and then program access the data
from database.

36
SAP ABAP Consultant sanaimaan336@gmail.com

Lock Modes ->


1. Exclusive lock – The locked object can be displayed or editable only by user who has set
the lock.
2. Shared Lock – The locked object can be edited only by the user who has set lock, but
other user can display the data at the same time.
3. Exclusive but not cumulative lock - Exclusive locks can be requested several times from the
same transaction and are processed successively. In contrast, exclusive but not cumulative
locks can be called only once from the same transaction. Each further lock request will be
rejected.
4. Optimistic lock - Optimistic locks initially behave like shared locks and can be converted
into exclusive locks.

37

You might also like