Data Dictionary Interview Questions
Data Dictionary Interview Questions
ANS : ABAP 4 data dictionary describes the logical structures of the objects used in application
development and shows how they are mapped to the underlying relational database in
tables/views.
Data Dictionary is a central source of data in a data management system. This manages all
definitions(metadata) required for different applications in SAP. ABAP dictionary is completely
integrated into ABAP development workbench. All other component of ABAP development
workbench can access the data definitions(meta data) stored in the data dictionary.
SAP’s data dictionary is called the ABAP Dictionary. ABAP Dictionary is accessed via transaction
code SE11.
Its main function is to support the creation and management of data definitions. It has details
about
· What is the relationship existing between the various data objects available in database?
2) What are the different types of data dictionary objects/ What are the main object types of
ABAP dictionary??
ANS:-
Database tables, views , Datatype(data elements, structures , table type), type group,
domains, Search help, lock object, Matchcode objects.
The object types of ABAP dictionary can be of following type:
Views: are logical views on more than one table. The structure of the view is defined in the ABAP
Dictionary. A view on the database can then be created from this structure.
Data Types (data elements, structures, table types): Types are created in ABAP programs. The
structure of a type can be defined globally in ABAP programs. Changes to a type automatically take
effect in all the programs using the type.
Lock objects :are used to synchronize access to the same data by more than one user. Function
modules that can be used in application programs are generated from the definition of a lock
object in the ABAP Dictionary.
Domains: Different fields having the same technical type can be combined in domains. Domain
defines the value range of all table fields and structure components that refer to this domain.
Data element: The ABAP Dictionary also contains the information displayed with the F1 and F4 help
for a field in an input template. The documentation about the field is created for a data element.
Input help: The list of possible input values that appears for the input help is created by a foreign
key or a search help.
In a data management system, the principal functions performed by the data dictionary are
6) . In the ABAP/4 Dictionary Tables can be defined independent of the underlying database (T/F).
True.
step 2: creating data elements(properties and type for a table field), ,assign it with a domain
what we created now,save,activate it
step 3: creating a table(SE11) and assign it with the data element instead of assigning a
datatype to it,
like this create req fields:
on behalf of this:
table maintainence:
assign the type of the table ie.,A C G L S
NEXT
maintaince:
allowed,not allowed ,allowed with restricions
i)Transparent tables -
Exists with the same structure both in dictionary as well as in database exactly with the same
data and fields. Both Opensql and Nativesql can be used.
iii)Cluster tables -
These are logical tables that are arranged as records of transparent tables.one cannot use
native sql on these tables (only opensql).They are not manageable directly using database
system tools.
It describes the value range which describes allowed data values for the fields .
Formal Definition Of The Data Types.They Set Attributes Such As Data
Type,Length,Range.
domains are the dictionary objects that are assigned with constants and data types.
Fields referring to the same domain (via the data elements assigned to them) are
changed when a change is made to the domain.
Ensures consistency.
Ans: Whenever a table is created and defined through ABAP Dictionary, then it is called a
transparent table. When the table is activated in ABAP Dictionary, a table automatically gets
created in the underlying database with the same name as was defined in ABAP Dictionary.
So generally we say, transparent tables has one to one relationship with underlying database
which means there will be only one physical table on the database for each transparent table
created and defined through ABAP Dictionary. The tables which create 1-to-1 correspondence
between the table definition in the ABAP data dictionary and the table definition in the
physical database are called as transparent tables in SAP.
The names of the table and fields in underlying database will correspond or have the same
names as the logical table definition in the ABAP Dictionary.
Transparent tables can be used to store application data which include master data as well as
transaction data. Transparent tables are probably the only type of table that you will ever
create as a developer.
Tables M_MTVMA, M_MTVMB, M_MTVMC, M_MTVMD and M_MTVME can be seen in ABAP
Dictionary. These all mentioned tables are Pooled Tables. All these tables have been assigned
to one Table Pool i.e. M_MTVM, which will be present in the underlying database and storing
data of all the five mentioned tables of ABAP Dictionary.
The definition of a pool consists of at least two key fields and a long argument field
(VARDATA).
ANS : Tables in Data dictionary which has many to one relationship with an underlying database
table is called Pooled table. In simple words, Pooled tables appear as many tables in ABAP
dictionary, but the thing is they are stored as a single table in the underlying database.
In ABAP Dictionary, you can see each and every pooled table is assigned to a Table Pool.
Pooled tables are basically used by SAP to store temporary data or customizing data.
Pooled tables can be used to store control data (such as screen sequences or program
parameters).
Generally as a developer, we will never create a Pooled table or Table Pool. It does not mean that
we cannot create them. SAP has given the option to create Pooled tables through SE80 transaction
and Table pool via ABAP Dictionary.
A table cluster combines several logical tables in the ABAP/4 Dictionary. Several logical rows
from different cluster tables are brought together in a single physical record. The records
from the cluster tables assigned to a cluster are thus stored in a single common table in the
database
Tables CDPOS and CDHDR are Cluster tables in SAP ABAP Dictionary and CDCLS is the table
cluster that exist in the underlying database. CDCLS table contains or hold data of both tables
CDPOS and CDHDR in the underlying database.
Rows from the cluster tables are combined into a single row in the table cluster. The rows are
combined based on the part of the primary key they have in common.
The biggest advantage of cluster table and pooled table is they reduce the number of
database reads and thereby improve performance.
ii. Other examples of table clusters are CDCLS, CDHDR, RFBLG, DOKCLU, DOKTL .
23) What are the differences between transparent and pool and cluster tables and how they are
stored at the database level?
Ans:
i) Transparent tables have a one to one relationship with a physical table in an underlying
database where as pooled tables and cluster tables have many to one relationship with a
physical table in the underlying database (Relationship between tables in ABAP Dictionary &
Underlying database).
For each transparent table there will be exactly only one table in the underlying database
whereas many pooled tables are stored in a single table in an underlying database called table
pool. Similarly many cluster tables are stored in a single table in the database called a table
cluster
ii) In case of transparent tables, the underlying database table will have the same name,
same number of fields and the fields will also have the same names as defined in ABAP
Dictionary whereas for pooled tables and cluster tables the underlying database table will
have different name, different number of fields and fields will have different names from
what has been defined in ABAP Dictionary.
iii) Transparent tables can have one or more primary key Whereas Primary key of each pooled
table of a table pool need not be same whereas Primary key of each cluster table of a table
cluster should have at least one key in common.
iv) Secondary indexes can be created for transparent tables, but for pooled and cluster tables
we cannot create any secondary index.
v) Transparent tables can be accessed via both Native and Open SQL whereas pooled and
cluster table can be accessed by Open SQL only.
vi) Transparent tables are used to hold application data which includes both master data as
well as transaction data whereas table pool can store only system data based on the
transparent tables and Cluster table can be used to store control data they can also used
to store temporary data or text such as documentation
Pooled tables reduce the amount of database resources needed when many small tables
have to be opened at the same time.
Cluster tables are used when the tables have primary key in common and data in these
tables are all accessed simultaneously.
vii) Pooled tables are logical tables that must be assigned to a table pool when they are
defined.
Cluster table are logical tables that must be assigned to a table cluster when they are
defined.
24) What are tabs under the maintenance screen of the ABAP data dictionary screen?
i.Attributes,
iii. Fields,
Table fields: For table fields, field names and data types are defined.
Foreign keys: Relationship between the table and the other tables are defined.
Technical settings: Data class and size category defines that what type of table
to be created and how much space required.
Indexes: Secondary indexes are created for a table for faster data selection.
Again following are defined for a table fields:
Field name can be of maximum 16 characters in a table and must start with a letter.
Key flag determines if a field should be the table key.
Field type depicts the data type of the field in the ABAP dictionary.
Field length denotes the number of valid places in the field.
Decimal places Number of places after decimal point for float type value.
Short text describes the business meaning of the field.
Also fields from other structures can be added to the table definition as include.
26) How data Type, field Length and short Text of any field is assigned?
Ans: i. Data type, field length (and if necessary decimal places) short text can be directly
assigned to a field in the table definition.
ii. Data element can be assigned to a field so that data type, field length (and decimal places)
are automatically determined from the domain of the data element. The short description of
the data element is then assigned to the field as a short text.
27) How Can We Set The Table Spaces And Extent Sizes?
You can specify the extent sizes and the table space (physical storage area in the database) in
which a transparent table is to be stored by setting the size category and data class.
28) What Are The Differences Between Domain And Data Element?
Ans:
i. Domain depicts the technical attributes of a field (its data type, field length, no. of decimal
places, appearance on the screen) of a SAP database table. Whereas data element denotes
the semantic attributes (short description, label names) for a field.
ii. Data elements are directly attached to the fields of SAP database tables and each data
element has an underlying domain within it. Whereas domains are not directly attached to
the fields and a single domain can be under many data elements.
iii. Within domain value range of a field can be described. Whereas within the data element
parameter id and search help for a particular field can be assigned.
When ever you create a domain , you can entered allowed values. For example you go to
Domain SHKZG - Debit/credit indicator. Here only allowed values is H or S.
Whenever you use this Domain, the system will forces you to enter only these values.
This is a sort of master check . To be maintained as a customization object. This mean that if you
want to enter values to this table you have to create a development request & transport the
same.
When ever we create a foreign key relationship for a field with another table the system will
look a value table field which is there at domain level.The system proposes that table as an
check table for the foreign key
A foreign key links two tables T1 and T2 by assigning fields of table T1 to the primary key fields
of table T2.
Table T2 is then known as the check table of the foreign key. As per DBMS what we call foreign
key table, is called as check table in SAP.
For example you have Employee master table & Employee Transaction table.
When ever an employee Transacts we need to check whether that employee exists , so we can
refer to the employee master table.
ANS : The values specified for the size category and data class are mapped to database-specific
values via control tables.
is a type of delivery class in DDIC which has separate key areas for SAP and customer.
For example - Table TSADRV is a control table.
The Control Tables specify that it is the table where data is not changed frequently and pertains
to information for the flow of the system.
38) What Is Structure and what its use?
-->Go to Tcode: SE11 then select the radio button database table/data type(structure) and give
the data base table name /structure name in which you want to include the structure then click
on display<=>change button from application tool bar for enable mode.
-->then enter name that should be .include (this is mandatory) in field column then enter the
structure name in the field of dataelement which structure you want include in this database
table/structure
You don't need to open a standard table in change mode to include a structure.
This is how you can include your custom structure within standard SAP tables
Append Structure
----------------
1- It is used to add some extra fields both to custom and
built in or standard database tables.
2- It is used to add extra field only at the end of table
structure and the field name should begins with ZZ or YY.
3- It doesn't require database utility.
4-. Append structure : it will add Fields to the table from last 4-we can use include structure in
more than one table.
48) What is the max. no. Of structures that can be included in a table or structure.
/What’s the maximum depth of nested includes in a table?
Ans: Maximum depth is 9 i.e. maximum 9 structures can be included in a table/structure.
In case of a substructure, the reference originates in the table itself, in the form of a
statement include….
In case of an append structure, the table itself remains unchanged and the reference
originates in the append structure.
51) If a table that is to be extended contains a long field, we cannot use append structures why?
Long fields in a table must always be located in the end, as the last field of the table. If a table
has an append structure the append line must also be on the last field of the table.
52) . Can we include customizing include or an append structure with Pooled or Cluster tables?
No.
53) . Structures can contain data only during the runtime of a program (T/F)
True.
54) What is the advantage of structures? How do you use them in the ABAP programs?
ANS:-
Adv:- GLOBAL EXISTANCE(these could be used by any other program without creating it
again). Reusability
2. - -
3. -
57) Give an example of nested include.
Ans: Structure S1 may include structure S2 and again S2 may include S3.
The tables making up an aggregate object (primary and secondary) are called aggregate object.
61) . The data of a view is not physically stored, but derived from one or more tables (t/f)
True.
62) What are the 2 other types of Views, which are not allowed in Release 3.0?
· Structure Views.
· Entity Views.
63) How Many Types Of size categories and Data Classes Are There In Sap?
ANS : There are five size categories (0-4) A certain fixed memory size is assigned to each
category in the SAP database.
and 11 data classes only three of which are appropriate for application tables:
· APPL0-
Master data (data frequently accessed but rarely updated).
· APPL1-
Transaction data (data that is changed frequently).
· APPL2-
Organizational data (customizing data that is entered when system is configured and
thenrarely changed).
Domains, Data elements, Tables, Technical settings for tables, Secondary indexes for
transparent tables, Structures, Views, Matchcode objects, Matchcode Ids, Lock objects.
66) Can A Transparent Table Exist In Data Dictionary But Not In The Data Base Physically?
Ans:- No.
Transparent Table Do Exist With The Same Structure Both In The Dictionary As Well As In The
Database,Exactly With The Same Data And Fields.
67) What is the significance of Technical specifications /technical settings (specified while creating a
table in the data dictionary)?/ What is ‘technical settings’ of a table?What are the important
parameters to be mentioned within it?
Ans : By specifying technical settings we can control how database tables are created in the
database. The technical settings allows us to
· Buffering required.
Five contents in technical settings : Data class, size category, Buffering permission , Buffering
type and logging
68) What is a Table attribute?
Ans :The table’s attributes determine who is responsible for maintaining a table and which types
of access are allowed for the table. The most important table attributes are:
· Delivery class.
· Activation type.
Ans: We need to insert an delivery class value while creating customized table in SAP through
the transaction code SE11.
Delivery class is that which regulates the transport of the table’s data records (during SAP
installations, SAP software upgrade, client copies, and data transport to other SAP system).
SAP and its customers have different write types depending on the variety of delivery class. If
Delivery class is A, it depicts that the application table for master and transaction data
changes only rarely.
70) How many types of delivery classes are there in SAP?
Ans: There are following delivery classes:
i. A: Application table (master and transaction data) is maintained by the customers using
application transaction.
iv. G: Customer table, new data records can be inserted but may not overwrite or delete
existing ones.
vi. S: System table, data changes have the status of program changes i.e. System table for
program’s nature. Maintained only by SAP. E.g.: Codes for SAP transactions.
vii. W: System table for system operation and maintenance. Table contents are maintained
by maintenance transactions. E.g.: function module table.
· Determines how the table behaves when it is first installed, at upgrade, when it is
transported, and when a client copy is performed.
72) What Are The Two Ways For Restricting The Value Range For A Domain?
· By specifying fixed values.
· A domain defines a value range, which sets the permissible data values for the
fields,which refers to this domain.
· A single domain can be used as basis for any number of fields that are identical in
structure.
Primary Index:
Primary index is created automatically on key fields of data when table is created in SAP.
Secondary Index:
The secondary index is required when there is retrieval of data on non-key fields.Secondary
index is not created automatically.It is created menually depends on the requirement.
Indexes are described as a copy of a database table reduced to specific fields. This data exists
in sorted form. This sorting form ease fast access to the field of the tables.
For example - when you use a binary search.
In order that other fields are also read, a pointer to the associated record of the actual table
are included in the index. the indexes are activated along with the table and are created
automatically with it in the database.
80) What Are The Differences Between Structure And Table In Data Dictionary In Abap?
Structures are constructed the almost the same way as tables, the only difference using that no
database table is generated from them.
1. Table can store the data physically but a structure dose not store.
2. Table can have primary key but a structure dose not have.
3. Table can have the technical attribute but a structure dose not have.
4. Table store multiple records but structure can store single record at runtime
· Domains
· Data elements
· Structures
· Foreign Keys
ANS: · Views
· Match codes
· Lock objects.
Search Help - In a simple word, A search help is an object of the ABAP Dictionary with which
input helps (F4 helps) can be defined. It helps to define the standard input help process.
It displays all the possible values for a field in the form of a list.this list is known as hit list.
An efficient and user-friendly search assists users where the key of a record is unknown
Example:
Scenario: When User1 require only Material type as Finished goods and User2 require only
Material type as Raw material, for this scenario we can use search help exit.
Each search help exit must have the same interface as function module
F4IF_SHLP_EXIT_EXAMPLE (is used as pattern for all the search help exits to be created).
96) How Do You Assign Search Help At Program Level?
Method 1:
The statement MATCHCODE OBJECT can be used to assign a Search Help to a field.
Method 2:
Using the function module 'F4IF_INT_TABLE_VALUE_REQUEST'
you can add search help to the standard field, but with an access key.... bcoz you are changing
the SAP standard field..
I have an another alternative as well... if you can look at the domain say MATNR.. on the value
ranges tab you can see a value table on the bottom... you can use a similar thing where value
table will be your ztable and any value entered will be checked in this table.. if we find an entry
it proceeds else.. raises and error message..
or
or
u can assign the search help to (A) data element level or (B) field table level.
But u should consider it'll mean to change a standard object for both cases: so u need to get the
access key from your OSS.
98) What Is The Difference Between Elementary And Collective Search Help?
Elementary search help is for F4 help and Collective search help is the collection of Elementary
Search Helps.
elementary search help is one where u used only one field in the search help and mostly from
one table...say u want material & description u create search help with MARA and fields matnr
& maktx.
collective search help is one where u use more than one field and also from various tables. say
material from MARA & plant from T001W..u combine these 2 using collective search help.
Elementary search helps defines a search path where we will define the table from which the
data has to be read and the selection criteria. Through import and export parameters. Used
when we gets the data rom a single table. Collective Search Helps:- Combination of elementary
search helps. When we need to fetch data based on multiple selection criteria’s. More than one
tables are Selection from multiple tables
In Elementary Search Help selection method should be entered but there is no selection method
to be entered for a Collective Search Help instead of the selection method, we enter the
included search helps for the Collective Search help.
SE11- Create Search Help for 1 field, "Selection Method" box put the Table name to which the
field belongs to. "Dialog Type" box write: "Display Value Immediately".
Search Help Parameter is the Field name for which u want the Help. Tick Imp & Exp options and
assign LPOS = 1 and Enter. , save and Activate.
SE11- Go to the table , Click on the Field that needs to be assigned a search Help....Click at the
left side of the Field so that all the corresponding data Elements, Key field etc also gets selected.
Click on the "Search Help tab" just above the "Data Type " column.
Put the "Search Help" name that u just created. Mention the Field and Enter. it takes up the
required values. Now Copy.
U can repeat the process for whatever fields u want to assign a Search Help.
se51- Go to Screen Painter, Select Fields from Dictionary table to which u want search help to be
assigned.
Double click on the Text box of the corresponding field,......> Screen Painter Attributes.......>
Search help Text box.........> Enter the name of the Search help that u created for a field.
Ok....>Save.........> Activate
Now u should be able to get the Search help for the fields that u wanted to.
Using transaction code SE11 you can create search help. This search help has to be assigned to
the field for which this input help is required. There are four ways you can assign the search help
-
Scenario-1: In case if more than one search help is assigned to the field the conflicts in calling
the search help is resolved by the hierarchy of search help. So when a input help is called for the
field, first it checks if the search help is attached on the screen field or not. Here it also a case if
there is a program help written with PROCESS ON VALUE-REQUEST or not else it looks for the
search help attached to the screen field. If no serach help available here then it looks for the
input help attached using FIELD SELECT or FIELD VALUES.
Scenario-2: If the above first level if the field could not able to find the input help then it further
looks for the search help defined to the table field.
Scenario-3: If no search help define here, it tries to call the search help define at a check table. If
at check table it finds the search help then it displays else it displays the key values of the check
tables.
Scenario-4: Still there is no search help is define at the above level the system looks for the
search help define at the data element. If still the search help is not define at data element, the
fixed values of domain are displayed.
102) How You Attach Search Help To Data Element?
It is a similar to table index that gives list of possible values for either primary keys or non-
primary keys.
Lock objects are used to lock the database table while making the modifications on the database
table to avoid the inconsistancy at the time of data is being insert/change into database.
When you create a lock object System automatically create two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
SAP Locks is used to program different types of lock which is set across more than one database
LUWs. The database locks is of much shorter period than the SAP lock. This database lock is set in
duration of transaction and remains there till DEQUEUE_'lockobjectname' function module is get
called.
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful
name start with EZ
Example EZTEST_LOCK.
The tables.
The lock argument.
The user goes to VA02 to change a sales order, in this program, a lock is set. You can see such locks in
transaction SM12. If a lock is set, and another user accesses the same sales order, then they will get a
message saying that the sales order is locked. The ENQUEUE function module is used to set the lock, the
DEQUEUE function module is to release the lock.
1.Select object type Lock object in the initial screen of the ABAP Dictionary, enter an object
name and choose Create. The name of a lock object should begin with an E (Enqueue).
The maintenance screen for lock objects is displayed.
4.Select the lock mode of the primary table in the field below it.
The lock mode is used as the default value for the corresponding parameters of the function
modules generated from the lock object.
5.Choose Add if you want to lock records in more than one table with the lock object.
A list of all the tables linked with the primary table using valid foreign keys is displayed. Select
the appropriate table. The lock mode of the primary table is copied as lock mode. You can
change this setting as required, for example you can assign the lock mode separately for each
table.
6.Similarly, you can add a table linked with the secondary table just added with foreign keys. To
do this, place the cursor on the name of the secondary table and choose Add.
7.If no lock mode is assigned to a table, no lock is set for the entries in this table when the
generated function modules are called. You should not assign a lock mode if a secondary table
was only used to define a path between the primary table and another secondary table with
foreign keys.
9.You can (optionally) exclude lock parameters (see lock objects) from the function module
generation on the Lock parameter tab page. This makes sense for example if you always want to
lock a parameter generically.
To do this, simply deselect the Weight flag for the parameter. The parameter is not taken into
consideration in the generated function modules. This parameter is then always locked
generically.
9.The name of a lock parameter is usually the name of the corresponding table field. If two fields
with the same name are used as lock parameters in the lock object from different tables, you
must choose a new name for one of the fields in field Lock parameter.
10.You can define whether the function modules generated from the lock object should be RFC-
enabled on the Attributes tab page.
If you set the Allow RFC flag, the generated function modules can be called from within another
system with Remote Function Call.
11.If you permit Remote Function Calls for an existing lock object, you must ensure that the
generated function modules are called from within an ABAP program with parameters
appropriate for the type. You should therefore check all programs that use the associated
function modules before activating the lock object with the new option.
12 .Choose Activate .
Result
When you activate the lock object, the two function modules ENQUEUE_<lockobjectname> and
DEQUEUE_<lockobjectname> are generated from its definition to set and release locks.
You can find information about the activation flow in the activation log, which you can display
with Utilities Activation log. If errors occurred during activation, the activation log is displayed
immediately.
111) What Are The Function Modules That Are Generated When You Activate A Lockobject?
112) What Is The Use Of Enqueue Function Module?
113) What Is The Use Of Dequeue Function Module?
When you activate the lock, the two function modules ENQUEUE_'lockobjectname' and
DEQUEUE_'lockobjectname' get generated. These two locks are used to set and release the
locks respectively.
protects read access to an object. The read lock allows other transactions read access but not
write access to the locked area of the table
protects write access to an object. The write lock allows other transactions neither read nor
write access to the locked
A view does not contain data of its own - rather, the view provides specialized access to the data
that exists in other tables. For this reason, views are often called virtual tables.
Views combines more than one table. The structure of the view is defined in the ABAP
Dictionary. With the help of views, application-dependent view can be defined that combines
the data.
Data about an application object (like Purchase order, Sales Order, Invoice Verification, etc.) is
often distributed on several database tables. By defining a view, one can define an application-
dependent view that combines this data. The structure of such a view is defined by specifying
the tables and fields used in the view. Fields that are not required can be hidden, thereby
minimizing interfaces. A view can be used in ABAP programs for data selection.
117) What Are The Types Of Views?
· Database View
· Help View
· Projection View
· Maintenance View
Fields of table T1 are F1, F2 and F3. Fields of table T2 are F1, F5.
By using a Database view one can combine the fields of both tables T1 and T2, provided primary
and foreign key relation is maintained between the two tables and thus final view can have
fields like F1, F2, F3, F5.
119) What Is Projection View?
In standard SAP tables one can find there are a number of fields. Sometimes it happens or there
is a requirement of viewing only a fewer no of fields of a table, in such cases a projection view
can be created. Projection views are created only on a single table.
For example, if Table T1 has fields F1,F2,F3,F4,F5, F6, F7, F8, F9, F10, etc…
Say there is a need to view data only for say Fields F1, F2, F4,F8 & F9, in such cases projection
view can be created.
120) What Is Maintenance View?
Just like we have table maintenance (SM30) for each table, similarly if there is a requirement to
maintain data for one or more tables in a single view, then maintenance view can be created.
All the tables in a maintenance view must be linked with foreign key. The join conditions for
maintenance views are always derived from the foreign key automatically and thus one cannot
directly enter the join conditions as for database views. Unlike Database views, one can modify
data from maintenance view.
Thus, a maintenance view allows you to maintain the data of an application object together.
121) What Is Help View?
Help views can be used as selection methods for Search Helps. It might be necessary to create a
Help View if you are trying to accomplish an outer join, since database views only create inner
joins.
122) State The Differences Between Database View & Projection View?
The basic differences between projection view and database view are:
Database view can built over many tables whereas projection view can be built over a single table only.
Database view can be updated if the view is built over a single table whereas in projection view data can
be updated.
In case of database view, data updates can use open SQL or native SQL whereas in case of projection
view, data updates must use open SQL.
123) What are the advantages and disadvantages of using views in ABAP programming ?
advantages: view is used to retrieve the data very fastly from the database tables
*memory wastage is reduced
*faster than joins to retrieve the data from database tables
disadvantages:
view is not a container,it will not hold the data
*view memory is not permanent memory
124) What Are The Relational Operations That Can Be Performed On View In SAP?
There are three operations that can be performed on views in SAP: Join, Projection and
Selection.
The Projection Operation is used to narrow a view’s focus to certain fields in a table.
The Selection Operation is used to narrow a view’s focus to certain records in a table.
The Join Operation is used to combine information from multiple tables into a single view.
Primary Key: A combination of field(s) to uniquely identify a record in a table.Also known as primary
index.
Index: Indexes are used to improve the performance while retrieving the data(records) from DB table.
Normally records will be arranged in a certain order in the table along with the index name if an index is
created on certain field(s). If the fields specified in the index is used to query the table, then data
retrieval will be fast.
In case, if one does not have a primary key fields to query the table,then he can consider using the fields
specified in the index to retrieve the records.
Ans: Using foreign keys(as main table-field is linked with check table), input value check for any
input field can be done.
Foreign keys can also be used to link several tables.
Explaination on foreign keys:
Suppose, tab1(Foreign key table or dependent table) contains the following fields: fld1(primary
key), fld2, fld3, fld4, fld5 and Tab2(Referenced table) contains the following fields: fld6(primary
key), fld7(primary key), fld8, fld9 and tab1-fld2 is connected to tab2-fld5, tab1-fld4 is connected to
tab2-fld6Therefore, fld2 and fld4 fields of the table tab1 are called as foreign key fields to the
table tab2 and tab2 is called as check table or referenced table.
Cardinality specifies how many rows are allowed in foreign key table for a corresponding value in check
table. It specifies as X: Y (where X point to check table and Y points to foreign key table).
X=1: if a row in check table deleted then the corresponding rows from foreign key table also deleted.
X=C: Deletion of check table rows won’t affect the foreign key table rows.
The allowed values for Y are
Y=1: For each row in check table only one row is allowed in foreign key table
Y=C: For each row in check table maximum one row is allowed in foreign key table
Y=N: For each row in check table there is always at least one row in foreign key table.
Y=CN: There might or might not be rows in the foreign key table for each row in the check table.
134) What Are The Prerequisites For Creating Foreign Key Relationship?
135) What are foreign key fields?
Ans: One field of the foreign key table corresponds to each key field of the check table. That
field of the is called as foreign key field.
Uses: A foreign key permits assigning data records in the foreign key table and check table.
One record of the foreign key table uniquely identifies a record of the check table (using the
value entries in the foreign key fields of the foreign key table).
Key fields/candidates: if the key is one of the primary key fields of foreign key table or that key is part
of Key candidates that can identity a unique row without using primary key.
Non-key fields/candidates: (just opposite of the above)
Key fields of a text table: The text table contains the language description of values in a check table.
It used for multi language purposes.
When we create foreign keys we need to specify the appropriate cardinality and key field type for the
keys.
138) Do We Create Table Fields With Out Data Elements And Domains? If Yes How? If No
Why?
Yes ,We can create a field without any data element and
domain, by using ( Predefined type ) option given on the
right of the fields Tab (near to search help tab).
Alternately, we can opt for the BUILT IN TYPE found beneath the domain at the time of the
creation of the data element.
139) Can you create a table with fields not referring to data elements?
ANS:-
YES.
eg:- ITAB LIKE SPFLI.here we are referening to a data object(SPFLI) not data element.
A data element describes the role played by a domain in a technical context. A data
element contains semantic information.
143) Can you delete a domain, which is being used by data elements?
No.
145) Can you delete data element, which is being used by table fields.
No.
Yes. If you want to specify no data element and therefore no domain for a field, you
can enter data type and field length and a short text directly in the table maintenance.
In SE11 one option is available above the fields strip. Data element/ direct type.
Predefined types:-
Elementary Types supported by ABAP :
Fixed length:
characters (C)
numbers: numeric text (N), integers (I), packed (P), floating decimal point (F)
Date (D)
Time (T)
Hexadecimal (X)
Variable length:
String
Xstring
References:
Data
Object
structure
internal tables
Master data: It is the data which is seldomly changed. Transaction data: It is the data which is
often changed. Organization data: It is a customizing data which is entered in the system
when the system is configured and is then rarely changed. System data:It is the data which
R/3 system needs for itself.
E.g.: TAB1 contains the field PRICE which holds price values. Field UNIT contains currency key
for PRICE.
So,TAB1 is the reference table for field PRICE and UNIT is the reference field for field PRICE.
200) A field containing currency amounts (data type CURR) must be assigned to a reference
table and a reference field. Explain.
As a reference table, a system containing all the valid currencies is assigned or any other table,
which contains a field with the currency key format.
This field is called as reference field. The assignment of the field containing currency amounts
to the reference field is made at runtime. The value in the reference field determines the
currency of the amount.
201) A field containing quantity amounts (data type QUAN) must be assigned to a reference
table and a reference field. Explain?
As a reference table, a system table containing all the valid quantity units is assigned or any
other table, which contains a field with the format or quantity units (data type UNIT). This
field is called as reference field.
The assignment of the field containing quantity amounts to the reference field is made at
runtime. The value in the reference field determines the quantity unit of the amount.
The external layer is the plane at which the user sees and interacts with the data, that is, the
data format in the user interface. This data format is independent of the database system
used.
The ABAP/4 layer describes the data formats used by the ABAP/4 processor.
The database layer describes the data formats used in the database.
208) How is conversion of data types done between ABAP/4 & DB layer?
ANS : Conversion between ABAP/4 data types and the database layer is done within the
database interface.
209) How is conversion of data types done between ABAP/4 & external level?
ANS :Conversion between the external layer and the ABAP/4 layer is done in the SAP dialog manager
DYNP.
C: Character.
I: Integer.
V: Character string of variable length, length is given in the first two bytes.
Database utility is the interface between the ABAP/4 Dictionary and the underlying the SAP system.
It is a tool with which you can make data stored in the ABAP/4 Dictionary available.
Match code is a tool to help us to search for data records in the system. Match Codes are an
efficient and user-friendly search aid where key of a record is unknown.
A matchcode is an aid to finding records stored in the system whenever an object key is required in an
input field but the user only knows other (non-key) information about the object.
212) . What is the max no of match code Id’s that can be defined for one Match code object?
213) . Can we define our own Match Code ID’s for SAP Matchcodes?
Yes, the number 0 to 9 are reserved for us to create our own Match Code Ids for a SAP defined
Matchcode object.
If the data in one of the base tables of a matchcode ID changes, the matchcode data has to be
updated. The update type stipulates when the matchcode is to be updated and how it is to be
done.
The update type also specifies which method is to be used for Building matchcodes. You must
specify the update type when you define a matchcode ID.
215) Can matchcode object contain Ids with different update types?
Yes.
· Update type I: Access to the matchcode data is managed using a database view.
217) What are the two different ways of building a match code object?
· Logical structure: The matchcode data is set up temporarily at the moment when the match code
is accessed. (Update type I, k).
· Physical Structure: The match code data is physically stored in a separate table in the database.
(Update type A, S, P).
218) What are the differences between a Database index and a match code?
· Match code can contain fields from several tables whereas an index can contain fields from only
one table.
· Match code objects can be built on transparent tables and pooled and cluster tables.
219) What is the function of the transport system and workbench organizer?
The function of the transport system and the Workbench Organizer is to manage any changes made to
objects of the ABAP/4 Development Workbench and to transport these changes between different
SAP systems.
220) How can we access the correction and transport system?
Each time you create a new object or change an existing object in the ABAP/4 Dictionary, you branch
automatically to the Workbench Organizer or correction and transport system.
Domains, Data elements, Tables, Technical settings for tables, Secondary indexes for transparent tables,
Structures, Views, Matchcode objects, Matchcode Ids, Lock objects.
222) How can we set the table spaces and extent sizes?
You can specify the extent sizes and the table space (physical storage area in the database) in which a
transparent table is to be stored by setting the size category and data class.
The correction system manages changes to internal system components. Such as objects of the
ABAP/4 Dictionary.
Local objects (Dev class$TMP) are independent of correction and transport system.
Related objects from the ABAP/4 repository are assigned to the same development class. This
enables you to correct and transport related objects as a unit.
Q. What’s logging?
2. what is the logging of technical setting while creating db table. Answer