SlideShare uma empresa Scribd logo
1 de 18
Lecture 2 Reading Database Tables BCO5647 Applications Programming Techniques (ABAP)
Readings & Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The  ABAP  Dictionary ,[object Object],[object Object],[object Object]
ABAP Open SQL ,[object Object]
ABAP Open SQL ,[object Object],[object Object],[object Object]
Using SELECT to Retrieve Data 1 ,[object Object],[object Object],[object Object],[object Object],Reading by Single Record ACCESS
Using SELECT to Retrieve Data 2 ,[object Object]
Using SELECT to Retrieve Data 3 ,[object Object]
Reusable Components for Data Retrieval ,[object Object],[object Object],[object Object],[object Object],[object Object]
Reading Data from the   Database ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using WHERE to limit the Data returned with SELECT ,[object Object],[object Object],[object Object]
Using ORDER BY to sort the Data returned with SELECT ,[object Object],[object Object]
Working with System Variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Working with System Variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Working with System Variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using the SELECT SINGLE statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Commenting Code and Formal Documentation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Commenting Code and Formal Documentation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Mais conteúdo relacionado

Mais procurados

BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdf
KeerthanaP37
 
Sql Queries
Sql QueriesSql Queries
Sql Queries
webicon
 
Stacks & Queues
Stacks & QueuesStacks & Queues
Stacks & Queues
tech4us
 

Mais procurados (20)

Migration
MigrationMigration
Migration
 
Lecture 2c stacks
Lecture 2c stacksLecture 2c stacks
Lecture 2c stacks
 
10053 - null is not nothing
10053 - null is not nothing10053 - null is not nothing
10053 - null is not nothing
 
SAP Modularization techniques
SAP Modularization techniquesSAP Modularization techniques
SAP Modularization techniques
 
Sap abap-data structures and internal tables
Sap abap-data structures and internal tablesSap abap-data structures and internal tables
Sap abap-data structures and internal tables
 
Internal tables
Internal tables Internal tables
Internal tables
 
Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]
 
Oracle: PLSQL
Oracle: PLSQLOracle: PLSQL
Oracle: PLSQL
 
Etl2
Etl2Etl2
Etl2
 
Oracle Baisc Tutorial
Oracle Baisc TutorialOracle Baisc Tutorial
Oracle Baisc Tutorial
 
BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdf
 
Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
 
linked list
linked list linked list
linked list
 
Interview Preparation
Interview PreparationInterview Preparation
Interview Preparation
 
Oracle: Procedures
Oracle: ProceduresOracle: Procedures
Oracle: Procedures
 
EBS R12 Concurrent program tracing
EBS R12 Concurrent program tracingEBS R12 Concurrent program tracing
EBS R12 Concurrent program tracing
 
Sql Queries
Sql QueriesSql Queries
Sql Queries
 
05 internal tables
05 internal tables05 internal tables
05 internal tables
 
Stacks & Queues
Stacks & QueuesStacks & Queues
Stacks & Queues
 
Rana Junaid Rasheed
Rana Junaid RasheedRana Junaid Rasheed
Rana Junaid Rasheed
 

Destaque

Chapter 01 overview of abap dictionary1
Chapter 01 overview of abap dictionary1Chapter 01 overview of abap dictionary1
Chapter 01 overview of abap dictionary1
Kranthi Kumar
 
Chapter 02 abap dictionary objects1
Chapter 02 abap dictionary objects1Chapter 02 abap dictionary objects1
Chapter 02 abap dictionary objects1
Kranthi Kumar
 
Chapter 05 adding structures1
Chapter 05 adding structures1Chapter 05 adding structures1
Chapter 05 adding structures1
Kranthi Kumar
 
Chapter 04 abap dictionary tables in relational databases1
Chapter 04 abap dictionary tables in relational databases1Chapter 04 abap dictionary tables in relational databases1
Chapter 04 abap dictionary tables in relational databases1
Kranthi Kumar
 
