SlideShare a Scribd company logo
ABAP Dictionary Objects
March-2005 ABAP Dictionary Objects | 2.02
Objectives
• The participants will be able to:
– Access the ABAP Dictionary
– Discuss the Basic Objects (Domain, Data Element,
Table etc.) of the ABAP Dictionary
– Define and create a Table, Data Element, and
Domain
March-2005 ABAP Dictionary Objects | 2.02 2
Accessing the ABAP Dictionary
March-2005 ABAP Dictionary Objects | 2.02 3
Data
Dictionary
 Use transaction code SE11 to access the ABAP Dictionary
March-2005 ABAP Dictionary Objects | 2.02 4
Basic Objects of the ABAP Data Dictionary
Table CTable BTable A
Data Element 1 Data Element 2
DomainDomain
Tables
March-2005 ABAP Dictionary Objects | 2.02 5
 Tables store the information that is in the database.
 They consist of rows (records) and columns (fields).
TABLE KNA1
(Customers)
NAME1 ORT02MANDT KUNNR
Table: KNA1Table: KNA1Table: KNA1Table: KNA1
March-2005 ABAP Dictionary Objects | 2.02 6
 The Object Navigator is used to organize your programming in an integrated
development environment
Object Navigator
Create a Table
March-2005 ABAP Dictionary Objects | 2.02 7
Enter a description (short text)
Maintain delivery class
Table maintenance attribute
Two-Level Domain Concept
March-2005 ABAP Dictionary Objects | 2.02 8
Data Element 1Data Element 1 Data Element 2Data Element 2
DomainDomain
 In SAP R/3, a field is defined by being assigned to a data element, which is in
turn assigned to a domain
March-2005 ABAP Dictionary Objects | 2.02 9
Data Element 1Data Element 1
Table BTable A
 A data element provides a meaningful description for a field
Data Elements
Pre-Defined Data Elements
March-2005 ABAP Dictionary Objects | 2.02 10
 SAP R/3 comes delivered with many pre-defined data elements
Create Data Element
March-2005 ABAP Dictionary Objects | 2.02 11
Enter a description (short text).
Enter domain name.
March-2005 ABAP Dictionary Objects | 2.02 12
Maintain field labels or column headers in the Field Label tab
Create Data Element (Contd.)
Data Element Documentation
March-2005 ABAP Dictionary Objects | 2.02 13
 In addition to providing field descriptions and headers, data elements
can provide detailed field documentation
Domains
March-2005 ABAP Dictionary Objects | 2.02 14
 A domain specifies the technical characteristics and the allowed
values of a field
 Domains are linked to fields via data elements
Table ATable A
Data Elements
Domain
Characteristics of Domains
March-2005 ABAP Dictionary Objects | 2.02 15
 Domains can exist independently in the ABAP Dictionary
 Multiple data elements may be assigned to the same
domain Pre-defined domains exist in the SAP system
 Domains can also specify a field’s output characteristics
Table ATable A
Data Elements
Domain
Allowed Values
March-2005 ABAP Dictionary Objects | 2.02 16
Value Table
Domain Domain
January
February
March.......
December
March-2005 ABAP Dictionary Objects | 2.02 17
valid
values
invalid
values
 By defining valid values for a domain, automatic validation is
provided for any fields that point to that domain
Benefits of Using Allowed Values
March-2005 ABAP Dictionary Objects | 2.02 18
Enter a description (short text).
Enter data type
Enter the number of characters
allowed for this domain
Create a Domain
March-2005 ABAP Dictionary Objects | 2.02 19
Create a Domain (Contd.)
Activate Icon
Assign Single Values
Assign Interval Values
Assign a Value Table
March-2005 ABAP Dictionary Objects | 2.02 20
Add Fields to Table
Enter Data Element “ZXXFIRSTNAME”
Check the Primary Key Checkbox
Enter the Field Name “FIRSTNAME”
March-2005 ABAP Dictionary Objects | 2.02 21
Maintain Technical Settings of a Table
Enter a Size Category
Enter a Data Class
Demonstration
March-2005 ABAP Dictionary Objects | 2.02 22
 Creation of a transparent table using transaction SE11 along with the
