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: 

sy-tleng output

Former Member
0 Kudos

Hi,

Pls have a look at the below code.

<b>data: begin of it occurs 3,

f1 value 'X',

end of it,

n type i.

append: it, it, it.

describe table it lines n.

write: / 'length of a row from sy-tleng:', sy-tleng.</b>

After executing the above piece of code, the output displayed is [length of a row from sy-tleng: 2].

As far as i understand, <b>length of the row in this case should be 1</b> since f1 is a char type variable with default length 1.

<b>Why is the output 2??</b>

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I get the output as 1 only..i am on ECC 5.0

4 REPLIES 4

Former Member
0 Kudos

I get the output as 1 only..i am on ECC 5.0

0 Kudos

Hi,

Thanks for your reply.

I am on Ver 4.7 and i get the output as 2.

Regards,

Vijay

Former Member
0 Kudos

Hi,

After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, the system fills SY-TLENG with the row size of the addressed internal table.

Regards

Sudheer

0 Kudos

Hi,

Thank you for the information.

But why is the output displayed as 2 ?

Regards,

Vijay