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

Sap Abap Ddic Se11

Uploaded by

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

Sap Abap Ddic Se11

Uploaded by

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

Sap

Abap
DDIC (Data
Dictionary-
SE11)
Sonu Jangir Abap Developer
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Data Dictionary

Table of Contents
Data Dictionary
Database Tables
Domain
Data Types
Currency and Quantity Fields
Table Maintenance Generator
Primary and Foreign Key Relationship
Technical Properties of a Table
Structures
Predefined Types
Include and Append Structure
Search Help
Views
Lock Objects
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Data Dictionary (DDIC)
Introduction:

 The data dictionary is the central and structured source of data.


 The central data definitions (metadata) are maintained in the
data dictionary.

 The data objects can be referred anywhere in the system.

Figure 2.1: Data Dictionary Central Repository

 The transaction code SE11 is used to work with the data


dictionary.
 Following are the different types of data dictionary objects
1. Database Tables.
2. Domains.
3. Data types
a. Data element.
b. Structure.
c. Table type.
4. Search helps
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


a. Elementary search help.
b. Collective search help.
5. Views
a. Database view.
b. Maintenance view.
c. Help view.
d. Projection view.
6. Lock objects.
7. Type groups.

1. Database tables (Data Dictionary tables)


Introduction

 They are the small data storage components in the data base.
 Tables are the collection of fields which contain the physical
data.
 The tables are made up of rows by columns.

