You are on page 1of 18

1|Page

ASSIGNMENT ON DDIC
1. What is table? Explain different types of tables in SAP.

Table: A table is defined independently of ABAP dictionary. Fields are defined


with data types and lengths.

A table is defined with the following components:

Fields: it defines the type of the data stored in the fields

Technical settings: It controls how the table should be created in the database.

Foreign keys: It defines the relationship between the two tables.

Indexes: To speed up data selection, secondary indexes can be created for the table.

Creating table:

1. Initially, go to se11.
2. Choose the radio button Table and enter the name of the table and click on
create.
3. A table is created and maintenance screen of the table is opened.
4. Enter the short description and select the delivery and maintenance tab and
select the delivery class. Also choose the maintenance allowed from Data
Browser/Table view editing.
5. Go to fields tab and enter the name of the field. Name should not contain
spaces. The maximum no.of character in the name is 16.It should start with a
letter and can contain underlining and digits.
6. Select the key column if the field is a key field.
7. Enter the data element name in field type. We can also define a direct type
data element by clicking on the predefined tab.
8. Maintain the technical settings by clicking on the technical settings tab.
9. Save and activate the table.

Types of tables:

There are three types of tables in SAP

1. Transparent tables

1
2|Page

2. Pooled tables
3. Clustered tables

Transparent table:

Transparent table is a single table. It has one to one relationship with a table in the
database. For each transparent table there is one associated table in the database.
The database has the same name and the no.of fields. Transparent table is used to
hold master data.

Pooled table:

Pooled tables are logical tables that must be assigned to a table pool when they are
defined. Pooled tables are used to store control data. The data of the pooled tables
are commonly stored in a table called table pool.

The definition of pool consists of two key fields Tabname and Varkey and an
argument called Vardata

Clustered table:

Clustered tables must be assigned to a table cluster while creating. Clustered tables
are used to store temporary data such as documentation. The data of the clustered
tables are stored in a table called table Cluster.

A cluster table consists of a field Pageno for differentiating continuous records. It


also contains long field Varadata

2. What is structure? Explain different types of structures in SAP.

Structure: A structure comprises components. A component can refer to a data


element or another structure or a table type. Structures are used to define the data
at run time. A structure can have only a single record at run time.

There are three types of structures.

Flat Structure: A flat structure references elementary types.

2
3|Page

Nested Structures: A nested structure references at least one further structure, but
not a table type.

Deep Structure: A deep structure references at least one table type.

Creating Structure:

1. Initially go to se11
2. Select the radio button data type and enter the name of the structure you
want to create and click on create
3. A dialogue box will appear and select the structure and click ok. Structure
will be created
4. Enter the short description.
5. Enter a name in the components column
6. Enter the name of the type used in the column component name.
7. Save and activate the structure.

3. Difference between pooled and clustered tables?

A table in the database in which all records from the pooled tables assigned to the
table pool are stored corresponds to a table pool.

Several logical data records from different cluster tables can be stored together in
one physical record in a table cluster.

Pooled tables hold system data. All the pooled tables stored in the table pool need
not contain any key relationship between them. Table pool holds more no.of tables
but fewer amounts of data.

Clustered table holds application data. All the clustered tables stored in the table
cluster must have a key relationship among them. Table cluster holds more no. of
data and less no. of tables.

4. What is table type?

A table type describes the structure and functional attributes of an internal table.

A table type is defined by

 Line type, that defines the structure and data type

3
4|Page

 Access mode used to access the data in the internal table

 Keys of the internal table.

5. What is the difference between tables, structure, and table type?

Table Structure Table type

 It is a database  Structure consists  Table type


object which is of components. describes the
defined Types are defined structure and
independently of for components. functional attributes
the ABAP of an internal table
dictionary.  Structure holds in ABAP.
single data record
 A table holds at run time.  Table type holds
multiple data multiple data
records.  Structure consists records at runtime.
of components and
 Table contains data component types.  Table type contains
elements, fields, line type,
and primary keys.  There is no foreign predefined type and
key relationship in reference type.
 Table consists of structures.
foreign key  In table type we
relationships with  In structure we can add primary
other tables. cannot have keys and secondary
delivery and keys.
 In tables delivery maintenance.
and maintenance is  In table type we
available cannot have
delivery and
maintenance.

6. Explain about view? Explain different types of views in sap and


differences between them.

4
5|Page

 A view is a virtual representation of data from several database tables. i.e., a


view does not hold any data in the database.

 The structure of a view is defined by specifying the tables and fields used in
