Data Dictionary
Data Dictionary
DDIC is a central repository where we create and maintain repository objects related to
particular Data base.
Objects of DDIC are,
• Data base table
• Views
• Data type
• Domain
• Type group
• Search help
• Lock object
change document
it is used to record the changes done in the document such as data element data type, data
element length
No input history
if this indicator is set then user cannot get input history in the input fields
1.Data base Table: A database table is an object type in DDIC which stores the
actual data in the form of rows and columns. The name of the custom table
in DDIC must start with a letter z or y and can have a maximum of 16
characters.
Group : -
Field Length: It defines the number of characters that can be entered into
the field.
Decimal Places: It specifies how many digits are permitted after the
decimal point, and it can only be used for the numeric data types.
Short text: It specifies the meaning of the field entered within the table.
short description specifies the meaning of the objects or fields in the DDIC.
Currenecy/ quantity fields :-
ReferanceTable: -
A reference table is specified for fields containing currency amounts (date type CURR) or
quantities (data type QUAN). This must be a field ( reference field) with the currency key
format (data type CUKY) or format for quantity units (data type UNIT).
Field Label: Field labels are used to assign text information to data
elements.
The text information related to the data element is referred to by the field &
is displayed on the screen in place of the field name.
2. Header Field.
Data class: It defines the physical area in the data base where the created
table going to be stored.
Here we have got
Master Data: The data which is accessed frequently and updated rarely.
Transaction data: The data which is updated frequently.
Organizational / Customizing data: the data which is defined during
system initialization and updates rarely.
Buffer: It is a cache memory in application layer of R/3 architecture where
frequently accessed data will be stored.
Options available are
Buffering not allowed: it specifies the The data in the table will not be
buffered.
Buffering allowed but currently switched off: buffering principally
allowed but now buffering will be off.
Buffering is switched on: The data in the table will be buffered.
Buffering type
Single record buffering: with this kind of buffering, only records of a table
which are accessed are loaded into the buffer.
Generic area buffering: In read access to a record of generically buffered
table, whose all left justified part of the key corresponds are loaded into the
buffer.
You use generic buffering to load in the buffer all the records whose generic
key fields match with the accessed record of the table.
Fully buffering: with the full buffering either complete table or none of the
table will be in buffer. If read access is made to a record, all the records of
the table will be in buffer.
Single record buffer: Only first record or records which are read will be
stored in the buffer
• Fully buffered: All the records will be stored in the buffer
• Generic Area: The key field’s data is called generic area. Only generic
area data i.e. key fields data will be stored in the buffer.
• it is Especially used for Text Table.
How to avoid Buffering: ->By using "BYPASS BUFFERING" statement in
select query. it will go fetch the records directly from database tables and
skip from buffer.
->BY using Aggregative functions, they are not considered Buffer.
Ex: MAX,MIN,AVG,SUM and Count.
Log data changes: If we tick on this checkbox, any data changes we have
made will be recorded in log table. T-code for see log table Scu3 or OY18.
• If we select this check box what ever the changes we made on the
data will be recorded in the log tables.
We can specify the data type and length of the field without using data
element by clicking on predefined type.
Text Table:
Text table is a table that contains all the primary key fields of the
main table along with language field(SPRAS). The text table contains a text
field for the description in different languages.
tEXT TABLE IS FOREIGN KEY TABLE WHICH IS USED TO DISPLAY THE
CONTENTS OF CHECK TABLE IN DIFFERENT LANGAUGES
The cardinality of is 1:N with respect to the main table. That means for a
single record in the main table there can be N number of records in the text
table.
Types of Tables
• Transparent table: Exhibit one to one relationship i,e data base table
has one table corresponding to the table created in the DDIC. This
table contains application data like master data and transaction data.
In transparent tables, the database table has the same name and the
same number of fields with field names as the data dictionary table.
• Pool table: The pooled table in ABAP shows the many-to-
one relationship with the table definition in the database, which means
for a single table defined in the SAP database, there are various tables
in the ABAP dictionary. The names of the tables stored in the Dictionary
and the database must be different. The SAP database stores all the
Pooled tables in a single table, which is known as a table pool. The
tables in the data dictionary may or may not have primary key field
in common. They are used to store the system data, such as
system configuration information, historical data, etc.
• Cluster table: Cluster tables are similar to the Pooled tables, as they
also show the many-to-one relationship with the table definition in
the SAP database. All the cluster tables are stored in a single table in
the database, and that table is known as a table cluster. The tables in
the data dictionary must have at least one primary key field in
common, and the table is usually accessed simultaneously. They are
used to store the system data, such as system configuration
information, historical data, etc.
Foreign keys are used to establish the relationship between the different
tables present in the ABAP Dictionary. We can create value checks for input
fields using the foreign keys. Value checks are required to validate the values
of some fields in a table with the values of other fields of different tables. The
table that contains the foreign key is called a foreign key table.
Below are the two requirements for creating a foreign key relationship:
• The fields used in the check table for the validation must be the
primary keys.
• The foreign key fields in the foreign key table and primary key fields in
the check table must be of the same domain so that it can ensure that
both fields are compatible with data type and length.
Primary key is a field that uniquely identifies the rows in a table by one or
more columns. The primary key field cannot have a NULL value or duplicate
values.
The foreign key relationship is about relating or connecting two different
tables in order to avoid redundancy and perform table validations in
ABAP.
pdf: -
(Foreign key
The purpose is to validate the data being entered in one table (foreign key
table) by checking against list of possible values in another table.
Check table:- A table which stores master data is called a check table.
Foreign Key Table :- A table which is linked with check table for validating
its own data is called foreign key table.
Use of Foreign key:- Foreign keys are used to establish the relationship
between the different tables present in the ABAP Dictionary.
▪ We can create value checks for input fields using the foreign keys.
▪ It connects two tables by assigning the foreign key field of one table to the
primary key field of another table.
2. Key fields/candidates:
1. Non key fields/candidates: The foreign key fields are neither primary
key fields of the foreign key table nor do they uniquely identify a record of
the foreign key table (key candidates). For this reason, the foreign key fields
do not (partially) identify the foreign key table.
2. Key fields/candidates: The foreign key fields are either primary key
fields of the foreign key table or they already uniquely identify a record of the
foreign key table (key candidates). The foreign key fields therefore (partially)
identify the foreign key table.
3. Key fields of a text table: The foreign key table is a text table for the
check table, that is the key of the foreign key table only differs from the key
of the check table in that it has an additional language key field. This is a
special case of the type Key fields/candidates.)
The cardinality of the foreign key is used to specify the allowed rows in the foreign
key table for the corresponding value in the check table. It is defined while creating
the foreign key relationship.
It can be expressed as X: Y relationship, where X is used for the check table,
and Y is for the foreign key table.
• n=1
For each dependent record there is exactly one record of the check table.
• n=C
There can be records in the foreign key table which do not reference any record of the check
table.
• It specifies that the records contained within the foreign table may not
correspond to any record of the check table.
• m=1
For each record of the check table there is exactly one dependent record.
• m=C
For each record of the check table there is at most one dependent record.
• m=N
For each record of the check table there is at least one dependent record.
• m = CN
For each record of the check table there are any number of dependent records
• X=1: It specifies that a check table has a single record for each record
of the foreign key table.
• X=C: It specifies that the records contained within the foreign table
may not correspond to any record of the check table.
The values for Y can be:
• Y=1: It specifies that for each record in the check table, only one
record is allowed in the foreign key table.
• Y=C: It specifies that the maximum one record of the check table can
exist for the foreign key table.
• Y=N: It specifies that for each record of the check table, at least one
record of the foreign key table should exist.
Primary Index: The primary index is a unique index constructed from the
key fields of the primary key. It is always created automatically in SAP ABAP.
A maximum of one record exists in the table for each combination of index
fields.
Secondary Index: Alongside the primary index defined using the primary
key, both unique and non-unique secondary indexes can be created for a
database table. Creating secondary indexes usually improves the
performance of database reads that evaluate the indexes of the database.
Purpose of Index: - (In SAP ABAP, indexes are used to avoid the duplicate
data and improve the performance while accessing the table.)
after changing the version or updating the data the previous data will not be lost during the process
after changing the version or updating the data, the previous data will be lost during the process.
2. Views: Views are the data dictionary repository objects in ABAP, which are
used to view the data of several tables in one place.
A view is similar to the database table, but it does not contain any physical
data; instead, it derives data from different tables and acts like a virtual
table. Since it does not physically store any data, and the database only
contains the view definition, hence it takes very little space in the database.
Append View : -
Append view is used to enhancement of views in the SAP ABAP which means
we can only be enhance the new fields to the existing view.
one step :- in one step only one maintenance screen is processed at run
time.
in one step entries are displayed here in the form of lists.
in one step overview screen number is madatory
in one step in the overview screen itself we can maintain the data and add
entries also.
two step : - in two step there are two maintenace screen at runtime i,e
overview screen and single screen .
A single entry is diplayed on the screen.
in two step both overview and single screen is mandatory
in two step in the overview screen we can maintain the data,
if we want ad new entries it take us to single their we can add the new
entries
4. Help Views: The help view is created on two or more than two tables,
specifically for the "Search-helps" in DDIC, and we cannot execute it directly.
It combines the data by using an outer join. It allows us only to read the
data, and we cannot maintain the data in this view. It can be used as a
selection method in search helps.
Difference between database view, projection view, maintenance view and
help view,
Database View Projection Maintenance Help View
View View
database view is projection view maintenace maintenace
applicable for is applicable for view is view is
single as well as single table apllicable for apllicable for
multiple tables moth than one moth than one
also tables tables
Works on Inner
join
No joins
3.Data Types: The data type object is used to create the user-defined data
types in ABAP Dictionary, such as data elements, structures, and table
type.
1. Data element: The data element is an object that specifies the
semantic information of the field, such as description, labels, etc.
• Elementary Type:
Elementary type refers to the data type that contains semantic
attributes, such as data type, length, and the number of decimal
places. These data types can be assigned in two ways to a data
element:
• Reference Type:
The reference type describes the single field that has references for
global classes and interfaces with the multiple numbers of data
elements.
2. Structure: Structures are data objects (comprised of components of any
data type) that are saved in sequence in the memory. The data type of a
structure is a structured type or a structure defined in the ABAP HYPERLINK
"javascript:call_link('abenabap_dictionary_glosry.htm')" HYPERLINK
"javascript:call_link('abenabap_dictionary_glosry.htm')"Dictionary.
• Flat structures do not contain any deep components. They only
contain components with flat data types, such as elementary
types c, n, d, t, decfloat16, decfloat34, f, i, int8, p, x, plus b, s (or
structures with these types).
• Flat character-like structures are flat structures that contain
only character-like components.
• Nested structures contain at least one substructure. A nested
structure is flat or character-like, depending on the attributes of all of
the components.
• Deep structures contain at least one deep component, at any nesting
level. Possible deep components include strings, internal tables, boxed
components, data references, or object references.
Type Category in the Dictionary
When defining components of a structure in the ABAP Dictionary, the
following can be used: Typing Kind:
Type - installed or user-defined type (elementary, structured or table type)
Type Ref to - Reference Type- Type Ref to is set automatically if you input
a class, an interface or the generic references OBJECT or DATA as the
component type. If you input as the component type a reference type that
has already been defined in the dictionary, a blue arrow appears in the Dtype
column.
Type ... boxed - Boxed Component with a structure-like dictionary type.
Two ways to add structure to a table,
Include structure: Here we type. . INCLUDE in field column and give
structure name in data element column. We can go for include structure for
only custom table we can’t add include structure to standard table.
Append Structure: Here we click on append structure button at the top and
we create the append structure. This structure is applicable for both custom
as well as standard table.
Difference between Include and Append structure,
Include structure Append structure
Applicable for only custom tables. Applicable for both standard and
custom tables.
Adds anywhere in the table field. Adds at the end of the table.
DB Table Structure
Table stores data physically and Structure contains data only during
permanent data run time
no input history: -
If this indicator is set, the SAP GUI uses to handle the input history of a screen input field is
switched off.
3.Table type: A table type is a type that describes the structure and
functions of an internal table in the ABAP program. It can be used in the
ABAP program analogously to types that are predefined in the ABAP program
or defined directly in the ABAP program to define data objects and types.
Conversion Routine: The data that we enter in the SAP system is not
stored in the original format in the SAP database, and it needs to be
converted into the format compatible with the SAP database.
Sign: If we want to enter negative values in input field, we need to tick this
checkbox.
Lower case: If we tick this check box the characters we enter will display as
it is else the default case is Upper case.
or
Fixed value and intervals: We can assign some fixed values for data types
and length, to a domain. These fixed values are helpful in providing some
input checks for the fields on a screen. The fixed values can also be used as
the source of the input help (F4) for the fields. These values can be created
by defining either single values or the lower and upper limits of the fields.
5. Type Group: A type group is an ABAP program managed by ABAP
Dictionary that is initiated by the statement TYPE-POOL and that contains
ABAP statements for defining globally visible data types, constants,
and macros.
6. Search Help: This option allows us to create the help document for the
user so that the user can know what values should be filled into the input
field values. It can be accessed using the F4
Types of search help are,
Selection Method: The possible entries for a field displayed in the hit list
are determined at runtime by selection from the database. The selection
method describes the database object from which the data is read. Database
table or view can be defined as selection method.
Dialog type: The dialog type defines the dialog steps executed for an input
help. There are the following dialog types:
• Dialog with value restriction: The dialog box for restricting values is
displayed immediately.
Select this option if the list of possible entries is normally very large.
Restricting the set of data to be processed increases the clarity of the hit list
and reduces the system load during value selection.
• Dialog depends on value set: If the hit list contains less than 100
entries, it is displayed immediately. If the hit list contains more than
100 entries, the dialog box for restricting values is displayed.
Hot key: The hot key permits the user to select an elementary search help
from the collective search help directly in the input field with the short
notation. The restrictions can also be entered directly in the dialog box for
restricting values. Letters and digits are allowed as hot key.
Search help exit: A search help exit is a function module for making the
input help process described by the search help more flexible than possible
with the standard version.
and also used to filter and ,modify the elementary search help to collective
search help
Search help parameter: This is a field from the source of data. The fields
from the table are listed in the selection list. The fields participating in the
search help would be entered, one field in each row.
• Import − This field is a checkbox for indicating whether a Search help
parameter is an import parameter. The export or import is with
reference to the search help.
• if we check this flag then the value will be displayed into the hitlist
field in the selection list. If you enter a value 1, the field will appear in
field in the restrictive dialog box. If you enter a value of 1, the field will
appear in the first position in the restrictive dialog box and so on.
• SDis: If this flag is set, the search help parameter appears in the
selection popup window for restricting values as a pure display field.
• Modify: Normally the parameter gets the data element from the field
of the selection method having the same name. If the data element of
this field changes, the search help is automatically adjusted, i.e. the
data element is also changed there. Assigning another data element,
Set the Modified flag. You can now enter values for field Data element.
You can enter a new data element, but it must have the same data
type length and number of decimal places as the previous one.
This cancels the link between the data element of the search help
parameter and the data element of the corresponding field of the
selection method.
Default Value: A default value of the right type can be assigned to a
parameter of a search help. The parameter is assigned this default value
in the
following cases when the input help is called:
1. If the parameter is not an IMPORT parameter.
2. If nothing is assigned to the parameter in the search help attachment
with which the search help is attached to the screen field.
3. If in the search help attachment a field was assigned to the parameter
that does not exist on the screen or in the flow logic (module pool) in the
input help process.
4. If a search help is included in a collective search help and the parameter
is not linked with any parameter of this collective search help.
2.Collective Search help: Collective search helps contain several
elementary searches helps. A collective search help therefore provides
several alternative search paths for possible entries.
conversion_exit_xxxxx_input
when we open the se16 it will only ask us to give table name
in one screen itself we can add the entries, insert,delete the enrties
it is is used the
particular task taking lot of time thats whjy keep the back ground wp
Its a copy of internal table which stores the single record at run-time
int right tot left
in the the
2) delivery class : -
go to-> se80 and in the drop down we need to select Function group
one step
in one step
two step
we can insert the records one by one
one more extent gets created so it will put load on the application layer as
well as perform issue will happen
al12 nd st05
structure combination of field ,length along with the data type and its store
the data
at runtime.
what ever the functionalities used in the table type we can acces in the
globally
why we need table type?
dialog types: -
cc : hierarchy member