[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Figure 2.2: Database Table

 In SAP tables are of three types.


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

 The transparent tables have one-one relationship with the


database tables, that means, the table names, field names and
the number of fields are similar in both data dictionary and
database.

[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Figure 2.3: Transparent Table

Note: In the real time we mostly work with the transparent


tables.

Pooled tables:

 The pooled tables have many to one relationship with the


database tables, that means one table on the data dictionary is
liked with another set of tables called TABLE POOL in the data
base.
 The pool tables follow the binary search while accessing data.
 Key field names are different in DDIC and table Pool
Cluster tables:

 The cluster tables also have many to one relationship with the
database tables, that means one table in the data dictionary is
stored with another set of tables called cluster pool.
 Key field names are same in DDIC and cluster Pool

[Date]

Figure 2.4: Pooled or Cluster Table


Document Prepared By Sonu Jangir Sap Abap Developer
Different approaches to create the database (or) Data dictionary
tables:

 There are two approaches to create the transparent database


or data dictionary tables.
1. Top down approach.
2. Bottom up approach.

1. Top down approach:

 In this approach the required data elements and domains are


created while creating the tables.

Tables Data Elements  Domains

2. Bottom up approach:

 In this approach the required domains and data elements are


created first then they can be used at the time of creation the
tables or structures.

Domains  Data Elements  Tables

Note: In the real time the top down approach is advisable since
the bottom up approach take more time and difficult to remember
to create a data element and domains.

Domain
Introduction:
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


 It is also one of the data dictionary objects which can be used
to maintain the technical properties of field such are data
types, length of the data……..etc.
 It can also be used to maintain the value tables to provide
search help on the field.

FIELD NAME DATA TYPE DATA LENGTH


EMP_NO NUMC (numeric) 10

EMP_NAME CHAR (character) 30

Data Elements:

 It is one of the data dictionary objects.


 It is used to maintain the field tables of the fields in the tables
or structures.

FIELD NAME FIELD LABELS


EMP_NO EMPLOYEE NO

EMP_NAME EMPLOYEE NAME

Hierarchy of the domains and data elements reusability:

 The domains, data elements and tables or structures can be


reused
as
below
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Figure 2.5: Hierarchy of Domains and Data Elements Reusability

Mandatory fields:

 The mandatory fields are the compulsory fields to be filled if


the data.
 The tick marks are appeared on the mandatory fields

Example: Mandatory field Must be filled

Optional field May or may not be


filled

System provided search help:

 It is used to display all the system provided possible entities


and select any one of them.
 The function key ‘f4’ or a search help icon is pressed to display
the search help windows.

Creation of the below custom table:

FIELD KEY INITIAL DATA DATA DESCRIPTION


VALUE TYPE LENGTH
MANDT CLNT 3 Client

EMP_NO NUMC 10 Employee No

EMP_NAME CHAR 30 Employee


Name

Client dependent and independent tables:

 The tables which have the field name will have MANDT (client
[Date]

no) are called client dependent tables.


Document Prepared By Sonu Jangir Sap Abap Developer
 The table which does not have the field MANDT is called client
independent table.

Note: In the real time we mostly work with the client


dependent tables.

Key fields:

 Key fields are used to maintain the unique data by avoiding the
duplicate data.
 In SAP the key field check boxes are checked to make the fields
as primary key fields.

Note: If there are more than one field the data will be checked
row level.

Initial value check box:

 It is checked to take the default field values of the key fields for
the first time.

Example: integer :0

Character : space…………..etc.

Steps to create the database (data dictionary) transparent table:

 Execute the transaction code SE11.


 Enter the table name (ZB21_EMPLOYEE).
 Click on create button (F5).
 Enter short description (could be any).
 Select an appropriate delivery class (c).
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


 Select an option ‘Display or Maintenance allowed’ by pressing
the drop down under data browser or table view maintenance.
 Click on fields tab.
 Enter the field name MANDT’.
 Check the check boxes key and initial value.
 Enter the standard data element ‘MANDT’.
 Press the ‘Enter’ button.

Note: If a data element exist in the system, the corresponding


details such are data types, length etc. are displayed.
 Click on save icon.
 Click on local object button (F7).
 Enter the next field name ‘EMP_NO’.

Steps to Create of data element:

 Enter the data element name ( ).


 Press the ‘Enter’ button.
 Double click on data element name.
 Click on yes button.
 Click on yes button or enter.
 Enter short description (EMPLOYEE NAME).
 Click on the tab ‘Field label’.
 Enter the field labels for short, medium, long and heading.
 Press the ‘Enter’ button.
 Click on save icon.
 Click on the local object button (F7).
 Click on the tab ‘data type’.

Steps to Create of domain:

 Enter the domain name (could be same as data element name).


[Date]

 Press the ‘Enter’ button.


Document Prepared By Sonu Jangir Sap Abap Developer
Note: If the domain is already available in the system, the
corresponding details such as data type, data length………….. Etc.

 Click on yes button in case of no active domain available


message.
 Double click on the domain name.
 Click on yes button.
 Click on yes button.
 Enter short description.
 Enter the required number of characters.

Note:
 Press F4 function key to see all the system provided data
types in the search help.
 The decimal places should be filled for the decimal data types
such are currency, quantity………..etc.
 The field output length is used to restrict the data output
length.
 The check box sign is checked to return sign of the number.
 The check box lower case is checked to make the character
fields as a case sensitive to accept both upper and lower case
letters. Since the system takes the character data as
uppercase letters by default.
Example: Data type : (NUMC)
No of characters : (10)
Decimal places : ( )
…………………………………………

 Click on save icon.


 Click on the button local object button.
 Click on check icon (ctrl + F2).
[Date]

 Click on activate icon.


Document Prepared By Sonu Jangir Sap Abap Developer
Note: If an object is activated directly, the corresponding
object will be saved, checked and activated.
Activate = Save + Activate

 Press the ‘Enter’ button.


 Click on an icon back (F3).
 Click on activate icon.
 Press the ‘Enter’ button.

Note:
 Check the check boxes key and initial value to make the fields
of the table as key field.
 Follow the similar steps to create any number of required
data elements and domains.
(Refer ‘creation of data elements’ and ‘creation of domains’ )

 Click on technical settings button.


 Enter or select an appropriate data clause (APPLO).
 Enter the required size category ( '0’ )
 Click on save icon.
 Click on back.
 Click on the menu icon ‘extra’.
 Click on enhancement category.
 Click on yes button.
 Click on active icon.
 Click on back icon.

Steps to create the table entries (in the custom table):

 Execute the transaction code SE11.


 Enter required custom table name.
 Click on display button.
[Date]

 Click on the menu icon utilities.


Document Prepared By Sonu Jangir Sap Abap Developer
 Click on the table contents.
 Click on create entries.
 Enter required data.
 Click on save.
 Click on back icon.

Note: Follow the similar steps to create any number of entries.

Steps to execute a table:

 Execute the transaction code SE11.


 Enter the required table name.
 Click on display button.
 Click on the icon contents (ctrl + shift + F10).
 Click on execute icon.

Note:
 The transaction codes SE16or SE16N can also be used.
 The button number of entries is used to know the total
number of recordings in the table.

Some of the useful functions or properties in the tables:

Steps to convert field names to field labels and vice versa:

 Once the table is executed ( SE11  Table name  Display 


Contents )
 Click on the menu item settings.
 Click on user parameters.
 Select a radio button either field name or field label.
[Date]

 Click on yes button.

Document Prepared By Sonu Jangir Sap Abap Developer


Steps to change the input fields for selection:

 Exécute transaction code SE16 or SE11.


 Enter the required table name.
 Click on the table contents icon.
 Click on the menu item settings.
 Click on fields for selection.
 Check or uncheck the required fields.

Note:
 Check is to add input fields and uncheck is to hide input fields.
 An icon find (ctrl + f) can be used to find the required fields.
 (Find icon  enter a field name or field label in the find string
 press enter)
 An icon select all (F9) is used to select all the fields.
 An icon deselect all (shift + F2) is used to deselect all the
fields.

 Click on yes button.


 Click on back icon.

Steps to choose the fields in the list:

 Once the table is executed.


 Click on the menu icon settings in the output list.
 Click on format list.
 Click on choose field (ctrl + F9).
 Click on an icon find.
 Enter the required field names or field labels to be displayed in
the output list.
 Press the ‘Enter’ button.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


 Click on the required highlighted field name or field label
(yellow background).
 Check the check box that appeared beside a fieldname.
 Click on yes button.

Note: Uncheck the check box to hide the fields.

Steps to change the output list format:

 Once the table is executed.


 Click on menu icon settings.
 Click on user parameters.
 Select the required format (AVL grid display) under output list
block.
 Click on yes button.

Note: The default output list format is ‘SE16 standard list’.

Steps to download the table data:

 Once the table is displayed either in ALV list format or ALV grid
format.
 Click on an icon local file (ctrl + shift + F9).
 Select the required file format such as ‘spread sheet’ or ‘rich
text’ or ‘html format’……etc.
 Click on yes button.
 Select the required directory by pressing the function key ‘F4’
or search help icon.
 Enter the file name (download_excell.xls).
 Click on back icon.
[Date]

Steps to find a system generated program of the tables:

Document Prepared By Sonu Jangir Sap Abap Developer


 Once the table is executed.
 Click on the menu item system.
 Click on status.
 Double click on the system generated program name to see
system generated source code.

Note: The system generated program name is appeared in the


program field under SAP data block.

Currency or Quantity fields:

 In SAP the currency and quality fields are required currency key
and quantity unit. Hence, the reference table and the reference
field must be specified for currency and quantity fields.
 The data type for the currency field is ‘CURR’ and the data type
for the currency key is ‘CUKY’.
 The data type for the quantity is ‘QUAN’ and the data type for
quantity key is ‘UNIT’.

Note:
 The reference table could be any table which has the currency
key and quantity unit fields.
 The same table can also be used as a reference table if it has
the currency key or quantity unit fields.

 The number of decimal places at domain level must be


specified for currency and quantity fields.
Example: <ZCUST_TAB>
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Field Data Reference Reference Description
type table field
CURR_KEY CUKY Currency
key
EMP_SAL CURR <ZCUST_TAB> CURR_KEY
Salary key
QUANTITY QUAN VBAP MEINS
( standard Quantity
table )

Steps to work with the currency or quantity fields:

 Once the currency and quantity fields are inserted in the table
or structures.
 Click on the tab currency or quantity fields.

Note: The columns reference table and reference fields are enabled
for the currency and quantity fields only.

 Specify the reference tables and reference fields as like the


above example.
 Click on activate icon.
 Press the ‘Enter’ button.

Example: 50,784.50 RS/USD……….

Currency value_CURR currency key_CUKY

100.50 pieces/kgs/grams……..

Quantity_QUAN Quantity units_UNIT


[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Table Maintenance Generator (TMG):

 It is used to maintain (create/change/delete) the custom tables


and maintenance views.
 It also must be created to check and pass the default values of
the table fields while maintaining.
 The transaction code SM30 is used to maintain the custom
tables and maintenance views.

Note: In the real time the custom tables and the maintenance
views are maintained using the transaction code SM30 only.

Steps to create TMG:

 Once the custom table or maintenance view is in change mode


or in display mode.

Note: The custom table is maintenance view must be activated


before Table Maintenance Generator is created.

 Click on utilities menu item.


 Click on table maintenance generator.
 Select an appropriate authorization group (&NC&).

Note: Authorization group is used to control the user access.


 Enter the function group name (could be same as the table
name).

Note: The function group must be specified. Since, the system


generates the screen and the corresponding source code for the
table maintenance under the function group.
 Select the radio button one step maintenance.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Note:
 In case of one step maintenance the system generates single
over view screen to maintain and display the data.
Example: In case of one step
EMP_NO EMP_NAME --------------
1 A B
2 C D
| | |
| | |
Over-view screen – 1 (display / change mode)
 In case of two step maintenance the system generates two
screens to create a single entry at a time and display to create
a data in another screen. Two step maintenance is the default
option.
Example: In case of two steps

EMP_NO :
_______________

EMP_NAME :
_______________
|
|
|

SINGLE SCREEN

Display mode only

EMP_NO EMP_NAME --------------


1 A B
| | |
| | |
[Date]

Overview screen – 1
Document Prepared By Sonu Jangir Sap Abap Developer
 In the real time the option one step maintenance is
preferable. Since, the multiple entries can be maintained at a
time.

 Enter overview screen number (could be any number).


 Click on create icon (F6).
 Click on save icon (package: $TMP).
 Press the ‘Enter’ button.
 Click on local object button (F7).
 Click on back icon.

Steps to maintain the custom table or maintenance view:

 Execute the transaction code SM30.


 Enter the required custom table or view name.
 Click on maintain button.
 Click on new entries button.
 Maintain the required data.

Note: Select an entry and click on delete (shift + F2) icon to delete
the table / view entries.
 Click on save icon.
 Click on back icon.

Steps to change a custom table:

 Execute the transaction code SE11.


 Enter the required custom table name.
 Click on change icon (F6).
 Select the required field before which the new field to be
[Date]

inserted.

Document Prepared By Sonu Jangir Sap Abap Developer


 Click on an icon insert row that appears just above the field
column.

Note: An icon delete row is used to delete the unwanted fields.


 Add the required additional fields and make the necessary
fields.
 Click on activate button.
 Press the ‘Enter’ button.

Deletion of TMG:

 If any changes are made in custom table after TMG is created


then the TMG must be deleted and recreated again without
getting any run time error.

Select to delete ‘TMG’ and recreated:

 Once the custom table is in change mode.


 Click on the menu item ‘utilities.
 Click on TMG.
 Click on delete icon (shift + F2).
 Click on yes button.
 Click on back icon.
 Select the radio button ‘one step maintenance.’
 Click on create (F6) icon.
 Click on save icon under a package $TMP (local object).
 Click on back icon.

Table Adjustment:

 If the key fields are changed as non-key fields by unchecking


key check boxes, the system gives an error to convert the table.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Example: Structure change at field level.

 The table must be adjustable to avoid such kind of errors.


 The transaction code SE14 or the menu bar utilities and
database utilities in SE11 can be used to adjust the tables.

Steps to adjust the table:

 Execute the transaction code SE14.


 Enter the required table name in the object name field.
 Click on edit button.
 Click on the button ‘Active and Adjust database’.
 Click on yes button.
 Activate the table in SE11.

Steps to copy a data dictionary object:

 Execute the transaction code SE11.


 Enter the required data dictionary object name (table name).
 Click on icon copy.
 Change to table name.
 Click on yes button.
 Press the ‘Enter’ button.
 Click on local object button.

Note:
 The TMG is not copied while copying the table.
 The data of an existing table is not copied while copying the
table.

 Click on change icon.


 Make the necessary changes in the copied table.
 Activate the table and create TMG.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


 Click on back icon.

Steps to delete a data dictionary object:

 Execute the transaction code SE11.


 Enter the required DDIC object name.
 Click on delete icon.

Note: It is not possible to delete a DDIC objects if they are already


used in another dependent objects.
 Click on yes button.

Steps to create the custom transaction code to maintain tables or


maintenance views:

 Execute the transaction code SE93.


 Enter the custom transaction code name to be created.
 Click on create button.
 Enter short text (custom transaction code).
 Select the last radio button (parameter transaction).
 Click on yes button.
 Enter the transaction code SM30 in transaction field.

Note: If a checkbox step initial screen is check, an initial screen


of SM30 can be skipped.
 Scroll down and check all GUI supported checkboxes.
 Maintain the default values as below.
Name of screen field Value
VIEW NAME <ZCUST_TABLE>

UPDATE X
 Click on save icon.
 Click on local object button.
 Execute the above created transaction code to maintain the
[Date]

table.
Document Prepared By Sonu Jangir Sap Abap Developer
Indexes:

 Indexes are used to avoid the duplicate data in the table.


 They can also be used for better performance while extracting
the data from the tables.
 Indexes are of two types:
1. Primary index.
2. Secondary index.

Primary Index:

 The primary indexes are generated automatically by the system


using all the key fields of a table.

Secondary Index:

 The secondary indexes are maintained by the technical


consultants.
 The secondary indexes are created using key and non-key fields
of a table.
 The secondary indexes are also called custom indexes.
 Up to 9 secondary indexes can be created in a table
Note: Secondary indexes cannot be defined on pooled and
cluster tables.

Note: In the real time the secondary indexes are not advisable since
the data is filtered at database level for all the users.
 The indexes are represented as below.

Example: <dbtab / dbtab> ~ < PIN /ZSD>

<PIN>  Primary index

<ZSD>  Secondary index


[Date]

Steps to create a secondary index:

Document Prepared By Sonu Jangir Sap Abap Developer


 Once the table is in display or change mode.
 Click on the button ‘indexes’.
 Click on create icon.
 Click on create index.
 Enter the index name up to 3 characters only (ZSD).
 Click on yes button.
 Enter short description.
 Click on ‘Table Fields’ button.
 Check the required fields.
 Click on yes button.
 Click on activate icon.
 Click on back icon.

Note: An icon index is used to delete unwanted index.


 Cancel the index window.
 Click on back.

Primary and foreign key relationship or link:

 In each RDBMS (Relational database management system) all


the tables are linked together through primary and foreign key
relationship.
 It is used to execute the correct data from the multiple tables
by joining them.
 In SAP the master tables (primary tables) are called check
tables, the child tables are called foreign key tables.

Note: The domain name of a check table field should be similar to a


domain name of the foreign key field in the child table to create
foreign key relationship, but the field name is different.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Figure 2.6: Primary and Foreign Key Relationship

Note:
 Here domain name of EMP_NO and EMPNO should be similar.
 It is not possible to join pooled and cluster tables, since they
are already set of tables.
 A search help is displayed to see the possible entries of a
check table field on the foreign key field when the foreign key
table or child table are executed.

Steps to create a foreign key relationship:


[Date]

 Once the foreign key table or child table is in change mode.


Document Prepared By Sonu Jangir Sap Abap Developer
 Place the cursor on the field through which the foreign key
relationship to be created.
 Click on foreign key icon that appears beside search help
button.
 Enter the required check table name.
 Maintain the foreign key fields and select the radio button key
field or candidates as below.

Example: Foreign key fields


Checkbox Check table Foreign key Foreign key
table field
<ZCUST_TABLE> EMP_NO

|
|
|
Key fields / candidates

 Click on yes button.


 Press the ‘Enter’ button.
 Click on yes button.
 Activate the foreign key table.
 Click on back.

Different ways to check table relationships (or) link between the


tables:

There are two ways to check the relationship between the tables:
[Date]

1. Using the transaction code SQVI.

Document Prepared By Sonu Jangir Sap Abap Developer


2. By maintaining the foreign key (child) custom tables.

1. Transaction code SQVI:

 It is used to know the relationship or joining conditions


between the tables.

Steps to use SQVI:

 Execute the transaction code SQVI.


 Enter quick view name ‘YJOIN’.
 Click on create button.
 Enter title.
 Select table join under data source block.
 Click on yes button.
 Click on insert table button.
 Enter the required table name (<ZCUST_TABLE1>) or standard
table name.
 Click on insert table button.
 Enter the required table name (<ZCUST_TABLE2>) or standard
table name.
 Press the ‘Enter’ button.

Note:
 Follow the similar steps to insert any number of transparent
tables.
 The button delete table is used to remove the tables from the
join.

2. To check the relationship by maintaining the foreign key table:

 Execute the transaction code SM30.


 Enter the foreign key table name (child table name).
[Date]

 Click on maintain button.


Document Prepared By Sonu Jangir Sap Abap Developer
 Click on new entries button.
 Enter any values in the foreign key field which does not exist in
the check table.
 Click on save icon.

Note: If the system given an error message as ‘entry xxxx does not
exists in the check table’, the relationship is working fine.

Value table:

 The value is maintained at domain level to provide the possible


maintained entries as a search help.
 It does not force the user to select any one of to maintain
entries in the value table at the time of maintaining the custom
table.

Steps to maintain the value table:

 Once the domain is in change mode.


 Click on the tab value range.
 Maintain the required single values or intervals or specify any
value table.

Example: Single values:

FIXED VALUE Short Text


A

Intervals:
Lower Limit Upper Limit Short Text
A S
[Date]

T X
Document Prepared By Sonu Jangir Sap Abap Developer
(or) Value table (ZCUST_TABLE2)

 Click on save icon.


 Click on back icon.
 Activate the data element.
 Click on back.

Differences between check table and value table:

Check Table Value Table


1. It is maintained at table 1. It is maintained at domain
level. level.
2. If forces the user to select 2. It does not force the user
any one of check table field since it has empty value by
entries. default.
3. The search help is displayed 3. The search help is displayed
from the check table on the on each field which is linked
foreign key field of a foreign with the same domain of
key table (child table). the valued table.
4. Can be used to extract the 4. It is not possible to extract
data. the data since not physical
table.

Standard Tables:

 They are the system provided tables.


 The standard tables can only be updated through the standard
transaction codes (applications or programs).
 The standard tables of function areas can be recognized as
below.
Sales and distribution tables
[Date]

Most of the SD tables start with VB* and LI*

Document Prepared By Sonu Jangir Sap Abap Developer


Example:
VBAK -- Sales document Header data.
VBAP -- Sales document Item data.
VBAK – Billing Document.
VBRP – Billing Document item data.
|
|
|
LIKP – Delivery Document Header data.
LIPS – Delivery Document Item data.

Material Management (MM) tables:

 Most or the mm tables start with MA* and EK*

Example:

MARA – Material Master Data.

MARC – Material Plant Data.

EKKO – Purchase Order Header data.

EKPO – Purchase Order Item data.

Finance and controlling (FI / CO) tables:

 Most of the FICO tables start with BS*, PR* and CS*

Example: BSAD – Customer accounts for cleared items.


[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


BSAK – Vendor account for cleared items.
BSID – Customer accounts
BSIK – Vendor accounting
|
|
|
PRPS – WBS element master data.
(WBS – Work Breakdown Structure)
CSKS – cost center master data.

Note:
 In fico some of the tables are cluster tables which start with
BSE*
Example: BSEG – Accounting Document Segment.
BSEC – Accounting Data Document Segment.
BSET – Tax Data Document.
…….

HR Tables (Human Resource):

 Most of the HR tables start with PA* and HRM*

Example: PA000-HR Master Record for an info type ‘0001’.

PA001-HR Master Data: Registry for serialization in ALE in


bound.

Customer relationship management (CRM) tables:

 Most of the tables start with BUT*


[Date]

Example: BUT000 – Business Partner : General data 1

Document Prepared By Sonu Jangir Sap Abap Developer


BUT001 – Business Partner : General data 2

Some of the example tables for pooled:

 Some of the pooled tables start with M-MTV*

Example: M_MTVMA – Generated pooled table for match code.

Vendor Tables:

 Most of the vendor tables start with LF*

Example: LFA1 – Vendor master table.

LFB1 – Vendor master table(company code).

Customer tables:

 Most of the customer tables start with KN*

Example: KNA1 – General Data in customer master.

KNB1 – Customer master ( company code ).

Some of the useful special tables:

a) Data Dictionary related tables:


o Most of the data dictionary tables start with DD*
[Date]

Example: DD02L – SAP Tables.


Document Prepared By Sonu Jangir Sap Abap Developer
DD02T – SAP Table texts (to find the table names
using short
description).
DD01L – Domain.
DD01T – Domain texts.
DD04L – Data elements.
DD04T – Data elements text
|
|
b) Transaction codes table:
o The standard table ‘TSTC “contains all the transaction
codes in the system.

c) Repository objects table:


o The standard tables TADIR (directory of repository
objects) and TRDIR (system ABAO programs) contains all
the workbench objects.

[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Differences between Transparent, Pooled and Cluster tables:

Transparent Tables Pooled Tables Cluster Tables


1. It has one-one 1. It has many to 1. It has many to
relationship one relationship one relationship
with the data with the data with the data
base tables. base table. base table.

2. Secondary 2. Secondary 2. Secondary


indexes can be indexes cannot indexes cannot
created. be created. be created.

3. Can be joined 3. Cannot be used 3. Cannot be used


with other with joins. with joins.
transparent
tables.
4. Table names 4. Table names
4. The table name, and field names and field names
field name, of are different in are different in
fields is similar database. database.
in both DDIC
and database.
5. Open SQL 5. Open SQL
5. Both open and statements can statements can
native SQL can only be used. only be used.
be used.
6. It is stored with 6. It is stored with
6. There is a another set of another set of
similar table in table called table called
DB. Table pool. Cluster pool.
7. It follows binary 7. It follows linear
7. Data can be search. search.
accessed in
both linear and 8. Foreign Keys 8. Foreign Keys
[Date]

binary search. cannot be can be created

Document Prepared By Sonu Jangir Sap Abap Developer


8. Foreign keys created since since key field
can be created key field names names are same
are different in in DDIC and
DDIC and Table Cluster Pool
Pool

Linear and Binary search:

 In case of linear search the search criteria is started for the first
record and stopped once the required record is found.
Example: 1, 2, 3,……75,……100.
 
Linear search
 In case of binary search total number of records are split in to
two equal parts (n/2) then the search criteria is started in the
second half.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Note: In case of the required record id not found in the second half,
a system will search in the first half.
Example: 1, 2, 3……, 50,………., 100
 (n/2) 
Binary search

Technical properties of a table:

 Following are the different technical properties of a table.


a) Delivery class.
b) Data browser or Table view maintenance.
c) Data class.
d) Size category.
e) Buffering.
f) Enhancement category.
g) Table Maintenance Generator.

