What Is Sap Abap Data Dictionary (SE11)
What Is Sap Abap Data Dictionary (SE11)
SAP Menu Path Tools > ABAP Workbench > Development > SE11 – ABAP Dictionary
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.
What are the different components of ABAP Data Dictionary ?
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.
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.
Transparent Table :
Pool Table :
Cluster Table :
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
Understanding sap standard table MARA, MAKT
Table Components
Field -> Data element -> Domain (data type is assign at domain level)
Field -> Data element (data type is assign at data element level)
Field -> data type is assign at field level with pre define data type
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.
Lets create a table – Top down/Bottom up approach - ZEMPLOYEE_MASTER
All custom table – should start either with ‘Z’ or ‘Y’.
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’
ABAP data types are classified in 3 types :
• Elementary data types
• Complex data types
• Reference data types
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.
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.
One data element can be used and assigned to multiple table fields.
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.
Deep structure :
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.
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
• 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.
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.
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.
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.
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.
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.
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.
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.
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.