0% found this document useful (0 votes)
12 views

Data Dictionary

Uploaded by

Laksh Mhr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Data Dictionary

Uploaded by

Laksh Mhr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 56

Sr.

N Fields Data Element Data Type Length Decimal Short Description


o
1 MANDT MANDT CLNT 3 Client
2 Order_N Zonum NUMC 12 Order Number
3 Date ZDate DATS 8 Order Date
4 Vendor Zvname CHAR 30 Vendor Name
5 POrg Zporg CHAR 4 Purchasing Org
6 Total_A Ztotal CURR 7 2 Total Amount
7 Currency ZCrn CUKY 5 Currency

Use TCode: SE11

Select Create.
Give client field and data element.

Give field name and data element for Order name.

Save it.

Double click on data element (ZONUM).


Click on Yes.

 Data Element

Give Description and domain name.

Select Field label.


Again select data types.

Double click on Domain.

Select Yes.
Select Local Object.

Click on Yes.
Save – Check and Activate.

Select
Local

Object.

Activate (Ctl+3).
Select Domain and Data element.

Follow same steps and create remaining data element and domains.

Sr.N Fields Data Element Data Type Length Decimal Short Description
o
1 MANDT MANDT CLNT 3 Client
2 Order_N Zonum NUMC 12 Order Number
3 ODate ZDate DATS 8 Order Date
4 Vendor Zvname CHAR 30 Vendor Name
5 POrg EKORG CHAR 4 Purchasing Org
6 Total_A Ztotal CURR 7 2 Total Amount
7 Currency ZCrn CUKY 5 Currency

After Creating all fields and data element.


Select Currency/Quantity field.

Give reference table and ref. field.

Select more and click on technical settings.


Save it.

Come back and activate Database table.

Now select More-Utilities-table contents-create entries.

You can record as many as you want.

Save it.

Back.

Display table content.

Select more -Utilities-table contents-Display.


Execute.

Change Entry

Select entry and click on change.


Save it.

Table Maintenance Generate


Select more – utilities – Table maintenance generator
Click on create.

Save it.
Give table name and select Edit.

Click on new entries.

Here you can add entries as many as you want.


TMG Using 2 steps.
Delete TMG

Continue.
Now select two steps.
Click on find scr. Number(s).
Continue
You will get screen number.

Now select create button.


Save it.
Use Tcode: SM30
Give table name click on edit.
Select new entry button.

Here you can enter only one entry at a time.

Structure
There are two types of structure.
1. Include
2. Append
1. Include Structure.
Suppose I want to add delivery date and address in below table.
Sr.N Fields Data Element Data Type Length Decimal Short Description
o
1 MANDT MANDT CLNT 3 Client
2 Date ZDate DATS 8 Order Date
3 Order_N Zonum NUMC 12 Order Number
4 Vendor Zvname CHAR 30 Vendor Name
5 POrg Zporg CHAR 4 Purchasing Org
6 Total_A Ztotal CURR 7 2 Total Amount
7 Currency ZCrn CUKY 5 Currency
8 Ddate ZDdate DATS 8 Delivery Date
9 Dadd ZDadd CHAR 40 Delivery Address

First we need to create Data element and Domain for Delivery date and Address.
Use Tcode: SE11
Give Domain name and click on create.

Save and activate.


We will use domain CHAR40 (Standard) For Delivery Address.
Create Data elements
Select
create button.

Continue.
Give description and Domain name.
Select field label.

Save and activate.


Follow same steps and create one more data element (ZDadd).

Now create include structure.

Structure name – Zinclude


Click on create.

Continue.
Save and activate.

Save – activate.

Add include structure in Database table


Select more – edit – include – insert.

We will insert
include structure
here

Give include structure name.


Continue.

Enhancement category

More-Extras-Enhancement category.
Copy –Save – activate.

Append Structure

Select more – Append Structure

Continue.
Double click on Zonote.