a.) Delivery class:

 It is used to specify type of the table.


 It can also control the transport of the table data.
 It is also used in the extended table maintenance.

Note: in case of delivery class ‘A’ the table or maintenance view can
be maintained in any system (Development  Quality 
Production) using SM30.

b.) Data browser / Table view maintenance:

 It is used to specify an option to maintain or not maintain the


table or views.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Note:
 In the real time n option display or maintenance allow is
mostly used.
 In case of the option display or maintenance allowed with
restrictions and display or maintenance not allowed the
custom table or maintenance views cannot be maintained.

c.) Data Class:

 It is used to specify type of data which can be maintained in the


tables.
 There are mainly three types of data.
o Master data.
o Transaction data.
o Organization and customer data.

Master data:

 It is the data which can be accessed frequently and rarely


changed.
 The data class for the master table is APPLO.
Example: Date of Birth, permanent address etc………

Transaction data:

 It is the data which can be frequently accessed and updated.


 The data class for transaction data is APPL1.
Example: Salary, current address etc…………

Organization and customizing data:

 This data is maintained while installing the system.


 It can be changed rarely
Example: Company codes, serial numbers etc…..
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Note:
 There are two more data classes USR and USR1 which are
reserved for user specific developments.
 In the real time the data class APP0 (master data) or
