‎2009 May 25 6:19 AM
Hi All,
I know like we can create work areas in both the ways. But when we go for no.1 ad when we go for no.2.
What is the difference b/w both?
1). ls_final_tab TYPE it_final_tab,
2). ls_final_tab LIKE LINE OF it_final_tab
‎2009 May 25 6:25 AM
Hi,
In First case it_final_tab is either types or standard table.
But in second case it_final_tab is internal table.
Regards
Vishnu
‎2009 May 25 6:21 AM
Hello,
Normally we declare work areas using TYPE statement when the table is of standard one.
"Like Line of " is used when we declare a work area similar to the line of an internal table.
Thanks,
Sowmya
‎2009 May 25 6:25 AM
Hi,
In First case it_final_tab is either types or standard table.
But in second case it_final_tab is internal table.
Regards
Vishnu
‎2009 May 25 6:31 AM
Hi puppy,
1). ls_final_tab TYPE it_final_tab,
2). ls_final_tab LIKE LINE OF it_final_tab
If u r writing " ls_final_tab TYPE it_final_tab," , it means it_final_tab to which u r referring is defined as
types and not as data i.e. it is acting as a work area & not as an internal table.
Ans if u r writing "ls_final_tab LIKE LINE OF it_final_tab" that means you have dfeclared an internal table it_final_tab with "Data".
regards,
ajit.
‎2009 May 25 6:33 AM
Hi,
Functionality of both the declaration is same, only difference is if it_final_tab is a local internal table then you would not be able to use type. and also if you mention like line of then it_final_tab should be an internal table.
if it_final_tab is a globally defined structure or table then we go for type.
even if it_final_tab is declared using types declaration then also we go for type.
Regards,
Siddarth
‎2009 May 25 6:37 AM
hi,
The first type is used to create work areas for normal tables or internal tables, the second one is used to create workareas for the table types.
Regards,
Manish