relevant data-element and domains.
Practice
March-2005 ABAP Dictionary Objects | 2.02 23
 Creation of a transparent table using transaction SE11 along with the
relevant data-element and domains.
Using a Table in Program Code
March-2005 ABAP Dictionary Objects | 2.02 24
TABLES: YEMPLOY.
SELECT *
FROM YEMPLOY.
WRITE: / YEMPLOY_ID
YEMPLOY_NAME
YEMPLOY_SALARY
ENDSELECT.
• Use transaction code SE11 to access the ABAP
Dictionary
• The basic objects of the ABAP Dictionary are
tables, data elements, and domains
• Tables are the objects that actually hold the
information in a database
• A data element provides a meaningful
description for a field
• A domain specifies the technicalMarch-2005 ABAP Dictionary Objects | 2.02 25
Summary
• What is the transaction to access the ABAP
Dictionary ?
• What is a data element ?
• What is a domain ?
• What is a value table in a domain ?
March-2005 ABAP Dictionary Objects | 2.02 26
Questions

More Related Content

What's hot (17)

PPT
Chapter 10 online help & documentation1
Kranthi Kumar
 
PPT
data modelling1
Kranthi Kumar
 
PPT
Chapter 09 overview of search helps1
Kranthi Kumar
 
PPTX
Unit 3 - Transparent tables in the ABAP Dictionary
dubon07
 
PPT
Chapter 08 abap dictionary objects views1
Kranthi Kumar
 
PDF
X rec extened reconciliation using excel vba
senthilsundaresan
 
PDF
ETL Microsoft Material
Ahmed Hashem
 
PPTX
Ssis sql ssrs_sp_ssas_mdx_hb_li
Hong-Bing Li
 
PPTX
Unit 1 - SAP System Architecture
dubon07
 
PPTX
Unit 2 - Object Navigator, Repository and ABAP Programs
dubon07
 
PPTX
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
dubon07
 
PDF
169318090 0104abapdictionary-100831073625-phpapp02
Phani Patibandla
 
PPT
MS Bi Portfolio Gregory Lee
keeperx99
 
PDF
Sap business objects xir3.03.1, bi 4.0 & 4.1 training
FuturePoint Technologies
 
PDF
Simplest way of loading data from flat file to hana
Deepak Chaubey
 
DOCX
SSIS Project Profile
tthompson0421
 
PPTX
Reports Dashboards SQL Demo
Hong-Bing Li
 
Chapter 10 online help & documentation1
Kranthi Kumar
 
data modelling1
Kranthi Kumar
 
Chapter 09 overview of search helps1
Kranthi Kumar
 
Unit 3 - Transparent tables in the ABAP Dictionary
dubon07
 
Chapter 08 abap dictionary objects views1
Kranthi Kumar
 
X rec extened reconciliation using excel vba
senthilsundaresan
 
ETL Microsoft Material
Ahmed Hashem
 
Ssis sql ssrs_sp_ssas_mdx_hb_li
Hong-Bing Li
 
Unit 1 - SAP System Architecture
dubon07
 
Unit 2 - Object Navigator, Repository and ABAP Programs
dubon07
 
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
dubon07
 
169318090 0104abapdictionary-100831073625-phpapp02
Phani Patibandla
 
MS Bi Portfolio Gregory Lee
keeperx99
 
Sap business objects xir3.03.1, bi 4.0 & 4.1 training
FuturePoint Technologies
 
Simplest way of loading data from flat file to hana
Deepak Chaubey
 
SSIS Project Profile
tthompson0421
 
Reports Dashboards SQL Demo
Hong-Bing Li
 

Viewers also liked (19)

PPT
Lecture02 abap on line
Milind Patil
 
PPT
cardinality1
Kranthi Kumar
 
PPT
Ale Idoc
Amit Khari
 
PDF
05 internal tables
Brahmaiah Punati
 
