2007 Dec 27 12:14 PM
hi experts,
i have two pages and in page one i have to chack a condition .
if it is true it has to print the first page else it has to go to next page .how to achieve it ???
ragrds,
mani
2007 Dec 27 12:19 PM
write the code in the script text element
/: if &cond& eq 'X'.
/: new-page.
/:endif.
2007 Dec 27 12:44 PM
2007 Dec 27 1:04 PM
Hi manikandan,
New-page is an abap command which is used at sapscript side.
You just write;
/: New-page
if the condition is true...
Thanks.
Reward if helpful.
2007 Dec 27 1:22 PM
Hi Manikandan,
SAPscript automatically inserts a page break when the main window of a page (MAIN) is full. You can use the NEW-PAGE command to force a page break in the text at any point you want one. The text following this command will appear on a new page. The page break will always be performed (it is an unconditional page break).
The NEW-PAGE command completes the current page.
This means that all the windows that are still on the page will be output immediately. If you use the NEW-PAGE command without parameters then the page defined in the layout set for the current page as the next page will be taken next. If, however, your layout set contains a number of different pages then you can specify any one of these as the next page to be used.
Check this code.
/: IF <CONDITION IS TRUE>
Continue on FIRST page*
/: ELSE
/: NEW-PAGE NEXT ->This will trigger NEXT as next page
/: ENDIF
Thanks,
Vinay
Edited by: Vinaykumar G on Dec 27, 2007 6:53 PM
2007 Dec 28 5:26 AM
hi vinay,
i am in another window not main window.for a particular condition alone it is not going to main window.it is going to anothet window.now i want to put the control to main window back from the second window.
what shall i do???
-
main
statements
-
-
second window
(here i have to write a code to put the control back to main window)
something like this.
if <condition>
goto main window
endif
is that possible????
regards,
mani
2007 Dec 28 5:28 AM
you can specify new page command in script...
but not the window name...
2007 Dec 28 5:47 AM
ya i tried that also
if <condition>
new-page next
endif
but the control is not going to that next page .it continues in the same page
mani
2007 Dec 27 1:12 PM
/: IF <condition>
/: &NEXTPAGE& = 'FIRST'
/: ELSE
/: &NEXTPAGE& = 'NEXT'
/: ENDIF
/: NEW-PAGE