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: 

appending problem

Former Member
0 Kudos

Hi,

Iam trying to display 4 lines of text for the particular doc no.But iam getting only last line.How to achieve it.

Here is the code.

loop at t_hdr.

loop at t_det.

write:/ t_hdr-name. write:'-'. write: t_hdr-text.

t_hdr-group = t_det-QMGRP and t_hdr-code = t_det-QMCOD.

write :1(5) t_det-sno,

7(15) t_det-qmnum,

22(15) t_det-refnum,

37(15) t_det-parnr,

53(25) t_det-qmtxt.

<b> loop at itab where qmnum = t_det-qmnum.

write :80(50) itab-desc.

endloop.</b> this is having four lines of text

endif.

endloop.

endloop.

points guaranteed

cheers

kaki

9 REPLIES 9

amit_khare
Active Contributor
0 Kudos

Hi,

try:write:/80(50) itab-desc.

instead

write :80(50) itab-desc.

Amit

0 Kudos

Hi Amit,

I got it but it is giving one line down.How to get it in same line of itab?

cheers

kaki

0 Kudos

data: str(100). "at top of you program

clear str. "<b>its must just before this loop on itab</b>.

loop at itab where qmnum = t_det-qmnum.

concatenate itab-desc str into str separated by space.

endloop. this is having four lines of text

write: 80(50) str. "it should be outside of the loop

plz reward points..if it helps you

0 Kudos

you can do this,

loop at itab.

if sy-tabix = 1.

write:80 itab-desc.

else.

write itab-desc.

endif.

endloop.

Former Member
0 Kudos

use write:/80(50) itab-desc.

former_member181962
Active Contributor
0 Kudos

loop at itab where qmnum = t_det-qmnum.

new-line.

write :80(50) itab-desc.

endloop.

try this ...in place of the highlighted code

Former Member
0 Kudos

Hi Kaki,

Put new line command after write statement like below:

loop at itab where qmnum = t_det-qmnum.

write /:80(50) itab-desc.

endloop. this is having four lines of text

It will print 4 lines of your message.

Award points, if it solves ur problem.

Regards,

Sudhakar.

Former Member
0 Kudos

Hi,

I think that each line have length of 132 character.But u have speciped only 50 characters.So increase your character like

write: 80(500).

I Hope it helps

regards,

srini

Former Member
0 Kudos

Hi,

Data: vline type SYLISEL.

vline = 50.

loop at itab where qmnum = t_det-qmnum.

write :vline(50), itab-desc.

vline = vline + 50.

endloop. this is having four lines of text

Try this.

Regards,

Sudhakar.