APPL1(transaction data) is mostly used.

d.) Size category:

 This property is used to reserve the initial space required for


the table data in the database.
 The size categories from 0 to 7 are available from the version
ecc6.
 In the real time the size category ‘0’ is mostly used (0 to 7100).

Note: If the user tries to enter a record over that the selected
range, the system will increase the size category in to a next
category (0 to 1).

e.) Buffering:

 It is used to reduce the traffic in the database in case of the


table is accessed by multiple users for number of times.
 There are three buffering modes
o Buffering not allowed – The table cannot be buffered.
o Buffering allowed but switched off – Buffering allowed
but not activated.
o Buffering switched on – The table can be buffered. In case
of this option any one of the buffering types should be
selected.
 Buffering types are of three types:
o Single record buffering.
[Date]

o Generic area buffering.

Document Prepared By Sonu Jangir Sap Abap Developer


o Fully buffered.

Single record buffer:

 In case of this buffering type a record by record is buffered


from the database tables.

Figure 2.7: Single Record Buffer

Generic Area Buffer:

 It is used to buffer the table data based on the specified key


fields.
 In case of this buffering type the number of key fields must be
specified.
Example: Number of key fields: 2
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Figure 2.8: Generic Area Buffer

Fully buffer:

 The entire table is buffered.

