SlideShare a Scribd company logo
1 of 23
ABAP VIEWS BASIC OOPS
By: Mohammad khalid khan…
CONTENTS
• What is view.
• Why view.
• OOPS.
• Objects and classes.
• Features of OOPS.
• Different visibility modes.
ABAP VIEWS
• Views are the data dictionary repository objects in ABAP, which are used to view
the data of several tables in one place.
• A view is similar to the database table, but it does not contain any physical data;
instead it derives data from different tables and acts like a virtual table (table
without any existence). Since it does not physically store any data, and the
database only contains the view definition, hence it takes very little space in the
database.
• A view can be created by combining the data of single or multiple tables, which
are called base tables.
WHY VIEWS ?
• The views in DDIC help to save time and increase efficiency, as it is a time-
consuming process to extract data from each table; for such cases, we can use
view in SAP ABAP Dictionary.
• A view can be used to represent a subset of data stored within a table or to join
multiple tables into a single virtual table.
• Whenever a view is executed, it displays the data extracted from the multiple
tables.
• In order to create a view in DDIC, we need to join the table, and for joining the
table, each table must have at least one common key field.
TYPES OF VIEWS
• In ABAP DDIC, there are four types of views that differ from each other in a way
in which they are implemented and access the data. These are given below:
1.Database view
2.Projection view
3.Help view
4.Maintenance view
DATABASE VIEW
• If a view is created on one or more tables by combining the fields using inner
join, such a view is called a Database view.
• Since this view uses the inner join, it only combines the matching records from
the table.
• In this view, we cannot perform any maintenance operation on table data; instead
we can just read the data.
KEY FEATURES OF DATABASE VIEW
• If the view contains more than one table, then it only allows us to read the data,
but if the view contains only a single table, the maintenance status can be
checked to find if the data can also be inserted in the view table or not.
• If we want to select the logically connected data from different tables
simultaneously, then we need to create the database views.
• This view can only combine the transparent tables, as it is implemented in the
database.
PROJECTION VIEW
• If a view is created on a single table, then it is called as Projection View.
• Using this type of view, we can minimize the fields by projecting only required
fields and rest fields will be filtered out.
• This view allows us to read and also maintain the data.
• The projection view is created on a single table only, and we cannot specify any
selection/join conditions for this view.
PROJECTION VIEW EXAMPLE
• Let's consider an example to understand the use of the projection view. Suppose
we have Students Details table, which contains records such as Student Name
and Roll number, Student address, Student fees, etc. We only want to share
student name and roll number with some companies. In this case, we will use the
projections view of the Student Details table. Hence, if there is a huge amount of
data, but we only want to display the relevant data field, we can choose the
projection view as the perfect option.
HELP VIEW
• The help views are created on two or more tables, specifically for the "Search-
helps" object in DDIC. It means they are used to provide the input helps(F4)
option for different fields in ABAP.
• It combines the data by using an outer join
• It allows us only to read the data, and we cannot maintain the data in this view.
• It can be used as a selection method in search helps.
MAINTENANCE VIEW
• The maintenance view is created on two or more tables, which is used to maintain the data of several
tables altogether. It helps us to maintain the complex application objects easily.
• It can combine several tables in a single unit, but the tables must have a foreign key relationship.
• It allows us to maintain and read the data of the table.
• The data present on several tables create a logical unit that acts as an application object for the user.
With the help of a maintenance view, we can display, modify, and maintain the data of such
application objects at once.
• In the maintenance view, all tables must be linked together with the foreign key, which means the join
condition must be derived from the foreign key always.
• There is always a maintenance status associated with each maintenance view, which specifies the
operations that can be performed on the associated table.
HOW TO CHOOSE THE VIEWS FOR THE TABLE?
• To read only the data of several tables with inner joins condition, choose
the database view.
• To read data and maintain the data for a single table, choose the projection
• To read only data of several tables with outer join conditions, choose the help It
can also be used for the Input help option.
• If a view is required with outer join, and which allows you to read and maintain the
data, choose the maintenance review.
WHAT IS OOPS
• Object means a real-world entity such as a pen, chair, table, computer, watch, etc. Object-
Oriented Programming is a methodology or paradigm to design a program using classes and
objects. It simplifies software development and maintenance by providing some concepts:
• Object
• Class
• Inheritance
• Polymorphism
• Abstraction
• Encapsulation
OBJECTS AND CLASSES
• OBJECT
• Any entity that has state and behavior is known as an object. For example, a
chair, pen, table, keyboard, bike, etc. It can be physical or logical.
• Class
• Collection of objects is called class. It is a logical entity.
• A class can also be defined as a blueprint from which you can create an individual
object. Class doesn't consume any space.
Inheritance
When one object acquires all the properties and behaviors of a parent object, it is
known as inheritance. It provides code reusability. It is used to achieve runtime
polymorphism.
Polymorphism
If one task is performed in different ways, it is known as polymorphism. For example:
to convince the customer differently, to draw something, for example, shape, triangle,
rectangle, etc..
Abstraction
Hiding internal details and showing functionality is known as abstraction. For
example phone call, we don't know the internal processing.
OO IN ABAP
ABAP was initially developed as a procedural language. But ABAP has now adapted
the principles of object oriented paradigms with the introduction of ABAP Objects.
The object-oriented concepts in ABAP such as class, object, inheritance, and
polymorphism, are essentially the same as those of other modern object-oriented
languages
FEATURES
• Effective programming structure.
• Real-world entities can be modeled very well.
• Data security and access.
• Minimizes code redundancy.
• Data abstraction and encapsulation.
COMPONENTS OF CLASS
• Attributes: Attributes are variables, constants declared within a
class.
• Methods: Methods are coding blocks which provides some
functionality .
• Interfaces: Interfaces are similar to classes which contain methods
Without any implementation.
• Events: Event is a mechanism through which one method of a class
can raise method of other class, without hazard of instantiating that
class.
VISIBILITY OF COMPONENTS
In ABAP Objects, the whole class definition is separated into three visibility sections:
• PUBLIC .
• PROTECTED .
• PRIVATE.
Public section: Data declared in public section can be accessed by the class itself, by its subclasses
as well as by other users outside the class.
Protected section: Data declared in the protected section can be accessed by the class itself, and
also by its subclasses but not by external users outside the class.
Private Section: Data declared in the private section can be accessed by the class only, but not by
its subclasses and by external users outside the class.
QUESTIONS ?
•What is the difference between TMG and
maintenance view
Is it mandatory to
implement all the
methods of interface IN
ABAP ?
does abstract method have
implementation in ABAP ?

