SlideShare uma empresa Scribd logo
1 de 26
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

Mais conteúdo relacionado

Mais procurados

Chapter 10 online help & documentation1
Chapter 10 online help & documentation1Chapter 10 online help & documentation1
Chapter 10 online help & documentation1Kranthi Kumar
 
Chapter 09 overview of search helps1
Chapter 09 overview of search helps1Chapter 09 overview of search helps1
Chapter 09 overview of search helps1Kranthi Kumar
 
Unit 3 - Transparent tables in the ABAP Dictionary
Unit 3 - Transparent tables in the ABAP DictionaryUnit 3 - Transparent tables in the ABAP Dictionary
Unit 3 - Transparent tables in the ABAP Dictionarydubon07
 
Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Kranthi Kumar
 
X rec extened reconciliation using excel vba
X rec   extened reconciliation using excel vbaX rec   extened reconciliation using excel vba
X rec extened reconciliation using excel vbasenthilsundaresan
 
ETL Microsoft Material
ETL Microsoft MaterialETL Microsoft Material
ETL Microsoft MaterialAhmed Hashem
 
Ssis sql ssrs_sp_ssas_mdx_hb_li
Ssis sql ssrs_sp_ssas_mdx_hb_liSsis sql ssrs_sp_ssas_mdx_hb_li
Ssis sql ssrs_sp_ssas_mdx_hb_liHong-Bing Li
 
Unit 1 - SAP System Architecture
Unit 1 - SAP System ArchitectureUnit 1 - SAP System Architecture
Unit 1 - SAP System Architecturedubon07
 
Unit 2 - Object Navigator, Repository and ABAP Programs
Unit 2 - Object Navigator, Repository and ABAP ProgramsUnit 2 - Object Navigator, Repository and ABAP Programs
Unit 2 - Object Navigator, Repository and ABAP Programsdubon07
 
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical ExpressionsUnit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressionsdubon07
 
169318090 0104abapdictionary-100831073625-phpapp02
169318090 0104abapdictionary-100831073625-phpapp02169318090 0104abapdictionary-100831073625-phpapp02
169318090 0104abapdictionary-100831073625-phpapp02Phani Patibandla
 
MS Bi Portfolio Gregory Lee
MS Bi Portfolio Gregory LeeMS Bi Portfolio Gregory Lee
MS Bi Portfolio Gregory Leekeeperx99
 
Sap business objects xir3.03.1, bi 4.0 & 4.1 training
Sap business objects xir3.03.1, bi 4.0 & 4.1 trainingSap business objects xir3.03.1, bi 4.0 & 4.1 training
Sap business objects xir3.03.1, bi 4.0 & 4.1 trainingFuturePoint Technologies
 
Simplest way of loading data from flat file to hana
Simplest way of loading data from flat file to hanaSimplest way of loading data from flat file to hana
Simplest way of loading data from flat file to hanaDeepak Chaubey
 
SSIS Project Profile
SSIS Project ProfileSSIS Project Profile
SSIS Project Profiletthompson0421
 
Reports Dashboards SQL Demo
Reports Dashboards SQL DemoReports Dashboards SQL Demo
Reports Dashboards SQL DemoHong-Bing Li
 

Mais procurados (17)

Chapter 10 online help & documentation1
Chapter 10 online help & documentation1Chapter 10 online help & documentation1
Chapter 10 online help & documentation1
 
data modelling1
 data modelling1 data modelling1
data modelling1
 
Chapter 09 overview of search helps1
Chapter 09 overview of search helps1Chapter 09 overview of search helps1
Chapter 09 overview of search helps1
 
Unit 3 - Transparent tables in the ABAP Dictionary
Unit 3 - Transparent tables in the ABAP DictionaryUnit 3 - Transparent tables in the ABAP Dictionary
Unit 3 - Transparent tables in the ABAP Dictionary
 
Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1
 
X rec extened reconciliation using excel vba
X rec   extened reconciliation using excel vbaX rec   extened reconciliation using excel vba
X rec extened reconciliation using excel vba
 
ETL Microsoft Material
ETL Microsoft MaterialETL Microsoft Material
ETL Microsoft Material
 
