cancel
Showing results for 
Search instead for 
Did you mean: 

Difference Between Windows and PageWindows in SAP SCRIPT ???

Former Member
0 Kudos

Hi..

Let me know the Difference between Windows and Page Windows in SAP SCRIPT????

Tnnks in Advance..

Accepted Solutions (0)

Answers (6)

Answers (6)

mohit_johri1
Explorer
0 Kudos

Hi,

Windows : Lists all the windows created in that layout set.

Page Windows : Lists windows created in a particular page.

e.g, There are 3 pages in a Sapscript page1,page2 and page3 and following are the windows created.

Page1 : Main, window1 , window2, window3.

Page2 : window4 , window5

Page3 : window6 ,

Then Windows will have following entries :

Main,

window1 ,

window2,

window3

window4 ,

window5

window6 ,

And page windows will have entries corresponding to the page selected.

For page1:

Main,

window1 ,

window2,

window3

For Page2:

window4 ,

window5

For Page3:

window6

Former Member
0 Kudos

Hi,

I have made a copy of a script which is assigned to fbzp for check printing.

But my copied window is not printing 5 constant windows..

I have compared both the scripts and they are identical.

when I click on windows am able see those windows,

But when i click on page windows I am not able to see those windows,

not even in form layout.

Can anyone help..Urgent issue.

Thanks.

jie
Advisor
Advisor
0 Kudos

Hello Debrath,

can you attach the screen shot of the windows and page windows?

Regards

Jie Bai

Former Member
0 Kudos

Hi Jie,

I have marked the windows which are not appearing.

There are 3 pages first,last and next.

In neither of the pages this windows are appearing in form layout ,wheras when I take the output print this windows appears with the hard coded values written in the text element of this windows.

Thanks.

prasanth_kasturi
Active Contributor
0 Kudos

hi,

windows are places where we write the required text.

page windows are nothing but postions of the positions of the windows on the page

hope u understand

former_member187457
Active Contributor
0 Kudos

for building a wall you need bricks....without bricks you cant build a wall...

so like that windows are brick and page windows are the wall....

first you have to create bricks(windows) then only you can create a wall( page window).....

Former Member
0 Kudos

Hi,

Windows:

WINDOW TYPES

When defining a layout set window, you must select a window type for the window. You can choose between three types:

• Constant windows (CONST)

• Variable windows (VAR)

• Main windows (MAIN)

CONSTANT WINDOW

A window of type CONST has the same contents and size on all layout set pages, on which a corresponding page window is defined. This allows the processing of the window contents to be optimized internally.

Page windows whose allocated window is of type CONST must have the same size throughout the layout set. If a window of type CONST is full, all remaining text the application program wants to output in this window, is lost. Constant windows do not trigger a page break. In other words: all text exceeding the window size is simply truncated.

VARIABLE WINDOW

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 layout set pages.

As far as the processing of the window contents is concerned, the system currently treats constant and variable windows alike. The only difference is that constant windows have the same size throughout the layout set.

MAIN WINDOW

Each layout set must have one window of type MAIN. Such a window is called the main window of the layout set. For SAPscript layout sets, 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).

PAGE WINDOWS:

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 layout set. 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.

HOW THE COMPOSER WORKS

The composer or layout set processor is the central formatting module for the print output. It prepares the texts for the different output devices by using the allocated styles or layout sets.

Processing a layout set happens in a certain order. You must know some facts concerning the different window types, the setting of subsequent pages, or the dynamic control from within the print program.

Page control in layout sets

Define subsequent page statically

Define subsequent page dynamically

Format a layout set page

PAGE CONTROL IN LAYOUT SETS

SAPscript automatically triggers a page break as soon as the main window of one page is full. To be able to execute the page break, the system must know on which subsequent page to continue outputting the text. You can specify the subsequent page either statically when defining the layout set, or you can set the subsequent page dynamically during layout set output.

If the subsequent page is not specified, SAPscript automatically terminates printing, thereby ignoring any other output statements of the application program.

DEFINE SUBSEQUENT PAGE STATICALLY

You define the subsequent page statically with the layout set maintenance transaction. First, specify the start page in the layout set header. The system automatically calls this page whenever the layout set is started. With this page, or, more correctly, with the page window of this page, the text output starts. For each page, specify the subsequent page in the page definition. After a page break, the system continues text output on the subsequent page defined for the last page. By specifying start page and subsequent pages, you can define a page sequence.

DEFINE SUBSEQUENT PAGE DYNAMICALLY

The page sequence set in the layout set definition can be changed by the application program dynamically at runtime. If you want the layout set to start with a page other than the one defined in the layout set header, specify the desired start page using the parameter STARTPAGE when you call the function module START_FORM. However, this new start page is valid only for the current call of the function module.

If you want to break to a subsequent page other than the one specified in the page definition, use the control statement NEW-PAGE to set the name of the new page.

NEW-PAGE .

NEW-PAGE ends the output on the current page. The new subsequent page is only valid for the current call of the control statement. You can either include the control statement explicitly into the text of a text element or pass it to the layout set output using the function module CONTROL_FORM.

