76. WHAT ARE THE DIFFERENCES BETWEEN CLUSTER TABLES AND POOLED TABLES?
Ans: Cluster tables:
Table type in the ABAP Dictionary.
The data of several cluster tables is stored together in a single table cluster in the database. A cluster table is thus known only in the ABAP Dictionary, not in the database.
Pooled tables:
Table type in the ABAP Dictionary.
The data of several pooled tables are stored together as a table pool in the database. Therefore, a pooled table is known in the ABAP Dictionary, but not in the database.
77. WHAT IS THE DIFFERENCE BETWEEN ABAP MEMORY AND SAP MEMORY?
Ans: ABAP MEMORY:
Area of memory assigned to a particular transaction and any modules called from there.
ABAP memory does not depend on the ABAP program that generates it during a transaction. This means that any object stored there can be read by any ABAP program during the same transaction.
In contrast to ABAP memory, which exists only for the life of one transaction, there is also global SAP memory, which extends beyond transaction limits.
SAP MEMORY:
Global, user-related memory that extends beyond transaction limits.
Access to the SAP memory is via SPA/GPA parameters.
78. WHAT IS AN INTERNAL TABLE? EXPLAIN THE DIFFERENT TYPES?
Ans: INTERNAL TABLE:
Data structure that exists only at program run time.
Internal tables are one of two structured data types in ABAP. They can contain any number of identically structured rows, with or without a header line.
The header line is similar to a structure and serves as the work area of the internal table. The data type of individual rows can be either elementary or structured.
Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP.
The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs.
You should use internal tables whenever you want to process a data set with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.
Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects.
A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.
TYPES OF INTERNAL TABLES:
HASHED TABLE:
This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index.
The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
Hashed tables have no linear index.
You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.
INDEX TABLE:
The operations listed below are only permitted for index tables (sorted and standard tables). Some of them are restricted to standard tables.
Since it is quicker to access a table by index than by key, you should always use specific index operations when you know that a particular internal table is an index table.
In particular, the quickest way to fill a table line by line is to append lines to a standard table, since a standard table cannot have a unique key and therefore appends the lines without having to check the existing lines in the table.
If you can either accommodate duplicate entries in a table, or exclude them in a different way, it can be quicker to fill a standard table and then sort it or assign it to a sorted table if the data does not have to be inserted into the table in the correct sort sequence.
Furthermore, the performance of operations that change the internal linear index has been improved in Release 4.5A. Previously, index manipulation costs for inserting and deleting liens in standard tables and sorted tables increased in linear relation to the number of lines.
From Release 4.5A, the index manipulation costs only increase logarithmically with the number of lines, since the table indexes are now maintained as a tree structure. This makes insertion and deletion operations efficient, even in very large standard and sorted tables.
SORTED TABLES
This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement.
Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table.
The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
79. What is the difference between AT SELECTION-SCREEN and AT SELECTION-SCREEN OUTPUT?
Ans: AT SELECTION-SCREEN is the PAI of the selection screen whereas AT SELECTION-SCREEN OUTPUT is the PBO of the selection screen.
80. What is the difference between SY-INDEX and SY-TABIX?
Ans:
Sy-TABIX : SY-TABIX is a syatem variable which stores the index current processing record of an internal table.
SY-INDX : SY-INDEX is a system variable which acts as a loop iteration counter, it stores loop iteration number.
So when you are looping over an internal table, you use SY-TABIX.
LOOP AT ITAB INTO WA. **SY-TABIX stores index number of internal table record ENDLOOP.
When you use DO ENDDO / WHILE for looping, there is no table involved. So you use SY-INDEX.
DO 10 times. **SY-INDEX stores number of iteration of loop ENDDO.
81. What is the difference between VIEW and a TABLE in SAP?
Ans: A table physically stores data.
A view does not store any data on its own. It can contain data from multiple tables and it just accesses/reads data from those tables.
82. What is the difference between PASS BY VALUE and PASS BY REFERENCE?
Ans: These concepts are generally used for Function modules or Subroutines etc. and their meaning can be taken literally.
Say we are passing a variable lv_var:
CALL FUNCTION 'DEMO_FM'
EXPORTING
VAR = lv_var.
When we PASS lv_var by VALUE , the actual value of lv_var is copied into VAR.
When we PASS lv_var by REFERENCE , the reference or the memory address of lv_var is passed to the Function module. So VAR and lv_var will refer to the same memory address and have the same value.
83. What is the difference between Master data and Transaction data in SAP?
Ans: Master data is data that does not change often and is always needed in the same way by business.
Ex: One time activities like creating Company Codes, Materials, Vendors, Customers etc.
Transaction data keeps on changing and deals with day to day activities carried out in business.
Transactions done by or with Customers, Vendors, and Materials etc. generate Transaction Data. So data related to Sales, Purchases, Deliveries, Invoices etc. represent transaction data.
Some important transactions here for Master Data:
- Material: MM01 MM02 MM03.
- Vendor: XK01 , XK02 , XK03
- Customer: Xd01 , XD02 , XD03.
Some Important transactions for Transaction data:
- Purchase Order: ME21n , ME22n , ME23n.
- Sales Order: VA01 , VA02 , VA03.
- Goods Receipt: MIGO.
- Invoices: MIRO.
84. What will you use SELECT SINGLE or SELECT UPTO 1 ROWS?
Ans: It is very important for us to understand the difference between SELECT SINGLE and SELECT UP TO 1 ROWS... We use select single when we need to get one record form data base table with where condition, we should pass key field in where condition.
Example:
SELECT SINGLE * FROM MARA
INTO WA_MARA WHERE MATNR = '00001'. "here matnr is key field
We use SELECT UP TO 1 ROWS to get a single record from data base table where there is no key field at our side.
Example:
SELECT * FROM MARA INTO WA_MARA
UP TO 1 ROWS
WHERE MTART = 'FERT'. "here mtart is not a key field
In simple SELECT SINGLE is used to get exact record from data base where as SELECT UP TO 1 ROWS is use to get approximate record from data base.
85. How to transport variants in SAP ABAP?
Ans: We use RSTRANSP program to transport variants in SAP ABAP, go to SE38, provide RSTRANSP execute, provide program name, variant name, execute create transport.
86. How to create checkbox in selection-screen using write statement?
Ans: By using
WRITE AS CHECKBOX
we can print check box.
87. Can a domain, assigned to a data element be changed?
Ans: Yes It can be changed. We can do it by just overwriting the entry in the field domain.
88. What is a Data Class in SAP Data Dictionary?
Ans: Data class determined the physical area of table inside database, it is available under technical settings of table in Se11...Example: APPL0, APPL1 etc
89. What is a Size Category in SAP Data Dictionary?
Ans: The Size category describes the probable space requirement of the table in the database.
90. What are the Data types of the ABAP/4 layer?
Ans: Possible ABAP/4 data types:
C: Character.
D: Date, format YYYYMMDD.
F: Floating-point number in DOUBLE PRECISION (8 bytes).
I: Integer.
N: Numerical character string of arbitrary length.
P: Amount of counter field (packed; implementation depends on h/w platform).
S: Time Stamp YYYYMMDDHHMMSS.
V: Character string of variable length, length is given in the first two bytes.
X: Hexadecimal (binary) storage.
No comments:
Post a Comment