the view.

 Fields which are required only can be selected from the database tables and
used in the views using relational join operation.

 The base tables of the view must be selected in the first step of a view
definition. In the second step, these tables must be linked by defining the
join conditions.

 In the third step, you must select the fields of the base tables to be used in
the view. In the fourth step, selection conditions that restrict the records in
the view can be used.

 The maintenance status defines whether you can only read data with the
view or whether you can also insert and change data with it.

There are four different types of views.

1. Database view

2. Projection view

3. Help view

4. Maintenance view

Database view:

A database view is a general view for one or more basis tables. If there are multiple
basis tables, they are joined using an inner join. Database views implement an
inner join. The join conditions for the inner join can be formulated using equality
relationships between any two table fields in the basis tables. If the database view
only contains a single table, the maintenance status can be used to determine if
data records can also be inserted with the view. If the database view contains more
than one table, you can only read the data. A database view only contains
transparent tables.

5
6|Page

Projection view:

 Projection views are used to hide fields of a table. No selection condition is


required for a projection view.

 There is no corresponding object in the database for a projection view. A


projection view is mapped to the corresponding access to its base table.

 Projection views can be used to access pooled table or clustered table as well
as transparent table.

 The maintenance status of the view controls how the data of the table can be
accessed with the projection view.

 If the status is read only--- the data in the projection view can be read only
using open SQL.

 If the status is read and change----- the data in the view can be changed
using open SQL.

Maintenance view:

 A maintenance view performs writes on various tables with the help of


extended table maintenance. One maintenance view may change the
contents of several related database tables.

 A maintenance view permits you to maintain the data of an application


object together

 The data of the base tables in maintenance view can be changed using a
table maintenance generator.(sm30)

 All the tables in a maintenance view must be linked with foreign keys. There
are some restrictions for attributes of the foreign keys with which the tables
in a maintenance view can be linked. They are

 The secondary tables have to be in an N:1 dependency to


the primary table

6
7|Page

 If the secondary table is the foreign key table, the foreign


key fields of a table or the foreign key must have the
cardinality N:1 or N:C

The Access setting in the maintenance status of a maintenance view can have the
following values:

 Read only------ The maintenance view can only be used to read data.

 Read, change, delete, and insert---------The maintenance view can be used to


change, delete, and insert data.

 Read and change---------The maintenance view can be used to change data,


but not delete or insert it.

Help view:

A help view is a special view for use in search helps. The selection method of a
search help is either a table or a view. If you have to select data from several tables
for the search help, you should generally use a database view as selection method.
Outer join is used in the help view.

All the tables included in a help view must be linked with foreign keys. The first
table to be inserted in the help view is called the primary table of the help view.
The tables added to this primary table with foreign keys are called secondary
tables.

Differences between the views:

 In Projection view, we can view the data from the selected fields.

 In database view we can view the fields from more than one table.

 In maintenance view, we can use multiple data but we cannot access the data
from the tables which are related with the foreign key relationship.

 Help view is used in the search help.

7
8|Page

7. What is lock object in SAP and explain about the different types of lock
objects.
 A lock object is a virtual link of several SAP tables which is used to
synchronize simultaneous access by two users to the same set of data.
 The lock objects are explicitly created in the ABAP dictionary. The lock
objects must start with letter E.
 The tables in which data records should be locked with a lock request are
defined in a lock object together with their key fields
 The function modules for requesting and releasing locks which are created
automatically when the lock object is activated must be linked to the
programming.

There are two function modules

ENQUEUE for setting the lock

DEQUEUE for releasing the lock.

There are four types of lock objects. They are

Exclusive lock: The locked data can only be displayed or edited by a single user. A
request for another exclusive lock or for a shared lock is rejected.

Shared lock: More than one user can access the locked data at the same time in
display mode. A request for another shared lock is accepted, even if it comes from
another user. An exclusive lock is rejected.

Exclusive but not cumulative: 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. All
other lock requests are rejected.

Optimistic Lock: Optimistic locks initially behave like shared like shared lock
and can be converted into exclusive locks.

8. What is data element and domain and explain the difference between
them.

Domain:

8
9|Page

A domain defines a value range. It defines the technical attributes of a filed like
length data type etc. A domain is assigned to a data element. All the table fields
which use that data element will have the same value range.

The value range of a domain can be restricted by defining fixed values. If all the
fields or components that refer to the domain should be checked against a certain
table, this table can be defined as the value table of the domain.

Creating domain:

1. Initially go to se11

