cancel
Showing results for 
Search instead for 
Did you mean: 

Print some value on eacht page ,exept the last one

adel_adel
Participant
0 Kudos

Hi Experts,

i need to print some data in each page of the form exept the last page of my script . the data should be only in the main window be printed.

I heard that the &nextpage& variable and other counters like formpages , page doesn't give always the true value inside the main window.

Is this correct ? so can any body suggest how to do it ?.

It concers printing an internal tabel with articles /prices, so if it is not the last page : print some text.

Do i have to pass the total count of the internal table from abap to solve this problem?

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

adel_adel
Participant
0 Kudos

&nextpage& doesn't work on the main window.

former_member585060
Active Contributor
0 Kudos

Try this way

Create 2 Pages,(First , Last )

Assign First Pages's next page as First Page itself.

In Main Window of the First Page after field variable

use NEW-PAGE Last. So that it triggers Last page.

Ex:-

First page

Main Window

P1 &ITAB-ABCD&

/: NEW-PAGE Last

(where Last = last page with conditions)

former_member585060
Active Contributor
0 Kudos

Yes, &NEXTPAGE& NE 0 won't work in Main Window.

Former Member
0 Kudos

hi,

if the window is other than main window then you can use

/: if &NEXTPAGE& ne 0

print your data.

/: endif

regards

padma

Former Member
0 Kudos

Hi,

For the last page the &nextpage& variable is 0.

So when you are printing the data you can use the condition

If &NEXTPAGE& NE 0.

Print data.

endif.