Escolar Documentos
Profissional Documentos
Cultura Documentos
Domain:- It is used to define the Technical Attributes (Data Type and Length) and the
Value Ranges (Fixed Values and Intervals). A domain is assigned to a data element. All
table fields or structure components that use this data element then have the value range
defined by the domain.
Data Element:- A Data Element describes either an elementary type or a reference type.
An elementary type is defined by the built-in data type, length and possibly the number
of decimal places. These type attributes can either be defined directly in the Data Element
or copied from a domain.
Advanages :
1.Reusability of Data type,length,description.
Table 3
Table1 Table2
Domain
CHAR, 10
Page 1 of 21 Prepared By : Ganapati Adimulam
eMAX Technologies,AmeerPet,Hyderabad
Ph : +91 40 65976727.
ABAP/Data Dictionary
We Never Compromise in Quality. Would You ?
_______________________________________________________________________
_
2.To maintain the relationship between the tables. The related fields
from each table should have the common domain.
3.What is Primary Key and the Rules regarding the Primary Key in table creation ?
Primary key is One or than One Field Combination to Identify the record from the
Corresponding Database Table Uniquely.
Rules :
Each Table Should have Primary Key.
It Should be Data Type CHAR.
It Shoul appear as the First Field(at the Beginning of the Table).
4.Can we have more than One primary key in the Same Database table ?
No . But We Can Have More that One Field Combination as Promary Key but not More
than One Promary Key.
6.Can we use the same APPEND Structure in More than One Database Table?
No.
7.Why and How to Handle the Currency and Quantity Fields Differently in table
Creation ?
Working with Currency(Amount) and Quantity fields:
When we are working with international customers and Vendors if you provide only the
Amount figure i.e. 1000, but is not enough as it is not clear whether it is 1000 INR,1000
USD,1000 EUR, 1000 MYR etc. So you have to always provide the currency
key(INR,USD etc),when we are working with Amounts.
Similarly when we are working with Quantity we have to provide Units of the quantity.
Note : When the Amount Fields are created by using Data type CURR and the Quantity
Fields by Using QUAN. Then only the system expects Currency Key(CUKY) as
reference for Amount and Units key(UNIT) as reference for Quantity. This is must to
create a table with Currency and Quantity fields
Note : CURR and CUKY Fields Should be Linked in the Database and Similarly,
QUAN and UNIT Fields.
Now click on the tab .
8.Expain the Forign Key , Importance Of Foreign Key , Rules to Define the Foreign
Key ?
a. The Domain names of the field in the Foreign Key table and for the field in the
Check table should be same.
b. The field in the check table should be Primary Key.
INDEX : We can search a table for data records that satisfy certain search criteria faster using an
index.
An delete can be considered a copy of a database table that has been reduced to certain fields.
This copy is always in sorted form. Sorting provides faster access to the data records of the table,
for example using a binary search. The index also contains a pointer to the corresponding record
of the actual table so that the fields not contained in the index can also be read.
The primary index is distinguished from the secondary indexs of a table. The primary index
contains the key fields of the table and a pointer to the non-key fields of the table.
The primary index is created automatically when the table is created in the database.
Secondary INDEX :
This is necessary if the table is frequently accessed in a way that does not take advantage of the
sorting of the primary index for the access.
Note :All the counters of carriers at a certain airport are often searched for flight bookings. The
airport ID is used to search for counters for such an access. Sorting the primary index is of no
use in speeding up this access. Since table SCOUNTER has a large number of entries, a
secondary index on the field AIRPORT (ID of the airport) must be created to support access
using the airport ID.
NO
Two step: Two screens namely the overview screen and Single screen are created. The
user can see the key fields in the first screen and can further go on to edit further details.
13.What are the Master Tables and the Primary Key Fields for?
a. Currency Codes
b. Countries
c. Unit Of Measurements
d. Purchasing Organizations
e. Customer Master
f. Vendor Master
g. Plant Master Data
h. Company codes
i. Sales Organizations
j. Profit Center Master
k. Cost Center
l. Purchasing inforecord
and also the Transaction Codes to Create the same whereever it is Applicable ?
DATBI VALID TO
No
Purchasing Org T024E EKORG Purchasing Org
Purchasing Info ME11 Purchasing Info
Record Record
Currency Codes TCURU WAERS Currency Code
• The type group name in the ABAP/4 Dictionary has a maximum of 5 characters. The
Data Type names within type group <typepool> must begin with <typepool>
followed by an underscore.
Note : Up to 4.7 EE Version , We Can Create the TYPE Group SE80->Data Dictionary
But not from SE11. Where as from ECC 5.0 Version we Can Still Create it through
SE11 itself.
Ex : SLIS is Created by SAP to work with all the Datatypes required to Work with ALV.
• The types in a type group must be declared in ABAP/4 programs with the TYPE-
POOLS command to access the Data types from the TYPE-GROUP.
Elementary search help is for f4 help and collectice search help is the collection of
elementary search helps.
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 from a single table.
Each One is Elementary Search Help and the Combination is Collective Search Help.
Data Class : The Data class determines in which tablespace (Physical area) the table is
stored when it is created in the database.
Size Category : The Size category describes the probable space requirement of the table
in the database.
Delivery Class:It Defines the type of the data that is going to be stored and also it
defines the owner of the Table and also the delivery class controls the transport of table
data for installation, upgrade, client copy and when transporting between customer
systems.
Buffering a table improves the performance when accessing the data records contained in
the table.
The table buffers reside locally on each application server in the system. The data of
buffered tables can thus be accessed directly from the buffer of the application server.
This avoids the time-consuming process of accessing the database.
Only transparent tables and pooled tables can be buffered. Cluster tables cannot be
buffered.
Note : The table containing currency exchange rates is updated only once a day, but it is
read frequently. Buffering is recommended in this case.
Note : The contents of buffered tables are not always up-to-date in a distributed system.
You can bypass the buffer and read the data directly from the database table with the
ABAP command "SELECT SINGLE ... BYPASSING BUFFER.
Buffer Types:
o For large tables where there are frequent single-record accesses (using SELECT
SINGLE
In Single-record buffering Only the records of a table that are really accessed are
loaded into the buffer.
Single-record buffering should be used particularly for large tables where only a
few records are accessed with SELECT SINGLE. The size of the records being
accessed should be between 100 and 200 KB.
Generic Buffering :
With generic buffering, all the records in the buffer whose generic key fields match this record are
loaded when one record of the table is accessed. The generic key is a part of the primary key of
the table that is left-justified.
In this example, the record highlighted in red is read by a program from table SCOUNTER. If the
table is generically buffered, all the records read whose generic key fields (MANDT and CARRID)
agree are loaded into the buffer.
Full Buffering :
With full buffering, buffering either the entire table is in the buffe or the table is not in the buffe at
all. All the records of the table are loaded into the buffe when one record of the table is read.
In this example, a program reads the record highlighted in red from table SCOUNTER. If the table
is fully buffered, all the records of the table are loaded into the buffe.
Note : Tables best suited to full buffering are small, read frequently, and rarely written.
A view is a logical view on one or more tables. A 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
Types Of Views :
Transparent Table:-
It is used to store application data such as Master and Transactional Data. We always
create Transparent tables only.
There is a One to One relationship i.e. for the table in DDIC another table with the
same structure and the same name and the same fields will be created in the original Data
base.
Pooled Tables and Table Pools :
It should be used exclusively for storing internal control information (screen sequences,
program parameters, temporary data, continuous texts such as documentation).
The data from several different pooled tables can be stored together in a table pool.
This is Many to One relationship i.e. for many pooled tables in DDIC only one Data base
table will be created in the Data Base.
PT1
PT2
Table Pool One Table will be
created for the Table
PT5
Pool Not for each
PT3 Pooled Table.
PT4
It should be used exclusively for storing internal control information (screen sequences,
program parameters, temporary data, continuous texts such as documentation).
The data from several different cluster tables can be stored together in a table clusters.
This is Many to One relationship i.e. for many cluster tables in DDIC only one Data
base table will be created in the Data Base.
CT1
CT2
Note:- All the Tables in the Cluster Tables should have a common Primary Key.
20.What is the max. no. of structures that can be included in a table or structure?
Maximum. But not 9, where all the other Materials and Some Websites Says it is 9. (Try
yourself Including the Structures in the Custom Table).
Append Structure : It is to be Created for the Table for which the additional Fields
should be added.
Custom INCLUDE : SAP itself ADD the CI Include In the Table , Which Can be
Created by Simply Double Click on it. We Can add the Additional Fields to the Standard
Table , Only When SAP Provides CI Include in the Custom Table.
22.If a table that is to be extended contains a long field, we cannot use append
structures why?
If a table has an append structure, if it has a Long Field , Make Sure that the Long Field is
Last Field in the APPEND Structure . So that we can APPEND the Structure.
Note : When another APPEND structed is Created, it shoud be APPENDed after the
previous APPEND, i.e we are going to add new fields after the Long Field, where we are
violating the rule that the Long Field should be at the end of the Table.
23.What are the two ways for restricting the value range for a domain?
Fixed Values
&
Intervals
Value
Table
Non-standard conversions from display format to sap internal format and vice-versa are
implemented with so called conversion routines.
Ex : ALPHA
CONVERSION_EXIT_ALPHA_INPUT Conversion exit ALPHA, external->internal
CONVERSION_EXIT_ALPHA_OUTPUT Conversion exit ALPHA, internal->external
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
Note1 : Activating a lock object in the ABAP Dictionary automatically creates function modules for
setting (ENQUEUE_<lock object name>) and releasing (DEQUEUE_<lock object name>)
locks.
The Check Table is the dependent table to which the relationship is defined using
foreign keys. The contents of the check table field are shown in the input help for the
referenced field.
The Value table is the table attached to a field at the domain level, where the entry to the
field can be only from the value table. They are not used in the Input Help.
Note : Value table is the Default Check Table.
The MANDT field of the table specifies whether the table is client independent or not.
You can directly activate it from the SE11 -> Utilities ->Database Utility->Activate
and Adjust Database.
31.In which table are the programs,Tables,Development Classess are stored in?
The programs are stored in the table TADIR and the development class packages in
TDEVC, Database Tables in DD02L and DD02T(Short Texts).
32.When I create new entries in the table the field values are always in Uppercase.
How do I get the data with mixed case?
The reason for this is that the Domain for the field in the table might have Lowercase
checkbox unchecked. Check the Lowercase checkbox to preserve the case of your data.
EXERCISE
4.Add the below fields to the standard database table T001 by appending the
following fields,
6. Create the below table to Maintain the Purchase Order Details of the Vendors:
Note: Maintain the foreign key relationship between the above two tables Based on the
Vendor No.