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: 

formatting in reports

Former Member
0 Kudos

hi experts,

what is the best and easiest way to format a non-alv report it is time consuming by using under, text,sy-vline,screen offsets,positions in write statement .please send me a sample code for this

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

in classic reports you must foramt report with sy-vline only...no other way..

but instead of using fixed column positions you can use variable lenghts...easy to format..

for example..


WRITE 😕 sy-vline,
            2 itab-matnr,   "fixed column positions
            19 sy-vline,
            20 itab-menge ,
            33 sy-vline.

you can write above code like this,
WRITE 😕 sy-vline,
            (18) itab-matnr, sy-vline,
            (13) itab-menge , sy-vline.
         

4 REPLIES 4

Former Member
0 Kudos

hi,

in classic reports you must foramt report with sy-vline only...no other way..

but instead of using fixed column positions you can use variable lenghts...easy to format..

for example..


WRITE 😕 sy-vline,
            2 itab-matnr,   "fixed column positions
            19 sy-vline,
            20 itab-menge ,
            33 sy-vline.

you can write above code like this,
WRITE 😕 sy-vline,
            (18) itab-matnr, sy-vline,
            (13) itab-menge , sy-vline.
         

0 Kudos

hi perez,

WRITE 😕 sy-vline,

2 itab-matnr, "fixed column positions

19 sy-vline,

20 itab-menge ,

33 sy-vline.

you can write above code like this,

WRITE 😕 sy-vline,

(18) itab-matnr, sy-vline,

(13) itab-menge , sy-vline.

can u please explain a little bit more

Former Member
0 Kudos

Hi,

No other simply ways.

You can go ALV List Display instead of Grid Display.

for Placeholders, you can create constants like l_pos10 for position 10...

So that you can change the pos at definition level instead of changing eveywhere.

For Example:

data: l_10 type i value 10,

l_25 type i value 25.

write: /l_10 'Baburaj ',

AT l_25 'Manickam'.

Regards,

Baburaj

Former Member
0 Kudos

sdn rocks