Friday 14 November 2014

SCRIPT : Use of NEW-PAGE and NEW_WINDOW in SAP Script?

NEW-PAGE: - When a Page, MAIN Window instance content area are filled with texts then an automatic new page is triggered and the remaining texts are displayed in the NEXT-PAGE. But by using the NEW-PAGE command an explicit page break can be triggered at any point & texts are displayed in the Next Page.

NEW-WINDOW : - If the page contains multiple instances of the MAIN window and the  text  can be managed within a single instance of the MAIN window, then the NEW-WINDOW command is used to explicitly put some part of the text into different instances of the MAIN window.

-----------------------------------------------------------------------------------
STEP1.  So here we have the Script Page Window , select the Page and click on the text Element.













STEP2. Maintain the below text . Go back and activate it.




















STEP3. Run the program.





















STEP4. So we have the Output in one page.






























STEP5. Go back to the Text Element of Main Window and add NEW-PAGE command. Go back and activate it.




















Execute the Program.





















STEP6. So as a result of NEW-PAGE command, the output is splitted across two pages though the MAIN Window is capable enough to display the contents.


























Second page output.

























STEP7. Go back again and remove the NEW-PAGE command and replace it by NEW-WINDOW . Go back and activate it.



















STEP8. Run the program.





















STEP9. So again we have the same output as in case of NEW-PAGE. If a page contains a single Instance of MAIN window and in side the MAIN window text element we have the command NEW-WINDOW , as no other instance of the MAIN window available, so in this case NEW-WINDOW acts similar as NEW-PAGE.


























Second Page output.





















Step10. Let's create two MAIN window instances in the PAGE window. Select the Text Element.













Step11.  Maintain the text as shown below. Go back and activate it.


















Run the program.






















Step12.  So though we have two instances of the MAIN window are available, but as out text contexts are fit into a single MAIN instance, so the result s single column.




























Step14. Add the command NEW-WINDOW. Go back and activate the form.

















STEP15. Execute the program.




















Step16. So the output is splitted across two different instances of the MAIN window in the same page.







--------------------------------------------------------------------------------------------

No comments:

Comments system

Disqus Shortname