Print on the last page of a Sapscript form

Hi,
Is it possible (and how) to print something (a filed of an internal table) only to the last page of a sapscript form?
Thanks

Hi
if you want to print something at the end of a page....
You can write it as this...
in the main window...
in the data element write it...
/E END_DATA
/: IF &PAGE&  EQ  &SAPSCRIPT-FORMPAGES&.
&W_VALUE&.
/: ENDIF.
SAPSCRIPT-FORMPAGES variable is a system variable which stores the total pages.
PAGE variable stores the current variable accordingly it will check for last page and print it.
Now call it in the driver program .
Regards.

Similar Messages

  • How to print in the last page of the script..?

    Hi,
    I am working on a script. I have a header window and one main window. In the main window, I am printing the line items of the Invoice. Once the line items finish, I have to print the sub totals there. and also to print the company agreement details(around 10 lines of text) in the last page of the script.
    So, <b>how to print the agreement details in the last page of the script..?</b>
    Can anyone provide me a sample code to find the last page of the Script layout..?
    And regarding writing the agreement details, is it better to hard code the text or use the standard texts..? which one is better..?
    Regards,
    Paddu.

    HI,
      Just create a Standard text, if you are going to use this standard text in other layouts also... and use it otherwise you can hard code it as this its of only 10 lines.
    declare one more element in the  main window itselft and call it atlast it would print in the last page..
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'FOOTER'<b><- This element should contain the agreement details</b>
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    ELEMENT = 1.
    Thanks
    Mahesh

  • Fixing table position on the template and printing on the last page

    Hi,
    I have a requirement where i need to print a table at a fixed position and at the last page.
    if there is a single page, then the said table should print at the bottom of the page ... if there are multiple line records, the records should print on the first page and second page till it completes ... and the table at the bottom ..
    even if there is a single line record, the table should be at a fixed position.
    how can this functionality be acheived ...

    clarify one question pls....
    For eg if there is only one record then the table should be in the bottom of the first page or in the fixed position in the second page.... b'cos as you told about multiple lines of records then it obviously comes in the bottom of the end page and will not be inthe fixed position...... right!!!
    Thanks
    PBV

  • Secondary window to be printed on the last page the form

    Hello,
    Is there any way, by which we can show the defined secondary window on the last page of the form in smartform?
    Only 1 page is defined in the smartform for the layout.
    e.g. If no. of line items exceeds more than the size defined for it in the main window, then a new page is taken to print rest of the line items. then total (defined in the secondary window) of the line items must be displayed on the the last page of the form only in this case the last page is 2nd.
    Thanks and Regards,
    Paresh

    >
    paresh rane wrote:
    > e.g. If no. of line items exceeds more than the size defined for it in the main window, then a new page is taken to print rest of the line items. 
    > Paresh
    put a counter on which you are getting the line items.
    for the last page, the counter should be equal to the number of line items in the table .. right?
    so.. keep the number of records in another variable, lets say in the global initialization part.
    and for the secondary window condition tab
    keep
    counter = gv_number_of_lines
    only when this condition satisfies, the window will be triggered. and this condition will only be satisfied if all the items are covered => last page.

  • Can I print the last page of a PDF document using command line?

    Hi
    I am in a situation in which I constantly have to deal with multiple PDF documents and I need to print the last page in each of these, and ONLY the last page. The total number of pages will vary for each file, so the page number for the last page will also vary.
    I would really prefer to not do this manually, by opening up each file in the visible Adobe Reader window and then print.
    Question:
    Is there a way with Adobe Reader (maybe with the help of some other Adobe product) to print only the last page of a PDF document using some kind of command line without opening up the PDF file in the visible Adobe Reader window?
    I'm using Windows.
    Thanks in advance,
    Regards,
    Emil

    Thank you for taking the time to reply.
    I tried both ways and neither works.  It gives me a prompt box that I have to click "next" for every page but after going thru all pages, nothing is sent to the printer.
    Also, all directions I've read indicate it will print to the default printer.  If my default printer is on a network, will that cause problems....
    and...
    should I be getting a prompt box on every page?  I thought all this would happen behind the scenes and not force me to interact with every page.
    dc

  • I select "reverse" and printer still prints from page 1; how do I print the last page first, etc

    I select "reverse" so the printer will start printing on the last page and end on the first and it still prints from page 1 leaving me to cplace all the pages in order manually.  How do I do this.  My last HP had no problems;  I have a 6100
    This question was solved.
    View Solution.

    Please try this:
    Enter Control Panel > Devices and Printers.
    Right click the printer icon, click Printing Preferences.
    Select the Advanced tab.
    Set the Pages Order as Front to Back.
    Additioanlly, verify the same setting apply for the used program as customized preferences may kept for a specific program:
    Open the File you would like to print, the click File > Print.
    Click Preferences and verify the page order set as Front to Back.
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Print total in last page,

    Hello Everyone
    In PLD i have a requirement whereby if the layout goes into more than a page says 2 pages,then the total should display "Continued in next page" in the 1st page and in the last page(in our case 2nd page) total should print the document total in the same area. How can this be done? How to achieve this if...then...else statement in PLD
    if CurrentPage()!=TotalPages()
    then "Continued in Next page"
    else Doctotal
    Thanks and Regards
    Raghu
    Edited by: Raghu Ram on Apr 7, 2009 12:38 PM

    Dear Raghu,
    If you would like to print certain fields on the last page only,
    'TotalPages()' cannot be used in formula, therefore, please follow the
    Workaround below.
    As a Workaround create the following field:
       Field_Formula
       General Tab
       Untick visible
       Left = 0 / Width = 0 / Top = 0 / Height = 0
       Content Tab
       Source Type: Formula
       SystemString(ContinueNextPageNotice) ==''
    And enter the ID of this field as the "Link to" for the Fields you
    like to print on the last page only.
    For more information please refer to the NOTE 1058584.
    Hope this helps.
    Regards,
    Gagan Thareja
    SAP Business One Forums Team

  • How to display grand total only on the last page of my report

    Hello
    I need to display the grand total amount of the invoice only on the last page of every report. If the report has 1 page then the grand total will be displayed on the 1st page. If the report has 2 pages then a subtotal will be displayed on the 1st page adding up all the amounts on page 1 only, and the grand total will be displayed on the 2nd page, adding up all the amounts of page 1 and 2. If the report has 3 pages then the a subtotal will be displayed on page 1 adding up all the amounts of page 1, and another subtotal on page 2 adding up all the amounts of page 2, and the grand total are displayed on page 3 adding up the amounts of every page.
    supplier amount
    xx 100
    yy 100
    subtotal 200
    page 1 of 2 --here i need to display only the total amounts of page 1
    supplier amount
    subtotal brought forward 200 --then i need to bring total of page 1 over to page 2
    qq 300
    zz 300
    total 800 --here i have reached the end of the report and  
    need to display the grand total
    page 2 of 2
    --Currently i am displaying this on my report
    supplier amount
    xx 100
    yy 100
    total 800 --this one gives the problem cause it displays the grand total
    ---------- on page 1 of 2 even before you can see the amounts on the
    next pages
    page 1 of 2
    supplier amount
    qq 300
    zz 300
    total 800

    put the grand total in a frame and set it to print on the last page of the enclosing object.

  • How do I place my counts at the bottom of the report on the last page

    I produce a count using a summary column. I want that along with the text label to print on the last page at the bottom. How do I do this.
    Howard

    set a summery column at the data model level and change its property :
    Function = count
    source= empno
    reset at =report
    after that in the layout model u have set a text item at the botom or report in the main frame and u have to set one frame item and then in it set a text ietm.
    Thanks
    Md.Muniruzzaman Khan
    email : [email protected]

  • How to print just the 1st page of multiple emails?

    Hi dear fellows,
    my company sends out newsletters to 1400 subscribed users every now and then. And of course there're always some error messages coming back. In the batch of last month it were 341, each 3 pages long with an error log and the newsletter. Now, for documentation purposes and to deal with the various issues, I would like to print the error messages 2x2 per page, without the attached newsletter of the original message. With Entourage it was a matter of minutes, now I'm trying for hours and I'm out of ideas.
    Basically I'm looking for the the command: "print the 1st page of each of this 341 mails with a 2x2 layout"
    I appreciate your help, thanks a lot and have a nice weekend,
    greetings from Germany, Berlin,
    Jan

    HI,
      Just create a Standard text, if you are going to use this standard text in other layouts also... and use it otherwise you can hard code it as this its of only 10 lines.
    declare one more element in the  main window itselft and call it atlast it would print in the last page..
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'FOOTER'<b><- This element should contain the agreement details</b>
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    ELEMENT = 1.
    Thanks
    Mahesh

  • Sapscript bottom text in Main, just for the last page, but printing only in the last page

    I need to print a text but only for the last page in the main window.
    I have tried with IF.
    IF &PAGE& = &SAPSCRIPT-FORMPAGES&
    BOTTOM
    ....TEXT
    ENDBOTTOM
    ENDIF
    But it prints in all pages in every main window.
    Can someone point me what I am doing wrong or how can I do this?
    Regards,
    Carlos

    Hello Carlos,
    the problem with this condition is the following.
    The Sapscript composer cannot know during the processing of e.g. the first page,
    how many pages will follow. So &SAPSCRIPT-FORMPAGES& still contains the same
    value like& PAGE& and is filled with the correct values only at the very end of the processing.
    (when the total number of pages is known).
    So I suggest you to use the BOTTOM command in the print program,
    when the processing of all item of the MAIN window is ended.
    There is an other variable &NEXTPAGE&.  &NEXTPAGE& will always be 0
    when it reaches to last page to print. The problem with this variable that
    it can not be used in a condition in MAIN window too, only in a separate page window.
    Regards,
    Hedvig

  • Avoid printing Header and Footer in the last page

    Hi,
    Could anyone please let me know how to avoid print the header and footer in the last page?
    Note: I'm printing RTF template for publishing the output.
    Looking forward for your valuable inputs/suggestions.
    Thanks in advance,
    Regards,
    Muru

    Hai,
    My report got FROM PO & TO PO parameters and i need to print footer only in first page of each PO. Tried with section but now i am getting first page of all PO contionious and then all lines together.
    Please call me or sent replies to [email protected]

  • How can I print a label on the last page of the report in the margin

    I would like to display a label on my report but has to appear only on the last page of the report in the margin area or as a footer. I have tried using the solution below that I came across in this forum. This solution only worked if I put the label as a report trailer and not in the margin of the main section of report. The problem of putting the label as a report trailer is that it will only appear at the end of the report on it's own page, i.e. on a new page. I would like the label to appear at the end of the report, on the last page which has the other report details and not to appear on a new page on its own. Could you please help? Thanks.
    1. Create a dummy query, like
    select 1 dummy
    from dual
    2. Create a package spec:
    PACKAGE pkg_globals IS
    totalPages number(3);
    END;
    2. Create a repeating frame and field for this dummy at the end of the report layout.
    3. Create a format trigger for this frame:
    function R_1FormatTrigger return boolean is
    begin
    SRW.GET_PAGE_NUM(pkg_globals.totalPages);
    return (FALSE);
    end;
    4. Create a format trigger for your margin field:
    function F_1FormatTrigger return boolean is
    pagenum number;
    begin
    srw.get_page_num(pagenum);
    if pagenum = pkg_globals.totalPages then
    return (TRUE);
    else
    return (false);
    end if;
    end;

    user8655468 wrote:
    I would like to display a label on my report but has to appear only on the last page of the report in the margin areaCreate a fixed frame at the bottom of margin area and inside the frame put your label.
    set the frame print object on: Last page
    Hope this works..

  • How to Print T&C on backside of the last page in smartform.

    Hi All,
             I have requirement from one of the my client to print the terms & condition page on the back side of last page in invoice form.
    I have created three pages as below.
    First page: To Print header data,Print mode:blank,Next page : NEXT.
    Second page : Contains the continuation of the data,if there are enough lines,Print Mode: D,Next page : NEXT.
    Last page:To Print T&C,Print mode : blank,Next page :blank.
                This is working properly when form has 2 pages.Here my question is,
    How to print the T&C on backside of first page,if form has only one page.
    Thanks in Advance.

    Hi Vineesh,
    I have 3 pages in my form.
    First page: To Print header data, Print mode:blank, Next page : NEXT.
                         First page has the comment node, go to next page as Third page.
    Second page : Contains the continuation of the data, if there are enough lines, Print Mode: D,
                          Next page : NEXT.
    Third Page: T&C page, Print mode : blank,Next page :blank
    The 3rd page should print back side of the page.
    If form has only one page,then first page should be in D mode.Hence the T&C page will print back side of first page.
    If form has multiple pages. then the last page ( where the main window gets end ) should be D.Hence
    the T&C page will print back side of last page.
    How to achieve this both the scenarios?
    Thanks & Regards,
    Priya Chandran

  • Layout Question - How to print a frame on the bottom of the last page ?

    I have a summary frame for my report. I want to print the summary information at the bottom of the last page of the report. Currently depending on the data, the summary frame prints anywhere on the last page. How do I make sure it prints exactly at the bottom of the last page (just the last page).
    Thanks in advance.

    You might like to take a look at the following threads:
    Last frame with last record of proceding repeating frame
    Re: How to capture a keystroke - including control chars?

Maybe you are looking for

  • Transaction Code SCC1

    Transaction Code SCC1 --      Can this be used to <b>pull</b> a change request / transport from a <b>target</b>                            client or      should SCC1 be used only to push a change request / transport from a                          <b

  • Passing new values as extension to FM in registration page in b2c ISA..

    Hi experts, I have b2c application with CRM50. I have added new fields in the user(consumer) registration page.I need to pass these values to the backend. The standard function module CRM_ISA_REGISTER_CONSUMER  which has an parameter EXTENSION_IN to

  • Mxml components not compiled into swc?

    Hi, I am using Flash Builder(Flex 4) and i am having issues compiling mxml components into swc. My scenario: I created Flex Library project, added some mxml components and actionsript classes. I created separate Flex project and added swc file to pro

  • How do I dump a screen saver?

    I have a screen saver that is NOT from Firefox, and I'd really like to get rid of it as it is annoying. Please tell me how I can dump it permanently. I have already uninstalled EVERYTHING associated with it, but it is still there interrupting my use

  • Adobe photoshop alternatives !

    any body know any FREE software, lighter than and alternative to adobe photoshop ?