Application Development 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: 

LIKE <tabname>.&LIKE LINE OF <tabname>

Former Member
0 Kudos

we are creating a workarea <wa> in 2 ways my question is what is the difference between 1 & 2

1] wa LIKE <tabname>.

2] wa LIKE LINE OF <tabname>

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello

Here is another example:

DATA:

gt_knb1 TYPE STANDARD TABLE OF knb1, " itab = table type without header line!!!

gs_knb1 TYPE knb1,

gs_knb1x LIKE LINE OF gt_knb1. " identical to gs_knb1

Regards

Uwe

3 REPLIES 3

former_member188827
Active Contributor
0 Kudos

like line of can only be used if we are reffereinfg to an internal table where as like can be used to refer to any structre, db table or internal table

uwe_schieferstein
Active Contributor
0 Kudos

Hello

Here is another example:

DATA:

gt_knb1 TYPE STANDARD TABLE OF knb1, " itab = table type without header line!!!

gs_knb1 TYPE knb1,

gs_knb1x LIKE LINE OF gt_knb1. " identical to gs_knb1

Regards

Uwe

Former Member
0 Kudos

Hi,

1. practically both are same.

2. the only difference is that the second statement

wa LIKE LINE OF <tabname>

expects <tabname> which should be an internal

table, which is declared in the program.

regards,

amit m.