Ssis sql ssrs_sp_ssas_mdx_hb_li
Ssis sql ssrs_sp_ssas_mdx_hb_liSsis sql ssrs_sp_ssas_mdx_hb_li
Ssis sql ssrs_sp_ssas_mdx_hb_li
 
Unit 1 - SAP System Architecture
Unit 1 - SAP System ArchitectureUnit 1 - SAP System Architecture
Unit 1 - SAP System Architecture
 
Unit 2 - Object Navigator, Repository and ABAP Programs
Unit 2 - Object Navigator, Repository and ABAP ProgramsUnit 2 - Object Navigator, Repository and ABAP Programs
Unit 2 - Object Navigator, Repository and ABAP Programs
 
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical ExpressionsUnit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
 
169318090 0104abapdictionary-100831073625-phpapp02
169318090 0104abapdictionary-100831073625-phpapp02169318090 0104abapdictionary-100831073625-phpapp02
169318090 0104abapdictionary-100831073625-phpapp02
 
MS Bi Portfolio Gregory Lee
MS Bi Portfolio Gregory LeeMS Bi Portfolio Gregory Lee
MS Bi Portfolio Gregory Lee
 
Sap business objects xir3.03.1, bi 4.0 & 4.1 training
Sap business objects xir3.03.1, bi 4.0 & 4.1 trainingSap business objects xir3.03.1, bi 4.0 & 4.1 training
Sap business objects xir3.03.1, bi 4.0 & 4.1 training
 
Simplest way of loading data from flat file to hana
Simplest way of loading data from flat file to hanaSimplest way of loading data from flat file to hana
Simplest way of loading data from flat file to hana
 
SSIS Project Profile
SSIS Project ProfileSSIS Project Profile
SSIS Project Profile
 
Reports Dashboards SQL Demo
Reports Dashboards SQL DemoReports Dashboards SQL Demo
Reports Dashboards SQL Demo
 

Destaque

Lecture02 abap on line
Lecture02 abap on lineLecture02 abap on line
Lecture02 abap on lineMilind Patil
 
Chapter 06 abap repository information system1
Chapter 06 abap  repository information system1Chapter 06 abap  repository information system1
Chapter 06 abap repository information system1Kranthi Kumar
 
0106 debugging
0106 debugging0106 debugging
0106 debuggingvkyecc1
 
Sujith ~ cross applications
Sujith ~ cross applicationsSujith ~ cross applications
Sujith ~ cross applicationsKranthi Kumar
 
table maintenance generator1
 table maintenance generator1 table maintenance generator1
table maintenance generator1Kranthi Kumar
 
Abap function module help
Abap function module helpAbap function module help
Abap function module helpKranthi Kumar
 
Abap course chapter 3 basic concepts
Abap course   chapter 3 basic conceptsAbap course   chapter 3 basic concepts
Abap course chapter 3 basic conceptsMilind Patil
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)Kranthi Kumar
 
Step by-step creation of a bapi in detailed steps with scr…
Step by-step creation of a bapi in detailed steps with scr…Step by-step creation of a bapi in detailed steps with scr…
Step by-step creation of a bapi in detailed steps with scr…sapsarath612
 
Dialog Programming Overview
Dialog Programming OverviewDialog Programming Overview
Dialog Programming Overviewsapdocs. info
 
Ale edi i_doc.sapdb.info
Ale edi i_doc.sapdb.infoAle edi i_doc.sapdb.info
Ale edi i_doc.sapdb.infoIvs Naresh
 
Workflow Part1 1
Workflow Part1 1Workflow Part1 1
Workflow Part1 1evil66_in
 

Destaque (19)

Lecture02 abap on line
Lecture02 abap on lineLecture02 abap on line
Lecture02 abap on line
 
cardinality1
cardinality1cardinality1
cardinality1
 
Ale Idoc
Ale IdocAle Idoc
Ale Idoc
 
05 internal tables
05 internal tables05 internal tables
05 internal tables
 
Chapter 06 abap repository information system1
Chapter 06 abap  repository information system1Chapter 06 abap  repository information system1
Chapter 06 abap repository information system1
 
0106 debugging
0106 debugging0106 debugging
0106 debugging
 