PPT
Chapter 06 abap repository information system1
Kranthi Kumar
 
PPT
0106 debugging
vkyecc1
 
PDF
Sujith ~ cross applications
Kranthi Kumar
 
PDF
Bapi jco[1]
mateenjambagi
 
PPT
VIEWS
Kranthi Kumar
 
PPT
table maintenance generator1
Kranthi Kumar
 
PPT
Abap function module help
Kranthi Kumar
 
PPTX
Abap course chapter 3 basic concepts
Milind Patil
 
PDF
control techniques
Kranthi Kumar
 
PPT
abap list viewer (alv)
Kranthi Kumar
 
PDF
Step by-step creation of a bapi in detailed steps with scr…
sapsarath612
 
PPT
Dialog Programming Overview
sapdocs. info
 
PDF
Ale edi i_doc.sapdb.info
Ivs Naresh
 
PDF
Workflow Part1 1
evil66_in
 
PPT
Module pool programming
Subhojit- Opekkhay
 
Lecture02 abap on line
Milind Patil
 
cardinality1
Kranthi Kumar
 
Ale Idoc
Amit Khari
 
05 internal tables
Brahmaiah Punati
 
Chapter 06 abap repository information system1
Kranthi Kumar
 
0106 debugging
vkyecc1
 
Sujith ~ cross applications
Kranthi Kumar
 
Bapi jco[1]
mateenjambagi
 
table maintenance generator1
Kranthi Kumar
 
Abap function module help
Kranthi Kumar
 
Abap course chapter 3 basic concepts
Milind Patil
 
control techniques
Kranthi Kumar
 
abap list viewer (alv)
Kranthi Kumar
 
Step by-step creation of a bapi in detailed steps with scr…
sapsarath612
 
Dialog Programming Overview
sapdocs. info
 
Ale edi i_doc.sapdb.info
Ivs Naresh
 
Workflow Part1 1
evil66_in
 
Module pool programming
Subhojit- Opekkhay
 
Ad

Similar to Chapter 02 abap dictionary objects1 (20)

PPT
Database_Tuning.ppt
AsimEisa2
 
PPT
Lecture03 abap on line
Milind Patil
 
PPT
Data_Dictionary of sap abap known as DDIC.ppt
pagajal493
 
PPTX
bi-publisher.pptx
kjkombrink
 
PDF
SAP ABAP data dictionary
Revanth Nagaraju
 
PPT
ABAP
Madhu Reddy
 
PPTX
OPERATE DATABASE APPLICATION
YoomiLaataBekele
 
PPTX
Vba
Juhi Mahajan
 
PDF
OSA Con 2022 - Apache Iceberg_ An Architectural Look Under the Covers - Alex ...
Altinity Ltd
 
PDF
Abap sample
Marina de Pendragón
 
PPT
What's New for Developers in SQL Server 2008?
ukdpe
 
PPT
SQL Server 2008 Overview
Eric Nelson
 
PPT
Sql server ___________session 1(sql 2008)
Ehtisham Ali
 
PDF
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
IICT Chromepet
 
PPTX
Access lesson 02 Creating a Database
Aram SE
 
PPTX
Access lesson 02 Creating a Database
Aram SE
 
PPTX
363656678-internship-ppt-on-SAP-ABAP.pptx
EnteryourName2
 
PPTX
Performance Tuning Oracle's BI Applications
KPI Partners
 
DOC
Abap faq
Kranthi Kumar
 
PDF
Information Design Tool -Tutorial4
Obily W
 
Database_Tuning.ppt
AsimEisa2
 
Lecture03 abap on line
Milind Patil
 
Data_Dictionary of sap abap known as DDIC.ppt
pagajal493
 
bi-publisher.pptx
kjkombrink
 
SAP ABAP data dictionary
Revanth Nagaraju
 
OPERATE DATABASE APPLICATION
YoomiLaataBekele
 
OSA Con 2022 - Apache Iceberg_ An Architectural Look Under the Covers - Alex ...
Altinity Ltd
 
What's New for Developers in SQL Server 2008?
ukdpe
 