Figure 2.9: Fully Buffer

f.) Enhancement category:

 This property is used to control the table or structure


enhancement.

Note: In the real time an option “can be enhanced (DEEP)” is mostly


selected.

g.) Table Maintenance Generator (TMG):

 This property is used to maintain the multiple entries and


validate the table data.

Structures:
[Date]

Introduction:
Document Prepared By Sonu Jangir Sap Abap Developer
 It is almost similar to a table but only the difference is the
structures do not have any physical data. Whereas, tables have
physical data.
 The structure is filled with a single record at runtime only.
 The structure can be referred across the system.

Steps to create a structure:

 Execute the transaction code SE11.


 Select a radio button data type.
 Enter the structure name (<zcust_dd_structure>).
 Click on the create button.
 Select a radio button structure.
 Click on yes button.
 Enter short description
 Enter the required field name.

Example: EMP_CITY

 Enter the data element name in the component type column.


 Press the ‘Enter’ button.

Creation of Data Element:

 Double click on data element name.


 Click on yes button.
 Click on yes button.
 Click on local object button.
 Click on yes button.
 Enter short description.
 Click on the tab ‘Field label’.
 Enter the field labels for short, medium, long and heading.
[Date]

 Press the ‘Enter’ button.

Document Prepared By Sonu Jangir Sap Abap Developer


 Click on save icon.
 Click on the local object button (F7).
 Click on the tab ‘data type’.

