Skip to Content

Sapscript Printing Issues

Hi All,

I want to display only two line items in main window in First Page,

the third line item must go to second page in sapscript.

I have used

/:PROTECT.

/:ENDPROTECT.

command also but its not helping.

Also i cant increase the size of main window???

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2014 at 07:23 AM

    Hi Nishant,

    'Protect...Endprotect' is used to prevent page breaks among the flowing content.It means ths content has to be protected against the page breaks occurring.

    1) Create a new element with New-Page Command and call it based on count (as sugg by Prakash) inside the item loop of driver program.

    or

    2) On basis of count do a FM call as sugg by Mahadeo , again in the loop at item table.

    BR.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2014 at 02:12 AM

    Have you called the window inside Loop in your driver program. Just pass a variable count from your program to SCRIPT and put below condition in your script in command prompt:

    IF COUNT > 2 .

    NEW-PAGE.

    ENDIF.

    Cheers,

    Prakash

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2014 at 03:12 AM

    Use command new-page after second line

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2014 at 04:18 AM

    hiii,

    In driver program after second line or where u want to break the page use FM,

    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    COMMAND = 'NEW-PAGE'
    EXCEPTIONS
    UNOPENED = 1
    UNSTARTED = 2
    OTHERS = 3.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.