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

problem in report

Former Member
0 Likes
1,076

hi to all help me in this issue.

i had a problem in the outputof a simple report

LOOP AT ITAB_BSIS.

SORT ITAB_BSIS BY BELNR.

WRITE : /10 itab_bsis-bldat,30 l_duedate,45 ITAB_BSIS-blart,

60 ITAB_BSIS-BELNR , 70 itab_bsis-sgtxt,90 itab_bsis-dmbtr.

ENDLOOP.

in selection screen iam giving range of belnrs so i need to display document(belnr) no wise in differnt pages

how can i do it.

thanks in advance

kiran kumar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,048

Hi Kiran,

Remove the sort statement inside the loop and put it outside the loop.

REgards,

Ravi

hi,

SORT ITAB_BSIS BY BELNR.

LOOP AT ITAB_BSIS.

AT NEW BELNR.

NEW-PAGE.

ENDAT.

WRITE : /10 itab_bsis-bldat,30 l_duedate,45 ITAB_BSIS-blart,

60 ITAB_BSIS-BELNR , 70 itab_bsis-sgtxt,90 itab_bsis-dmbtr.

ENDLOOP.

hope this helps,

do reward if it helps,

priya.

9 REPLIES 9
Read only

Former Member
0 Likes
1,049

Hi Kiran,

Remove the sort statement inside the loop and put it outside the loop.

REgards,

Ravi

Read only

0 Likes
1,048

hi i need to change the the top of page for each belnr like customer address

same logic can i keep there.

thanks in advance

kiran kumar

Read only

0 Likes
1,048

hi,

SORT ITAB_BSIS BY BELNR.

LOOP AT ITAB_BSIS.

AT NEW BELNR.

NEW-PAGE.

ENDAT.

WRITE : /10 itab_bsis-bldat,30 l_duedate,45 ITAB_BSIS-blart,

60 ITAB_BSIS-BELNR , 70 itab_bsis-sgtxt,90 itab_bsis-dmbtr.

ENDLOOP.

hope this helps,

do reward if it helps,

priya.

Read only

0 Likes
1,048

yes you can use the variable belnr to get the customer address in the top of page event. Don't use loop there.

Read only

amit_khare
Active Contributor
0 Likes
1,048

Hi,

first of all sort before the loop i.e.

<b>SORT ITAB_BSIS BY BELNR.</b>

LOOP AT ITAB_BSIS.

WRITE : /10 itab_bsis-bldat,30 l_duedate,45 ITAB_BSIS-blart,

60 ITAB_BSIS-BELNR , 70 itab_bsis-sgtxt,90 itab_bsis-dmbtr.

ENDLOOP.

Regards,

Amit

Read only

Former Member
0 Likes
1,048

Hi Kiran,

Remove the sort statement inside the loop.

First sort the itab by belnr and then move the data for final display.

Regards

KK

Read only

Former Member
0 Likes
1,048

Hi ,

Try this way

SORT ITAB_BSIS BY BELNR.

LOOP AT ITAB_BSIS.

AT NEW BELNR.

NEW-PAGE.

ENDAT.

WRITE : /10 itab_bsis-bldat,30 l_duedate,45 ITAB_BSIS-blart,

60 ITAB_BSIS-BELNR , 70 itab_bsis-sgtxt,90 itab_bsis-dmbtr.

AT LAST .

  • Page Footer

ENDAT.

ENDLOOP.

  • Please Mark Useful Answers

Read only

Former Member
0 Likes
1,048

Hi,

Please use the below code:

LOOP AT ITAB.

AT NEW BELNR.

NEW-PAGE.

WRITE / ITAB-BELNR.

ENDAT.

Read only

Former Member
0 Likes
1,048

Hi

Try at new belnr ... it will work