‎2009 Apr 28 3:50 PM
Hi friends,
i have searched sdn but still didnt find a proper answer for thsi question
What is the differnce between internal table and table type?
what i got after going through few lines which i got from sdn is
both will hold multiple records at run time.
is table table type also a internal table created globally
can any one clearify this.
Regards
Priyanka.
‎2009 Apr 28 3:54 PM
No, Table type is not an internal table created globally .
Table type is just a global(declared globally) type which we can use in your program to declare an internal table.
An internal table stores multiple records in a program temporarily.
You can also declare type for an internal table in the program itself by using keyword TYPES
‎2009 Apr 28 3:56 PM
Hi Priyanka,
table type are declared when you are using any subroutines or form routines you declare tables option..
ther if you want to pass reference table table type are used.
internal table is used to hold data.
and table types are used for refernce of a tbale.
regards,
Prabhudas
‎2009 Apr 28 3:59 PM
Difference is that internal tables are specific to a particular program and need to be defined every time. where as Table types are defined globally and can be used in n number of programs.
Where as during runtime Internal tables hold data and table type are used as reference data they don't hold any data.
Edited by: Suvendu Swain on Apr 28, 2009 5:00 PM
‎2009 Apr 28 4:00 PM
Hello,
A table type is like any other type definition, a description to be used to define program variables.
Table types can be defined in the data dictionary using se11. Take a look there for examples.
data: my_itab type ty_tab_type.
- defines an internal table, my_itab, which can be used in your program to store and process data
at runtime
Regards
Greg Kern
‎2009 Apr 29 2:47 AM
Hi Priyanka,
See the difference,
Data : It_Itab type table of MSEG. " IT_ITAB is Internal Table.
Data : var1 tyep c.
Perform Subroutine TABLES IT_ITAB using Var1.
Form Subroutine TABLES IT_ITAB_REF using Var2. " IT_ITAB_REF is Table type of IT_ITAB.
ENDFORM.
Thanks & regards,
Dileep .C