2. Choose the radio button domain and enter the name of the domain you want
to create and click on create button.

3. Maintenance screen for domain appears. Enter the short description.

4. Click on the data type tab and enter the data type you want to assign to that
data element.

5. Click on value range tab and enter any fixed values or value range you want
to specify. Mention the table name in the value table field if you want to
assign a value table to it.

6. Save and activate the domain.

All the tables and structures in which a field or component refers to the particular
domain are affected by changes made to the domain.

Data element:

Data element defines the semantic description of a field. It describes the meaning
of a domain.

Data element is used to define the type of the field, structure component or row
type of a table.

Creating Data Elements:

1. Initially go to se11.

9
10 | P a g e

2. Choose data type radio button and type the name of the data element you
want to create.

3. A dialogue box appears which shows structure data element and table type,
then choose data element. A maintenance screen for data element appears.

4. Enter the short description. Then enter the name of the domain you want to
assign to the data element.

5. On the Field label tab page you can maintain text information (short,
medium, and long field labels and the title) for the data element.

6. Save and activate the data element.

9. What is search help and its purpose? Explain different types of search
helps in SAP.

Search help provides an input help. i.e., it helps the user to display the list of all
possible input values for a screen field. This search help is to be assigned to a
screen field, to see the input help.

There are two types of search helps.

1. Elementary search help.

2. Collective search help.

Elementary search help:

It describes a search path. The data of the hit list in the


elementary search help is read from tables or views.

The following are the components in the elementary search help.

 The name of the table or view is provided in the selection method. If we


want to read the data from a single table we can pass table in the selection
method. If we want data from multiple tables we can use vies in the
selection method.

10
11 | P a g e

 The dialog type of an elementary search help defines how the hit list is
displayed when the input help is called.

 The hot key is used to select the elementary search help from the collective
search help

 Search help parameters determine what information is displayed in the


dialogue box.

 Import parameters: Parameters with which context information from the


processed input template (screen) may be copied to the help process.

 Export parameters: Parameters with which values from the hit list may be
returned to the input template

 You can define the dialog for the input help with the fields LPos, SPos .
Enter the parameter position in the hit list in LPos. If you enter nothing or
the value 0 here, the parameter is not displayed in the hit list.

 Enter the parameter position in the hit list in SPos. If you enter nothing or
the value 0 here, the parameter is not displayed in the hit list.

Collective search help:

 A collective search help combines several elementary search helps. The user
can thus choose one of several alternative search paths with a collective
search help.

 A collective search help comprises several elementary search helps. It


combines all the search paths that are meaningful for a field.

 The import and export parameters of the included search helps must be
assigned to the parameters of the collective search help.

 Both elementary search helps and collective search helps can be included in
the collective search helps.

 If collective search helps are contained in a collective search help, they are
expanded to the level of the elementary search helps when the input help is
called.

11
12 | P a g e

10. What is enhancement category? Explain briefly.

Enhancement category is used in programs where there is an active Unicode check,


statements, operand checks, and accesses with an offset and length are problematic.

Depending on the structure definition, the radio buttons allowed in the dialog box
are ready for input. Choose one of the possible enhancement categories:

 Cannot be enhanced --- The structure must not be enhanced.

 Can be enhanced and character like ----- All structure components and
their enhancements must be character-type.

 Can be enhanced and character-like or numeric ----- The structure and its
enhancement must not contain any deep data types.

 Can be enhanced in any way ---------- The structure and its enhancement
may contain components whose data type can be of any category at all.

 Unclassified -------- This category can be chosen, for example, for a


transition status; however, it must not be chosen for creating structures.

11. What is data class and delivery class? Differences between them.

Data class: it corresponds to a physical area where the table is stored in the
database.

The following are the data classes.

APPL0: Master data ----- data which is rarely changed.

APPL1: Transaction data -------- Data which is frequently changed.

APPL2: Organizational data ---- Customizing data that is defined when the system
is installed.

USR1 and USR2: Customer data ------ database tables for customer developments
in a separate table space.

12
13 | P a g e

DDIM: Dimensions table

DFACTS: Facts table

DODS: ODS table.

Delivery class:

The delivery class of a database table controls the transport of table. The delivery
class is also used in the extended table maintenance.

There are the following development classes:

A: Application table stores master and transactional data.

C: Customer table data is maintained by the customer

L: Table for storing temporary data.