Chapter 06 abap repository information system1
Chapter 06 abap  repository information system1Chapter 06 abap  repository information system1
Chapter 06 abap repository information system1
Kranthi Kumar
 
Chapter 07 abap dictionary changes1
Chapter 07 abap dictionary changes1Chapter 07 abap dictionary changes1
Chapter 07 abap dictionary changes1
Kranthi Kumar
 
Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1
Kranthi Kumar
 
Chapter 10 online help & documentation1
Chapter 10 online help & documentation1Chapter 10 online help & documentation1
Chapter 10 online help & documentation1
Kranthi Kumar
 
0106 debugging
0106 debugging0106 debugging
0106 debugging
vkyecc1
 
0104 abap dictionary
0104 abap dictionary0104 abap dictionary
0104 abap dictionary
vkyecc1
 
Sujith ~ cross applications
Sujith ~ cross applicationsSujith ~ cross applications
Sujith ~ cross applications
Kranthi Kumar
 
Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1
Kranthi Kumar
 
table maintenance generator1
 table maintenance generator1 table maintenance generator1
table maintenance generator1
Kranthi Kumar
 
Abap function module help
Abap function module helpAbap function module help
Abap function module help
Kranthi Kumar
 
Abap course chapter 3 basic concepts
Abap course   chapter 3 basic conceptsAbap course   chapter 3 basic concepts
Abap course chapter 3 basic concepts
Milind Patil
 

Destaque (20)

Chapter 01 overview of abap dictionary1
Chapter 01 overview of abap dictionary1Chapter 01 overview of abap dictionary1
Chapter 01 overview of abap dictionary1
 
Chapter 02 abap dictionary objects1
Chapter 02 abap dictionary objects1Chapter 02 abap dictionary objects1
Chapter 02 abap dictionary objects1
 
Chapter 05 adding structures1
Chapter 05 adding structures1Chapter 05 adding structures1
Chapter 05 adding structures1
 
Chapter 04 abap dictionary tables in relational databases1
Chapter 04 abap dictionary tables in relational databases1Chapter 04 abap dictionary tables in relational databases1
Chapter 04 abap dictionary tables in relational databases1
 
Chapter 06 abap repository information system1
Chapter 06 abap  repository information system1Chapter 06 abap  repository information system1
Chapter 06 abap repository information system1
 
data modelling1
 data modelling1 data modelling1
data modelling1
 
Chapter 07 abap dictionary changes1
Chapter 07 abap dictionary changes1Chapter 07 abap dictionary changes1
Chapter 07 abap dictionary changes1
 
cardinality1
cardinality1cardinality1
cardinality1
 
Ale Idoc
Ale IdocAle Idoc
Ale Idoc
 
Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1
 
Chapter 10 online help & documentation1
Chapter 10 online help & documentation1Chapter 10 online help & documentation1
Chapter 10 online help & documentation1
 
0106 debugging
0106 debugging0106 debugging
0106 debugging
 
0104 abap dictionary
0104 abap dictionary0104 abap dictionary
0104 abap dictionary
 
Sujith ~ cross applications
Sujith ~ cross applicationsSujith ~ cross applications
Sujith ~ cross applications
 
Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1
 
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
 

Semelhante a Lecture02 abap on line

Power of call symput data
Power of call symput dataPower of call symput data
Power of call symput data
Yash Sharma
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index Tuning
Manikanda kumar
 
Chapter Seven(2)
Chapter Seven(2)Chapter Seven(2)
Chapter Seven(2)
bolovv
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2
nesmaddy
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
paulguerin
 

Semelhante a Lecture02 abap on line (20)

Advanced plsql mock_assessment
Advanced plsql mock_assessmentAdvanced plsql mock_assessment
Advanced plsql mock_assessment
 
Apps1
Apps1Apps1
Apps1
 
Top 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tipsTop 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tips
 
Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1
 
Power of call symput data
Power of call symput dataPower of call symput data
Power of call symput data
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index Tuning
 
