Escolar Documentos
Profissional Documentos
Cultura Documentos
~ Madhusudan
iSU
INTERNAL TABLES
These internal tables can be created as a replica of data base table, using some or all fields of one table or more tables.
These internal tables are created only during run time. No memory is reserved.
iSU
iSU
iSU
iSU
iSU
iSU
2.
iSU
First
Second
WITH {UNIQUE|NON-UNIQUE} KEY <keys>] [INITIAL SIZE <n>] [WITH HEADER LINE].
iSU
Which TABKIND to choose depends on how you are accessing the Entries in the internal table.
10
iSU
STANDARD TABLE This table type is most appropriate when you intend to address the table entries using the index. Key access to the standard table uses linear search.
This means that the time required for a search is in linear relation to the number of table entries.
You should use index operations to access standard tables.
11
iSU
SORTED TABLE Defines the table as one that is always saved correctly sorted. Key access to a sorted table uses a binary key. You can also access sorted tables by index operations.
The time required for a search is in logarithmical relation to the number of table entries.
iSU
12
HASHED TABLE Defines the table as one that is managed with an internal hash procedure. You can imagine a hashed table as a set, whose elements you can address using their unique key.
Unlike standard and sorted tables, you cannot access hash tables using an index. Access time using the key is constant, regardless of the number of table entries.
13
iSU
INDEX TABLES
Standard and sorted tables belong to the generic class index tables.
14
iSU
ANY TABLE
The set of permitted operations for a table with type ANY TABLE consists of the intersection of all permitted operations for STANDARD, SORTED and HASHED TABLES, and so is identical to the set of operations permitted for hashed tables.
15
iSU
16
iSU
LINETYP ( LINE TYPE) The line type of an internal table can be any ABAP data type (including another internal table). Line type gives the columns required for the internal table.
17
iSU
Key
The key is used to identify lines in the table. There are two possible keys for an internal table 1. The default key 2 User-defined key. You can specify that the key should by UNIQUE or NON-UNIQUE. If the key is unique, the internal table may not contain duplicate entries. The uniqueness of the key depends partly on the table type.
iSU
18
19
iSU
20
iSU
21
iSU
Write
loop at itab < where carried = LH >. Write:/ itab-carrid,itab-connid,itab-fldate. endloop.
22
iSU
Internal Table
Loop At...
AA AA AL DL
10/29/1998
11/26/1998 11/21/1998
11/29/1998
23
iSU
Read
Read table itab index <index>. OR Read table itab with key carrid = LH connid = 0400.
24
iSU
Internal Table
Read Table
AA
Carrid
0017
Connid
10/29/1998
Header line
Fldate
10/29/1998
11/26/1998 11/21/1998
AA AA AL DL
Body
11/29/1998
25
iSU
Insert
itab-carrid = MN. itab-connid = 1111. insert itab index 3.
26
iSU
Internal Table
Insert table
AA AA AL DL
Body
27
iSU
Modify
itab-carrid = NM. itab-connid = 2222. modify itab index 3.
28
iSU
Internal Table
Modify
AA Carrid
0050 Connid
10/29/1998
Carrid Connid
Fldate
10/29/1998
Fldate
10/29/1998
11/26/1998 11/21/1998 11/29/1998
AA
Modify
0050 0026
0555 1699
AA
AL DL
TABLE: SFLIGHT
29
iSU
Delete
delete itab index 3. OR delete from itab where carrid = LH.
30
iSU
Internal Table
Delete
Header line AA Carrid AA AA AA AL DL 0017 Connid 0017 0017 0026 0555 1699 (delete)
AA
0017
10/29/1998
Fldate
10/29/1998 11/26/1998 11/21/1998 11/29/1998
TABLE: SFLIGHT
31
iSU
32
iSU
Internal Table
Clear - Refresh
Header line
REFRESH
AA AL DL
Body
33
iSU
34
iSU
Database Table
Sort
Header line
Move
Body Carrid DL AA AL AA Connid 1699 0026 0555 0017 Fldate Append
11/29/1998 11/26/1998 11/21/1998 10/29/1998
TABLE: SFLIGHT
35
iSU
Collect itab
If non numeric fields are same, then numeric fields will be added by using this command.
36
iSU
External Table
Collect
Internal Table
Header line
Header line
Carrid AA AA AL DL
Connid Seatsmax 0017 0017 0064 1699 660 280 220 380
TABLE: SFLIGHT
37
iSU
Questions???
38
iSU
THANKS!
Please complete the feed back form which will be sent across and send it back to Dinesh.Vennu@igate.com.
39
iSU
KEY CONTACTS:
Presenter : Madhusudan Rao Budati Madhusudan.Budati@igate.com iSU Team Details : Dinesh Vennu Dinesh.Vennu@igate.com Madhusudan Rao Budati Madhusudan.Budati@igate.com
40
iSU