Skip to Content
author's profile photo Former Member
Former Member

Script window problem...

HI all...

I have a requirement in script ...

I have a footer which covers 30% of the form...

I have to print the footer only on the last page.

The main window can accomdate only 23 rows ...

if the entries in the main window are less than 22 rows..i need to print the footer in the first page only

if the entries are more than 22 entries i need to accomdate the place for main window in the first page and so on.

Example: I have the Page which has the main address and footer ..the footer covers 30% of page.

if i have the 150 line items in the main window the last page may go upto 7 to 8 pages

in that case i only need the footer which has covered 30% of the form in the last page only.

and i will be able to accomdate the maximum place for the line items in the main window

<removed_by_moderator>

Thanks

Edited by: Julius Bussche on Oct 7, 2008 3:57 AM

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 06, 2008 at 06:11 PM

    Hi,

    These kind of scenario are normally dealt with the help of SAPSCRIPT system Variables/Control Commands.

    Looks you are using a secondary window to print the footer, you can compare the value in SAPscript symbol PAGE with SAPSCRIPT-FORMPAGES. When they are equal, have the text print; otherwise, have nothing print.

    /: IF &PAGE& = &SAPSCRIPT-FORMPAGES&

    • [your END OF PAGE text here]

    /: ENDIF

    Another option is to simply check if &NEXTPAGE& ='0'. This should achieve the same results.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi ..Thanks for reply

      The solution you are provided for the Footer.

      This is what i did:

      I designed the Main window (Max available space) with additional windows Logo and footer.

      I put Table to show the line items material quantity etc...

      I coded BOTTOM, ENDBOTTOM of the main window and placed my text there.

      My question here is ..i want to show Only line items in Main window if the pages are more than 1.

      when the all line items are displayed in Main window then i will place my Text at the end of line items.

      In the footer i will show page numbers if the pages are more than 1 ..if only one page printed then i will show Address in the footer...

      If i put BOTTOM, ENDBOTTOM in main window ..The text will be shown in each page of main window??? or only in the last page's main window??

      Please let me know

  • author's profile photo Former Member
    Former Member
    Posted on Oct 06, 2008 at 07:11 PM

    If you can modify the print program you can move your footer into a text element in window MAIN that is called only once at the end of the print.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Madhu..

      Nothing to be coded extra line items will automatically go to second page but U need to do only is...

      In standard attributes of First page :

      Page : First

      Next Page : Last

      In standard attributes of Second page :

      Page : Last

      Next Page : Last

      That's it need to do...

      Regards,

      sg.

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.