More Related Content

What's hot

Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questionskssr99
 
List Processing in ABAP
List Processing in ABAPList Processing in ABAP
List Processing in ABAPsapdocs. info
 
SAP ABAP - Needed Notes
SAP   ABAP - Needed NotesSAP   ABAP - Needed Notes
SAP ABAP - Needed NotesAkash Bhavsar
 
ABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection ScreenABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection Screensapdocs. info
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questionsPradipta Mohanty
 
IDOC , ALE ,EDI
IDOC , ALE ,EDIIDOC , ALE ,EDI
IDOC , ALE ,EDIAmit Khari
 
Technical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part ITechnical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part IAshish Saxena
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answersUttam Agrawal
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)Kranthi Kumar
 

What's hot (20)

Abap reports
Abap reportsAbap reports
Abap reports
 
Field symbols
Field symbolsField symbols
Field symbols
 
Index in SAP ABAP
Index in SAP ABAPIndex in SAP ABAP
Index in SAP ABAP
 
Badi document
Badi documentBadi document
Badi document
 
Sap scripts
Sap scriptsSap scripts
Sap scripts
 
Sap abap
Sap abapSap abap
Sap abap
 
Reports
ReportsReports
Reports
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
 
List Processing in ABAP
List Processing in ABAPList Processing in ABAP
List Processing in ABAP
 
Abap dictionary 1
Abap dictionary 1Abap dictionary 1
Abap dictionary 1
 
SAP ABAP - Needed Notes
SAP   ABAP - Needed NotesSAP   ABAP - Needed Notes
SAP ABAP - Needed Notes
 
Badis
Badis Badis
Badis
 
SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
 
ABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection ScreenABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection Screen
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
 
IDOC , ALE ,EDI
IDOC , ALE ,EDIIDOC , ALE ,EDI
IDOC , ALE ,EDI
 
Technical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part ITechnical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part I
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
 

Similar to Abap views and lock objects.pptx

Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)Bilal Arshad
 
Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Aaron Shilo
 
