Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Main Window in SAP Script

Former Member
0 Kudos

Hi Guys,

I wanted to know as to why is it possible to create multiple main window in SAP Script.

In most theory it is written a SAP Script can only use 1 main window, If thats the case why is it still possible to create more than 1 of them.

Can you explain its use and functionality.

Helpful answers will be duly rewarded.

8 REPLIES 8

Former Member
0 Kudos

Hi

Script without mainwindow is not possible but We can have a smartform without a mainwindow.

We can have a total of 99 mainwindows for a script.

But we can have only one main window for each page in a script.

Each form must have one window of type MAIN. Such a window is called the main window of the form. For SAPscript forms, the main window has a central meaning:

It controls the page break.

It contains the text body that may cover several pages.

It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).

As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form. The SAPscript composer thus avoids reformatting of the text after each page break.

If a page does not have a main window, the system implicitly processes all other windows of the page and continues with the subsequent page. This page must not call itself as subsequent page (recursive call), since this would produce an endless loop. In such a case, SAPscript terminates the output after three subsequent pages.

For printing header lines or totals, the different output areas of the main window are of special importance.

thnx

sravani

Plz reward if useful.

Former Member
0 Kudos

Hi,

U can have multiple main windows in Sapscripts(Upto 99)

Main Windows (MAIN)

Each form must have one window of type MAIN. Such a window is called the main window of the form. For SAPscript forms, the main window has a central meaning:-

? It controls the page break.

? It contains the text body that may cover several pages.

? It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).

As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form. The SAPscript composer thus avoids reformatting of the text after each page break.

If a page does not have a main window, the system implicitly processes all other windows of the page and continues with the subsequent page. This page must not call itself as subsequent page (recursive call), since this would produce an endless loop. In such a case, SAPscript terminates the output after three subsequent pages.

For printing header lines or totals, the different output areas of the main window are of special importance.

The diffetent Output areas of main window are

TOP

BODY

BOTTOM

  • its use and functionality.*

Suppose you have requirement that you r displaying data from two line item tables which can flow multiple pages.

In this case u have to use multiple mail windows.

Regards

Sandipan

Former Member
0 Kudos

As far as i know i can create atleast 2 main windows in one page itself.

0 Kudos

nope.....there is only 1 main window in one page in script

0 Kudos

Hi,

U can have only one in one page.

Regards

Sandipan

Former Member
0 Kudos

Hi,

By some of our brother posted about windows that is enfough

There are 3 windows in SAP Script.

1.Main window

2.Constant window.

3.Variable window

if it is usefull

rewarwd me,

regards,

Satish.chekuri.

Former Member
0 Kudos

Dear Jayesh,

In SAP Script more than one main window is allowed within a single page also. Whenever we are going to print the Address labels we can use the same which is print multiple dynamic data in single window.

Thanks & Regards,

Mani

Former Member
0 Kudos

Each form must have one window of type MAIN. Such a window is called the main window of the form. 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, Don’t lose any data.

       Every page we have use max 99 MAIN window. (00-98).   It controls the page break.