Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table Types and Line Type

Former Member
0 Likes
8,886

What is the need of Table Types,

when there is Tables.

Even when iam using in the Abap Programs in se38..

iam not getting any difference..

Even i want to about the use of Line type

when there is the structure..

iam sap 4.7 they gave that Table type describe the structure and

functional attributes of an internal table.

What is the need of Table Types,

when there is Tables.

Even when iam using in the Abap Programs in se38..

iam not getting any difference..

Even i want to about the use of Line type

when there is the structure..

iam sap 4.7 they gave that Table type describe the structure and

functional attributes of an internal table.

6 REPLIES 6
Read only

Former Member
0 Likes
1,618

Way: 1:

Go to SE84 --> Select ABAP Dict --> Table Types -->

Enter the short names like ORDER wih leading and ending * on the Table Types Field. ---> F8

This will bring all related entries of Table Types(Line Types) having ORDER has a part of its Name.

Way:2:

If you know the Table Name, then go SE11 --> Putch in the Table Name --> Press Display

Now put the cursor on the Table Name field, press CNTLSHFTF3, on the WHERE USED LIST Pop up, Select only the TABLE TYPE Option and press EXECUTE.

This will bring the Table Types and Line Types.

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.

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

Allot points if this helps!

Read only

0 Likes
1,618

Hi Mr. Murali,

Thanks for sending replay..

When there is Tables and Structure in SE11..

What is the need of having the Table type and Line type.

Read only

0 Likes
1,618

Hi,

That predefined table contains lot of fields.

here our requirement is with some fields and not all the fileds.

so we have to go for internal table with selected fields.

for that we are using this line type and row type to increase the performance of a report.

see if you define one variable with predefine type it will work with accuracy.thats why first we of all we have to create line type and row type in abap dictionary level then we have to use the same line type and row type at our report level.this is the best method as a programmer point of view with good performance.

reward if useful..

regards,

swami.

Read only

0 Likes
1,618

If we want some fields we can go for the view right..

On what bases u said about performance i didnt understand..

for line type we can go for structure also.

Read only

Former Member
0 Likes
1,618

Hi Ranjith,

When you work on ECC6.0 and above, its mandatory that you need to use table types for the declaration of tables in ZFMs parameters (Import\Export\Tables).

When you want fields from different tables, many times you wont find views corresponding to your scenario. then it is best way to declare a type having all those fields.

ex:

Types: BEGIN OF ty_itab,

bukrs TYPE bukrs , " Company Code

kostl type char10, " Cost center

lifnr TYPE lifnr, " Vendor

blart TYPE blart , " Document Type

bschl TYPE bschl, " Posting key

END OF ty_itab.

Now you can simply declare a table type using the above type.

Types: ty_itab_tab TYPE STANDARD TABLE OF ty_itab.

Otherwise it is very difficult to create a ztable for every scenario like this.

These table types are also used for declarations in perform(Subroutines) statements also.

ex:

FORM fill_header_details USING p_itab TYPE ty_itab_tab.

Hope this clears you.

Regards,

Jalendhar

Read only

Former Member
0 Likes
1,618

Table type : We can declare the internal table in the SE11

(this is global we can use any program) is

called as table type.

Line type : same as bove for structure or work area.