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

Differnece Type and Table Type

Former Member
0 Likes
689

Can any one tell me the difference between Type and Tabel type.

For Exa while declaring an internal table we do it as follows:


Type:Begin of tt_infy,
          infty TYPE t582s-infty,
        End of tt_infy.

Data : I_infy type standard table of tt_infy.

For the above what tt_infy called as: Is it Table type or Type.

Tell me the exact difference between Table type & Type with example.

Thanks in advance.

Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 3:27 PM

6 REPLIES 6
Read only

Former Member
0 Likes
652

Hi,

Type : it is refering technical charac

Table type: it'll refer structure of the table as well all the tech info of the fields which are there in the table.

Read only

0 Likes
652

Hi,

hope this example helps you.


*Structure type: a line of a table
types : begin of t_record,
           line(255),
          end of t_record. 
         
*Tables type: how the internal table is structured
types : tt_type type standard table of t_record. 

*Internal table: the final variable
data : itab type tt_type.

P.s : You can create table type also globally in SE11 transaction

Bye

Andrea

Read only

Former Member
0 Likes
652

Hi Ravindar,

It is called only 'Table Type' but not 'Type'. Table type refers to a table where as 'table of Type ' refers to a strucutre.

Below is the declarations for them individually.

Strucutre declaration

Types:Begin of type_infy,

infty TYPE t582s-infty,

End of type_infy.

Table type declaration

Types: tt_infy type standard table of type_infy.

Internal table using TYPES declaration

Data : I_infy type standard table of type_infy.

Internal table using TABLE TYPE declaration

Data : I_infy type tt_infy.

If you reference table type using 'TYPE' it refers to table where as if you reference standard table of using 'TYPE' refers to structure.

Thanks,

Vinay

Read only

Former Member
0 Likes
652

A table type describes the structure and functional attributes of an internal table.The table type that you will use depends on how the typical internal table operations will be most frequently executed.

Ex: If u want to pass table as a parameter then use TABLE TYPE (in type of parameter).

also refer : http://abapdictionary.blogspot.com/2007/11/table-types-in-abap.html

Read only

Former Member
0 Likes
652

Hi,

Check this to understand table type:

http://help.sap.com/search/highlightContent.jsp

Types statement is used to declare a structure


types: begin of record,
          material like matnr,
          materialtype like mtart,
         end of record.

through above declaration you are informing runtime environment that record is a structure which can hold values of type mentioned in record.

Through data statement actual memory will be created for record.

Regards

Vinod

Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 3:27 PM

Read only

Former Member
0 Likes
652

Answered