Create last page in script

Hello guys!!!
i have a script with 2 pages.
i want a page to be printed with some text on it at the end of the script printing.
that means... if i've 3 pages of script , then i want a 4th page with some text on it.
i've tried &PAGE& EQ &SAPSCRIPT-FORMPAGES&
AND &NEXTPAGE& EQ 0
BUT, they did not work.
is there ny otherway we can achieve dis? or i did nything wrong??
i was writing the code at the end in the main window. shud i wrtite it somewer else??
how does this page printing works in the script.. some1 help
<removed_by_moderator>  <= please read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] here.
thnx
ziden
Edited by: Julius Bussche on Aug 7, 2008 12:02 PM

did you try out what I suggested? Does it work? If yes, why more concerns?
MAIN window is triggered only once. You see it triggered more times, because when the page is full, all other windows are triggered and after that MAIN window is continued from the point, where it reached the page end (just check the page number in debugging screen)

Similar Messages

  • How to get the last page  SAP Script form

    How to get the last page  SAP Script form.
    I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.
    Regards

    Hi
    You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.
    From SAP Help:
    This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .
    Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.
    /: IF &NEXTPAGE& = '0'
       Last page
    /: ENDIF
    Max

  • Footer note on last page of script

    Hi All,
    I want to display a footer note on the last page of script. For that I am writing following code in my script.
    :/BOTTOM
    :/IF &NEXTPAGE& EQ 0
    END OF SCRIPT
    :/ELSE
    CONTINUE ON NEXT PAGE
    :/ENDIF
    :/ENDBOTTOM
    Also I am using top of page using top & endtop.
    It is working fine.
    Regards,
    Dilip
    Message was edited by: Diliip Gupchup

    Hi,
    Check this one
    Re: Printing Footer in the output.
    Re: Smart Form Footer help
    Thanks & Regards,
    Judith.

  • Need to place the window only in last page in script

    Hi,
      I want to place the footer window only in the last page.If it has 2 pages the footer window shhould come in second page only if there is only 1 page then it should come in the first page.
    can anyone tell me how to do this in Script.

    HI Camila,
    In such a case, donot use the footer of the Table , but create another window-FOOTER which is positioned after your table, with such a design, your footer would alwyas come only at the end of the Table.
    This is a simpler approach.
    The other approach could be to set Conditions in the condition tab of the footer , such as it comes only on the last page.
    If you take my suggestion, i would say use the 1st option i have explained.
    This will help you.

  • Terms and Conditions to display in the last page of Script

    Hi Experts,
    My requirement is to print the Terms and Conditions in the Last Page of a PO. so for that, I have created one LAST page. Previously i have FIRST Page and Next Page in the Script. In the LAST Page it has to windows. One is for Logo and another one is for Terms and Conditions. I am trying to print to Terms and Conditions through a Standard Text ( Created in SO10) in the Terms and Conditions window.
    The page flow are like FIRST-->NEXT, NEXT>LAST, LAST---->LAST
    Please guide me how shall i proceed to get the output. It would be better if we get the output with out doing any change to the driver program.
    Thanks,
    Priyabrata

    Dear Priyabrata
    The page flow should  like FIRST-->NEXT, NEXT>NEXT, LAST---->
    And call your page in main window at last element.
    This will surely solve your problem.
    Regards,
    Vijay

  • Not to print last page in Script

    Hi Experts,
    I am having a Z-script for tcode F110.
    There i don't want to print 'last' Page in the form.
    The program which i s calling driver program is a standard sap include RFFORI06 calling
    'Last ' page with window 'Summary'.
    As its a standard include i can't make any changes in driver program.
    Please help.
    Thanks in advance for your support.

    The 'last' page and its window is getting called from a standard sap include as mentioned above.
    Even if i will delete 'last' page but as start_form is calling 'last' page it will generate a blank page irrespective
    of the page 'last' is deleted.
    I have even tried to do so by generating a test program and calling the script.
    Kindly advice.

  • How to find out last page in scripts

    hi all,
    i have a problem in SAP scripts.
    if pages increment is dynamic then how to write data in the last page of footer window .
    Thanks & Regards,
    Hari Krishna.K

    Hi...
    Write this code.
    /: IF &NEXTPAGE& EQ 0.
    Last page
    /:ENDIF.
    Regards,
    Suresh......

  • How to get the address in last page in script?

    I have the requirement ....in 4 page script i want to print header logo in first page and in last 4 th page i want to print address....how is it possssible?

    use the command address ......end address.......
    The ADDRESS - ENDADDRESS control command formats an address according to the postal convention of the recipient country defined in the COUNTRY parameter. The reference fields are described in the structures ADRS1, ADRS2, or ADRS3, depending on the type of address. Either direct values or symbols may be assigned to the parameters
    The parameter values contain both formatting and address information. The address data are formatted for output according to the data in the following parameters:
    TYPE
    FROMCOUNTRY
    COUNTRY
    LANGUAGE
    PRIORITY
    DELIVERY
    LINES
    Parameters
    DELIVERY
    Means that the address should be formatted as a complete delivery address, using the street name and number rather than the P.O. Box.
    TYPE
    Specifies the type of address. The following types are possible:
    Normal address (ADRS1). This is the address of a company or organization. It corresponds to the address structure that is expected in most SAP applications.
    Private or personal address (ADRS2). This is the address of a natural person, a private or home address.
    Company addressDienstadresse (ADRS3) with contact person. This is the address of a colleague or contact within a company or organization. The company name should be specified in the TITLE and NAME fields; the ATTN: contact person should be named in PERSON and TITLE.
    Should you enter another address type or leave the field blank, then type 1 is used for formatting.
    PARAGRAPH
    Specifies the paragraph format to be used for outputting the address. If this parameter is not given, the address will be output using the default paragraph format.
    PRIORITY
    Specifies which of the address lines may be omitted should this be necessary. Any combination of the following codes may be specified. The order in which you list the codes determines the order in which address lines are left out.
    The codes are as follows:
    A Title
    P Mandatory empty line
    4 Name4
    3 Name3
    R Region
    T Neighborhood, administrative section of a city (CITY2)l
    D Department
    L Country name
    C Post code or zip code
    2 Name2
    B P.O. Box (Japan only)
    S Street name and number or P.O. Box, depending upon DELIVERY parameter
    N Name and form of address of natural person (PERSON and TITLE)
    I Location information in LOCATION
    O City
    LINES
    Specifies how many lines may be used for formatting the address. If there are too few lines available to allow all the address data to be formatted, then the data specified in the PRIORITY parameter are omitted. If there is no LINES parameter and if this command is in a form window of a type other than MAIN, then the number of lines available for formatting the address are automatically calculated based on the current output position and the size of the window.
    TITLE
    Title or form of address. Used only with addresses of types 1 and 3.
    NAME
    Up to four names may be given, separated by commas. Used only with addresses of types 1 and 3.
    PERSON
    Name of the addressee. Used only for addresses of type 2 (private or personal address) or type 3 (company contact address). In type 3 addresses, use PERSON for the name of your contact person: ‘Attn: Mr. Jeffries’. The name fields should be used for the company address.
    PERSONNUMBER
    Personal number. Can be used only for address types 2 or 3 (private or personal address).
    TITLE (with PERSON)
    Title of the addressee. Can be used only for address types 2 or type 3 (private or personal address).
    DEPARTMENT
    Department of the addressee. Can be used only for address type 3 (company address).
    STREET
    Street name.
    HOUSE
    House number for the corresponding street.
    LOCATION
    Additional location information, such as the building, "Upstairs Apartment" and so on. Appears on its own line in the address.
    POBOX
    P. O. Box
    CODE
    The post code / zip code of the P. O. Box if this differs from the post code / zip code of the recipient.
    CITY
    The city in which the destination P.O. Box is located if this differs from the city of the recipient.
    POSTCODE
    Post code / zip code of the recipient.
    CITY
    Addressee’s city. city1 is expected to be the city; city2 is the neighborhood or administrative section, if required.
    NO_UPPERCASE_FOR_CITY
    Default = NO_UPPERCASE_FOR_CITY ‘ ‘
    Usually, the system prints the city and country names of foreign addresses in uppercase ( NO_UPPERCASE_FOR_CITY ‘ ‘ ).
    You can use this parameter to force the system to output city and country name unchanged (uppercase/lowercase).
    ( NO_UPPERCASE_FOR_CITY ‘X’ )
    REGION
    This allows an administrative region, county, province, or state etc. to be specified.
    COUNTRY
    Specifies the recipient country, i.e. the country according to whose postal conventions the address is to be formatted.
    COUNTRY_IN_REC_LANG
    This flag tells the system to use the recipient language for the country name.
    ( COUNTRY_IN_REC_LANG ‘X‘ )
    ( Default: Recipient language is not used: COUNTRY_IN_REC_LANG ‘ ‘ )
    LANG_FOR_COUNTRY
    Default = Space
    Use this parameter to explicitly set the language in which to print the country name of a foreign address. By default, the system uses the language of the sending country.
    LANGUAGE
    Language code of the language of the recipient country, if it differs from that of the recipient COUNTRY. Example: addresses in Switzerland. Standard SAP language codes are used; you can display these in the initial SAPscript text processing screen or in table T002.
    FROMCOUNTRY
    Specifies the language to be used for formatting the name of the recipient country. For most European countries, the recipient country is specified by placing the international car registration letters in front of the post code and separating them from the post code with a hyphen. You must always specify the sender country.
    ADDRESSNUMBER
    The number is used to index a central address file, from which the desired address is read instead of using the set of the above fields. You can find more information on this facility in the documentation for the function module ADDRESS_INTO_PRINTFORM.
    You use this one parameter instead of the set of parameters described before.
    /: ADDRESS
    /: TITLE 'Firma'
    /: NAME 'Schneider & Co', 'Finanzberatung'
    /: STREET 'Kapitalgasse 33'
    /: POBOX '12345' CODE '68499'
    /: POSTCODE '68309'
    /: CITY 'Mannheim'
    /: COUNTRY 'DE'
    /: FROMCOUNTRY 'DE'
    /: ENDADDRESS
    This produces the following output address:
    Firma
    Schneider & Co
    Finanzberatung
    Postfach 12345
    68499 Mannheim
    If the DELIVERY parameter is specified on the ADDRESS command, then the street name and number will appear in the address in place of the P. O. Box number.
    Firma
    Schneider & Co
    Finanzberatung
    Kapitalgasse 33
    68309 Mannheim
    SAPscript makes an internal call to the ADDRESS_INTO_PRINTFORM function module for formatting the address. If the result is not as expected, you should check the settings for this function module
    If DELIVERY is not specified and if a POBOX is specified, then the POBOX is used in an address instead of a STREET.
    reward points if helpful....
    Message was edited by:
            raam

  • How to create new page in SAP Script?

    Moved to correct forum by moderator.  Duplicate deleted.  Do NOT post the same question in two forums.
    Hello friends,
    I am modifying one SAP script.
    It is already contains 2 pages. FIRST and NEXT.
    All I have to do is to create one more page which should be display as last page.
    And this last page should display some data.
    I tried and created a new page in SE71 but when i execute the program, it doesn't show newly created (LAST) page.
    Please guide me.
    REgards,
    RH
    Edited by: Matt on Nov 7, 2008 4:26 PM

    Hi
    U need to force the call of this new page.
    I suppose your sapscript is arrange with 2 page: FIRST and NEXT, where FIRST has NEXT as next page.
    So the system automatically print the pages FIRST and NEXT: u need to insert the statament:
    /: NEW-PAGE LAST
    in the MAIN window.
    U can create a text element NEW_PAGE and you'll call it as soon as you've finished to print the main data:
    /E NEW_PAGE
    /: NEW-PAGE LAST
    U can use the fm CONTROL_FORM
    Max

  • How to print last page in sap script in ladscape format?

    Hi all,
    can any 1 tell me How to print last page in sap script in ladscape format?
    Thanks In advance.
    Pravin

    Hi Pravin Sherkar,
    we can do this in SAP Scripts.
    we need to create two pages, one of landscape and another of potrait.
    now after filling the data at last we need to call the page which is of format landscape using START_FORM  function module.
    You can use condition &PAGE& = &FORMPAGES&.
    Please check this link
    Printing Portrait/Landscape in sapscript
    Re: Landscape and potrait in same layout?
    http://www.sap-img.com/ts013.htm
    Best regards,
    raam

  • Printing LAST page in SAP script on the back side.

    Hi ,
    I have a problem with the printing of the LAST page on the reverse side of the form, when done with a vendor.
    At a time we print many vendors together.
    So, when done with printing of a vendor it needs  to print his address on last page, reverse side(address)
    Next will be followed by another vendor details.
    I cannot give 'D' for the first page because it would fail if the form flows more than 2 pages.
    is there any way of triggering the LAST page in SAP Script when it done with printing of one vendor.
    any help would be highly appreciated.
    regards.

    Hi ,
    In Script PO i have to print 'Terms and Conditions' text only on the back side of last page of the PO.
    Presently script contains THREE pages ( FIRST, NEXT, TERMS).
    FIRST with attributes :
    next page as NEXT , Print mode T.
    NEXT with attributes :
    next page as NEXT and print mode T
    TERMS with attributes :
    next page as ' '.
    I Created 'TERMS AND CONDITION' window.For TERMS page i selected 'TERMS AND CONDITION' window only.
    So page window of 'TERMS'  is 'TERMS AND CONDITION'  and i included standard text in 'TERMS AND CONDITION' window.
    If PO contains 9 pages( that means MAIN WINDOW data flows up to 9th page with footer also ).
    So i have to print standard text(Terms and conditions) back side of 9th page only not on all pages.
    So total PO contians 9 pages with 10 prints.
    Please help to solve the issue
    Thanks and Regards
    Venkata swamy

  • Print text on back side of last page in sap script

    Hi All,
    In Script PO i have to print 'Terms and Conditions' text only on the back side of last page of the PO.
    Presently script contains two pages ( FIRST, NEXT).
    FIRST  with attributes :
       next page as  NEXT , Print mode T.
    NEXT  with attributes :
       next page as NEXT and print mode T
    Please help us in solving issue.
    Thanks and Regards
    Venkata Swamy

    Hi ,
    In Script PO i have to print 'Terms and Conditions' text only on the back side of last page of the PO.
    Presently script contains THREE pages ( FIRST, NEXT, TERMS).
    FIRST with attributes :
    next page as NEXT , Print mode T.
    NEXT with attributes :
    next page as NEXT and print mode T
    TERMS with attributes :
    next page as ' '.
    I Created 'TERMS AND CONDITION' window.For TERMS page i selected 'TERMS AND CONDITION' window only.
    So page window of 'TERMS'  is 'TERMS AND CONDITION'  and i included standard text in 'TERMS AND CONDITION' window.
    If PO contains 9 pages( that means MAIN WINDOW data flows up to 9th page with footer also ).
    So i have to print standard text(Terms and conditions) back side of 9th page only not on all pages.
    So total PO contians 9 pages with 10 prints.
    Please help to solve the issue
    Thanks and Regards
    Venkata swamy

  • Last page in SAP Script

    Hi All,
    I have a requirement of printing terms and conditions of PO on a new page of SAP Script.
    I created a new page as LAST and called it through NEW-PAGE command from MAIN window.
    On my LAST page I created 1 window, which calls Standard Text.
    Issue I am facing is in spite of having data of more than 1 pages , print preview is displaying only 1 page of Terms and Condtions.
    Can you please let me know what am I missing?

    Hi Shradda,
    you also can just add an additional processing.
    You know, something like
    /: PERFORM 'YOUR_ROUTINE' IN PROGRAM 'YOUR_PROG'
    /: ENDFORM
    See here: https://help.sap.com/saphelp_crm700_ehp02/helpdata/en/4e/34f87463de02c2e10000000a15822b/content.htm?frameset=/de/4e/3663…
    But in my opinion it is the best to make a copy of the original because I'm pretty sure, there will be more additional requierements in the end and just to enhance or to use this technique is very hard to understand after the second implemented spot
    Can you share your stuff how you tried it?
    I mean, calling two sites in a row should definitv work fine.
    /: NEW-PAGE 'LAST1'
    /: NEW-PAGE 'LAST2'
    I tried it on my own and it works perfectly fine...
    Did you gave your last-page a followpage while testing the first suggestion? That is of course a must-have.
    ~Florian

  • 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

  • Need to add a new page in the SAP Script as last page

    Hello,
    I need to add a new page in the SAP Script as last page.
    Currently I have three pages in the form(FIRST,NEXT,LAST). For this I created one more page END.
    FIRST page next page is NEXT
    NEXT page next page is NEXT
    LAST page next page is LAST
    END page next page is END.
    I used NEW-PAGE END in the main window but it is not working and also I trired with CONTROL_FORM this also not working.
    Thanks,
    Ravi.

    Hello,
    I need to add a new page in the SAP Script as last page.
    Currently I have three pages in the form(FIRST,NEXT,LAST). For this I created one more page END.
    FIRST page next page is NEXT
    NEXT page next page is NEXT
    LAST page next page is LAST
    END page next page is END.
    Create the text element in the main wondow of your form
    /E           ENDPAGE
    /:           NEW-PAGE END
    and call the element from your print program by using write_form, where you want the END page in your print.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element = 'ENDPAGE'
        EXCEPTIONS
          element = 1
          window  = 2.
    Thanks,
    Ravi.

