Skip to Content

SAPScript - controlled empty Line

Hello,

I have a Problem in a Sapscript: in den MAIN, between all items, we need to print an empty line to separate the items. The problem is, if at the end of the MAIN, after an item they is not enough space for this empty line, this line is printed automatically at the begining of the next new page. I want to avoid this empty line at the end of page. Is this possible?

I have make test with "Protect" and "Endprotect", it's works but in this case, the new page is trigged and the complete last item of the page is printed at the next page. This is not a good solution because we lost to much place at the end of the MAIN.

Is any other solution possible? It is possible to controll this empty line?

Thanks for answer.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 03, 2007 at 02:50 AM

    Yes, it is possible to print empty line in the beginning of next page... before printing empty line always check like this..

    Ex: IF &PAGE& NE &NEXTPAGE&

    ***PRINT EMPTY LINE

    ENDIF.

    Try it has to work, if not let me know I will do slight changes to the logic and send it to you...

    Regarads,

    SaiRam

    Add comment
    10|10000 characters needed characters exceeded

    • Marc Burger Sai Ram Reddy Neelapu

      Hi SaiRam,

      I have already try this, i think it's the same solution as yours and it doesn't work:

      (For the test, the empty line is replaced by variable, that's shows the page numers)

      /: DEFINE &SAV_PAGE& := 1

      ...

      /: IF &SAV_PAGE& NE &NEXTPAGE&

      /: &SAV_PAGE& = &NEXTPAGE&

      /: ENDIF.

      /: IF &PAGE& EQ &SAV_PAGE&.

      page = &PAGE&, nextpage = &NEXTPAGE&, save = &SAV_PAGE&

      /: ENDIF.

      Here an example of the result:

      Item 10

      page = 1, nextpage = 2, save = 1

      Item 20

      page = 1, nextpage = 2, save = 1

      Item 30

      .

      .

      .

      page = 1, nextpage = 2, save = 2

      Item 70

      End-Of-Page

      -


      New-Page

      page = 2, nextpage = 3, save = 1

      Item 80

      Item 90

      Item 100

      ...

      We see that the system doesn't have enough place after "item 70" to print the Page-Line, so it trigged a new page. Normaly, he doesn't have to print the Page-Line at the bottom of the line, but it doesn't work. I don't know how avoid the print of this line at the bottom of a page. On a New-Page, i wan't start the Print with an item-line and not with a Page-Line.

      Have I do something wrong?

      Thanks for your answer.

      Marc