Skip to Content
author's profile photo Former Member
Former Member

sy-tleng output

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>

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 07:44 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 07:45 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.