SAP ABAP Dictionary Interview Questions With Answers-2
6) What Do You Mean By Pooled Tables In SAP ABAP? Also Explain What Do You Mean By Table Pool?
Tables in Data dictionary which has many to one relationship with an underlying database table is called Pooled table. In simple words, Pooled tables appear as many tables in ABAP dictionary, but the thing is they are stored as a single table in the underlying database.
In ABAP Dictionary, you can see each and every pooled table is assigned to a Table Pool.
As it is understood that for many pooled tables in ABAP dictionary, there is a single table called as Table Pool in an underlying database. A Table Pool is an underlying database table with a special structure that enables the data of many ABAP Dictionary tables to be stored within it.
Tables M_MTVMA, M_MTVMB, M_MTVMC, M_MTVMD and M_MTVME can be seen in ABAP Dictionary. These all mentioned tables are Pooled Tables. All these tables have been assigned to one Table Pool i.e. M_MTVM, which will be present in the underlying database and storing data of all the five mentioned tables of ABAP Dictionary.
Pooled tables are basically used by SAP to store temporary data or customizing data. Pooled tables can also be used to store control data (such as screen sequences or program parameters).
Generally as a developer, we will never create a Pooled table or Table Pool. It does not mean that we cannot create them. SAP has given the option to create Pooled tables through SE80 transaction and Table pool via ABAP Dictionary.
7) What Do You Mean By Cluster Tables In SAP ABAP? Also Explain What Do You Mean By Table Cluster?
A cluster table is similar to a Pooled table. It has a many to one relationship with a table in an underlying database. Many cluster tables are stored in a single table in an underlying database called a table cluster.
So table cluster is similar to pooled table pool. A table cluster holds only cluster table within it.
Table clusters store data from several cluster tables based on the primary key fields that they have in common.
Rows from the cluster tables are combined into a single row in the table cluster. The rows are combined based on the part of the primary key they have in common.
The biggest advantage of cluster table and pooled table is they reduce the number of database reads and thereby improve performance.
Tables CDPOS and CDHDR are Cluster tables in SAP ABAP Dictionary and CDCLS is the table cluster that exist in the underlying database. CDCLS table contains or hold data of both tables CDPOS and CDHDR in the underlying database.
8) What Are The Differences Between Transparent Tables, Pooled Tables & Cluster Tables?
Differences between transparent, pooled and cluster tables are:
- Transparent tables have a one to one relationship with a physical table in an underlying database where as pooled tables and cluster tables have many to one relationship with a physical table in the underlying database (Relationship between tables in ABAP Dictionary & Underlying database).
- In case of transparent tables, the underlying database table will have the same name, same number of fields and the fields will also have the same names as defined in ABAP Dictionary whereas for pooled tables and cluster tables the underlying database table will have different name, different number of fields and fields will have different names from what has been defined in ABAP Dictionary.
- Transparent tables can have one or more primary key Whereas Primary key of each pooled table of a table pool need not be same whereas Primary key of each cluster table of a table cluster should have at least one key in common.
- Secondary indexes can be created for transparent tables, but for pooled and cluster tables we cannot create any secondary index.
- Transparent tables can be accessed via both Native and Open SQL whereas pooled and cluster table can be accessed by Open SQL only.
Transparent tables are used to hold application data which includes both master data as well as transaction data.
Pooled tables reduce the amount of database resources needed when many small tables have to be opened at the same time.
Cluster tables are used when the tables have primary key in common and data in these tables are all accessed simultaneously.
9) What Is A View In SAP?
A view is like a telescope which just provides a picture of something. You can construct a view with special lenses or filters to allow you to look at one or more dictionary tables. You can look at parts of one table (selected records and/or fields) or combinations of tables and parts of tables. A view is an ABAP Dictionary object. In simple words, a View simply mirrors an entire database table. A view would just look like a table and act just like a table – but it isn't actually a table.
A view does not contain data of its own - rather, the view provides specialized access to the data that exists in other tables. For this reason, views are often called virtual tables. Views are used to look into one or more tables. A view does not contain data of its own.
Views combines more than one table. The structure of the view is defined in the ABAP Dictionary. With the help of views, application-dependent view can be defined that combines the data.
Data about an application object (like Purchase order, Sales Order, Invoice Verification, etc.) is often distributed on several database tables. By defining a view, one can define an application-dependent view that combines this data. The structure of such a view is defined by specifying the tables and fields used in the view. Fields that are not required can be hidden, thereby minimizing interfaces. A view can be used in ABAP programs for data selection.
10) What Are The Different Types Of Views In SAP?
In SAP, you have total four types of views. Based on the way in which the view is implemented and the methods that are permitted for accessing the view data they are divided into Database View, Projection View, Maintenance View and Help View.
Database views implement an Inner Join whereas Projection View, Maintenance View and Help View implement an Outer Join.
There are 4 Different types of Views in SAP. They are:
- Maintenance View
- Database View
- Projection View
- Help View