G: Customizing table [protected against SAP.

E: Control table.

S: System table.

W: System table

12. What is the use of technical settings in table and explain different
options in it.

The technical settings of a table define how the table will be handled when it is
created in the database.

The following are the different options available in it.

Data class: It defines the physical area where the table is stored in the database.

Size category: Determines the size of the initial memory reserved for the table.

Buffering Permission: It defines whether the table may be buffered. There are
three possibilities available.

13
14 | P a g e

 Buffering not permitted: This is selected when the table is


changed frequently.

 Buffering permitted but not activated:

 Buffering activated: The table should be activated.

Buffering types: The buffering type defines which table records are loaded into
the buffer when the table is accessed. There three types of buffering.

Full buffering ----- All the records of the table are loaded into the buffer when one
record of the table is accessed.

Generic buffering ------ When a record of the table is accessed, all the records
having this record in the key field are loaded into the buffer.

 Single record buffering ----------- Only the records of a table that are
accessed are loaded into the buffer.

13. Explain about TMG.

SAP Table Maintenance Generator (TMG) is used to create a table maintenance


program, which can be used by the end users to maintain the table for creating a
new entry in the table, can change the existing data, and can delete the data.

To create Table Maintenance Generator (TMG) you can go to SE11 t-code and then
enter the table name and then click on change button. Go to Utilities -> Table
Maintenance Generator.

In production systems, the end-users generally won't be having access to SE11


transaction code. So, if they need to maintain this table they need a TMG. Using
TMG we can give the multiple entries at a time.

TMG events:

1. Before saving the data in the database

2. After saving the data in the database

14
15 | P a g e

3. Before deleting the data in the database

4. After deleting the data in the database.

5. Creating a new entry

These are the events triggered while the TMG is maintained.

14. What is the use of database utility?

The database utility is the interface between the ABAP Dictionary and the
relational database underlying the R/3 System. The database utility allows you to
edit the database objects.

1. Go to Transaction SE14

2. The Initial screen of database utility is displayed. Enter Name of either


table/view/Match code/Pool/Cluster tables. Choose Edit button or Enter Key.

Indexes: It will display the list of indexes that are created for this table

Processing Type:

The DB Utility can be run either online or in the background.

Direct: the create/delete/modify operations of the object will be performed in


foreground.

Background: the create/delete/modify operations of the object will be performed


in background

Enter for Mass processing: If you want to modify large no of objects, choose this
option.

15. What is the maximum number of primary keys in a table and what is
the length of the primary key?

The maximum number of primary keys in a table is 16. The maximum length of
the primary key is approximately 255 to 300.

15
16 | P a g e

16. What is cardinality? And different types of relations.

The cardinality describes the foreign key relationship with regard to the number of
possible dependent records or referenced records.

The left side (n) of the cardinality is defined as follows:

 n=1: There is exactly one record assigned to the check table for each record
of the foreign key table.

 n=C: The foreign key table may contain records which do not correspond to
any record of the check table because the foreign key field is empty.

The right side (m) of the cardinality is defined as follows:

 m=1: There is exactly one dependent record for each record of the check
table.

 m=C: There is at most one dependent record for each record of the check
table.

 m=N: There is at least one dependent record for each record of the check
table.

 m=CN: There may be any number of dependent records for each record of
the check table.

17. What is the use of search help exit?

A search help describes the standard input help process. In exceptions it could
be necessary to deviate in some points from this standard. Such a deviation
from the standard can also be implemented with a search help exit.

18. Differences between custom include and append structure.

Append structure Custom include

Append structures are used for A Customizing include is a structure


enhancements that are not included that satisfies a special naming
in the standard. This includes special convention. The name of a Customizing
16
17 | P a g e

developments, country versions and include begins with ‘CI_’ and the
adding customer fields to any tables include is in the customer namespace.
or structures.
If enhancements are already planned in
An append structure is a structure the R/3 standard using customer-specific
that is assigned to exactly one table fields, such Customizing includes are
or structure. There can be more than included in the corresponding standard
one append structure for a table or table or standard structure. The
structure. Customizing include is usually first
created in the customer system and
filled with fields by special Customizing
transactions.

19. What happens when we delete or add a primary key?

If we add or delete a primary key we have to go to se14 and adjust the table in the
database.

20. Mention all the tables related to Material, purchase and sale order.

Material tables:

 MARA- Material data

 MARC- Plant data for material

 MARD- Storage location data for material

 MAKT- Material Descriptions.

Purchase order tables:

 EKKO-Purchasing Document header

 EKPO- Purchasing Document Item

Sales order tables:

17
18 | P a g e

 VBAK- Sales document header data

 VBAP- Sales document item data

18

You might also like