Query Optimization in SQL Server
Query Optimization in SQL ServerQuery Optimization in SQL Server
Query Optimization in SQL ServerRajesh Gunasundaram
 
Operate Database Applicationitss level2.pptx
Operate Database Applicationitss level2.pptxOperate Database Applicationitss level2.pptx
Operate Database Applicationitss level2.pptxAbdirisakIman
 
Database management system
Database management systemDatabase management system
Database management systemSabinDhakal13
 
CHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptxCHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptxkashishy2
 

Similar to Abap views and lock objects.pptx (20)

Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)
 
Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…
 
The strength of a spatial database
The strength of a spatial databaseThe strength of a spatial database
The strength of a spatial database
 
Query Optimization in SQL Server
Query Optimization in SQL ServerQuery Optimization in SQL Server
Query Optimization in SQL Server
 
Presentation2
Presentation2Presentation2
Presentation2
 
Presentation2
Presentation2Presentation2
Presentation2
 
Operate Database Applicationitss level2.pptx
Operate Database Applicationitss level2.pptxOperate Database Applicationitss level2.pptx
Operate Database Applicationitss level2.pptx
 
Data warehouse physical design
Data warehouse physical designData warehouse physical design
Data warehouse physical design
 
Database management system
Database management systemDatabase management system
Database management system
 
MS ACCESS.pptx
MS ACCESS.pptxMS ACCESS.pptx
MS ACCESS.pptx
 
Collections
CollectionsCollections
Collections
 
Alv view.pptx
Alv view.pptxAlv view.pptx
Alv view.pptx
 
oracle
oracle oracle
oracle
 
MS-ACCESS.pptx
MS-ACCESS.pptxMS-ACCESS.pptx
MS-ACCESS.pptx
 
CC -Unit3.pptx
CC -Unit3.pptxCC -Unit3.pptx
CC -Unit3.pptx
 
Abstraction.pptx
Abstraction.pptxAbstraction.pptx
Abstraction.pptx
 
NoSql
NoSqlNoSql
NoSql
 
Dao benchmark
Dao benchmarkDao benchmark
Dao benchmark
 
Ch1_Intro-95(1).ppt
Ch1_Intro-95(1).pptCh1_Intro-95(1).ppt
Ch1_Intro-95(1).ppt
 
CHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptxCHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptx
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

