Skip to Content
avatar image
Former Member

sapscript

what does these commands do in sapscripts?

NEXT-PAGE

NEW-PAGE

PROTECT/ENDPROTECT

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 04, 2006 at 06:41 AM

    hi,

    NEW-PAGE: It is used to force a page break at any point of. SAPscript automatically inserts a page break when the main window of a main page is full.

    /: 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 <Page1>. Here the page1 will be taken as the next page.

    PROTECT…ENDPROTECT:

    To allow you to define the areas to be protected against a page break on an individual basis, SAPscript provides the PROTECT…. ENDPROTECT command pair. If you enclose the text to be protected in these commands, then SAPscript will ensure that each line of this text is printed together on the same page. If the complete text fits in the space remaining on the current page, then it is printed on this page just as it would be if no PROTECT command had been used. If, however, the remaining space is not sufficient for the text, then the PROTECT command has the same effect as a NEW-PAGE command and text is printed on a new page.

    And next page is a system command to display the next page number.

    If u find it useful mark the points

    Regards,

    GNK

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      /: 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. • 6.3 Preventing Page Breaks: PROTECT You can specify, either in the style or in the form, that a particular paragraph should not be split in two by a page break. If this page protect attribute is set, then the complete paragraph is always printed on one page. This property applies only to that particular paragraph. This attribute is not intended to be used to protect all paragraphs against a page break. The point is that a page break is by its very nature a dynamic event and the exact point at which it occurs depends on the current state (length and contents) of the preceding text. It is also possible that you may want to protect only certain parts of a paragraph against a page break. One way to achieve this is to use the NEW-PAGE command immediately before the text concerned starts. Explicitly beginning a new page at this point should ensure that a further page break does not occur within the text. However, this technique is not change-friendly. For example, you format your text with the help of the NEW-PAGE command so that no page breaks occur where they should not. At a later time, you insert or delete some lines. These changes cause all the subsequent text to be moved relative to the printed page, and you must check each NEW-PAGE command you previously inserted to see if it is still in the correct place. To allow you to define the areas to be protected against a page break on an individual basis, SAPscript provides the PROTECT.. ENDPROTECT command pair. If you enclose the text to be protected in these commands, then SAPscript will ensure that each line of this text is printed together on the same page. If the complete text fits in the space remaining on the current page, then it is printed on this page just as it would be if no PROTECT command had been used. If, however, the remaining space is not sufficient for the text, then the PROTECT command has the same effect as a NEW-PAGE command and text is printed on a new page. Thus the PROTECT/ENDPROTECT commands may be regarded as a kind of conditional NEW-PAGE command, the condition being whether or not the lines enclosed between the two commands fit in the space remaining in the current main window. Syntax: /: PROTECT