cancel
Showing results for 
Search instead for 
Did you mean: 

How to create two main windows in one page

Former Member
0 Kudos

Hi all,

Can anyone tell me how to create two main windows in a page. I want to print the same line items two times in a page.

your help will be rewarded

Regards

Yathish

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

You can create two main window provided they have the same UPPER, WIDTH and HEIGHT alginment are the same.

Priya

Former Member
0 Kudos

Hi,

You can create two main window provided they have the same UPPER, WIDTH and HEIGHT alginment to be the same.

Priya

Former Member
0 Kudos

Hi Yatish,

I have same issue . Please let me know how

you resolved it. Appreciate your feedback.

Former Member
0 Kudos

Yathish,

You can't create two main windows as far as i know.

create a main window and another left or right window ( VAR )as per requirement.

<b>reward points if useful.</b>

regards,

Vinod Samuel.

Former Member
0 Kudos

Hi

We generally won't create 2 main windows in a single page?

What for you need them?

We create a single MAIN window for single page

see the doc

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.

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.

reward if useful

Anji

Former Member
0 Kudos

Hi Anji

The requirement is I want to print the Main window line items two times in a single page. i.e. One is for client reference and other one is for Customer, But I too know two main windows is not posssible. But is there any other way other than modifying the standard print program

Regards

Yathish

Former Member
0 Kudos

If you are talking about SAPScript then you can have two MAIN copies of the MAIN window on a single page (i.e. MAIN 00, MAIN 01).

In smartforms you can only have one MAIN window.

naimesh_patel
Active Contributor
0 Kudos

This means that you need to generate the entire SAPScript 2 times, which will generate two copies - one for client & one for customer.

So, what you can do is:

CALL FM OPEN_FORM
DO 2 TIMES.
   CALL FM  START_FORM
   CALL FM WRITE_FORM  " << ALL YOUR DATA
   CALL FMEND_FORM
ENDDO.
 CALL FM CLOSE_FORM.

Regards,

Naimesh Patel