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: 

Difference between Constant and Variable window

Former Member
0 Kudos
539

Hi all,

What is the difference between Constant window and Variable window.I am not observing difference between them.I created two pages(page1 and page2) with 3 WINDOWS(Main,const11 and var11) and I inserted 8 lines of text on each window.But all the 3 windows are capable of holding 4 lines of text only.I included all those above 3 windows in both pages(Page1 and Page2).In page attributes for Page1,I included 'Page2' for next page and for page2 I included 'page2' for next page.

when I executed the form.I am getting constant texts in windows Const11 and Var11 for all output pages.I got 4 pages as output.

But what I learnt is constant windows contains constant text in all form pages and Variable windows contains variable contents in all form pages, in which they appear.But to my surprise variable window also contains constant text like constant window.That means the texts on both constant and varilable are same on all ouput pages( 4 pages of output).

Rgds,

Balaji

6 REPLIES 6

Former Member
0 Kudos
149

Hi

- Constant Window is constant (same text and same size) in all pages where it's used. So it has to be called once;

- Variable Window can be different (so different text and/or size) in all pages where it's used.

So It has to be call every time it needs.

For example the windows PAGE where the number of page is displayed should be VARIABLE because the page number change in every page.

Max

Former Member
0 Kudos
149

hi,

Contents in Variable window are regenerated for each and every page hwere as contents in Constant window are generated only once and same is displayed for every page.

SAPscript does not distinguish between the two window types, although both types are mentioned in the SAPscript documentation.

This means that, for better performance, windows that contain different information on different pages must be VAR; all others are CONST. The content of the window is defined in the SAPscript editor.

Regards,

Sailaja.

Former Member
0 Kudos
149

Hi Balaji,

There is no big difference between the two as such... i guess the only difference is in a constant window the data is made to sit in the window only one time at run time where as in a varaible window, this happens as many times as it is called.

Regards,

Vidya.

Former Member
0 Kudos
149

hi balaji,

a constant window is a window in which the data is constant.for eg.header data.

it can be used once per page.

in a variable window the data may vary.

main window is a variablw window.

regards,

sudha.

Former Member
0 Kudos
149

Hi all,

I still didnt observe any difference between constant and variable windows.I included &SAPSCRIPT-FORMPAGES& in both Constant and Variable windows.On both the windows I am getting different variables like 1 of 2 and 2 and 2.

I am able to see that type of results on both Constant and Variable windows.

Then where lies the difference between those.

Rgs,

Balaji

0 Kudos
149

Hi Balaji,

1)The window can be of type VAR or CONST except for the MAIN.

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

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

<b>4)But in the present version, SAP system does not distinguish between these two types.</b>

Thanks,

Vinay