Yes.
Save in your customizing request or local object.
Save – activate.
Order Item table.
Sr.No Fields Data Element Data Type Length Decimal Short Description

1 MANDT MANDT CLNT 3 Client


2 Order_N Zonum NUMC 12 Order Number
3 Item_N Zitem_n NUMC 3 Item Number
4 Item_name Zitemn CHAR 45 Short Description
5 IPrice Ziprice CURR 7 2 Total Amount
6 Person_re Zperson CHAR 25 Person responsible

Create item table like Order Header table.


Your table will look like this.
Maintain Primary foreign key

2.Click on
primary key

1.Select
common field

3. Give check
table

Click on copy.
Yes.
Cardinality means number of record available in primary table corresponding to foreign key table.

Save and activate.

Create TMG for Item Table.

Now maintain record in item table.

Tcode: SM30

Give table name and select edit.

New entries.

Save it.
Index

Indexes are used to avoid the duplicate data and improve the performance while accessing the table.

1. Primary Index: Primary indexes in SAP are created automatically by the SAP system using key fields of
database tables.

2. Secondary Index: Secondary Indexes are created manually and managed by the SAP ABAP consultant. We can
create up to 9 secondary indexes.

a) Creation of secondary index

➢ Go to SE11, Provide Table name

➢ Click on change mode, click on Index and create index.


1.Click on
create

Give index name and continue.

Enter field name save and activate.

Type of database table .

1. Transparent table.
2. Pooled tables
3. Cluster table

Views

Views are the data dictionary repository objects in ABAP, which are used to view the data of several tables in
one place.

A view is similar to the database table, but it does not contain any physical data, instead it derives data from
different tables and acts like a virtual table (table without any existence). Since it does not physically store any
data, and the database only contains the view definition, hence it takes very little space in the database.

There are four types of database view.

1. Database view
2. Projection view
3. Maintenance view
4. Help view

1) Creation of Database view

➢ If a view is created on one or more tables by combining the fields using inner join, such a view is called
Database view. Since this view uses the inner join, it only combines the matching records from the table.

➢ Go to SE11. Click the radio button in front of View option, and give a name to the view then click the
create button given on the screen.
Click on create.

Select Database view.


➢ A view maintains screen appears that contains multiple tabs, where first provide the description in the
field "Short description”. Select the Table/Join Conditions tab and will provide the table names (EKKO).

➢ When we click on the Relationships button, all the tables with the foreign key relationship with the base
table (EKKO) will be displayed.

Onc
e we will select the EKPO table, all the join conditions field names will be filled automatically.

 Move to the next tab, which is View fields, to select the fields of both tables that we want to display
 After selecting the fields, click on the Copy button. Similarly, we will choose the Fields of another table
(EKPO).
Click on Table field.

Select table name and click on choose.

You can select whatever the field you want.

Then click on copy.

Again select table field.


Table EKPO click on choose.

Select fields from EKPO click on copy.

Your database view will look like this.

Save and activate it.

We display the records that we have selected using the database view. Click on the Content option given at the
screen.
Can view all the records using the execute button given at the above image. It will display all the records.
2) Creation of Projection view

➢ ABAP Projection views are special views used to hide some fields of a database table and display only the
required or selected fields. Hence, using this type of view, we can minimize the fields by projecting only required
fields and rest fields will be filtered out.

➢ This view allows us to read and also maintain the needed data.

➢ The projection view is created on a single table only.

Steps:

➢ Go to SE11 Click the radio button in front of view option

➢ Provide a name to the view

➢ click the Create button given on the screen

A pop-up window will appear with all the views, from where select the “PROJECTION VIEW”.
➢ Provide basis table for the table which view to be created.

➢ Give Fields names, save and activate.

Display content.
Execute.

3) Creation of Maintenance view

➢ Maintenance view is created on two or more tables, which is used to maintain the data of several tables
altogether. It helps us to maintain the complex application objects easily.
➢ It can combine several tables in a single unit, but the tables must have a foreign key relationship.