IDUG 2015 NA Data Movement Utilities final
IDUG 2015 NA Data Movement Utilities finalIDUG 2015 NA Data Movement Utilities final
IDUG 2015 NA Data Movement Utilities final
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Chapter Seven(2)
Chapter Seven(2)Chapter Seven(2)
Chapter Seven(2)
 
11i&r12 difference
11i&r12 difference11i&r12 difference
11i&r12 difference
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Create generic delta
Create generic deltaCreate generic delta
Create generic delta
 
12c Database new features
12c Database new features12c Database new features
12c Database new features
 
Plsql
PlsqlPlsql
Plsql
 
Procedures andcursors
Procedures andcursorsProcedures andcursors
Procedures andcursors
 
Oracle plsql and d2 k interview questions
Oracle plsql and d2 k interview questionsOracle plsql and d2 k interview questions
Oracle plsql and d2 k interview questions
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2
 
Fdms 1st cycle exp.pdf
Fdms 1st cycle exp.pdfFdms 1st cycle exp.pdf
Fdms 1st cycle exp.pdf
 
PLSQL Practices
PLSQL PracticesPLSQL Practices
PLSQL Practices
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
 

Mais de Milind Patil

Abap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfilesAbap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfiles
Milind Patil
 
Step by step abap_input help or lov
Step by step abap_input help or lovStep by step abap_input help or lov
Step by step abap_input help or lov
Milind Patil
 
Step bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentationStep bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentation
Milind Patil
 
Step bystep abap_field help or documentation
Step bystep abap_field help or documentationStep bystep abap_field help or documentation
Step bystep abap_field help or documentation
Milind Patil
 
Abap slides user defined data types and data
Abap slides user defined data types and dataAbap slides user defined data types and data
Abap slides user defined data types and data
Milind Patil
 
Abap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checksAbap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checks
Milind Patil
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
Milind Patil
 
Abap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecksAbap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecks
Milind Patil
 
Abap slide exceptionshandling
Abap slide exceptionshandlingAbap slide exceptionshandling
Abap slide exceptionshandling
Milind Patil
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
Milind Patil
 
Lecture16 abap on line
Lecture16 abap on lineLecture16 abap on line
Lecture16 abap on line
Milind Patil
 
Lecture14 abap on line
Lecture14 abap on lineLecture14 abap on line
Lecture14 abap on line
Milind Patil
 
Lecture13 abap on line
Lecture13 abap on lineLecture13 abap on line
Lecture13 abap on line
Milind Patil
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
Milind Patil
 
Lecture11 abap on line
Lecture11 abap on lineLecture11 abap on line
Lecture11 abap on line
Milind Patil
 
Lecture10 abap on line
Lecture10 abap on lineLecture10 abap on line
Lecture10 abap on line
Milind Patil
 
Lecture09 abap on line
Lecture09 abap on lineLecture09 abap on line
Lecture09 abap on line
Milind Patil
 

Mais de Milind Patil (20)

Abap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfilesAbap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfiles
 
Step by step abap_input help or lov
Step by step abap_input help or lovStep by step abap_input help or lov
Step by step abap_input help or lov
 
Step bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentationStep bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentation
 
Step bystep abap_field help or documentation
Step bystep abap_field help or documentationStep bystep abap_field help or documentation
Step bystep abap_field help or documentation
 
Abap slides user defined data types and data
Abap slides user defined data types and dataAbap slides user defined data types and data
Abap slides user defined data types and data
 
Abap slides set1
Abap slides set1Abap slides set1
Abap slides set1
 
Abap slide class3
Abap slide class3Abap slide class3
Abap slide class3
 
Abap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checksAbap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checks
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
 
Abap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecksAbap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecks
 
Abap slide exceptionshandling
Abap slide exceptionshandlingAbap slide exceptionshandling
Abap slide exceptionshandling
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
 
Abap reports
Abap reportsAbap reports
Abap reports
 
Lecture16 abap on line
Lecture16 abap on lineLecture16 abap on line
Lecture16 abap on line
 
Lecture14 abap on line
Lecture14 abap on lineLecture14 abap on line
Lecture14 abap on line
 
