12. Data structures and internal tables Flashcards Preview

SAP ABAP > 12. Data structures and internal tables > Flashcards

Flashcards in 12. Data structures and internal tables Deck (31)
Loading flashcards...
1
Q

Structures

A

Temporary objects in program memory. Structures are used in connection with sequential datasets and subroutines as well as a “staging area” for internal tables.

2
Q

Internal Tables

A

Internal tables are comprised of records which have the same format as an individual structure.
Internal tables are tables which only exist during the execution of a program.
Unlike the ABAP Dictionary transparent tables, internal table data is not stored on the database server. Internal table data resides in a program specific work area.

3
Q

BEGIN OF / END OF

A

The start and end of the structure are indicated by BEGIN OF and END OF .

4
Q

Types of internal tables

A

Standard, Sorted and Hashed

5
Q

APPEND

A

APPEND statement uses the work area to append the line/row information into the table.

6
Q

SY-TABIX statement

A

Row number in the table index of an internarl table. Contains the last row accessed using a primary or secondary table index. Is set to 0 when accessed using a hash algorithm.
When an internal table is read, the system field SY-TABIX is set to the index value of the internal table line which has been placed either in the header line or the work area

7
Q

COLLECT

A

When the COLLECT statement is used, ABAP scans the internal table for entries which correspond to the header line in fields which are not of type P, I or F . E

8
Q

SORT Statement

A

An internal table is sorted using the SORT statement. If sort criteria is not specified, the table is sorted by all fields (except those of data types P, I, and F) in ascending order in the sequence in which they were declared.

9
Q

An internal table type is defined

A

using the TYPES statement. No memory is allocated when defining a type.

10
Q

An internal table object is created with

A

the DATA statement by referring to an internal table type using the TYPE parameter. It is this DATA statement occupies memory. Internal table objects can also be created through a reference to an existing table or structure using the LIKE parameter.

11
Q

implicit key

A

By default, all the records that you append to your internal table have a key. This key is the combination of all non-numeric fields. This is the implicit key.

12
Q

Control Level Processing

A

When processing an internal table with the LOOP statement, it is possible to add additional code that will only be processed when a field changes.

13
Q

READ TABLE

A

reads a single table entry.

14
Q

READ TABLE WITH KEY ‘‘.

A
  • Enter the search argument after the parameter KEY (in single quotes).
    • Beginning with the first character of the first field of the first entry in the table, ABAP compares each record character by character with the search argument (‘‘).
15
Q

READ TABLE WITH KEY ‘‘ BINARY SEARCH.

A

• Like variant 2, but using a binary search (faster than linear search).
• The internal table must be sorted in ascending order by the
search argument.

16
Q

INSERT INDEX <i></i>

A

Statement generates a new table entry before line <i> with the contents of the header line. If the table has no entries, the contents of the header line are added to the table. </i>

17
Q

MODIFY INDEX <i></i>

A

Statement overwrites table line <i> with the contents of the header line. Line <i> must already exist. Ex.</i></i>

18
Q

DELETE INDEX <i></i>

A

statement deletes table line <i>. Ex.</i>

19
Q

APPEND TO

A

Appends the contents of the work area to the end of the internal table Ex.

20
Q

COLLECT INTO

A

Accumulates the values on a field into the table.

21
Q

INSERT INTO

A

Inserts a new line with the contents of the work area before the current line.

22
Q

MODIFY FROM

A

Overwrites a line in the table with the contents of the work area.

23
Q

READ TABLE INTO

A

Reads a line from the table into the work area.

24
Q

LOOP AT INTO

A

Processes an internal table. On each loop pass, a table entry is placed in the work area.

25
Q

CLEAR

A

statement initialises all single fields in the header line of an internal table according to type.

26
Q

REFRESH

A

Statement deletes all table lines. The table storage space is not released. The header line remains unchanged.

27
Q

FREE

A

Statement releases the storage space required for a table. The header line remains unchanged. Ex.

28
Q

DESCRIBE TABLE

A

The DESCRIBE TABLE statement provides information about an internal table’s attributes. With this statement, the programmer must use at least one of the two parameters available – LINES and OCCURS.

29
Q

LINES

A

The LINES parameter allows the programmer to find out the number of existing table entries.

30
Q

OCCURS

A

The OCCURS parameter contains the value of the OCCURS clause specified in the internal table definition.

31
Q

EDITOR-CALL FOR

A

With the EDITOR-CALL FOR statement, the program will
open the SAP Table Editor which allows the user to change any data in the
internal table.