cancel
Showing results for 
Search instead for 
Did you mean: 

SCRIPT

Former Member
0 Kudos

IN SCRIPT I HAVE TWO MAIN WINDOW ONE IS SMALLER (MAIN 01 )AND OTHER ONE IS BIGGER (MAIN 02)

BASED ON CONDITION I NEED TO CALL RESPECTIVE MAIN WINDOW

IF DATA IS GOING NEXT PAGE I NEED PRINT IN BIGGER MAIN WINDOW IF ITS ENDING WITH THAT PAGE

I NEED PRINT IN SMALLER MAIN WINDOW

PLEASE HELP IN THESE REGARDS

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

thanks for ur reply

can we dynamically change the size of main window.

if data is ending with in first page i want size of main window small so that i can display footer window in first page ..

if data is going to 2nd page in first page i want size of main window bigger.

Former Member
0 Kudos

may be this will help you

WINDOS IN SCRIPT:

3 types of windows are available in sapscript.

u2022 MAIN

Main window in which continuous text is printed. This is the window used by dialog users of a print program and form. For example, the body text of a letter would be entered in MAIN.

The text in the main window can extend over several pages. If the text fills one page, output continues in the window of the next and subsequent pages, as long as MAIN has been defined for these pages.

u2022 VAR

Window with variable contents. The text can vary on each page in which the window is positioned. Variable windows are formatted for each page.

To every window you can assign text, which is printed in the corresponding window when the form is formatted. To assign text, use text elements, which are stored with the form.

To create and maintain text elements with the SAPscript Editor, choose Text elements. Should the text selected for the window exceed the window size, then the text is cut off.

u2022 CONST

Window with constant contents that is formatted only once.

Currently, CONST windows are processed in the same way as VAR windows. You should only use windows of type VAR.

Former Member
0 Kudos

Sunil,

First of all as Manjunath mentioned data printed on a main window can go on to multiple pages. Here are two solutions for this case.

1. Create a page ONE, with second page property of it is ONE. Create a MAIN window and FOOTER window. In FOOTER window put this condition

/: IF &NEXTPAGE& EQ 0

whatever footer you want.

/: ENDIF

2. I think this will be best fit for your case.

Create a page ONE, with second page property of it is ONE. Create two MAIN windows and FOOTER window.

Keep the these conditions in the windows

MAIN2 (Bigger in height)

/: IF &NEXTPAGE& NE 0

whatever footer you want.

/: ENDIF

MAIN1 (Shorter in height)

/: IF &NEXTPAGE& EQ 0

whatever footer you want.

/: ENDIF

FOOTER ( this window statrts after MAIN1 winows ends. ie

/: IF &NEXTPAGE& EQ 0

whatever footer you want.

/: ENDIF

FOOTER upper margin = upper margin of MAIN1 + height of MAIN1 (+ <n> , n is some number if you want some gap between these windows) )

Hope this helps

Thank you,

Surya

Former Member
0 Kudos

Hi ,

First of all your assumtion itself is wrong.

The concept of Main Window is nothing but elasticity. I mean to say that if the data does not fit in one page automatically it goes to the next page that you mention at the page attributes.

Let me know if you still have any concerns. Allot points if this is usefull.

Former Member
0 Kudos

Sunil,

You don't need to use two main windows and use condition to print in the next page or to print in the same page.

Purpose of main window is that it will print in the next page if there is more data in it provided the next page has a main window.

Here are two scnarios: 1. You use next page property of the first page if the first and next page are different, meaning having different winows.

2.You use next page property of the first page to FIRST page if all the pages are identical.

In both cases you should have MAIN window both on FIRST as well as NEXT page. Then if there are more contents that are needs to be printed more than one page, they will be printed automatically on the next page.

Hope this helps you. If you have any questions please let me know.

Thank you,

Surya