‎2008 Feb 09 5:24 AM
hi friends,
can anyone plz tell me what is table types in simple words,and how to create table types,and what situation we will create table types.
thanks & regards.
‎2008 Feb 09 5:38 AM
Hi,
In classes if u want to declare inernal table in the parameters then u declare table types and then refer it to the parameter then that variable is like internal table.
you can declare table type in se11 when u declare the data type then give table type and give line type as ur structure.
Plzz reward points if it helps.
‎2008 Feb 09 5:36 AM
Hi sriniva,
SAP Table Types
I. Transparent tables (BKPF, VBAK, VBAP, KNA1, COEP)
Allows secondary indexes (SE11->Display Table->Indexes)
Can be buffered (SE11->Display Table->technical settings) Heavily updated tables should not be buffered.
II. Pool Tables (match codes, look up tables)
Should be accessed via primary key or
Should be buffered (SE11->Display Table->technical settings)
No secondary indexes
Select * is Ok because all columns retrieved anyway
III. Cluster Tables (BSEG,BSEC) Should be accessed via primary key - very fast retrieval otherwise very slow
No secondary indexes
Select * is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.
Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported
Can not be buffered
IV. Buffered Tables (includes both Transparent & Pool Tables)
While buffering database tables in program memory (SELECT into internal table) is generally a good idea for performance, it is not always necessary. Some tables are already buffered in memory. These are mostly configuration tables. If a table is already buffered, then a select statement against it is very fast. To determine if a table is buffered, choose the 'technical settings' soft button from the data dictionary display of a table (SE12). Pool tables should all be buffered.
Regards,
KTS Reddy.
‎2008 Feb 09 5:38 AM
Hi,
In classes if u want to declare inernal table in the parameters then u declare table types and then refer it to the parameter then that variable is like internal table.
you can declare table type in se11 when u declare the data type then give table type and give line type as ur structure.
Plzz reward points if it helps.
‎2008 Feb 09 5:41 AM
Hi Srinivas,
Table Types : A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command
DATA : itab TYPE TTYP.
Reafer these links below for clear ideas.
http://help.sap.com/saphelp_nw04/helpdata/en/fb/f14736a1f0ad1fe10000009b38f839/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm
Thanks,
Sakthi C
‎2008 Feb 09 5:45 AM
hi,
If u want create an internal table in your program that is used in more than one programs having same line type,access type and key Definition.then define that table type in Data Dictionary(SE11) and using that table type to can
create an internal table in any program.
Please reward if find useful.
Regards,
Mayank