‎2009 Jan 08 10:35 AM
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
‎2009 Jan 08 10:40 AM
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.
‎2009 Jan 08 10:46 AM
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
‎2009 Jan 08 10:42 AM
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
‎2009 Jan 08 10:53 AM
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
‎2009 Jan 08 11:00 AM
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
‎2009 Jun 08 8:14 AM