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

work areas...?

Former Member
0 Likes
603

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
567

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

5 REPLIES 5
Read only

Former Member
0 Likes
567

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

Read only

Former Member
0 Likes
568

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

Read only

Former Member
0 Likes
567

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.

Read only

Former Member
0 Likes
566

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

Read only

Former Member
0 Likes
566

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