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

Sapscript: value of &sapscript-formpages& before close-form

Former Member
0 Likes
650

Hi everybody,

I have a problem on a sapscript where a window is printed on every page, but it should not be printed on the last page.

The matter is that it is the header of an array, so it has to appear on the "NEXT" page if the array is too long to be printed on one page. But on the last page I print an other array, so I don't want this header to appear here.

How can I do that?

I thought I can test

if &page& NE &sapscript-formpages&

but it seems that when I do this test, they have no value. Maybe they will only have a value on the close-form ?

Thanks in advance ! <b></b>

6 REPLIES 6
Read only

Former Member
0 Likes
592

Hello,

I did not get u,but to what I understood my answer goes as follows.

Since u dont want to print that particular window in the last page,u can go like this.

if &page& ne &sapscript-formpages&

/e text element

rest of things u want to print

endif

___________________

Or u can do the same thing in the print program,that is near the write_form.

Hope u can get me.

Regards

Read only

0 Likes
592

Hello Ravi,

I tried this, and when I'm on the page 1 on 2, the result is false... It's as if &page& and &sapscript-formpages& are always egals. But I printed them, and I see 1, and 2...

That's why I wondered if their value is initial until the close-form is reached.

Read only

0 Likes
592

Hi,

May 'NE' is not working in ur case try to use <>, this one case.

Next try by passing the &page& and &sapscript-formpages&

to different varibles and check with them in that condition.

Regards

Read only

0 Likes
592

Thanks Ravi,

By passing the &page& and &sapscript-formpages& in variables, I saw that they're always equals to the page number (both). And I found &NEXTPAGE&, which is equal to '0' on the last page!

So I did :

IF &NEXTPAGE& NE '0'

PS: I tried to give you some points, but it seems it doesn't work :

"Error:

  • Rewarding the message failed. "

Read only

Former Member
0 Likes
592

might be wrong with small case letters.

try to give the fields in Capital letters like &PAGE& etc..

this might solve your problem,i guess.

Regards

Srikanth

Read only

0 Likes
592

Hi Srikanth,

Sorry, I wrote it in small case letters here, but in the sapscript, it is in capital letters.

Regards,

Emilie