Application Development 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: 

sap script form pages

Former Member
0 Kudos

Hi,

My client wants some text in the last page above footer.

I have given

if &page& = &sapscript-formpages&.

include (some text)

endif

but in debug when page is 1

formpages is 0.

Any inputs in this regard would be appreciated.

Thanks in advance.

Syed

8 REPLIES 8

Former Member
0 Kudos

Hi

If you want to write something only in the last page you've to check the variable &NEXTPAGE.

This variable give the number of the last page, if it's ZERO it means you're in last one.

if &&NEXTPAGE& = 0.

include (some text)

endif

Max

0 Kudos

if &NEXTPAGE& = 0.

include (some text)

endif

or

if &sapscript-formpages& = 0.

do this (some text )

endif.

or

if &page& = 0

do (some text )

endif.

Former Member
0 Kudos

Hi Syed,

I hope the command you gave wont work because

<b>&page&</b> is a character type of length 60 and <b>&sapscript-formpages&</b> is an integer type of length 10. So you can check by two methods one is

<b>1.</b> if &NEXTPAGE& eq 0.

<b>

2.</b> using an include

/: PERFORM CHECK_PAGE1 IN PROGRAM Y_TEST

/: USING &PAGE&

/: USING &SAPSCRIPT-FORMPAGES&

/: ENDPERFORM

Former Member
0 Kudos

Hi Syed ,

The last page in script is shone as 0.

so we need to che check with 0.

try this code.

if &page& = 0.

include (some text)

endif.

OR

if &sapscript-formpages& = 0.

include (some text)

endif.

either of this two will works.

Regards,

Ramesh.

0 Kudos

Hi Syed ,

The last page in script is shone as 0.

so we need to che check with 0.

try this code.

if &page& = 0.

include (some text)

endif.

OR

if &sapscript-formpages& = 0.

include (some text)

endif.

OR

if &NEXTPAGE& = 0.

include (some text)

endif.

either of this three will works.

Regards,

Ramesh.

0 Kudos

Thank for your reply ....

ALI

Former Member
0 Kudos

The Answer is

if &NEXTPAGE& = 0.

include (some text)

endif.

Former Member
0 Kudos

hi syed,

give like this

if &NEXTPAGE& = 0.

include (some text)

endif