Sujith ~ cross applications
Sujith ~ cross applicationsSujith ~ cross applications
Sujith ~ cross applications
 
Bapi jco[1]
Bapi jco[1]Bapi jco[1]
Bapi jco[1]
 
VIEWS
VIEWSVIEWS
VIEWS
 
table maintenance generator1
 table maintenance generator1 table maintenance generator1
table maintenance generator1
 
Abap function module help
Abap function module helpAbap function module help
Abap function module help
 
Abap course chapter 3 basic concepts
Abap course   chapter 3 basic conceptsAbap course   chapter 3 basic concepts
Abap course chapter 3 basic concepts
 
control techniques
control techniquescontrol techniques
control techniques
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
 
Step by-step creation of a bapi in detailed steps with scr…
Step by-step creation of a bapi in detailed steps with scr…Step by-step creation of a bapi in detailed steps with scr…
Step by-step creation of a bapi in detailed steps with scr…
 
Dialog Programming Overview
Dialog Programming OverviewDialog Programming Overview
Dialog Programming Overview
 
Ale edi i_doc.sapdb.info
Ale edi i_doc.sapdb.infoAle edi i_doc.sapdb.info
Ale edi i_doc.sapdb.info
 
Workflow Part1 1
Workflow Part1 1Workflow Part1 1
Workflow Part1 1
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 

Semelhante a Chapter 02 abap dictionary objects1

Database_Tuning.ppt
Database_Tuning.pptDatabase_Tuning.ppt
Database_Tuning.pptAsimEisa2
 
Lecture03 abap on line
Lecture03 abap on lineLecture03 abap on line
Lecture03 abap on lineMilind Patil
 
bi-publisher.pptx
bi-publisher.pptxbi-publisher.pptx
bi-publisher.pptxkjkombrink
 
OPERATE DATABASE APPLICATION
OPERATE DATABASE APPLICATIONOPERATE DATABASE APPLICATION
OPERATE DATABASE APPLICATIONYoomiLaataBekele
 
OSA Con 2022 - Apache Iceberg_ An Architectural Look Under the Covers - Alex ...
OSA Con 2022 - Apache Iceberg_ An Architectural Look Under the Covers - Alex ...OSA Con 2022 - Apache Iceberg_ An Architectural Look Under the Covers - Alex ...
OSA Con 2022 - Apache Iceberg_ An Architectural Look Under the Covers - Alex ...Altinity Ltd
 
What's New for Developers in SQL Server 2008?
What's New for Developers in SQL Server 2008?What's New for Developers in SQL Server 2008?
What's New for Developers in SQL Server 2008?ukdpe
 
SQL Server 2008 Overview
SQL Server 2008 OverviewSQL Server 2008 Overview
SQL Server 2008 OverviewEric Nelson
 
Sql server ___________session 1(sql 2008)
Sql server  ___________session 1(sql 2008)Sql server  ___________session 1(sql 2008)
Sql server ___________session 1(sql 2008)Ehtisham Ali
 
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERSIICT Chromepet
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAram SE
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAram SE
 
Performance Tuning Oracle's BI Applications
Performance Tuning Oracle's BI ApplicationsPerformance Tuning Oracle's BI Applications
Performance Tuning Oracle's BI ApplicationsKPI Partners
 
Ay202122 oct sem bta ms excel proj specs final
Ay202122 oct sem bta ms excel proj specs finalAy202122 oct sem bta ms excel proj specs final
Ay202122 oct sem bta ms excel proj specs finalMark Kor
 
Information Design Tool -Tutorial4
Information Design Tool -Tutorial4Information Design Tool -Tutorial4
Information Design Tool -Tutorial4Obily W
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence PortfolioYubaraj Khanal
 

Semelhante a Chapter 02 abap dictionary objects1 (20)

Database_Tuning.ppt
Database_Tuning.pptDatabase_Tuning.ppt
Database_Tuning.ppt
 
Lecture03 abap on line
Lecture03 abap on lineLecture03 abap on line
Lecture03 abap on line
 
bi-publisher.pptx
bi-publisher.pptxbi-publisher.pptx
bi-publisher.pptx
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
 
ABAP
ABAPABAP
ABAP
 
