What is an internal table?
Internal table is a temporary table stored in the RAM of the application server. It gets created during the program execution and gets deleted once the program ends.
Different types of internal table.
- Standard table
- Sorted table
- Hashed table
What is the difference between COLLECT and APPEND statements?
APPEND statement adds a new record to the end of the internal table. COLLECT statement adds a new record to the end of the internal table if there is no record already exists in the internal table with the same key. If a record exits in the internal table with the same key then COLLECT adds the numeric values in the work area to the existing record.
How do you delete duplicate records from internal table?
Use SORT and DELETE ADJACENT DUPLICATES statements to delete the duplicate records from internal table.
How do you find number of records present in internal table?
Use DESCRIBE TABLE statement.
What is the difference between REFRESH and FREE statements?
REFRESH clears the contents of the internal table but the memory remains allocated. FREE clears the contents of the internal table and releases the memory space.
What are the different control break statements available inside a loop?
- AT FIRST / ENDAT
- AT LAST / ENDAT
- AT NEW / ENDAT
- AT END OF / ENDAT
- SUM
- ON CHANGE OF / ENDON
What is the purpose of AT FIRST and AT LAST?
AT FIRST is used to write headings and loop initialization process. AT LAST is used to write grand totals and loop termination processing.
What is the purpose of SUM statement?
SUM statement is used to calculate the totals for the rows of a control level.
Can we use ON CHANGE OF between SELECT and ENDSELECT?
Yes. It can be used in any loop construct. It can be used within LOOP AT/ENDLOOP, SELECT/ENDSELECT, DO/ENDDO and WHILE/ENDWHILE.