Application Development and Automation 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: 
Read only

a report program

Former Member
0 Likes
765

hello,

i hav created report program ....in which i hav printing data in two colums(sections)

of a page....im printing first 'first column'...n then 'second one' ( i.e. im printing left side of page and then right side of page ) n i hav declaired <b>line-count 60</b> ...while printing on left side if page ends due to line-count is set.....im not able to print on right of that page because page is set to next page( and it start printing from next page on right side as it is changed)...i want know that .... is it posiible to come back to previous page while printing in report program .....(as i hav mentioned problem ).....i want to know the code for that if possible....

Regards,

Gajanan Galande

7 REPLIES 7
Read only

Former Member
0 Likes
744

Hi

declare an Internal table with 2 column fields

and then populate the values into that internal table and write the data of that ITAB in the output, so that both the columns are printed.

You can't print leftside first and then right side next in the report output.

At a time you will write the contents of both the columns in a single line and then go to 2nd line

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

0 Likes
744

hey in report program by using BACK command u can set cursor to intial postion ...plz check how actually it works..

thanks 4 help...and that u hav given solution using internal table ...i hav tried tht

but it is not working in which i want ...

Read only

Former Member
0 Likes
744

Yes, you can do that by manipulating the fields sy-pagno (page number) and sy-linno (line number). Check out this example:

do 100 times.

write: / 'first column'.

enddo.

sy-pagno = 1.

sy-linno = 1.

do 100 times.

write: /50 'second column'.

enddo.

This will really only work without the line-count 60.

Message was edited by:

Kevin Kuestermeyer

Read only

Former Member
0 Likes
744

You can print first the right and then the left, using the BACK or SKIP TO LINE <n>. BACK can be used with or without RESERVE. Also don't forget about POSITION <n> to set the output column.

BACK returns to the first line of the current page after TOP-OF-PAGE

You will have to monitor the number lines you print because once you overflow, you cannot BACK to a prior page.

I hope this helps.

Look up in the ABAP help for examples of using these.

Bob

(Points are appreciated)

Read only

0 Likes
744

You will have to monitor the number lines you print because once you overflow, <b>you cannot BACK to a prior page.</b>

yes i want to know tht i can go to previous page after after printing on next page is it possibe or not?????

Read only

0 Likes
744

You will have to monitor the number lines you print because once you overflow, <b>you cannot BACK to a prior page.</b>

yes i want to know tht i can go to previous page after after printing on next page is it possibe or not?????

Read only

0 Likes
744

BACK only returns to the top of the current page. I have used this in 3-up label printing programs, some years ago. If you need to return to the first page, try the method suggested in the post by Kevin, to set sy-pagno and sy-linno to 1. I have not tried this.