Application Development 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: 

Doubt for Tabletype

Former Member
0 Kudos

What is table type and where we usually use. I know it is used as data types for internal table .

1>>So what is the use of tabletypes using in internal tables other than using standard tables for a database table and if you are using tabletypes, will be the data retrieved or we should again fill the tables

2>>What is the use of the keyword Tables:<table_name> as it creates work area.

3>>And one more thing if you are using structure and what will be the benefit.

Kindly explain with examples ...

Please correct me if i am wrong

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

As the name suggests, line type will create data for storing only one record or like structure and table type is for creating a table for the structure mentioned.

Usually when you create a table, you add all the fields you need.

A table type is based on a structure. Instead of adding fields, you just add one structure. Very useful sometimes. Especially in OO.

The transaction is just SE11. When you select create, you can choose 'Table type'. Then you enter a structure in the row type.

If you are declaring any STRUCTURE on your program, then we can represent those as

TYPE linetype

.

This would make the data declaration more understandable.

Please refer below link :

http://help.sap.com/saphelp_nw04/helpdata/en/0b/e06b1c2d8411d5b693006094192fe3/frameset.htm

<b>rEWARD IF USEFULL</b>

4 REPLIES 4

Former Member
0 Kudos

Yes you are right...

table types can be used for internal table declarations.

Satish

Former Member
0 Kudos

Hi

As the name suggests, line type will create data for storing only one record or like structure and table type is for creating a table for the structure mentioned.

Usually when you create a table, you add all the fields you need.

A table type is based on a structure. Instead of adding fields, you just add one structure. Very useful sometimes. Especially in OO.

The transaction is just SE11. When you select create, you can choose 'Table type'. Then you enter a structure in the row type.

If you are declaring any STRUCTURE on your program, then we can represent those as

TYPE linetype

.

This would make the data declaration more understandable.

Please refer below link :

http://help.sap.com/saphelp_nw04/helpdata/en/0b/e06b1c2d8411d5b693006094192fe3/frameset.htm

<b>rEWARD IF USEFULL</b>

Former Member
0 Kudos

hi

good

When a table type is defined, the key to be used for the table type must be specified.

You have the following options:

Standard key: The structure of the key depends on the row type category. In a structured row type, the standard key consists of all the character-like components of the table row. In an elementary row type or reference type as row type, the standard key consists of the entire table row. If the row type is a table type, the standard key is empty. Note that an empty key is only allowed for access mode Standard table.

Row type: The key consists of all the fields of the row type.

Key components: The key is explicitly defined by selecting components (fields) of the row type. This is only possible if a structure, table or view was selected as row type.

Key not specified: The key is not specified. This defines a generic table type.

http://help.sap.com/saphelp_nw04/helpdata/en/11/4b6ff5d84511d1951a00a0c929b3c3/content.htm

reward point if helpful.

thanks

mrutyun^

Former Member
0 Kudos

HI Vikranth,

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 <inttab> TYPE TTYP. An internal table <inttab> is created in the program with the attributes defined for TTYP in the ABAP Dictionary.

A table type is defined by:

its line type, that defines the structure and data type attributes of a line of the internal table

the options for managing and accessing the data ( access mode) in the internal table

the key ( key definition and key category) of the internal table

Refer to the url

<a href="http://help.sap.com/saphelp_46c/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm">http://help.sap.com/saphelp_46c/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm</a>

Hope it helps.

Lokesh