cancel
Showing results for 
Search instead for 
Did you mean: 

How we can create more than one 'MAIN' window in script.

Former Member
0 Kudos

I came to know that we can create 99 main windows in script.

When I tried to create another window of window type as ‘MAIN’. I am getting an error. Can any body tell how to create 99 main windows in scripts?

How we can create a script with out a main window ?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

You are correct that we can create up to 99 instances of the MAIN window.

When creating a Main window in Page Windows notice the number after the 'Window Type'. Here you will need to give the number of your instance.

What error are you getting?

I think I know what your problem is.

You are trying to create multiple MAIN's under the 'Window' option. This is not allowed.

As stated previously, you can have multiple instances of the MAIN window under the 'Page Windows' option.

Message was edited by:

Matt Nagel

Former Member
0 Kudos

Thanks Nagel,

Yes, I got in it. Can you please guide me

What is the use the instances of the main window and how to work with these main window instances?

B’coz I have given the number 2, after that I moved to Graphical form painter to see the 2 nd instance, but I didn’t see any difference expect number change and I also moved to WINDOWS option to create an element with 2 nd MAIN window instance. But ……….

Can you please explain me how to work with these instances of main window?

Former Member
0 Kudos

I have used multiple Main windows to print labels.

The label paper has two labels per page, so I have two Main windows in my Sapscript.

The Main windows are the same (you can have only one Main window, but can have multiple instances of it on a page). They have the same text elements etc. But there are two instances on the page.

In the print program you switch between the Main windows like this:

  call function 'CONTROL_FORM'
       EXPORTING
            command   = 'NEW-WINDOW'
       EXCEPTIONS
            unopened  = 01
            unstarted = 02.

I'm not sure exactly what you are asking for, but hopefully this helps.

Former Member
0 Kudos

Hi,

Only one main window can be defined in the SAP Script whereas upto 100 instances of main window can be created in a page.

Regards

Sudheer

Former Member
0 Kudos

No u can not create a SCRIPT without a main window but thisis possible with SMARTFORMS.

Difference with SMARTFORMS vs. SapScript(SE71)

The Following are the differences :-

a) Multiple page formats are possible in smartforms which is not the case in SAPScripts

b) It is possible to have a smartform without a main window .

c) Labels cannot be created in smartforms.

d) Routines can be written in smartforms tool.

e) Smartforms generates a function module when activated.

Former Member
0 Kudos

Hi!

Nope, in a SAPScript there's one and only one MAIN window! And this window is obligatory!

This is because this window controls the data flow, this window handles the automatic new pages and so on...

But you can create VAR type windows as many as you want.

Of course you can make some tricks, for example you are printing only a SPACE in your MAIN window, reuduce its size to 1 mm * 1 mm and you handle the new pages manually...

Regards

Tamá