cancel
Showing results for 
Search instead for 
Did you mean: 

Sy-uline ... How to write it dynamically

Former Member
0 Kudos

MY problem is .. whenever the linsize of my report changes , the length of sy-uline should change ..

That means instead of explicitly telling (120) sy-uline... I want to use sy-linsz .. ie

(sy-linsz) sy-uline. But its showing syntax error . I put the sy-linsz in a variable and checked .. Not okay .. somebody Please help me out.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

What about:

write: sy-uline(sy-linsz).

Mart

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

Do you realize the difference between the solutions?

For general reasons, the first one is suggested in the ABAP documentation:

"The specification of the output length len after AT should always be preferred over the use of a length specification for data object dobj (partial field access). In contrast to partial field access, the specification of the output length is not restricted to byte- and character-type data objects. Furthermore, the assignment of the list output to the data object is lost during a partial field access, in that it can no longer be addressed in the list."

Former Member
0 Kudos

Try using

write at (sy-linsz) sy-uline.

bye

Madhavan

Former Member
0 Kudos

Thank you very much for giving the answer .