cancel
Showing results for 
Search instead for 
Did you mean: 

create last page in script

Former Member
0 Kudos

Hello guys!!!

i have a script with 2 pages.

i want a page to be printed with some text on it at the end of the script printing.

that means... if i've 3 pages of script , then i want a 4th page with some text on it.

i've tried &PAGE& EQ &SAPSCRIPT-FORMPAGES&

AND &NEXTPAGE& EQ 0

BUT, they did not work.

is there ny otherway we can achieve dis? or i did nything wrong??

i was writing the code at the end in the main window. shud i wrtite it somewer else??

how does this page printing works in the script.. some1 help

<removed_by_moderator> <= please read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] here.

thnx

ziden

Edited by: Julius Bussche on Aug 7, 2008 12:02 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

check this condition

if &nextpage& = 0.

/: new-page <page name>

endif.

regards

padma

Former Member
0 Kudos

hello padmavathi...

i used the samething.. but i haven't given the <page name> there..

wud it really make ny difference?

Former Member
0 Kudos

Hi,

If you dont mention the page name it will go the page mentioned in next page attribute of the page...

This explicitly calls the specified page

regards

padma

Answers (2)

Answers (2)

JozsefSzikszai
Active Contributor
0 Kudos

I don't understand... If your code is in MAIN window, why don't you just make a page break before it and it will always appear as last page. You don't need this IF NEXTPAGE ...

Former Member
0 Kudos

eric.. can u plz elaborate? i realtively new to scripts

JozsefSzikszai
Active Contributor
0 Kudos

you have MAIN window, right? At the end of MAIN window there is something which you want always print as last page, right? Just put a NEW-PAGE command before this text and delete everything you tried before (IF NEXTPAGE ... )

Former Member
0 Kudos

thankx eric..

but i am just wondering, howmany times does this main window gets triggered??

i debugged it and observed... the control went through MAIN window once and then came back again into the MAIN wondow...

soo in such case it'd make an impact .. doesn't it?

Former Member
0 Kudos

eric... no use ...

it's not working for the documents numbers which has more line items.

if the line items are only 2-3 , then it works fine.

JozsefSzikszai
Active Contributor
0 Kudos

did you try out what I suggested? Does it work? If yes, why more concerns?

MAIN window is triggered only once. You see it triggered more times, because when the page is full, all other windows are triggered and after that MAIN window is continued from the point, where it reached the page end (just check the page number in debugging screen)

JozsefSzikszai
Active Contributor
0 Kudos

it does not matter how many items you printed before, however what you try to achieve is very unclear now... can you post the code of the MAIN window here? (I hope it is not too long)

Former Member
0 Kudos

create a variable window and in that try

IF &NEXTPAGE& EQ 0
         NEW-PAGE
         ENDIF 

With luck,

Pritam.