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

new page ....

Former Member
0 Likes
1,333

hi,

For Every new account number a new-page has to be

generated in report and also the changed account number has to be displayed in new-page .

How to do this?

rgds,

nagarjuna.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,301

Hi nag,

try this

loop at <table>.

if acc is not INITIAL.

on CHANGE OF <table-field>.

NEW-PAGE.

endon.

endif.

if u use ant new u will get ***** so use onchange of .

thanks,

13 REPLIES 13
Read only

Former Member
0 Likes
1,301

Hello


sort itable by account.
...
loop at itable.
  at new account.
    new-page.
  endat.
endloop.

Read only

Former Member
0 Likes
1,301

Hi Nag,

Try the following:

Loop at <internaltable>

at new <account-number>

NEW-PAGE.

--

--

endat.

endloop.

Hope this helps you.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
1,301

hi nagarjuna,

sort the internal table(itab) by ACCOUNT.

LOOP AT itab.

AT NEW account.

new-page.

.

.

.

ENDAT.

......

ENDLOOP.

Read only

Former Member
0 Likes
1,301

hi,

Try this.

Use At NEW control statement.

Loop at itab.

At New <Acc No>

new-page.

endat.

endloop.

Hope this will End.

Regards

Sumit Agarwal

Read only

Former Member
0 Likes
1,301

Hi Reddy,

as also said by others it will be something like:

report new_account line-count 20. " take line count as per requirement

loop at itab into wa.

  at new wa-account.
     new-page.
     write: wa-account.
  endat.
write:/ wa-field1
....................
...............
endloop.

With luck,

Pritam.

Read only

Former Member
0 Likes
1,301

If it is ALV then you can do that using SORT option. Populate the sort table , then pass the sort table to the ALV Function.

SORT-FIELDNAME = 'MATNR'.

SORT-GROUP = ''. " for New page

SORT-UP = 'X'.

append sort to it_sort.

If it is normal report you have to use control break statements and Trigger new-page using NEW-PAGE

Read only

Former Member
0 Likes
1,301

Hi Nagarjuna,

First sort your internal table by account.

Then use NEW-PAGE at AT NEW control break statement on account by looping that internal table. For every new account, a new page will be triggered.

I think this solves your problem.

Thanks,

Phani Diwakar.

Read only

0 Likes
1,301

hi,

For Every new account number a new-page has to be

triggered in report and once account number got changed it has to be displayed in new-page .

here my problem is in the header only i have account number.

after that for some records accnum is not there. that means those are related to that header record.those are to be displayed in one page. and for other accnum those details should be in new page.

101 1/2/08 hcvshvcjh 589 658

5/2/08 gsagc 698 458

2/2/08 hjfajjas 698 152

102 1/3/08 jhyuiay 987 654

1/3/08 asgsg 589 632

here fields are accno date description amt amt----> header

date desc amt amt -


> line items

101 details should be displayed in one page once the accnum got chnged that means 102 will come 102 details will be in another page i have to display.

how to do this?

thanks and regards,

nag.

Read only

0 Likes
1,301

Hi Nagarjuna,

Your all reuired data are stored in internal table. First sort the internal table by account no field.

Then proceed like this:

> loop at <internal table> into <work area>.

> at new wa-account.

> new-page.

> write: "What you want to display in the output".

> endat.

> clear <work area>.

> endloop.

Best Regards,

Sayak...

<removed by moderator>

Edited by: Jan Stallkamp on Jul 17, 2008 8:57 PM

Read only

0 Likes
1,301

i am not getting the exact output. for the first record only i have accnumber after that for some record there is no account number.

those records are related to that account number.

Once account number changed then only i've to trigger the new page. again same process first i've to display the header then records related to that record.

How to do this?

thanks,

nag.

Read only

0 Likes
1,301

Hi Reddy,

Try with a if condition before you control brk statement..like

IF accnumber IS NOT INITIAL.

AT NEW accnumber.

NEW-PAGE.

ENDAT.

...............

ENDIF.

With luck,

Pritam.

Read only

0 Likes
1,301

hi,

finally i got the solution..

thanks,

nag.

Read only

Former Member
0 Likes
1,302

Hi nag,

try this

loop at <table>.

if acc is not INITIAL.

on CHANGE OF <table-field>.

NEW-PAGE.

endon.

endif.

if u use ant new u will get ***** so use onchange of .

thanks,