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: 

what is the varible window and constant window(script)

Former Member
0 Kudos

whan i am using variable window in the form1 i have 2 windows can i display different contents with using variable window.

when i am using constant , what will be happend in the form1

could u plz explain clearly with step by step in possible ways we can use this 2 (variable and constant)

5 REPLIES 5

Former Member
0 Kudos

Hello,


What are the different types of windows in SAP Scripts?
Windows are defined in the Layout sets which define the position and the text to displayed.

The different types of windows are:

MAIN - Main Window
The main window is a continous window which can extend over several pages. If the text in the main window fills up a page, a new page is created.
Only one main window can be defined in the SAP Script whereas upto 100 instances of main window can be created in a page. 
VAR - Variable Window
This window can have the variable contents displayed on them. The contents of the window cannot exceed the window size. The content can be formatted for each page. 
CONST - Constant Window
The constant window can have a fixed content and is formatted only once. 

If useful reward.

Vasanth

amit_khare
Active Contributor
0 Kudos

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.

Variable Windows (VAR)

The contents of variable windows is processed again for each page, on which the window appears. The system outputs only as much text as fits into the window. Text exceeding the window size is truncated; the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.

Constant Windows (CONST)

Starting with Release 4.0, the system internally processes windows of type CONST similar to windows of type VAR. Therefore, if you create a new window, always use type VAR.

Regards,

Amit

former_member533584
Contributor
0 Kudos

hai,

using variable window we can grt diff contents by mentionig condition if &page& eq 2 ..

.

there is no much diff between variable and constant window the main difference is constant window formatted only once(first page) where as variable window is formated in every page

regards,

ananth.

0 Kudos

i think whan i am using var window

here i am going to use different content

which is like in the bening i am using like this(THIS IS MY DOUBT )

next page i am using some other contents like ( CAN U PLZ CLEAR MY DOUBT)

can i use different content in each pages.

when we are going to const window

if i declare const what will be happend in begining and next page the content will be the same of all the pages or not

Former Member
0 Kudos

Hi Rajash,

1) The content of variable window is regenerated on every page.

2) The content of a constant window is generated once at the beginning and later printed on every page.

A window mainly contains the SAP scripts text and the variable to be printed. There is one special window, MAIN, which contains the output of the line item of a document and is created by the system. The window can be of type VAR or CONST except for the MAIN. But in the present version, SAP system does not distinguish between these two types. The content of variable window is regenerated on every page. The content of a constant window is generated once at the beginning and later printed on every page.

Thanks,

Vinay