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

sap script form pages

Former Member
0 Likes
1,341

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
Read only

Former Member
0 Likes
1,018

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

Read only

0 Likes
1,018

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.

Read only

Former Member
0 Likes
1,018

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

Read only

Former Member
0 Likes
1,018

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.

Read only

0 Likes
1,018

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.

Read only

0 Likes
1,018

Thank for your reply ....

ALI

Read only

Former Member
0 Likes
1,018

The Answer is

if &NEXTPAGE& = 0.

include (some text)

endif.

Read only

Former Member
0 Likes
1,018

hi syed,

give like this

if &NEXTPAGE& = 0.

include (some text)

endif