‎2006 Oct 06 12:16 PM
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
‎2006 Oct 06 12:26 PM
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
‎2006 Oct 06 12:32 PM
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.
‎2006 Oct 06 12:27 PM
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
‎2006 Oct 06 12:29 PM
hi,
Try giving liek this
/: define &v_var&<b> :=</b> &sapscript-formpages&
Give := instead of =
Regards,
Sailaja.