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

Former Member
0 Likes
618

Hi all,

I am using &SAPSCRIPT-FORMPAGES& in my Script It prints the Number of pages which is correct.

Now my Clarification is I want to print the ( No of pages - 1). If Total Pages = 4. I want to print 3.

I used

/: Define &V_VAR& = &SAPSCRIPT-FORMPAGES&

/: Define &V_TOTPAGE&

/: PERFORM TOTPAGE IN PROGRAM XYZ

/: USING &V_VAR&

/: CHANGING &V_TOTPAGE&

/: ENDPERFORM.

In this perform I am reducing the Pages by 1

But now V_VAR is displaying the Value 0 even after Assigning &SAPSCRIPT-FORMPAGES&

But when I directly print &SAPSCRIPT-FORMPAGES& instead of &V_TOTPAGE& it prints the Total Pages.

When we could assign &SAPSCRIPT-FORMPAGES& value to a variable and then minus it by 1.

Thanks in adv

4 REPLIES 4
Read only

Former Member
0 Likes
589

hi,

pls try passing &SAPSCRIPT-FORMPAGES& directly in the perform statement.

/: PERFORM TOTPAGE IN PROGRAM XYZ

/: USING &SAPSCRIPT-FORMPAGES&

/: CHANGING &V_TOTPAGE&

/: ENDPERFORM.

Regards,

Preema

Read only

0 Likes
589

I did pass &SAPSCRIPT-FORMPAGES& in the perform however the value retreived in the form is 0.

Is it that the values in &SAPSCRIPT-FORMPAGES& is stored after close_form.

Read only

Former Member
0 Likes
589

hi

u need to write like this only

/: page & page& of &sapscript-formpages&

it will solve ur requirement.

u will get output like this

page 1 of 4.

cheer

Read only

Former Member
0 Likes
589

hi,

Try giving liek this

/: define &v_var&<b> :=</b> &sapscript-formpages&

Give := instead of =

Regards,

Sailaja.