Purpose of Internal Tables
• In ABAP/4, you work mainly with tables. Tables are the essential data structures in the R/3 System. Long-life data is stored in relational database tables.
• Besides database tables, you can create internal tables which exist only during the runtime of your program. ABAP/4 provides various operations for working with internal tables. You can, for example, search for, append, insert, or delete lines.
• The number of lines in an internal table is not fixed. Depending on requirements, the system increases the size of internal tables at runtime.
• You can use internal tables to perform table calculations on subsets of database tables. For example, you can read a certain part of a database table into an internal table (see Reading Data into an Internal Table).
From the internal table, you can then calculate totals or generate a ranked list.
• Another use for internal tables is reorganizing the contents of database tables according to the needs of your program. For example, you can read data relevant for creating a telephone list from one or several large customer tables into an internal table. During the runtime of your program, you can then access this list directly without having to perform a time-consuming database query for each call.
Structure of Internal Tables
In ABAP/4, you can distinguish between internal table data types, which define the structure of internal tables, and internal table data objects, which are the actual internal tables and can be filled with data. An internal table data type is an abstract definition of a data structure which can be used to declare data objects as internal tables.
Data type
An internal table is one of the two structured data types in ABAP/4. The other structured data type is the field string. An internal table consists of any number of lines which all have the same data type. The data type of the lines can be elementary or structured.
This definition opens a variety of internal table structures which range from lines consisting of one field to lines consisting of field strings which have internal tables as components.
You can define a data type as an internal table by using the TYPES statement with the OCCURS parameter. No memory is occupied when defining a data type.
Data object
A data object which has a data type defined as an internal table is the actual internal table you work with. It occupies memory and you can fill or read its lines.
You create a data object as an internal table by using the DATA statement either with the OCCURS parameter or by referring to another internal table by using the TYPE or LIKE parameters.
Identifying Table Lines
In order to access a certain line of a table, you must specify a field or combination of fields that can be used to identify the line. In the relational data model which is used to store long-life data in the R/3 System, the minimum combination required for this purpose is known as the key. The fields that define the key are called key fields.
Internal Table Index
The index is the sequential number of a table line. It is not a table field, but is created and managed automatically by the system.
You can use the index with the DELETE, INSERT, MODIFY, LOOP, and READ statements. In these statements, you can specify the index either as literal or as variable.
After processing a particular line of an internal table, the system field SY-TABIX generally contains the index of that line.
Internal Table Key
There are two kinds of internal table keys.
Self-defined Key
When reading lines from an internal table using the READ statement, you can specify a self-defined.
Standard Key
By definition, the key fields of an internal table are those fields which are not numeric (type F, I, and P) and are not internal tables. These key fields form the standard key of an internal table.
To obtain the standard key of an internal tables with nested structures (table lines which contain field strings as components), the system breaks down the sub-structures to the level of elementary fields.
Ads
Wednesday, October 14, 2009
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2009
(185)
-
▼
October
(63)
- Indexes - Form and Use
- Better Aproach - Coding in Abap (Coding Format)
- Example : Standard Abap Report
- SQL Interface
- BASICS OF INTERACTIVE REPORTS
- Transactions
- General command field formats
- Sap Script
- SAPScript Transaction codes
- Convert the sapscript from spoollist to pdf
- Report command field formats
- ABAP/4 functions:
- What is ABAP?
- Usefull Transaction Code in Abap
- SAP ABAP Interview FAQ
- SAP ABAP MNC Interview Questions
- SAP ABAP MNC Mostly asked interview questions
- SAP ABAP interview Questions and Answers
- ABAP Technical Interview Questions
- Face SAP ABAP Interview
- SAP ABAP Certification
- BUILD WEB SERVICE ABAP&SAP
- ABAP Objects-An Introduction to Programming
- SAP ABAP complete reference
- SAP ABAP Complete Certification
- Sap BC Abap Programming
- SAP ABAP Interview Part - 2
- SAP ABAP Interview Part - 1
- ABAP ENHANCEMENTS
- ALE ABAP DETIAL
- SAP BUSINESS WORK FLOW
- ALE IDOC'S IN SAP ABAP
- SAP ABAP DATA BASE UPDATES COMPLETE
- LUW’S AND CLIENT/SERVER ARCHITECHERE:SAP-ABAP
- SAP LOCK CONCEPT
- ORGANIZING DATABASE UPDATES
- COMPLEX LUW PROCESSING IN ABAP SAP
- SAP ABAP MEMORY
- CHANGING THE SAP STANDARD
- ENHANCEMENTS TO DICTIONERY ELEMENTS IN SAP
- BUSINESS TRANSACTION EVENTS IN ABAP SAP
- MODIFICATIONS OF SAP STANDARD OBJECTS
- SAP WORK FLOW SCENARIOS
- SAP SCRIPT CONTROLS
- DIFFERENCE BETWEEN BADI'S AND USER EXITS
- SAP ABAP ALV IN BRIEF
- SAP ABAP OPTIMIZATION I
- TYPE KEY WARD IN ABAP SAP
- TABLE TYPES IN SAP
- TYPES OF VIEWS IN SAP
- SAP ABAP FAQ'S ON SD MM FI/CO
- SALES FLOW IN SAP
- FI/CO DEFINATIONS FOR ABAPER
- PERFORMENCE TIPS IN ABAP SAP
- INTERNAL TABLES IN BRIEF
- CROSS APPLICAITONS DEFINATIONS
- RUN TIME ANALASIS IN ABAP SAP
- SAP ABAP Programming FAQ'S For inerview
- ABAP Programming real time questions for SAP ABAP
- SAP ABAP FAQ'S REAL TIME II
- SAP ABAP Questons and Answers for Interview
- ABAP ALE FAQ'S
- This is my First Post for ABAP Lovers
-
▼
October
(63)
No comments:
Post a Comment