You are on page 1of 2

Q1> What is index ?

Ans. Indexes are a sorted copy of the table that exist in the
database which helps in faster retrival of data from the
database.
Primary Index : User cannot create a primary index, the
system creates a primary index by default based on the
primary keys of the table.

Secondary Index : The secondary indexes are created by the


user.we can create a maximum of upto 15 secondary indexes
for a table.
Q2> what is a binary search ? and how it is useful in a sorted internal table?
Ans. IT DIVIDES THE SEARCH CRITERIA INTO TWO PARTS SO 1ST IT
SEARCH FOR THE 1ST HALF AND IF YOU GET THE DESIRED VALUE IT
WIL NOT SCAN THE SECOND PART WHICH HENANCES PERFORMANCE
TUNING....
example.
Binary Search Basic rule - Sort the data in Ascending order.
Suppose we have random numbers ranging from 1 to 10000 and
we are searching for 4219. If the data is unorganized and
random....a sequential search would be time consuming.
Hence once the data is sorted in Ascending order. Binary
search would reduce the LOOKUP time.
In the FIRST PASS BINARY search would split the range of 1 -
10000 in to two halfs (i.e 1 - 4999 & 5000 - 10000) and
compares the 4219 which happens to fall in the first half.
In the next pass again two halfs are made and compared.
This way BINARY SEARCH works by dividing either data into
two halfs.
For internal table......or for anything else....this is it
Q3> what is the difference between at first & at new statements
Ans. At First - Get triggered for the first loop iteration. Can
be used for printing report headers.

At new - This event gets triggered when a new value is


assigned to the field loop. This event is normally used for
Group headers.
Example:

Item no Name
At First 101 chris
101 Mathew
At new 102 Rachel
102 Natasha
At new 103 Chait
Q4> can you create an internal table dynamically?(at run time)
Ans. Yes..Internal tables can be created dynamically using
object oriented abap.chek out the method
CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
5> Define Internal Table?
Ans. It is a storage location with in a programe that will store the
records at run time of the program and releases the memory
after exicution of program.It has Header line where all
data are wrriten first and then updated as item data of the
internal table.
Q6> Difference between internal table and a dictionary table?
Ans.
7Q> What is the difference between standard and sorted internal tables?
(in performance wise)
Ans. Sorted table improve the performance in case of a huge table which
has no: of records
Q8> What is the difference between hashed & sorted internal tables?
Ans. Sorted internal table works on Binary Search and Hashed internal
tables works on hashed algorithm through indexes.

You might also like