SQL Server 2008 Overview
Eric Nelson
 
Sql server ___________session 1(sql 2008)
Ehtisham Ali
 
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
IICT Chromepet
 
Access lesson 02 Creating a Database
Aram SE
 
Access lesson 02 Creating a Database
Aram SE
 
363656678-internship-ppt-on-SAP-ABAP.pptx
EnteryourName2
 
Performance Tuning Oracle's BI Applications
KPI Partners
 
Abap faq
Kranthi Kumar
 
Information Design Tool -Tutorial4
Obily W
 
Ad

More from Kranthi Kumar (20)

PDF
Exercise in alv
Kranthi Kumar
 
PDF
Dynamic binding
Kranthi Kumar
 
PDF
Data binding
Kranthi Kumar
 
PDF
Creating simple comp
Kranthi Kumar
 
PDF
Creating messages
Kranthi Kumar
 
PDF
Creating a comp
Kranthi Kumar
 
PDF
Controllers and context programming
Kranthi Kumar
 
PDF
Context at design
Kranthi Kumar
 
PDF
Binding,context mapping,navigation exercise
Kranthi Kumar
 
PDF
Alv for web
Kranthi Kumar
 
PDF
Web(abap introduction)
Kranthi Kumar
 
PDF
Sap abap material
Kranthi Kumar
 
PDF
Crm technical
Kranthi Kumar
 
PPT
Chapter 07 debugging sap scripts
Kranthi Kumar
 
PPT
Chapter 06 printing sap script forms
Kranthi Kumar
 
PPT
Chapter 05 sap script - configuration
Kranthi Kumar
 
PPT
Chapter 04 sap script - output program
Kranthi Kumar
 
PPT
Chapter 02 sap script forms
Kranthi Kumar
 
PPT
sap script overview
Kranthi Kumar
 
PPT
Batch input session
Kranthi Kumar
 
Exercise in alv
Kranthi Kumar
 
Dynamic binding
Kranthi Kumar
 
Data binding
Kranthi Kumar
 
Creating simple comp
Kranthi Kumar
 
Creating messages
Kranthi Kumar
 
Creating a comp
Kranthi Kumar
 
Controllers and context programming
Kranthi Kumar
 
Context at design
Kranthi Kumar
 
Binding,context mapping,navigation exercise
Kranthi Kumar
 
Alv for web
Kranthi Kumar
 
Web(abap introduction)
Kranthi Kumar
 
Sap abap material
Kranthi Kumar
 
Crm technical
Kranthi Kumar
 
Chapter 07 debugging sap scripts
Kranthi Kumar
 
Chapter 06 printing sap script forms
Kranthi Kumar
 
Chapter 05 sap script - configuration
Kranthi Kumar
 
Chapter 04 sap script - output program
Kranthi Kumar
 
Chapter 02 sap script forms
Kranthi Kumar
 
sap script overview
Kranthi Kumar
 
Batch input session
Kranthi Kumar
 