FORMAT LAYOUT SET PAGE

The process of formatting the output is controlled by the text contents in the BODY area of the main window. If the main window is completely filled, or if the control statement NEW-PAGE appears in the main window, the system executes a page break. Only at this point in time the system formats the contents of the windows of the other types and replaces the variables with the current values.

For each other window, the system first outputs the default text element, if it exists. Then it processes and formats the list of the active text elements of this window, which you set using the function module WRITE_FORM with the parameter FUNCTION (SET, APPEND, DELETE). Any text that does not fit into the page window is truncated.

As a consequence to this processing order of the composer, the reservation of space for the TOP and BOTTOM areas must be made beforehand. If the BODY area of the main window already contains text, a new text output to the TOP area does not appear on the current page but on the subsequent page in the TOP area. The same applies for the BOTTOM area. If the BODY area is filled to such an extend that the new BOTTOM text no longer fits into the current main window, this text appears on the subsequent page in the BOTTOM area.

A frequent error in application programs is that for the subsequent page (for example, NEXT) of a layout set no main window is defined. If the formatted text of the previous page did not fit into the corresponding main window , the composer searches the subsequent pages for a main window to output the text remainder. However, if the subsequent page of NEXT is NEXT again, the composer encounters an endless loop.

To be able to create correct page breaks in longer text, you should define a main window on each layout set page.

LAYOUT SET CONTROL

To output SAPscript layout sets, in the print program you must always start the output with OPEN_FORM and end it with CLOSE_FORM. The function module OPEN_FORM initializes the SAPscript composer and opens the specified layout set for subsequent output. The system combines all output for this layout set up to the CLOSE_FORM to one print request. If CLOSE_FORM is missing, nothing will be printed.

To output data in a layout set, you must use the SAPscript function modules WRITE_FORM, WRITE_FORM_LINES, and CONTROL_FORM. You can use these function modules any number of times in any order between opening and closing a layout set.

You cannot use the ABAP/4 statement WRITE to write output to a SAPscript layout set.

Several print requests

Start a layout set again

Switch layout sets

Find layout sets

SEVERAL PRINT REQUESTS

Within one transaction, you can open and close several layout sets using OPEN_FORM and CLOSE_FORM, however not simultaneously. You can use parameters in the OPEN_FORM to control whether the output is stored in the same print request. But also the SAP spool decides, depending on several plausibility checks, whether new output is appended to an existing print request or whether to create a new print request anyway.

CALL FUNCTION ‘OPEN_FORM’

CALL FUNCTION ‘CLOSE_FORM’

CALL FUNCTION ‘OPEN_FORM’

CALL FUNCTION ‘CLOSE_FORM’

You cannot combine ABAP/4 list output and SAPscript output in one print request.

START A LAYOUT SET AGAIN

Usually a print program does not print only one urging letter or one account statement, but several layout sets for different customers. To have the output for each customer begin with the start page of the layout set, you must start the current layout set again and again.

To start a layout set again, you must first end the current layout set and then open the layout set again. Within one print request, first call the function module END_FORM. It executes the final processing for the current layout set. Then start the layout set again using START_FORM. Output then begins again on the start page of the desired layout set.

CALL FUNCTION ‘OPEN_FORM’

:

CALL FUNCTION ‘START_FORM’

:

CALL FUNCTION ‘END_FORM’

:

CALL FUNCTION ‘START_FORM’

:

CALL FUNCTION ‘END_FORM’

:

CALL FUNCTION CLOSE_FORM

If you use START_FORM and END_FORM, you must not specify a layout set for OPEN_FORM. However, in this case you can use the SAPscript output functions only after opening a layout set with START_FORM.

Reward Points if found helpfull..

Cheers,

Chandra Sekhar.

Former Member
0 Kudos

Window is an independent object, window need to assign to page, then it will become a page window, that means u r displaying this window using that page.

Madhavi

Former Member
0 Kudos

Hi,

Windows:

Various parts of the output document can be conveniently organised on the pages using windows. Thus the data stream coming from the ABAP program can be logically grouped into various parts and can be placed on different locations on a page

There are 2 main types of windows that can be used in a layout set:

MAIN - A layout set can have only one MAIN window which is created by default. This window can flow over multiple pages.

CONSTANT - A layout set can have any number of constant windows. A constant window can be used once per page

Page Windows:

All the windows that form a page of the layout set.

Choose the window and click the Text Elements button to go to the Layout Set Editor. This consists of 2 parts

The small space on the left is for specifying the type of command, while the window adjacent to it is for writing the command or the text that needs to go under a text element.

The Value table is the table attached to a field at the domain level, where the entry to the field can be only from the value table. They are not used in the Input Help.

when you define a domain, you already know that all fields that use the domain will need to be checked against a particular table. You can store this information in the domain definition by specifying a value table.

If you try to define a foreign key for a field that points to this domain, the value table of the domain is proposed as the check table for the foreign key.

Regards,

Omkaram.