Creation of domain:

 Enter the domain name (could be same as data element name).


 Press the ‘Enter’ button.
 Click on yes button in case of no active domain available
message.
 Double click on the domain name.
 Click on yes button.
 Click on yes button.
 Enter short description.
 Select an appropriate data type.
 Enter the required number of characters.
 Click on save icon.
 Click on the button local object button.
 Click on checkbox lowercase to accept both lowercase and
uppercase letters.
 Click on activate icon.
 Press the ‘Enter’ button.
 Click on an icon back (F3).
 Click on activate icon to activate data element.
 Press the ‘Enter’ button.
 Click on back icon.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Note: Follow the similar steps (creation of data element and
creation of domain) to create any number of required data
elements and domains.
 Click on the menu icon ‘extra’.
 Click on enhancement category.
 Click on yes button.
 Click on enhancement category (can be enhanced deep).
 Click on yes button.
 Click on active icon to activate structure.
 Click on back icon.

Pre-defined types:

 They are used to created table or structure without using data


element or domains.

Steps to make use of the predefined types while creating the table
or structure:

 Once the table or structure is in change mode.


 Click on predefined button.

Note: The data element or component column is disabled in case of


predefined types.

 Enter the required field name.


 Select an appropriate data type.
 Enter the required length and short description.
 Activate the table or structure.

Note: Follow the similar steps to make use of pre-defined types for
any number of fields.
[Date]

Example:
Document Prepared By Sonu Jangir Sap Abap Developer
Component Component type Data Length Short
type description
EMP_CITY <ZCUST_EMP_CITY> CHAR 30 Employee
city
EMP_COUNTRY CHAR 25
Employee
country

Differences between the tables created using data elements and


using predefined types:

Using data elements Using predefined types


1. Data elements can be 1. Reusability is not possible.
reused.
2. Foreign key relationship is
2. Foreign key relationship can not be created.
be created since it contains
domains. 3. ‘+’ symbols are appeared
while maintaining the table
3. Field labels are displayed instead of field labels.
while maintaining the table.

Include structure and append structure:

 The table or structure can be enhanced to add additional fields


using include structure or append structure.

Include structure:

 Include structure can be used for the multiple tables or


structures.
 The table or structure must be in change mode to include a
structure.
[Date]

 Click on yes button.


Document Prepared By Sonu Jangir Sap Abap Developer
Steps to include a structure:

 Once the table or structure is in change mode.


 Select a field before which a structure to be inserted or
