Application Development and Automation 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: 
Read only

sapscipts without main window

Former Member
0 Likes
1,158

hi experts,

I want 2 pages to be displayed

On page1, main gets created by default,but i did not copy it in page windows,in place of that i created a PRI window in page windows of Page1.

Similarly i created a SEC window in page window section of page2.

also, page1 => next page is page2

page2 => next page is page2.

But, the problem is when i run the code in se38, it displays only single page.

Thanks in advance,

Bijal

10 REPLIES 10
Read only

Former Member
0 Likes
956

Hi,

Yes, it will print only the single page because the first page still avialable for the data, if the first is full with the data then only the control will be goes to second page and it will create the second page,

Regards

Sudheer

Read only

Former Member
0 Likes
956

Hi,

when you don't create a main window the second page will not automatically triggered .

you need to trigger it explicitely using NEW-PAGE in first page of your script.

Regards,

Sumit

Read only

0 Likes
956

One of the window type is main window, so if you define all windows as either constant or variable windows then where will be main window. Main window will be created automatically even if you want to change its type it will not allow, it will raise error.

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.

Read only

Former Member
0 Likes
956

Hi,

Try control command

/: NEW-PAGE

or

/: NEW-PAGE SEC

in you SAPscript

Read only

Former Member
0 Likes
956

Hi,

Try control command

/: NEW-PAGE

or

/: NEW-PAGE SEC

in you SAPscript

Read only

Former Member
0 Likes
956

hi,

but in that case will it not print the second page data on first page...since in my case i m not able to veiw any data of page 2.and so wat is the use of giving next page of page 1 asc page2

can u provide me solution as in wat approch i sud use since my first and second page data are independent......also first page data is just few lines,

hope it clears the need

Regards

Bijal

Read only

0 Likes
956

no ..

new-page just triggeres the next page.

secon page will show only second page data and first will first's.

Regards,

sumit

Read only

Former Member
0 Likes
956

Hi Bijal,

Call /: NEW-PAGE

after performing all operation on the First page.

Read only

Former Member
0 Likes
956

Hi,

Where should I write the 'NEW-PAGE' command?

Please give me the exact syntax to be written.

Thanks

Read only

0 Likes
956

Please find docu for new page.

ideally it shld come in the last window last line.

only

<b>/: new-page</b>

will do the job for you

Regards,

Sumit

Explicit Page Break: NEW-PAGE

SAPscript automatically inserts a page break when the main window of a page (MAIN) is full. You can use the NEW-PAGE command to force a page break in the text at any point you want one. The text following this command then appears on a new page. The page break is always performed (it is an unconditional page break).

The NEW-PAGE command completes the current page. This means that all the windows that are still on the page are printed immediately. If you use the NEW-PAGE command without parameters, the page defined in the current form as the next page will be taken next. If, however, your form contains a number of different pages, then you can specify any one of these as the next page to be used.

Syntax:

/: NEW-PAGE [page_name]

/: NEW-PAGE

The current page will be completed and the text in the following lines will be written to the page specified in the form.

/: NEW-PAGE S1

As above, except that the page S1 will be taken as the next page.

• If, in a NEW-PAGE command, you specify a page not contained in the form, the specification is ignored.

• Take care that there are no blank lines immediately before a NEW-PAGE command. If an implicit page break occurs within the blank lines, an unexpected blank page may be printed.