Abap views and lock objects.pptx

  • 1. ABAP VIEWS BASIC OOPS By: Mohammad khalid khan…
  • 2. CONTENTS • What is view. • Why view. • OOPS. • Objects and classes. • Features of OOPS. • Different visibility modes.
  • 3. ABAP VIEWS • Views are the data dictionary repository objects in ABAP, which are used to view the data of several tables in one place. • A view is similar to the database table, but it does not contain any physical data; instead it derives data from different tables and acts like a virtual table (table without any existence). Since it does not physically store any data, and the database only contains the view definition, hence it takes very little space in the database. • A view can be created by combining the data of single or multiple tables, which are called base tables.
  • 4. WHY VIEWS ? • The views in DDIC help to save time and increase efficiency, as it is a time- consuming process to extract data from each table; for such cases, we can use view in SAP ABAP Dictionary. • A view can be used to represent a subset of data stored within a table or to join multiple tables into a single virtual table. • Whenever a view is executed, it displays the data extracted from the multiple tables. • In order to create a view in DDIC, we need to join the table, and for joining the table, each table must have at least one common key field.
  • 5. TYPES OF VIEWS • In ABAP DDIC, there are four types of views that differ from each other in a way in which they are implemented and access the data. These are given below: 1.Database view 2.Projection view 3.Help view 4.Maintenance view
  • 6. DATABASE VIEW • If a view is created on one or more tables by combining the fields using inner join, such a view is called a Database view. • Since this view uses the inner join, it only combines the matching records from the table. • In this view, we cannot perform any maintenance operation on table data; instead we can just read the data.
  • 7. KEY FEATURES OF DATABASE VIEW • If the view contains more than one table, then it only allows us to read the data, but if the view contains only a single table, the maintenance status can be checked to find if the data can also be inserted in the view table or not. • If we want to select the logically connected data from different tables simultaneously, then we need to create the database views. • This view can only combine the transparent tables, as it is implemented in the database.
  • 8. PROJECTION VIEW • If a view is created on a single table, then it is called as Projection View. • Using this type of view, we can minimize the fields by projecting only required fields and rest fields will be filtered out. • This view allows us to read and also maintain the data. • The projection view is created on a single table only, and we cannot specify any selection/join conditions for this view.
  • 9. PROJECTION VIEW EXAMPLE • Let's consider an example to understand the use of the projection view. Suppose we have Students Details table, which contains records such as Student Name and Roll number, Student address, Student fees, etc. We only want to share student name and roll number with some companies. In this case, we will use the projections view of the Student Details table. Hence, if there is a huge amount of data, but we only want to display the relevant data field, we can choose the projection view as the perfect option.
  • 10. HELP VIEW • The help views are created on two or more tables, specifically for the "Search- helps" object in DDIC. It means they are used to provide the input helps(F4) option for different fields in ABAP. • It combines the data by using an outer join • It allows us only to read the data, and we cannot maintain the data in this view. • It can be used as a selection method in search helps.
  • 11. MAINTENANCE VIEW • The maintenance view is created on two or more tables, which is used to maintain the data of several tables altogether. It helps us to maintain the complex application objects easily. • It can combine several tables in a single unit, but the tables must have a foreign key relationship. • It allows us to maintain and read the data of the table. • The data present on several tables create a logical unit that acts as an application object for the user. With the help of a maintenance view, we can display, modify, and maintain the data of such application objects at once. • In the maintenance view, all tables must be linked together with the foreign key, which means the join condition must be derived from the foreign key always. • There is always a maintenance status associated with each maintenance view, which specifies the operations that can be performed on the associated table.
  • 12. HOW TO CHOOSE THE VIEWS FOR THE TABLE? • To read only the data of several tables with inner joins condition, choose the database view. • To read data and maintain the data for a single table, choose the projection • To read only data of several tables with outer join conditions, choose the help It can also be used for the Input help option. • If a view is required with outer join, and which allows you to read and maintain the data, choose the maintenance review.
  • 13. WHAT IS OOPS • Object means a real-world entity such as a pen, chair, table, computer, watch, etc. Object- Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies software development and maintenance by providing some concepts: • Object • Class • Inheritance • Polymorphism • Abstraction • Encapsulation
  • 14. OBJECTS AND CLASSES • OBJECT • Any entity that has state and behavior is known as an object. For example, a chair, pen, table, keyboard, bike, etc. It can be physical or logical. • Class • Collection of objects is called class. It is a logical entity. • A class can also be defined as a blueprint from which you can create an individual object. Class doesn't consume any space.
  • 15. Inheritance When one object acquires all the properties and behaviors of a parent object, it is known as inheritance. It provides code reusability. It is used to achieve runtime polymorphism. Polymorphism If one task is performed in different ways, it is known as polymorphism. For example: to convince the customer differently, to draw something, for example, shape, triangle, rectangle, etc.. Abstraction Hiding internal details and showing functionality is known as abstraction. For example phone call, we don't know the internal processing.
  • 16. OO IN ABAP ABAP was initially developed as a procedural language. But ABAP has now adapted the principles of object oriented paradigms with the introduction of ABAP Objects. The object-oriented concepts in ABAP such as class, object, inheritance, and polymorphism, are essentially the same as those of other modern object-oriented languages
  • 17. FEATURES • Effective programming structure. • Real-world entities can be modeled very well. • Data security and access. • Minimizes code redundancy. • Data abstraction and encapsulation.
  • 18. COMPONENTS OF CLASS • Attributes: Attributes are variables, constants declared within a class. • Methods: Methods are coding blocks which provides some functionality . • Interfaces: Interfaces are similar to classes which contain methods Without any implementation. • Events: Event is a mechanism through which one method of a class can raise method of other class, without hazard of instantiating that class.
  • 19. VISIBILITY OF COMPONENTS In ABAP Objects, the whole class definition is separated into three visibility sections: • PUBLIC . • PROTECTED . • PRIVATE. Public section: Data declared in public section can be accessed by the class itself, by its subclasses as well as by other users outside the class. Protected section: Data declared in the protected section can be accessed by the class itself, and also by its subclasses but not by external users outside the class. Private Section: Data declared in the private section can be accessed by the class only, but not by its subclasses and by external users outside the class.
  • 20.
  • 21. QUESTIONS ? •What is the difference between TMG and maintenance view
  • 22. Is it mandatory to implement all the methods of interface IN ABAP ?
  • 23. does abstract method have implementation in ABAP ?