Chapter 02 abap dictionary objects1

  • 1. ABAP Dictionary Objects March-2005 ABAP Dictionary Objects | 2.02
  • 2. Objectives • The participants will be able to: – Access the ABAP Dictionary – Discuss the Basic Objects (Domain, Data Element, Table etc.) of the ABAP Dictionary – Define and create a Table, Data Element, and Domain March-2005 ABAP Dictionary Objects | 2.02 2
  • 3. Accessing the ABAP Dictionary March-2005 ABAP Dictionary Objects | 2.02 3 Data Dictionary  Use transaction code SE11 to access the ABAP Dictionary
  • 4. March-2005 ABAP Dictionary Objects | 2.02 4 Basic Objects of the ABAP Data Dictionary Table CTable BTable A Data Element 1 Data Element 2 DomainDomain
  • 5. Tables March-2005 ABAP Dictionary Objects | 2.02 5  Tables store the information that is in the database.  They consist of rows (records) and columns (fields). TABLE KNA1 (Customers) NAME1 ORT02MANDT KUNNR Table: KNA1Table: KNA1Table: KNA1Table: KNA1
  • 6. March-2005 ABAP Dictionary Objects | 2.02 6  The Object Navigator is used to organize your programming in an integrated development environment Object Navigator
  • 7. Create a Table March-2005 ABAP Dictionary Objects | 2.02 7 Enter a description (short text) Maintain delivery class Table maintenance attribute
  • 8. Two-Level Domain Concept March-2005 ABAP Dictionary Objects | 2.02 8 Data Element 1Data Element 1 Data Element 2Data Element 2 DomainDomain  In SAP R/3, a field is defined by being assigned to a data element, which is in turn assigned to a domain
  • 9. March-2005 ABAP Dictionary Objects | 2.02 9 Data Element 1Data Element 1 Table BTable A  A data element provides a meaningful description for a field Data Elements
  • 10. Pre-Defined Data Elements March-2005 ABAP Dictionary Objects | 2.02 10  SAP R/3 comes delivered with many pre-defined data elements
  • 11. Create Data Element March-2005 ABAP Dictionary Objects | 2.02 11 Enter a description (short text). Enter domain name.
  • 12. March-2005 ABAP Dictionary Objects | 2.02 12 Maintain field labels or column headers in the Field Label tab Create Data Element (Contd.)
  • 13. Data Element Documentation March-2005 ABAP Dictionary Objects | 2.02 13  In addition to providing field descriptions and headers, data elements can provide detailed field documentation
  • 14. Domains March-2005 ABAP Dictionary Objects | 2.02 14  A domain specifies the technical characteristics and the allowed values of a field  Domains are linked to fields via data elements Table ATable A Data Elements Domain
  • 15. Characteristics of Domains March-2005 ABAP Dictionary Objects | 2.02 15  Domains can exist independently in the ABAP Dictionary  Multiple data elements may be assigned to the same domain Pre-defined domains exist in the SAP system  Domains can also specify a field’s output characteristics Table ATable A Data Elements Domain
  • 16. Allowed Values March-2005 ABAP Dictionary Objects | 2.02 16 Value Table Domain Domain January February March....... December
  • 17. March-2005 ABAP Dictionary Objects | 2.02 17 valid values invalid values  By defining valid values for a domain, automatic validation is provided for any fields that point to that domain Benefits of Using Allowed Values
  • 18. March-2005 ABAP Dictionary Objects | 2.02 18 Enter a description (short text). Enter data type Enter the number of characters allowed for this domain Create a Domain
  • 19. March-2005 ABAP Dictionary Objects | 2.02 19 Create a Domain (Contd.) Activate Icon Assign Single Values Assign Interval Values Assign a Value Table
  • 20. March-2005 ABAP Dictionary Objects | 2.02 20 Add Fields to Table Enter Data Element “ZXXFIRSTNAME” Check the Primary Key Checkbox Enter the Field Name “FIRSTNAME”
  • 21. March-2005 ABAP Dictionary Objects | 2.02 21 Maintain Technical Settings of a Table Enter a Size Category Enter a Data Class
  • 22. Demonstration March-2005 ABAP Dictionary Objects | 2.02 22  Creation of a transparent table using transaction SE11 along with the relevant data-element and domains.
  • 23. Practice March-2005 ABAP Dictionary Objects | 2.02 23  Creation of a transparent table using transaction SE11 along with the relevant data-element and domains.
  • 24. Using a Table in Program Code March-2005 ABAP Dictionary Objects | 2.02 24 TABLES: YEMPLOY. SELECT * FROM YEMPLOY. WRITE: / YEMPLOY_ID YEMPLOY_NAME YEMPLOY_SALARY ENDSELECT.
  • 25. • Use transaction code SE11 to access the ABAP Dictionary • The basic objects of the ABAP Dictionary are tables, data elements, and domains • Tables are the objects that actually hold the information in a database • A data element provides a meaningful description for a field • A domain specifies the technicalMarch-2005 ABAP Dictionary Objects | 2.02 25 Summary
  • 26. • What is the transaction to access the ABAP Dictionary ? • What is a data element ? • What is a domain ? • What is a value table in a domain ? March-2005 ABAP Dictionary Objects | 2.02 26 Questions