Lecture13 abap on line
Lecture13 abap on lineLecture13 abap on line
Lecture13 abap on line
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
 
Lecture11 abap on line
Lecture11 abap on lineLecture11 abap on line
Lecture11 abap on line
 
Lecture10 abap on line
Lecture10 abap on lineLecture10 abap on line
Lecture10 abap on line
 
Lecture09 abap on line
Lecture09 abap on lineLecture09 abap on line
Lecture09 abap on line
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Último (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Lecture02 abap on line

  • 1. Lecture 2 Reading Database Tables BCO5647 Applications Programming Techniques (ABAP)
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.

Notas do Editor

  1. The ABAP Dictionary The ABAP Dictionary is part of SAP. It contains definitions of tables found in the database (table name, field names, type, length etc.) Each table has a unique name within the SAP system. SAP comes with over 8000 table descriptions in the ABAP Dictionary. During implementation of an SAP system, specialist consultants use many of these tables to map to the organisation's existing database tables. The ABAP Dictionary sits on top of a database such as Oracle or Informix and acts like a remote control generating and sending SQL statements to it. For example, when you create a table definition in the ABAP Dictionary, SQL statements are generated and sent to the database, causing it to create the actual table in the database. When you want to modify the table, you must modify the table definition in the Data Dictionary - this generates more SQL causing the database to modify the table. When you look at a table in the ABAP Dictionary , you are looking at the DESCRIPTION of a table in the underlying DB.
  2. ABAP Open SQL Reading data from the database is probably the most common activity in an ABAP program . A report program usually consists of a selection screen on which you define the dataset you wish to display . The user’s selection is integrated into an ABAP open SQL statement to extract the relevant data from the database. This data is then displayed as a “list” or “report”. Demonstrate zbmclec002a_demo What is OPEN SQL ?
  3. ABAP Open SQL Open SQL statements are a version of Standard SQL. Open SQL goes beyond standard SQL by offering variants of the statements that only operate in ABAP programs and can simply or accelerate database access . Open SQL statements allow you to access the database in a uniform way from your programs, regardless of the database system being used. This is achieved because Open SQL statements are converted into database-specific (native) SQL statements by the database interface. For example, if you were running an Oracle database, your ABAP Open SQL would be converted by the database interface to Oracle SQL statements. Open SQL allows your ABAP programs to be portable between databases. For example, if your company wanted to switch from an Oracle DB to an Informix DB, it could change the database, and your ABAP code would continue to run without modification. Open SQL makes your code fast . SAP’s database interface buffers information from the database. When data is read from the database, it can be stored in buffers. If a request is made to access the same records, the request can be satisfied without having to go to the database. This buffering technique reduces the load on the database server and can speed up database access times by a factor of 10 to 100 times.
  4. You use the Open SQL statement SELECT to program database read access. The SELECT statement contains a series of clauses, each of which has a different task: The SELECT clause describes whether the result of the selection will comprise several lines or a single line of data. The FROM clause names the database from which data is to be selected. The INTO clause determines the internal data objects into which the selected data is to be placed. The WHERE clause defines the conditions that the selection results must fulfil. Reading by Single Record ACCESS The SELECT SINGLE * statement allows you to read a single record from the database table. To ensure a unique access, all key fields must be filled in the WHERE clause. The * informs the database interface that all columns in that row of the database table should be read. If you only wish a specific selection of columns, you can list the required fields instead. In the INTO clause, enter the destination to where the database interface is to copy the data. The target area should have a structure identical to the columns of the database table being read.
  5. Reading several rows using a loop If you do not use the SINGLE addition with the SELECT statement, the system reads multiple records from the database. In this example, the field list determines the columns whose data is to be read from the database. The number of requested rows to be read can be restricted using the WHERE clause. In the WHERE clause, you enter only the field names of the database table. The name of the database table that is accessed is found in the FROM clause. The database delivers the data to the database interface in packages. The ABAP runtime system copies the data records to the target area row by row using a loop. It also enables sequential processing of all the statements between SELECT and ENDSELECT.
  6. Reading Several Rows Using an Array Fetch The INTO TABLE addition causes the ABAP runtime system to copy the contents of the database interface directly to the specified internal table. This is called an array fetch . Since the array fetch is not executed as a loop, you must not program an ENDSELECT statement.
  7. Methods of global classes (covered later) Methods of business objects (NOT covered in this subject but Adv ABAP) Function modules (covered later) Logical databases (covered later)
  8. Reading Data from the Database Line 1 - the report statement is required as the first line of a report program. Line 2 - the tables statement does 2 things: First, it allocates a memory area called the table work area. The name of this work area is called sbook . Second, it gives the program access to the database table called sbook . Note the program has 2 things named sbook : a work area and a table. Line 3 - Select is a looping command when it is used in conjunction with endselect . The select statement returns all rows contained in the named table, one at a time. The first row is returned and placed in the work area and made available for processing during the first pass of the loop. The second row is available during the second pass of the loop and so on, until all rows have been read from the table. The “*” means that ALL fields in each row of the database table are returned and stored in the table work area. Line 4 - the write statement is executed once for each row that is read from the database table into the table work area. Note that only two fields for each table row retrieved are printed. Also note that the field names are preceded by the table work area name and a hyphen.
  9. Using WHERE to limit the Data returned with SELECT A where clause can be added to the select statement to restrict the number of rows returned from the database. In the first program, the only rows read from the table are those where the table field CARRID has the value LH. The and operator can be used to include more than one condition. The or operator can also be used in the where clause.
  10. Using ORDER BY to sort the Data returned with SELECT Order By can have more than one field included Fields must be separated by spaces not commas, e.g. order by cityfrom cityto.
  11. Working with System Variables SAP’s R/3 system makes system variables available within your program. You don’t have to define anything to access them, they are always available. They begin with the prefix sy- and are usually called sy (sigh) fields for short. All system variables are defined in the ABAP Dictionary.
  12. Working with System Variables - sy-subrc To determine if the select statement returned any rows, you can test the system variable sy-subrc (sigh-sub-are-see) after the endselect statement If rows were found, the value of sy-subrc will be 0. If no rows were found, the value will be 4. If you code a select statement and want to test the value of sy-subrc , your test must come after the endselect statement. WHY? Answer: The code between the select and endselect is executed once for each row returned from the database. If no rows are returned from the database, the code between select and endselect is never executed. Therefore, you must code the test for sy-subrc AFTER the endselect . Demonstrate zbmclec002b_demo
  13. Working with System Variables - sy-dbcnt The system variable sy-dbcnt keeps a count of the number of rows returned from a select statement. By testing the value of sy-dbcnt after the ENDSELECT statement, you can determine the number of rows returned. sy-dbcnt can also be used as a loop counter; between the SELECT and ENDSELECT it contains a count of the current loop. For the first row returned, sy-dbcnt will be 1, for the second it will be 2, and so on. After the ENDSELECT, it will retain its value and so will contain the number of rows selected. What output would result from the sample program? 1 Acme Australia 2 Acme North America 3 Acme Asia 4 Acme Europe 4 records found
  14. Using the SELECT SINGLE statement You can use the SELECT SINGLE statement when you want a single row of data. For example, if you have a student number and you want to look up the student details. No ENDSELECT is needed because only one row is returned. If you know that only one row of data will always be returned, use this option as it is much faster more efficient than SELECT/ENDSELECT . To ensure that one unique row is returned, you should specify a primary field value in the WHERE clause.
  15. Commenting Code and Formal Documentation All programs should be fully documented. There are 2 ways to put comments into your code: An * in column one indicates that the entire line is a comment. It will turn red within the editor to indicate that it is a full-line comment. “ anywhere on a line indicates that the remainder of the line is a comment. There is no end-comment character. That means, when you begin a comment, the remainder of the line will be a comment only. No more code can follow on that line. The comment ends at the end of the current line. Aside from comments, you can formally document your code in the documentation component of the program.