11-26-2007 7:43 PM
Hi,
In sapscript, I write the below comparison but it doesn't understand:
<b>IF &PAGE& = &SAPSCRIPT-FORMPAGES&.</b>
with &PAGE& is of type character & &SAPSCRIPT-FORMPAGES& is an interger.
Can someone show me how to convert (date type) either of the above 2 values to make my comparison working?
Thanks!
11-26-2007 7:50 PM
11-26-2007 8:02 PM
11-26-2007 8:16 PM
If you are trying to access current page number in &PAGE&, than you can use the
/: IF &TTXSY-PAGE& = &SAPSCRIPT-FORMPAGES&
Regards,
Naimesh Patel
11-26-2007 8:30 PM
Hi,
Thanks for your reply but &TTXSY-PAGE& returns nothing.
The &PAGE& is already have the correct value but it is in string (character) instead of integer.
11-26-2007 8:37 PM
11-26-2007 8:49 PM
Satish,
&SYST-CPAGE& always returns 0 too. The value of &PAGE& is correct but it is in character (string) instead of integer.
I think what I have to do is to convert either of these 2 values to another corresponding type to make it comparable. But I don't know how.
Thanks anyway.
11-26-2007 9:11 PM
11-26-2007 9:12 PM
Oh I got it, just compare like below:
/: IF &TTXSY-PAGE& = &SAPSCRIPT-FORMPAGES<b>(C)</b>&
11-26-2007 9:14 PM
11-26-2007 9:19 PM
The solution is very simple, as:
IF &PAGE& = &SAPSCRIPT-FORMPAGES(C)&.
Thanks for all reponders anyway!