‎2014 Feb 11 5:28 AM
Hi All,
I have a script in which Windows are displayed dynmically based on the Page number. i.e; if the page number ( &PAGE& ) is Less than 3 one widdow should be displayed and if the Page number ( &PAGE& ) is greater 3 another window should be displayed.
It is working fine if the output of the script is Less than or Equal to 9. If the output is more than 10 pages wrong window is displayed (say First window is displayed instead of second). I have tried,
if &PAGE& (2ZC) < 3 , i even a perform which takes Page as the parameter and changes it to type I and passed it to a local variable and checking the condition based on the local variable that too didn't work.
Is it a standarf error ???
Can anyone Plz help me with a hint or solution to this problem.
Thanx....
‎2014 Feb 11 5:36 AM
Hi Deepan,
I'm a bit rusty on SAPscript stuff, but I think you should try:
&PAGE(C)& < 3
Cheers,
Custodio
‎2014 Feb 11 5:57 AM
I tried all possible combinations wit &PAGE& .. i did not help
‎2014 Feb 11 5:41 AM
Hi Deepan
When you check in debugging are you getting correct page number?
Nabheet
‎2014 Feb 11 5:56 AM
Yeah while checking in Debugging i am getting the exact page number .. i.e,. 10
‎2014 Feb 11 5:43 AM
Hi,
First just check what value &PAGE& prints on the Script.Try putting [Page &PAGE& from &SAPSCRIPT-FORMPAGES(3ZC)&]. See the what value is displayed as current page number.
Regards
Abhi
‎2014 Feb 11 5:59 AM
My page contains displaying the page number on it.. It displays the correct page number as 10 .. But if 10 > 3 should be true , but it returns false
‎2014 Feb 11 6:27 AM
I would suggest you to switch on Script debugging and check
Nabheet
‎2014 Feb 11 6:45 AM
I have debugged it, but in debugging mode its showing the correct value
‎2014 Feb 11 7:19 AM
Can you please attach your SAP script code screen shot. Secondly when you use perform subroutine call you can set back the flag if FLag eq 'X' then do 1 else 2. Was the flag value flowing back to the script
Nabheet
‎2014 Feb 11 10:28 AM
Actually i tried checking the page number in the script , but it did not work so i created a flag if a condition is true and checked the flag in the program.
I did get the exact output which i wanted but i did not follw the guidelines ....
‎2014 Feb 11 10:54 AM
Do the following...
PERFORM convert_no IN PROGRAM (any Z-Prog)
USING &SAPSCRIPT-FORMPAGES&
CHANGING &SET_FLAG&
ENDPERFORM.
IN Z-PROG program set the FLAG if its GT 3 .
Then , put the condition for the windows .
Regards