OPERATE DATABASE APPLICATION
OPERATE DATABASE APPLICATIONOPERATE DATABASE APPLICATION
OPERATE DATABASE APPLICATION
 
Vba
Vba Vba
Vba
 
OSA Con 2022 - Apache Iceberg_ An Architectural Look Under the Covers - Alex ...
OSA Con 2022 - Apache Iceberg_ An Architectural Look Under the Covers - Alex ...OSA Con 2022 - Apache Iceberg_ An Architectural Look Under the Covers - Alex ...
OSA Con 2022 - Apache Iceberg_ An Architectural Look Under the Covers - Alex ...
 
Abap sample
Abap sampleAbap sample
Abap sample
 
What's New for Developers in SQL Server 2008?
What's New for Developers in SQL Server 2008?What's New for Developers in SQL Server 2008?
What's New for Developers in SQL Server 2008?
 
SQL Server 2008 Overview
SQL Server 2008 OverviewSQL Server 2008 Overview
SQL Server 2008 Overview
 
Sql server ___________session 1(sql 2008)
Sql server  ___________session 1(sql 2008)Sql server  ___________session 1(sql 2008)
Sql server ___________session 1(sql 2008)
 
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a Database
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a Database
 
Performance Tuning Oracle's BI Applications
Performance Tuning Oracle's BI ApplicationsPerformance Tuning Oracle's BI Applications
Performance Tuning Oracle's BI Applications
 
Ay202122 oct sem bta ms excel proj specs final
Ay202122 oct sem bta ms excel proj specs finalAy202122 oct sem bta ms excel proj specs final
Ay202122 oct sem bta ms excel proj specs final
 
Abap faq
Abap faqAbap faq
Abap faq
 
Information Design Tool -Tutorial4
Information Design Tool -Tutorial4Information Design Tool -Tutorial4
Information Design Tool -Tutorial4
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 

Mais de Kranthi Kumar

Creating simple comp
Creating simple compCreating simple comp
Creating simple compKranthi Kumar
 
Controllers and context programming
Controllers and context programmingControllers and context programming
Controllers and context programmingKranthi Kumar
 
Binding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseBinding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseKranthi Kumar
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)Kranthi Kumar
 
Chapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsChapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsKranthi Kumar
 
Chapter 06 printing sap script forms
Chapter 06 printing sap script formsChapter 06 printing sap script forms
Chapter 06 printing sap script formsKranthi Kumar
 
Chapter 05 sap script - configuration
Chapter 05 sap script - configurationChapter 05 sap script - configuration
Chapter 05 sap script - configurationKranthi Kumar
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output programKranthi Kumar
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script formsKranthi Kumar
 

Mais de Kranthi Kumar (20)

Exercise in alv
Exercise in alvExercise in alv
Exercise in alv
 
Dynamic binding
Dynamic bindingDynamic binding
Dynamic binding
 
Data binding
Data bindingData binding
Data binding
 
Creating simple comp
Creating simple compCreating simple comp
Creating simple comp
 
Creating messages
Creating messagesCreating messages
Creating messages
 
Creating a comp
Creating a compCreating a comp
Creating a comp
 
Controllers and context programming
Controllers and context programmingControllers and context programming
Controllers and context programming
 
Context at design
Context at designContext at design
Context at design
 
Binding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseBinding,context mapping,navigation exercise
Binding,context mapping,navigation exercise
 
Alv for web
Alv for webAlv for web
Alv for web
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
Crm technical
Crm technicalCrm technical
Crm technical
 
Chapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsChapter 07 debugging sap scripts
Chapter 07 debugging sap scripts
 
Chapter 06 printing sap script forms
Chapter 06 printing sap script formsChapter 06 printing sap script forms
Chapter 06 printing sap script forms
 
Chapter 05 sap script - configuration
Chapter 05 sap script - configurationChapter 05 sap script - configuration
Chapter 05 sap script - configuration
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output program
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
 
sap script overview
sap script overviewsap script overview
sap script overview
 
Batch input session
Batch input sessionBatch input session
Batch input session
 

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

Notas do Editor

  1. 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.
  2. 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.
  3. 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.
  4. 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
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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).
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. 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)
  17. 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.
  18. 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.
  19. 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.
  20. 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.