Skip to Content
avatar image
Former Member

Triggering a new page based on a condition in SAP Scripts

Hi all,

I have a requirement such that ....a window should be only in the last page of the script. So i have created 2 pages....with main window in all 2 pages. And the 2nd page contains both main window & required window.

And i have witten the condition....

if &page& eq &sapscript-formpages&

new-page = page2.

endif.

It's not working...

plz suggest me...

Regards,

Chandru

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Apr 25, 2006 at 08:50 AM

    Hi chandra,

    1. in layout use a new element

    /E npage

    /: new-page

    2. in your driver program,

    use condition and use

    WRITE_FORM

    to print this element of new page.

    regards,

    amit m.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 25, 2006 at 08:52 AM

    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

    /: 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.

    regards

    vinod

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 25, 2006 at 09:01 AM

    hi

    good

    as per your reqirement i hope you have to redisign your screen again ,check with your required window.If you can clarify your requirement in more details than i hope i can give you some more input to you.

    thanks

    mrutyun

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 25, 2006 at 01:44 PM

    Hi Chandra,

    Your code is correct except the syntax for new page.

    <Syn> new-page page

    for your code it wuld be

    if &page& eq &sapscript-formpages&

    new-page page2.

    endif.

    Add comment
    10|10000 characters needed characters exceeded