Maybe you are looking for

  • Does Photoshop Photography Program include use of Typekit?

    I subscribe to Adobe's Photoshop Photography Program and notice that the Creative Cloud desktop application indicates that I can turn Typekit on. However, it's not clear if Typekit is included in my subscription. In the Creative Cloud FAQ I see this:

  • My printer is flashing 10.00.0 memory error, i have taken the cartridge out and replaced it,

    I am using an HP Laser Jet 2430 dtn printer. All was fine until a little bit ago and it is flashing memory error 10.00.0 It advaised to take out the cartridge and replace it, I did and I am still getting the error, now says contact support. Any sugge

  • TS3899 Hotmail not displaying all messages

    Is it normal to not have all the emails displayed on the website displayed in the inbox of your mobile ? I am using hotmail, I tried setting up with the 2 options of outlook.com and exchange server. Both are not showing. Thanks,

  • Is it possible to transfer my iPhoto library to an external Hard Drive?

    I have noticed that my fairly new iMac computer's hard drive is almost completely full. Is it possible to transfer my iPhoto library to an external hard drive (that I have plugged constantly into my iMac computer), and still have full functionality o

  • Why does iPhoto cancel book orders?

    I made a 20 page soft cover book with photos from my Nikon D2x, i.e. great color and resolution...after waiting two weeks for books to come I check order history and find that my order has been canceled with no explanation and no notifying email. Why