‎2007 Sep 13 11:49 AM
hi Expert,
how many internal tables are there? what are they?explain?
‎2007 Sep 13 11:57 AM
‎2007 Sep 13 12:00 PM
‎2007 Sep 13 12:15 PM
Hi
just follow the links given below you will get to know everything
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm">help link</a>
<a href="http://www.geekinterview.com/question_details/1498">help link 2</a>
<a href="http://www.sap-img.com/abap/what-are-different-types-of-internal-tables-and-their-usage.htm">help link 3</a>
reward if helpful
vivekanand
‎2007 Sep 13 12:24 PM
Hi,
INTERNAL TABLES:
Internal tables are holds the data which is having the same structure and storing it in working memory in ABAP. The data is stored line by line in the memory. The main purpose of internal table is for storing and formatting data from a database table within a program. It is used to minimize the DB access time in report programs.
Internal table are dynamic data objects, since they can contain any number of lines of a particular type. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes.
Types of Internal Tables :
1. Standard Internal Tables :
Standard tables have an internal linear index. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries. WE can fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command).
2. Sorted tables :
Sorted tables are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. Entries are inserted according to the sort sequence defined through the table key.
3. Hashed tables :
Hashed tables have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. we cannot access a hashed table using its index.
Use the link for better explanation:
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
<b>Reward with points if helpful.</b>
Regards,
Vijay
‎2007 Sep 13 12:29 PM
Hi Raja,
Internal table is a data object of Variable Length
At runtime the system allocated memory for the internal table.
we have
-> INDEXE TABLE
|-> Standard Table --> can be accessed with index,key
| prefreed is Index
|-> Sorted Table --> can be accessed with index,key
key. prefreed is Key (Binary search)
-> HASHED TABLE --> can be accessed with hash key
key. prefreed is Key
thanks
‎2007 Sep 13 12:50 PM
In a lot of Cafes or Restaurants there are two types of tables - those inside the building, and those on the sidewalk outside. The ones in the building are "Internal" and the ones on the sidewalk are "External". The internal tables are where the groups of patrons who frequent the business are stored for a period of time while they are being processed in the business. They are not permanent storage for patrons - most restaurant owners will be standing glaring at the last table of guests to leave, especially after closing time.
The number of Internal tables depends on the size of the business. There are some small businesses with no internal tables at all, right up to massive places with hundreds of tables or more. These tables need to be sized to cater for the types of groups that frequent the business. No use having lots of small internal tables for a group of 100 patrons - there would be real access problems for them to communicate with each other.
The decision on how many internal tables would fit was generally made at the time the building was constructed - you can play around a bit with the number later by making modifications, but trying to add too many will get you an "out of space" error situation. Taking some out may be OK, but the whole business may fail if you take the wrong ones out.
If you have the luxury of building a custom premise for the business, then you have a pretty free hand with the number of tables, except you will still be constrained by the building block size, the license requirements, the cost, the time to build, and lots of other factors. If you choose small tables, you can fit more in, while with very large tables you may only be able to have one or two.
So if you consider the program you are writing / modifying to be like the building described, and the internal tables in the program to be the places where groups of you data "sit" while being processed, you will see that there are a lot of possible answers to your question. The optimum answer to your question is to have just enough internal tables for the data you are processing. Lots of spare internal tables sitting around not being used is not good business (or programming) practice.
Hope this helps (or at least brightens someones day a bit).
No points please
Andrew
‎2007 Sep 14 6:35 AM
Hi,
<u><b>Choosing a Table Type</b></u>
The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.
<b>Standard tables</b>
This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access,
standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.
<b>Sorted tables</b>
This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for
partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
<b>Hashed tables</b>
This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
Regards,
Bhaskar