2007 Nov 26 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!
2007 Nov 26 7:50 PM
Hi Timy,
Use IF &SY-PAGNO& = &SAPSCRIPT-FORMPAGES&.
Regards,
Satish
2007 Nov 26 8:02 PM
2007 Nov 26 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
2007 Nov 26 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.
2007 Nov 26 8:37 PM
Timy,
Try this
&SYST-CPAGE& = &SAPSCRIPT-FORMPAGES&.
Regards,
Satish
2007 Nov 26 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.
2007 Nov 26 9:11 PM
2007 Nov 26 9:12 PM
Oh I got it, just compare like below:
/: IF &TTXSY-PAGE& = &SAPSCRIPT-FORMPAGES<b>(C)</b>&
2007 Nov 26 9:14 PM
I think you can also do in this way
&PAGE& = &SAPSCRIPT-JOBPAGES&
2007 Nov 26 9:19 PM
The solution is very simple, as:
IF &PAGE& = &SAPSCRIPT-FORMPAGES(C)&.
Thanks for all reponders anyway!