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

Code review

Former Member
0 Likes
418

Hi Folks,

Good morning all,

In SAPscript how will this work,

/: IF &PAGES& EQ &SAPSCRIPT-FORMPAGES&

N some text

/: ELSEIF &SAPSCRIPT-FORMPAGES& EQ 1

N some text

/: ELSE

N ,,Continued on next page

/: ENDIF

Please suggest o/p and also notice syntax errors if any.

In this code, i am trying to:

1)Print 'Some Text' in the last page only, in case of muliple page form

2)Print 'some text' in the first page itself without the text 'continued on next page' on that single page

3)Print 'continued on next page' on every page except the last page in case of multiple pages with the last page containing 'some text'

So, I guess i am right if write 'some text' in elseif part(which i had left empty). Right?

REGARDS,

VISHWANATH

Message was edited by: vishwanath vedula

Message was edited by: vishwanath vedula

2 REPLIES 2
Read only

Former Member
0 Likes
396

Hi Vish,

Answer1: Use if &nextpage& eq 0 (This means its a last page).

Answer2: elseif &page& eq 1

Answer3: elseif &nextpage& NE 0.

This will solve ur problem.

Regrads

Kapil

Read only

0 Likes
396

Is endif not needed in this code as i have put in my original post.