2. Data Dicionary
2. Data Dicionary
What is the significance of Technical settings (specified while creating a table in the data dictionary)?
By specifying technical settings we can control how database tables are created in the database. The technical settings
allow us to:
Optimize storage space requirements
Table access behavior
Buffering required
Changes to entries logged
What are the two ways for restricting the value range for a domain?
By specifying fixed values: The value range of domain can be restricted by defining fixed values. If fixed values are
defined for a domain, these are used in the input check in screen templates. To create or maintain an explicit list of
valid values, use the menu path Go to → Fixed Values on the Change Domain screen in the ABAP Dictionary. Explicit
values are used when the list of valid values is not likely to change over time. For example, if a domain were meant
to contain the names of the months of the year, it would be possible to explicitly list “JANUARY” through
‘DECEMBER’ as the allowed values (note that this would not work well in a multi-language environment).
By stipulating a value table: Valid values for a domain can also be specified by reference to a value table. When this
is done, the records in the value table specify the valid values for the domain. In order to specify a value table for a
domain, one of the key fields of that table must point to that domain. That field is the one that determines the valid
values for the domain. A value table is used when the list of valid values may change over time. For example, a car
maker may want to use a value table to list the valid colors for certain car models. As new colors are developed, the
value table could be updated without changing the domain itself.
Can you define a field without a data element? We can do this with predefine data type…divvis
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.
Can you create a table with fields not referring to data elements?
Yes. e.g. - ITAB LIKE SPFLI. Here we are referring to a data object (SPFLI), not data element.
Can you delete data element which is being used by table fields.
No.
How do you document ABAP/4 programs? Do you use program documentation menu option?
You can also enter documentation for the data element. Choose Go to ->Documentation. Or press F9. The text that you
enter here will be displayed when you press F1 on the field. Under Extra -> DE Supplement Docu., you can specify some
additional documentation like the possible cause of error, what should be done in case of error etc. You can also change
the document status with transaction SE61.
The attributes ___________, _____________ and ___________ are used for management of ABAP/4 program.
Type, Application and Class.
Sometimes check table is another table containing a subset of the records in a value table – Explain that.
For example, suppose a telephone company stores general customer information in the CUSTOMERS table and stores
specialized information about business customers in the BUSINESS_CUSTOMERS table. Suppose that there was also a
BUSINESS_OWNERS table that listed the owners of all business customers. The BUSINESS_OWNERS table might consist
of two fields: Customer ID and the name of each individual owner. In this case, we would establish a foreign key
relationship between the BUSINESS_OWNERS table and the BUSINESS_CUSTOMERS table. The value table for the
customer ID field in the BUSINESS_OWNERS table would be the CUSTOMERS table, but the check table would be the
BUSINESS_CUSTOMERS table. The foreign key table would be the BUSINESS_OWNERS table.
It is possible to combine the use of partial and constant foreign keys within the same foreign key relationship. (True /
False)
True.
What is the meaning of ABAP/4 Editor integrated with ABAP data dictionary?
Data dictionary is kind of interface for editor to retrieve data from database level to presentation area. It’s a Meta
data.
Only Transparent and Pooled table can be buffered. Buffering is not permitted for Cluster Tables. (True/False)
True.
Tables buffered by record reside in the single-record table buffer___________, fully and generically buffered tables
share the full/generic table buffer____________.
TABLP, TABL.
A table is buffered. By select statement I don’t want to get the data from table buffer. I want to get the data from
database. How?
If buffering is allowed for a table in the ABAP Dictionary, the SELECT statement always reads the data from the buffer in
the database interface of the current application server. To read data directly from the database table instead of from
the buffer, use the following:
SELECT... FROM <tables> BYPASSING BUFFER. ..
This addition guarantees that the data you read is the most up to date. However, as a rule, only data that does not
change frequently should be buffered, and using the buffer where appropriate improves performance. You should
therefore only use this option where really necessary.
What is Activation?
During activation, the runtime object of aggregate object or tables is created. The runtime object is buffered so that the
application program can access it quickly. Runtime object has information about the following objects of table – domain,
data elements, field definition & table definition.
Is it possible to increase the number of key fields in transparent tables that are already active?
No, Key changes are not allowed.
What is a Size Category? How Many types of size categories and data classes are there?
The Size category describes the probable space requirement of the table in the database.
There are five size categories (0-4) 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 and customizing data (customizing data that is entered when system is configured and then
rarely changed).
The other two types are:
USR
USR1 – Intended for customer’s own developments.
What is the client concept in SAP? What is the meaning of client independent?
There are two types of tables in R/3 database: client-dependent and client-independent. A table is client-dependent if
the first field is of type CLNT. The length will always be 3 and by convention, this field is always named MANDT. If the
first field is not of type CLNT, the table is client-independent.
In the Data Dictionary, Tables can be defined independent of the underlying database. (True/False)
True.
CASE 1: there are two clients using one Application Server. Are programs and tables client-dependent/independent?
CASE 2: There are two clients using different Application Servers. Are programs and tables client-dependent /
independent?
CASE 1: Programs are client-independent and Tables are client-dependent.
CASE 2: Programs and Tables, both are Client-dependent.
What is the exact difference between Transaction Codes SE01, SE09 and SE10?
SE01 is for creating Transport Request with extended view, for all type of transport request.
SE09 is the transaction code for workbench organizer. Workbench organizer is the set of utilities for development
change management. All Development changes are tracked via Workbench organizer.
SE10 is for Customizing organizer. Customizing organizer is the set of tools for customizing change management. All
customizing changes are tracked via customizing organizer.
How do you transfer request from Development instance to production or quality instance?
After the configuration is done by the consultant, he saves that configuration. System automatically generates one
request (in Version 4.7c and above). The entire configuration done in the development server is stored in this request.
To test this configuration, it should be transferred to quality server which is done by Basis consultants. Go to SE10, select
our request which you want to release to Basis consultants, then you will see one development request number and one
correction number. First click on correction number and the go to toolbar and click on the transfer request button (lorry
icon). That means now it’s ready to be released for basis consultants from development server to quality server. Then,
go to STMS (Sap Transport Management System), we find all the released requests by the consultants. Here, choose the
request and transfer it to quality. There the testing is performed to see whether the outcome result is met with
expected result or not. If the testing is successful, then in the similar process, Basis consultants transfer the
configuration to production server and a mail is send to end-user to tell him to use it. After using that configuration
running successfully end-user will send you the return mail stating that your configuration is working properly. Now
again you send the mail to concerned person (TL or PL) with the end-user's mail as attachment. Then they will close that
ticket.
How can we transport the ztable along with data to Production system?
It’s possible to transport the data along with the table definition, by setting the Delivery class ‘W’ appropriately
under the delivery and maintenance tab of SE11.
Once you fill the table, these objects are to be manually added to a transport request.
Double click the task, Give some short description, Enter R3TR in program ID & Object type as TABU, and then insert
the values to the task.
Can we copy a Development Class to another Development Class with all the objects?
You can copy a development class, but you can't copy the objects of the class by utilities provided in ABAP workbench.
We can rename the development class name through utilities ->object directory entry.
Can a transparent table exist in data dictionary but not in the database physically?
No. Transparent tables do exist with the same structure both in the dictionary and as well as in the database, exactly
with the same data and fields. Only time, a transparent table (definition) may exist in the data dictionary and not in the
database, when, it is not activated.
What are the difference between transparent tables and pooled tables?
Transparent tables: Transparent tables in the dictionary have a one-to-one relation with the table in database. Its
structure corresponds to single database field. Table in the database has the same name as in the dictionary, same
number of fields, and the fields have the same name as in the R3 table definition. Transparent table holds application
data. Both Open SQL and Native SQL can be used.
Pooled tables: Pooled tables in the dictionary have a many-to-one relation with the table in database. For one table in
the database there are many tables in the dictionary. The table in the database has a different name than in the table in
the data dictionary, it has different number of fields and field-names are different. Pooled table are stored in table pool
at the database level. A table pool is a database table with a special structure that enables the data of many R3 tables to
be stored in it. It can hold only pooled tables. One cannot use native SQL on these tables (only open SQL).They are not
manageable directly using database system tools.
What is the advantage of structures and how do you use them in ABAP/4 programs?
A structure is defined in the ABAP/4 Dictionary like a table and can be accessed from ABAP/4 programs. Any change
to the definition of the structure in the ABAP/4 Dictionary is automatically implemented in all programs.
While data in tables is stored permanently in the database, structures contain data only during the runtime of a
program.
Structures are used in ABAP/4 programs to transfer data between programs as it is globally defined. Structures are
used in particular for defining data at the interface between module pools and screens and for standardizing
parameters for function modules.
What is Substructure?
Substructures allow you to include fields from another table or structure in the table you are creating. Rather than
listing all of the fields you want a table or structure to contain, you can choose to include the fields from another table
or structure as a substructure. This allows you to avoid redundant field definitions in structures/tables as well as
maintain changes for these common fields in one structure/table.
A structure can only be included in its entirety and must be of table type INTTAB or TRANSP. Substructures can be
nested up to nine nesting levels are allowed. TRANSP table types can only exist once in a nested chain.
To include a substructure in a table - Type “.INCLUDE” for the Field Name field on the Table Change screen, then type in
the name of the structure/table in the “Data elem.” field. You can expand and collapse substructures in the table /
structure definition screens they are used. This is an alternative way to see what fields the substructure holds, rather
than double-clicking on the substructure name to navigate to its definition.
Can we include customizing include or an append structure with Pooled or Cluster tables?
No.
What is the maximum number of structures that can be included in a table or structure?
9 structures.
The data object does not occupy any space in memory. (TRUE / FALSE).
FALSE.
How is conversion of data types done between ABAP/4 & external level?
Conversion between the external layer and the ABAP/4 layer is done in the SAP dialog manager DYNP.
A field containing currency amounts (data type CURR) or, 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 currencies/quantities, is assigned or any other table which
contains a field with the currency key format (data type CUKY) or, quantity units format (data type UNIT). This field is
called as reference field. The assignment of the field containing currency/quality amounts to the reference field is made
at runtime. The value in the reference field determines the currency of the amount or, the quantity unit.
What is the difference between an elementary search help and a collective search help?
Elementary search helps describe a search path. The elementary search help must define where the data of the hit
list should be read from (selection method), how the exchange of values between the screen template and selection
method is implemented (interface of the search help) and how the online input help should be defined (online
behavior of the search help).
Collective search helps combine several elementary search helps. Collective search help thus can offer several
alternative search paths.
An elementary search help defines the standard flow of an input help.
Both elementary search helps and other search helps can be included in a collective search help. If other collective
search helps are contained in collective search help, they are expanded to the level of the elementary search helps
when the input help is called.
What is the maximum number of match code Id's that can be defined for one Match code object?
36. A match code Id is a one character ID which can be a letter or a number.
Can we define our own Match Code ID's for SAP Match codes?
Yes, the numbers 0 to 9 are reserved for us to create our own Match Code IDs for a SAP defined Match code object.
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 both transparent tables and pooled and cluster tables.
What is a View?
A view is a logical view on one or more tables. I.e., the data from a view is not actually physically stored instead being
derived from one or more tables. A view can be used to summarize data which is distributed among several tables.
It is possible to access the data of a DB view in ABAP/4 programs both with OPEN SQL and with NATIVE SQL.
(TRUE/FALSE)
True.
Since the Database View is implemented on a database, only transparent tables can be used to create them.
(TRUE/FALSE)
True.
What is locking?
When two users simultaneously attempt to access the same data record, this is synchronized by a lock mechanism.
When dialog transactions are programmed, locks are set and released by calling certain function modules. These
function modules are generated automatically from the definition of so-called lock objects in the ABAP/4 Dictionary. To
synchronize the access to a table by setting and removing locks, a Lock object has to be defined in the ABAP/4
Dictionary. Activating the lock object automatically creates function modules for setting and removing locks. These
function modules must be included when programming interactive transactions.
Lock Mechanism: Lock Mechanism prevents a new database operation being started till an existing one has been
correctly completed. When conversion is done, lock is created automatically and released only when conversion is
successful. Clearing of locks restart adjustment attempt is made to continue conversion at the point of termination
Cancel adjustment lock entry is simply deleted from table.
To set locks, a lock object must be defined in the ABAP/4 Dictionary. In this lock object, those tables in which data
records are to be locked by calling a lock are determined. All tables included in a lock object must be connected to each
other via foreign keys. The key fields of the tables in a lock object form the Lock arguments for the tables. The lock
arguments are the basis for formulating the logical condition for identifying the records to be locked.
When activating this lock object, two function modules with the names - ENQUEUE_<Object_name> and
DEQUEUE_<Object_name> are generated.
An Example of Locking:
Problem: You wish to prevent a user from being able to change the name of a course or the name of the professor with
responsibility for the course at a time when another user is editing the course description (which contains this
information).
Solution: The problem described above can be solved by defining a lock object E_UKURS. This is done by defining
primary and secondary tables in the lock object. Table UKURS is check table of table UKRSB, so UKURS should be
selected as primary table and UKRSB as secondary table of the lock object.
The Lock argument in this case is the field combination FABNR, KRSNR, and SPRAS (i.e. Primary Key Combination).
The Lock mode Shared is to be selected here. This allows several users to access the data simultaneously in display
mode.
The lock mode in the generated function modules for setting (ENQUEUE_E_UKURS) and releasing (DEQUEUE_E_UKURS)
locks is therefore set to share as default, but can be overridden by calling the function modules.
If the function module ENQUEUE_E_UKURS is called with FABNR = '1' and KRSNR = '3', the record for course 3 in faculty
1 is locked in table UKURS. Furthermore, all the course descriptions for this course are locked in table UKRSB since field
SPRAS was not specified when the function module was called. In such cases, the lock is made generically for a field
which is not defined.
If the function module DEQUEUE_E_UKURS is now called with FABNR = '1', KRSNR = '3' and SPRAS = 'D', the German
course description is unlocked. All other course descriptions remain locked.
You wish to prevent a user from being able to change the name of a course or the name of the professor with
responsibility for the course at a time when another user is editing the course description (which contains this
information). How you will do it?
Lock Object.