included.
 Click on insert row icon.
 Enter “.include” under field or component column.
 Enter the required structure name under Data Element or
component column.
 Press the ‘Enter’ button.
 Activate the table or structure.

Note: The structure can also be created by double clicking on the


specified structure name.

Append structure:

 The append structures are specific to a table or structure.


Hence, they cannot be used for the multiple tables or
structures.
 An append structures can be inserted in display mode also.

Steps to append a structure:

 Once the table or structure is in display or change mode.


 Click on append structure button.
 Enter append structure name.
 Click on yes button.
 Create the structure with the required fields.

Note: Refer creation of structure concept.


 Activate the structure.
[Date]

 Click on no button in case of warnings.

Document Prepared By Sonu Jangir Sap Abap Developer


 Click on back icon.

Note: Fields for include and append structure are in blue color.

Example: The custom table looks as below on the structure is


appended or included.

Fields Data structure Data type Short


description
|
|
.include <zcust_bdtab> STRU Structure
| include
|
EMPNAME
.APPEND STRU
Append include

Steps to append a structure to a standard table:

 Once the standard table is in display mode.


 Click on append structure button.
 Click on create append icon.
 Enter append structure name.
 Click on yes button.
 Create the structure with the required fields.
 Activate the structure.
 Click on back icon.
 Cancel the append structure window.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


Differences between INCLUDE and APPEND structures:

INCLUDE APPEND

1. It can be used for the 1. It is specific to particular


multiple tables. table or structure.
2. It is inserted at the end of
2. Can be inserted at any table (or) Structure (after
position. the last field)
3. It can be inserted in display
3. The table must be in change mode also
mode to include the
structure. 4. It is possible to insert
4. It is not possible for structure for standard
standard tables or tables (or) structure.
structures without using 5. It is not possible to add the
access key. additional fields manually
5. Possible to add the after append structure
additional fields after
INCLUDE structure
manually.

