SE11 is the T.Code to create Table in ABAP DDIC
ABAP DDIC/ DATA DICTIONARY: It is used to access the information about
the TABLES, VIEWS, DATA TYPE, TYPE GROUP, DOMAIN, SEARCH HELPS, LOCK OBJECTS.
Navigation to DDIC using TCode SE11
In the below tutorial we learn to create two tables, and establish
foreign key relation between two
ZABAP_TABLE_BOOK
ZABAP_TYPE_BOOK
And we learn
what is Domain,Data-element,Delivery class, Table-view/Edit, Technical settings (Data class + Size category),Enhancement
SCEANRIO TO CREATE foreign key relationship between TWO TABLES
ONE IS BOOK TABLE AND
THE OTHER IS TYPE OF THE BOOK TYPE
THESE TWO TABLES ARE LINKED BY COMMON FIELD
BOOK TYPE
ALL
THE DIFFERENT FIELDS OF EDUCATION BOOKS ARE MAINTAINED IN BOOK TYPE FIELD
The below can be achieved using foreign key
relation ship which is to link two fields
The dataelement of BOOK TABLE & BOOK
TYPE TABLE SHOULD be Same then it will create a foregin key link
ALL THE TYPES OF BOOKS ARE MAINTAINED IN
BOOKTYPE TABLE AND THESE TYPE OF BOOKS ARE ONLY ALLOWD IN BOOK TABLE
Ensure
the table Naming conventions as
In the
below maintain the table description
Delivery
class is used to specify the type of table example master table or transaction
table
master data: data which is seldomly changed. example is data which is there in address
like name, address and telephone number.
transaction data: this data will change frequently. example is goods in warehouse data
which change after every purchase order.
data
browser / table view editing is used to whether the table entries can be
created or read
Click
on field
double click on each data element and create data element. |
click on yes.
give the package name, click on save
click on create transport request and click
tick mark, in the below we need to maintain the client field if the table is
client
click on tick mark, we can create
domain by reusing existing domain or create new one
Domain: It is used to provide the
Data type, length, value range, sign, case sensitive for a field
In order to provide the value range for a
field as below we can maintain value range
size
category: maximun number of records table can hold
buffering: is used
to for the frequently accesed data is stored in the buffer area,based on the
selection of the buffer type the records are accessed
Log Changes: whenever the data is changed in order to check who has changed, we can click this checkbox.
enhancement category is used whether table can be enhanced that is we can add additional fields in future.
Creating another table BOOK TYPE
Foreign key relationship b/w two tables:
click on the field for which we want to create fk relationship above screenshot
give the check table name as below zabap_type_book and click create proposal and
SAP has provided lot of standard tables
KNA1 Customer master
VBAK Sales order header
VBAP Sales order Item
Check below standard table KNA1 which contains 277 fields.
below we can check delivery class and table editing for KNA1.
Below we can check the Currency field.
below we can see what the check tables are maintained for the KNA1 table.
below we can see the indexes maintained for the table kna1
index is maintained as below
In order to find the relation between the tables use SQVI Tcode
for example, we can find relationship between kna1, vbak, vbap tables.
KNA1-KUNNR = VBAK-KUNNR
VBAK-VBELN = VBAP-VBELN
Primary key of kna1-kunnr is
logically related to vbak-kunnr as
Primary key of VBAK-VBELN is logically related to PK of VBAP as below.
Upon activation of the table original table is created in the DATABASE
Database table: is created from tcode SE11, it collection of fields/Columns,it is
used to store the data permanently in database.
Dataelement: is combination of field label & domain(data type + length)
Delivery class: it describes the owner of the
class i.e the one who maintains the data in the table
Tab maint allwd: whether we can create the table entries or not
Techncial
settings:
data class: specifies table space in db
size category: number of records a table can store
buffering: frequently accessed data is retrieved from Buffer instead of DB
check table: at Field level validation of possible values of fields
value table: domain level validation of possible values of fields
Comments
Post a Comment