Editor's Notes

  • #4: There are several path to accessing the dictionary. Below is a list some of the ways to access the Dictionary. To access the ABAP Dictionary: Use the menu path: Tools  ABAP Workbench  Development  ABAP Dictionary; or Use the menu path: Tools  ABAP Workbench  Overview  Object Navigator Pull down the Workbench menu and select Other objects… Select the Dictionary tab from the pop up screen and enter the appropriate table name in the Database table field. or Use transaction code SE11 The ABAP Workbench was known as the ABAP/4 Development Workbench in past releases. The Object Navigator used to be called the Object Browser and the Repository Browser.
  • #5: The basic objects of the ABAP Dictionary are tables, data elements, and domains. These form the active part of the ABAP Dictionary and contain all the field-related metadata of the R/3 System. A field is not a dictionary object, but rather is a component of a table. A field cannot exist without a table and only has meaning within that particular table. Data elements and domains are dictionary objects. Therefore, they can be used by many tables. They specify the characteristics of fields. Table name is limited to 16 characters. Data element and domain names are limited to 30 characters. These concepts will be explained more fully in future pages. Table, data element and domain names were limited to 10 characters in previous releases.
  • #6: Tables are the objects that actually hold the information in a database. They consist of rows (records) and columns (fields). For example, table KNA1 stores information about customers. Some of the columns in KNA1 are KUNNR (customer ID number), NAME1 (customer name), and ORT01 (customer city). Each row in KNA1 stores this information for a different customer. Certain fields in a table are specified as the primary key of that table. The primary key is that field or combination of fields that uniquely identifies a row in the table. In table KNA1, the SAP R/3 client (MANDT) and the customer number (KUNNR) form the primary key. Custom tables must start with a Y or a Z and can be 16 characters in length.
  • #7: The Object Navigator is used to organize your programming in an integrated development environment. It can be used to create, change, and manage objects. It is the center point of entry into the ABAP Workbench. You can get to the Object Navigator by way of transaction SE80 or the menu path: Tools  ABAP Workbench  Overview  Object Navigator
  • #8: Now, let’s take a look at creating a table in the ABAP Dictionary. We will create a table called ZXXFIRSTTABLE (where XX stands for the last two digits of your logon id). This table will hold information about your ABAP class. Follow the menu path: 1. Tools  ABAP Workbench  Overview  Object Navigator 2. Pull down the Workbench menu and select Other objects. Select the Dictionary tab from the pop up screen and enter the appropriate table name in the Database table field. 3. Click the Create button (F5). 4. You can also use Transaction Code SE11, and select radio button for Database table. Remember, custom table names must begin with a Y or Z and are restricted to 16 characters. Enter a description (short text) and a delivery class. If the table is to be maintained via SAP R/3-provided table maintenance screens, uncheck the table maintenance attribute (Tab.Maint.Allowed).8. Click the Fields tab to begin adding Fields to the new table. We will learn how to add Fields later in this chapter.
  • #9: Table fields are defined in SAP R/3 by data elements and domains. This is a key difference between SAP R/3 and many other systems. In many other systems, a field is defined only by its type (i.e., character, numeric) and length. These characteristics are assigned directly to each field. In SAP R/3, a field is defined by being assigned to a data element, which is in turn assigned to a domain. These assignments determine the field’s type and length in addition to other characteristics. SAP R/3 refers to this method of field definition as the “Two-Level Domain Concept”. In addition, you can assign the field type (data type) characteristics in different ways:You can directly assign the field a data type, length, and short text when defining the table. You can assign a data element to a field so that the field will inherit the data element’s characteristics.
  • #10: The meaning of a field name is not always obvious. For example, KUNNR may not immediately bring the image of a customer to your mind. Data elements help resolve this problem. A data element provides a meaningful description for a field. You will hear it called a semantic domain. The data element description appears beside a field in a table definition. These descriptions are language-dependent(unlike field names). Even more importantly, the data element provides field headings for use on screens. When you “paint” a dictionary field on a screen, you can automatically have the data element field headings appear. This permits the end user to see meaningful field descriptions. The advantage of using a data element to describe fields and provide field headers is that the data element can be used more than once. For example, SAP R/3 contains many tables that have the field KUNNR. In cases like this, it is not necessary to enter the description for KUNNR many times. Each instance of KUNNR can be assigned to the same data element, and the field description only needs to be specified once. Additionally, if the description needs to be changed, it must be changed only once, and all fields referring to that data element automatically use the new description.
  • #11: SAP R/3 comes delivered with many pre-defined data elements. Whenever the semantic description of a field you are creating matches with an existing SAP R/3- supplied data element, use the one that SAP R/3 provides. Otherwise, you must create your own data element. When using a SAP R/3-supplied data element, however, you must also use the corresponding SAP R/3-supplied domain. If you wish to use a different domain, you must create your own data element.
  • #12: Now, let’s take a look at creating a data element in the ABAP Dictionary. We will create a data element called ZXXFIRSTNAME (where XX stands for the last two digits of your logon id). This data element will be used in the table ZXXFIRSTTABLE which we just created. To create a data element within the ABAP Dictionary use transaction SE80 or the menu path: Tools  ABAP Workbench  Overview  Object Navigator. You can also use Transaction Code SE11, and select radio button for Database Type and then Data Element. Pull down the Workbench menu and select Other objects. Select the Dictionary tab from the pop up screen and enter the appropriate Data Element name in the Data Element field. Click the Create button (F5). Enter a description (short text) and a Domain. Enter ZXXNAME as the Domain (where XX stands for the last two digits of your logon id). We will create this Domain later in the chapter. Click the icon (Ctrl+S). Type in your development class, YXXA (where XX stands for the last two digits of your logon id). Note : As of 4.0, a Data Element cannot have the same name as an existing table or Structure.
  • #13: Next, click the Field label tab. Provide a descriptive text for each of the following labels; Short, Medium, Long, and Heading. These labels are used as templates in the Screen Painter as a choice between the different label lengths. The Heading field is used as the column heading for tabular record entries and its length should correspond with the length of the field. Click the icon (Ctrl+S).
  • #14: In addition to providing field descriptions and headers, data elements can provide detailed field documentation. This documentation is maintained at the data element level and is available to a user who hits F1 when the cursor is in a field assigned to the data element. To maintain this documentation, navigate to the Change Data Element screen within the ABAP Dictionary and click the Documentation push-button.
  • #15: A domain specifies the technical characteristics and the allowed values of a field. Domains are linked to fields via data elements. In other words, fields are assigned to data elements, and data elements are assigned to domains. You cannot directly assign fields to domains. The technical characteristics of a field are the field’s type and length. These are also referred to as the field’s format. The allowed values of a field define what is acceptable input for that field. These may be listed explicitly or may be specified by reference to a value table. The concept of allowed values is explained more fully on later pages.
  • #16: Domains can exist independently in the ABAP Dictionary. Just as multiple fields may be assigned to the same data element, multiple data elements may be assigned to the same domain. As with data elements, pre-defined domains exist in the system and are available for your use. If a SAP R/3-supplied domain matches the characteristics you require, use the pre-defined domain. If you wish to change the domain’s allowed values, however, you must create your own domain. In addition to the characteristics listed previously, domains can also specify a field’s output characteristics, such as output length and whether or not lowercase letters are permitted for that domain.
  • #17: Valid values for a domain can be explicitly listed. To create or maintain an explicit list of valid values, use the menu path Goto  Fixed Values on the Change Domain screen in the ABAP Dictionary. Explicit values are used when the list of valid values is not likely to change over time. For example, if a domain was meant to contain the names of the months of the year, it would be possible to explicitly list “JANUARY” through “DECEMBER” as the allowed values (note that this would not work well in a multi-language environment) Valid values for a domain can also be specified by reference to a value table. When this is done, the records in the value table specify the valid values for the domain. In order to specify a value table for a domain, one of the key fields of that table must point to that domain. That field is the one that determines the valid values for the domain. A value table is used when the list of valid values may change over time. For example, a car maker may want to use a value table to list the valid colors for certain car models. As new colors are developed, the value table can be updated without changing the domain itself.
  • #18: By defining valid values for a domain, automatic validation is provided for any fields that point to that domain. This includes validation at the ABAP Dictionary level (if a program tries to insert invalid data, an error will occur) as well as at the screen level (users will not be permitted to enter invalid data). Additionally, users can obtain a list of possible entries (for fields pointing to domains with allowed values) by hitting function key F4.
  • #19: Now, let’s take a look at creating a Domain in the ABAP Dictionary. We will create a Domain called ZXXNAME (where XX stands for the last two digits of your logon id). This Domain will be attached to the Data Element ZXXFIRSTNAME which we just created. To create a Domain within the ABAP Dictionary use transaction SE80 or the menu path: Tools  ABAP Workbench  Overview  Object Navigator. Pull down the Workbench menu and select Other objects… Select the Dictionary tab from the pop up screen and enter the appropriate Domain name in the Domain field. You can also use Transaction Code SE11, and select radio button for Domain. Enter ZXXNAME as the Domain name (where XX stands for the last two digits of your logon id). Click the Create button (F5). Enter a description (short text), a data type, and the appropriate number of characters for this Domain. Click the icon (Ctrl+S). Type in your development class, YXXA (where XX stands for the last two digits of your logon id)
  • #20: A domain can define a value range containing the valid values for fields that refer to that domain. Explicit values or a value table can be defined for the Domain ZXXNAME. Click the Value range tab. Under both sections of this screen, we can assign valid values to the Domain ZXXNAME. This means that SAP will only allow the values specified on this screen to be entered into any field that references the Domain ZXXNAME. A Value Table can also be assigned to the Domain ZXXNAME. If a Value Table is assigned to ZXXNAME, SAP will only allow the values contained within the Value Table to be entered into any field that references the Domain ZXXNAME. Once valid values are assigned, click the icon (Ctrl+F3). Navigate back to the Data Element ZXXFIRSTNAME. Click the icon (Ctrl+F3). Navigate back to the Table ZXXFIRSTTABLE. We will now add a custom field to our table.
  • #21: Now you are able to add custom fields to the table ZXXFIRSTTABLE. Enter FIRSTNAME as the first field in the field list. Enter ZXXFIRSTNAME as FIRSTNAME’s Field Type (Data Element). Assigning the Data Element to the field FIRSTNAME means that the field FIRSTNAME will inherit the same data type and characteristics that we previously assigned to its Data Element, ZXXFIRSTNAME. The field FIRSTNAME will be a Character based field with a length of 30. Check the Primary Key checkbox next to the field FIRSTNAME. (This will be discussed in later chapters) Continue to add relevant fields (such as LASTNAME, HOMETOWN, POSTBOX, etc.) to this table. Remember to create your own Data Elements and Domains when SAP does not provide fields that meet your exact specifications. Click the icon (Ctrl+F3) to activate the new table when you are done.
  • #22: Maintain the table’s Technical Settings by entering a Data Class and a Size Category. Both of these fields will depend on what the table will be used for and how much data you expect the table to hold. For this example, ZXXFIRSTTABLE will hold a small amount of Master Data. Select APPL0 for the Data Class. Select 0 for the Size Category. Click the icon (Shift+F4) and then the button (F3). The table ZXXFIRSTTABLE should now be in an active status and it should contain one field FIRSTNAME.
  • #25: The TABLES statement: Identifies the table to the ABAP program. Creates a work area in memory to store records retrieved from the database (the work area only holds one record at a time). The SELECT statement retrieves records one at a time from the database and puts them into the work area. The WRITE statement writes data to the screen. The SELECT-ENDSELECT syntax creates a looping structure. In other words, all statements between SELECT and ENDSELECT are executed once for each record retrieved from the database.