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 tables.

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 Category, Buffering

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






Goto TCode SE11 Provide the table name ZABAP_TABLE_BOOK Click on create button




Ensure the table Naming conventions as above.

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 only.



Click on field tab.







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 specific.




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

 

click yes below 
click yes below
 

click yes below

 

give the data type select from the f4 help 

 

click yes below

 

save it in a Package as below 

 

Save it in a Transport request as below










activate the domain.


provide the data type as below.


In order to provide the value range for a field as below we can maintain value range

 


Provide the Field label for Rating as Below




Provide the field label for BOOK_TYPE field as below.

 

Provide the Data type for field Price as below

Maintain the Reference table and ref field for the Price field as below as for data type CURR we need to maintain the reference table and reference field.
Click yes below




Data class: it is used to specify the table space allocation for in the data base



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.

 

  


  


 

Activated the table go to menu utilities. 



IN ORDER TO CREATE THE TABLE ENTIRES IN THE BELWO CLICK ON UTLITIES TABLE CONTENTS CREATE ENTIRES

           
 


 

 


 


 



Creating another table BOOK TYPE

 
After creation of the table ZABAP_TYPE_BOOK we have created entries in the below we can see

 

 
Below are the two tables ZABAP_TABLE_BOOK and ZABAP_TYPE_BOOK are the two tables for which we want to maintain the foreign key relationship here ZABAP_TABLE_BOOK is Foreign key Table and ZABAP_TYPE_BOOK is the check table 

 
Click on the field for which we want to maintain the FK Relationship


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 enter.

 

 


 
 
Now the FK relationship is created between the fields as below we can find.

 

 


SAP has provided lot of standard tables example.

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 below.

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

Popular posts from this blog