Sei sulla pagina 1di 33

1

An Internal Table is a DATA OBJECT, in which you can keep several identically structured data records at runtime The number of data records is restricted only by the capacity of the specific system installation The ABAP runtime system dynamically manages the size of the internal table The individual data sets in an internal table are known as table rows or table entries The individual components in a row are referred as columns or fields

Line Type- defines the structure of the row of the itab Key key fields of an itab including their order (depending on the access type, the key can be defined as UNIQUE or NON_UNIQUE) Table Kind there are 3 different types of tables: 1. Standard Table Use this kind of internal table if table access is mostly by index 2. Sorted Table Data records are automatically sorted in ascending order of the keys. Use this kind of table if you mostly access the itab by KEY or would like the table to be automatically sorted by the KEY 3. Hashed Table Only KEY ACCESS is possible. Use this itab only if the itab is very large and want to access it by KEY Only

With this you can implement tables of any structure without having to refer to an existing dictionary structure

10

11

Remember to declare the work area and use that work area to process the single records of the internal table The work area has to be defined with the same type as the line type of the internal table

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

CLEAR: requirement.

The memory space required for the table is released, except for the initial memory

If you are using internal tables with header lines, remember that the header line and the body of the table have the same name. If you want to address the body of the table itself, not the header line, during initialization using CLEAR, you must place two square brackets ([]) after the table name. REFRESH: remains reserved. To release this memory space, use the following statement FREE: You can use FREE to directly initialize an internal table and to release its entire memory space, including the initial memory requirement, without first using the REFRESH or CLEAR statements. Like REFRESH, FREEaccesses the table body, not the table work area. After a FREEstatement, the internal table still exists. It still occupies the amount of memory required for its header (currently 256 bytes). This always applies to the body of the table.

With REFRESH, too, the initial memory requirement fort he table

When you refill the table, the system has to allocate new memory
space to the lines.

27

28

29

30

31

32

33

Potrebbero piacerti anche