[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


4.Search Helps
Introduction:

 These are used to display all the possible entries in the search
help window.
 The function key (F4) or search help icon () is pressed to display
the search help window.
 The DDIC search helps are of two types.
o Elementary search help.
o Collective search help.

Elementary search help:

 An elementary search help is defined using one base table or


help view

Collective search help:

 It is a collection of elementary search helps.

Steps to create an Elementary Search Help:

 Execute the transaction code SE11.


 Select the radio button search help.
 Enter an elementary search help name to be created.
 Click on create button.
 Click on yes button.
 Enter short description.
 Enter the required table or help view name in the selection
method field.
 Enter a search help parameter names, check the check boxes
imp, exp…
 Enter L position and S position.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


 Press the ‘Enter’ button.

Example:
Search help IMP EXP LPOS SPOS
parameter
NAME1 * * 2 2

NOTE:
 The checkboxes IMP and EXP must be check to import all the
possible entries from the specified table or help view and
export the selected entry to the screen fields.
 The position numbers LPOS and SPOS must be filled with the
same number to position the search help window on a screen
field.
 The search help exit is used to control the possible entries of a
search help.

 Click on activate icon.


 Click on local object icon.
 Click on yes button.
 Click on test icon.
 Press F4 function key or search help icon to see the possible
entries.
 Cancel search help window.
 Click on back.

Steps to create a collective search help:

 Execute the transaction code SE11.


 Select the radio button search help.
 Enter the collective search help name.
[Date]

 Click on create button.

Document Prepared By Sonu Jangir Sap Abap Developer


 Select a radio button collective search help.
 Click on yes button.
 Enter short description.
 Enter the search help parameter names, check the check boxes
imp, exp and enter the data element names as below.

Search help Imp Exp Data element


parameter
NAME1 * * NAME1_GP

KUNNR * * KUNNR
 Click on the tab included search helps.
 Enter the required elementary search helps.
 Place the cursor on the 1st search help name.
 Click on the button parameters assignment.
 Click on yes button.
 Click on copy button.

Note: Follow the similar steps to assign the parameters for any
number of search helps.
 Click on activate icon.
 Click on local object button.
 Click on yes button.
 Click on test icon.
 Press F4 function key.
 Click on an appropriate tabs to see the possible entries.
 Cancel the search help window.
 Click on back.

Different dialog types in DDIC search helps:

1. Display values immediately:


[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


 It is the default option to display all the possible entries
immediately.

2. Dialog depends on set of values:

 In case of this option the system gives restrictions window to


filter the possible entries in the search help.

Note: An icon ‘Multiple Selection’ is used to choose the different


single values and range.

3. Dialog with value restrictions:

 It is almost similar to 2nd option (dialog depends on set of


values).

4. Hot key:

 The hot key property is used to display the elementary search


help entries. By default in case of collective search help.

Search help assignment to table or structure field:

 The domain name of the table or structure field should be


similar to the domain name of search help parameter to assign
a search help.

Steps to assign a search help:

 Once the table or structure is in chance mode.


 Place the cursor on the required field.
 Click on search help button.
 Enter the required search help name to be assigned.
 Click on yes button.
 Click on copy button.
[Date]

 Activate the table or structure.


Document Prepared By Sonu Jangir Sap Abap Developer
 Click on contents icon in case of table.
 Press F4 function key on the required field.

5.VIEWS
Introduction:

 Views are virtual tables which can be filled at runtime only.


 They are defined using one or multiple tables.

Figure 2.10: Views


[Date]

 Views are of 4 types:

Document Prepared By Sonu Jangir Sap Abap Developer


1. Data base view.
2. Maintenance view.
3. Help view.
4. Projection view.

1. Database view:

 The database views are defined by joining multiple tables.


 It creates an inner join automatically.
 It can be used to extract the data in the program.

2. Maintenance view:

 The maintenance view is defined to maintain multiple table’s


data using the transaction code SM30.

3. Help view:

 It is used as a selection method in an elementary search help to


provide the possible entries from the multiple tables.

4. Projection view:

 It is used to suppress the unwanted fields of a table.


 It can be defined using one table only.

Steps to create the Database View:

 Execute the transaction code SE11.


 Select the radio button view.
 Enter database view name.
 Click n create button.
[Date]

 Click on yes button.

Document Prepared By Sonu Jangir Sap Abap Developer


 Enter short description.
 Enter the required table name under ‘Tables session’.
 Place the cursor on table name.
 Click on relationship button.
 Check the required relationships.
 Click on yes button.

Note: The transaction code SQVI can also be used to know the join
conditions.

Example:

Tables Table Field = Table Field


name name
EKKO ELKP MANDT = EKKO MANDT

ELKP ELKP EXNUM = EKKO EXNUM

 Click on view fields tab.


 Click on ‘Table Fields’ button.
 Double click on the required base table.
 Check the required fields to be inserted.
 Click on yes button.

Note:
 Follow the similar steps for any number of base tables.
 The field names should not be duplicate in the tables or
structures or views.

 Click on activate icon.


 Click on local object button.
[Date]

 Press the ‘Enter’ button.


Document Prepared By Sonu Jangir Sap Abap Developer
 Click on contents icon.
 Click on execute icon.
 Click on back.

Note:
 Follow the similar steps to create the help view by selecting a
radio button help view.
 Help views cannot be executed.

Steps to create Maintenance View:

 Execute the transaction code SE11.


 Select the radio button view.
 Enter the maintenance view name.
 Click on create button.
 Click the radio button maintenance view.
 Click on yes button.
 Enter short description.
 Enter the required table name under table session.
 Place the cursor on the table name.
 Click on relationship button.
 Check the required relationship.
 Click on yes button.
 Click on view fields tab.
 Click on ‘Table Fields’ button.
 Double click on the required base tables.
 Check the required fields along with the key fields
 Click on yes button.

Note: Follow the similar steps to select the fields for any number of
tables by clicking on ‘Table Fields’ button.
[Date]

 Click on maintenance status tab.


Document Prepared By Sonu Jangir Sap Abap Developer
 Change the delivery class if required.
 Click on activate icon.
 Click on local object button.
 Click on yes button.
 Click on utilities menu icon.
 Click on TMG.
 Enter authorization group (&NC&).
 Enter functional group name (could be same as table name).
 Select one step maintenance type.
 Enter overview screen number (could be any number).
 Click on create icon.
 Click on local object button.
 Press the ‘Enter’ button.
 Click on back icon.

Note: Transaction code SM30 is used to maintain the data in the


maintenance views as like the custom table.

Steps to create Projection View:

 Execute the transaction code SE11.


 Select the radio button view.
 Enter projection view name.
 Click on create button.
 Select the radio button projection view.
 Click on yes button.
 Enter short description.
 Enter the required base table name.
 Click on ‘Table Fields’ button.
 Check the required fields to be displayed.
[Date]

 Click on yes button.


Document Prepared By Sonu Jangir Sap Abap Developer
 Click on activate icon.
 Click on local object button.
 Press the ‘Enter’ button.
 Click on no button in case of warning.
 Click on contents icon.
 Click on execute icon.

6.LOCK OBJECTS
Introduction:

 They are used to control the parallel access for the same data
by the multiple users. i.e., the synchronous access to the same
data is provided using lock objects.
 The lock object name should start with ‘E’ followed by the table
name.
Example:
E<ZCUST_DBNAME> EVBAP
Custom table standard table
 Following are different types of lock modes:-
1. Write lock.
2. Read lock.
3. Exclusive not cumulative.

1. Write lock:

 It is also called an exclusive lock. In case of this lock mode the


locked data can be accessed or processed by single user only.
All other lock requests are rejected.

2. Read lock:

 It is also called a shared lock.


[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


 The multiple users can display the same data. If ne user tries to
edit the data, all other users cannot access this data.

Note: All other write locks are rejected but read locks are accepted.

3. Exclusive but not cumulative lock:

 It can be requested only once by the given transaction codes.


All other lock requests are rejected.

Steps to create lock objects:

 Execute the transaction code SE11.


 Select radio button lock object.
 Enter the lock object.
 Click on create button.
 Enter short description.
 Click on tables tab.
 Enter the required table name in the name field.
 Select an appropriate lock mode.
 Click on activate icon.
 Click on local object button.
 Press the ‘Enter’ button.

Note: The system generated two function modules one starts with
ENQUEUE* and another one with DEQUEUE* once the lock object is
activated.

ENQUEUE* function module:

 It is used to request for lock.

DEQUEUE* function module:


[Date]

Document Prepared By Sonu Jangir Sap Abap Developer


 To release the lock.

Steps to see the system generated function modules:

 Execute the transaction code SE11.


 Select the radio button lock object.
 Enter the lock object name.
 Click on display button.
 Click on ‘Goto’ menu icon.
 Click on lock modules.

Note: The system generated function modules are appeared.


Example:
ENQUEUE – EZCUST_DBTAB  Request lock
DEQUEUE – EZCUST_DBTAB  Release lock.

Maintain locked objects:

 The transaction code SM12 is used to list out the locked objects
and to delete locked objects.

Steps to list out the locked objects and unlock them:

 Execute the transaction code SM12.


 Click on list button to see the locked objects.
 Select the required locked object to be unlocked.
 Click on delete icon.
 Click on yes button.
[Date]

Document Prepared By Sonu Jangir Sap Abap Developer

You might also like