➢ It allows us to maintain and read the data of the table.

STEPS:

➢ Go to SE11 Click the radio button in front of View option, and give a name to the view then click the create
button given on the screen.

Click on create.

Select maintenance view and continue.

Click on the Table/Join Conditions tab; provide the name of the primary table for view under the Table column.
Click on relationships

Select reference table LFA1.


Copy

Go to the View fields tab, click on the Table Fields button to select the fields from each Table (primary and
secondary).

First select LFB1

Select copy button.

Follow same steps for LFA1.


Your Maintenance view will look like this.

Go to the Maint. Status tab and select the appropriate radio button. Select the other fields.
Save and Activate.

Go to the Utilities> Table Maintenance Generator. Fill the details as shown. Save it and activate the view.

Now go to sm30 Transaction code and click on edit.


The data will be displayed as below.
4) Creation of Help view

➢ The Help views are created on two or more tables, specifically for the "Search helps" object in DDIC. It means
they are used to provide the input helps (F4) option for different fields in ABAP.

➢ When going to search help, views with outer join act as the selection methods and these methods can be
either a table or a view, which specifies that data can be selected from a view or table. For such purpose, we
need to create the help views in ABAP.

Steps to create Help view

➢ Go to SE11 Click the radio button in front Help view.

➢ Provide a name to the view.

➢ Click the Create button given on the screen.


Pop-up window will appear with all the views, from where select the “HELP VIEW," and click on the

Copy.

Give table name and click on relationship


after that select select reference table T001
and click on copy.

Now Select view fields and click on table fields.

Again select table BSEC and continue.


Select required field and click on copy.

Same for table T001

Save and activate.

LOCK OBJECTS IN DDIC

To Avoid Parallel access, we use lock objects. is used to synchronize access to the same data by more than one
program.
Whenever we create a lock object two function module will be created.

1) ENQUE: used to lock the object.

2) DEQUE: used to unlock the object.

Whenever we create a lock object naming convention need to be maintained as ‘EZ/EY’.

There are 3 types of Lock Objects:

1. Write/Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another
exclusive lock or for a shared lock is rejected.

2. Read/Shared lock: More than one user can access the locked data at the same time in display mode. A
request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.

3. Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and
are processed successively. All other lock requests are rejected.

Creation of lock object

➢ Go to transaction SE11. Click ‘Lock Object’ radio button.

➢ Enter the name of lock object starting with E and click the Create button.

Select create button.

Enter the table name in Name field and select the lock mode as Shared Lock.
Click on Lock parameter tab, the following screen will appear.

Save and activate. Automatically 2 function modules will generate. To check function modules, we can use Go to
→ Lock Modules.

Click Lock Modules and the following screen will open.


SEARCH HELP

Providing a help for the list of the values to be selected on input field is called search help.

There are two types of search helps.


Elementary search help: A single search help for an input field is called elementary search help.

Collective search help: Group of elementary search help for a single input field is called collective
search help.

Creating Elementary Search Help

Go to SE11
Select search help radio button and provide name.
Click on ‘Create’.
TYPES OF TABLES
There are 3 Types of tables:
1. Transparent tables
2. Cluster tables
3. Pool tables

Transparent tables: - Transparent tables are one to one relationship. That is if you
create one transparent table in the data dictionary, then it’ll store like only one data
base table in the data base.

Cluster table: - This tables are many – one relationship. That is if you create the
many clustered tables in DDIC then they will form like a table cluster & store in
the data base. Buffering isn’t possible for clustered table. From this reason only
fetching the data from clustered table take more time. Clustered table is suitable
when you fetch the fewer amounts of data from more fields.

Pooled table: - Pooled tables are many – one relationship. That means if you create
many pooled tables in DDIC, then they will form like a table pool & stored in
the data base. Pooled tables are suitable when we fetch the large amount of data
from fewer fields.

You might also like