How To trigger last page in sap script of customer account statement

Hello all,
I am working on customer account statement.
It has it's own standard script(F140_CUS_STAT_02). But my client's requirement was completly diffrent,so i copied that to z script and made some changes like delete some window and some another window.
Now on first page , i have following windows,
1) Header
2) address
3) main
4) Account
5) Footer.
Next Page having following windows,
1) Header
2) Main
3) account
4) footer
Now i want to print account window on lsat page, so i put the condition nextpage = 0.
and it is working fine , but as account window is physically present after Main window , so that much blak sapge is getting creted after main window on every page.
To remove that blank space i am thinking of creting one more page and everytime i want display account window on that page.
I have creted the last page also. but in my output it not detecting that last page.
For First page - next page is next.
For Next page - next page is next.
for Last page- next page is last.
Also i have added following code at last in  main window.
/: NEXT-PAGE LAST.
But i think i am placing this code at incorrect position in main window.
I am not able to find out the correct podition to put the above code,but main window of that script conataing so namy text element, and that text element are getting handled from driver program based on some conditions.
I have added my code in main window but not changed the original code.
Plz let me know where to write /: NEXT-PAGE LAST. in main window.
Or provide me some another solution to trigger thet last page in sap script.
Regards,
Anuja Dhondge

Hi ,
actually in account window i have used tha box command to print account statement.
Previously i was printing this account statement in main window itself but without using bottom and end bottom command.
So , as i made some changes or add some code in main window then lines of this account statement  were getting dismental.
So my question is using bottom and end-bottom command this will happen or not????

Similar Messages

  • 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

  • How to Avoid blank page in SAP Script

    I am working on a Script. My Script prints a check.
    This script is a copy of a std script.
    It has 3 pages - First Next Last
    My First page has all the required data.
    My second page is empty with out any values.
    I am getting the blank page as Page 2 when executing. How can we avoid it ?
    Senthil

    Hi Senthil,
    Please see the below points:
    1. Please check what have you defined as the NEXT PAGE for your first page. If so change it and make the first page itself as the next page.
    2. Check your main Window, may be there is blank line at the last of the main window, so check that abd remove that,so you won't get the blank page
    Please see the link which is similar to your problem:
    Re: How to remove blank page in sap script
    May it helps you.
    Regards.
    Deepak Sharma.

  • Need to print some text only in last page in SAP script

    Moved to correct forum by Moderator.  General wasn't right either.
    Hi All.
    I need to print "Remarks" only in last page of sap script.
    Can anyone please help me on this.
    Thanks
    Senthil kumar V.
    Edited by: Matt on Nov 21, 2008 7:38 AM

    Hi,
    you have 4 possibilities.2 at non main window, 2 at main window.
    at non main window.
    1. /: IF &PAGE(C)& = &SAPSCRIPT-FORMPAGES(C)&
    remarks
    remarks
    remarks
       /: ENDIF
    2, /: if &NEXTPAGE& ='0'.
    remarks
    remarks
    remarks
       /: ENDIF
    at main window
    3. Add the remarks at the last item of the main which is printed
    4. add a new item to your main (/E)
        put your remarks in it.
       Change your program in such a way this item will print as last one.
       like
        /E REMARKS
    remarks
    remarks
    remarks
       and in sapscript program add logic at the end.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    element = 'REMARKS'
    EXCEPTIONS
    element = 1
    window = 2.
    I am sure this will do. Make a choice.
    Gr., Frank

  • 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

  • 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

  • Urgent - Not able to Print back page for Last Page in SAP Script.

    Hello All,
    I need to Print back page in SAP Script, I am able to do it by setting print mode as D, but now the problem is, it does not print back page for last page.
    For eg. if there are 3 pages it prints back page for first two. If there is only one page then it does not print back page.
    Please Help.
    Thanks.

    hi,
    Yes, we can print logo as water mark in scripts
    Just do as like this....
    Upload your logo via SE78.
    - Select 'Import' button from application toolbar of SE78, and perform upload.
    and write this code in scripts
    BITMAP 'COMPANY_LOGO' OBJECT GRAPHICS ID BMAP TYPE BCOL 
    regards
    Sankar

  • Adding Text to the last page in SAP Script RVORDER01

    Hi Experts,
                     I have copied RVORDER01 and changed the log for it and added my ZRVORDER01 in NACE.
    Now they want Some text to be added to the last page of the script how to do this without changing Standard Print Program ? Please guide me.
    Regards,
    Dheepak

    Hi,
    If you copied the the Standard Script to a ZScript then why is the problem adding a Text to the Last page......You should be able to do this easily .....i believe...Sorry if i misunderstood......

  • How to supress Last Page in a Script

    Hi
    In a script I have three pages First Next and Last, my requirement doesn't’t need Last page which contains the summary. If I delete Last page with in the script, the output displays with two pages where in the first page contains all the data which I require and the next page shows the fields other than main window [don’t know why it is triggering].
    If i include the Last page with in the script with a blank new window in that, my output displays normally with a blank page at the end.
    Will any one help me how to suppress the ‘Last’ page in the scripts.
    Am working on Cheques ‘F110_PRENUM_CHCK’ and the print program is ‘RFFOUS_C’ where I want to suppress the ‘Summary’ window in the Last page. Here i don't want to modify the original program.
    Thanx
    Message was edited by:
            Shinoy N

    Hi Shinoy,
    we have the same requirement as you mentioned. We have to delete the last page ( with summary and void check ) . I deleted the last page ...eventhough the void check in the last page is reflecting.
    Please do let me know, how to delete the last page.
    Regards,

  • How to remove blank page in sap script

    hi ,
    I have a problem in sap script. I copied one std. script and made some changes i.e removing the unwanted pages from the script.
    no where NEW-PAGE kind of command is declared in window but still a new blank page is coming in printing.
    i checked with the posted comments in forum n what i found .. i did that part for my script..but no progress.
    so help needed.
    thnx,
    m

    Hi,
    If there is no any "NEW-PAGE" command in your any window, Pls check following probable causes.
    1. Check your main Window, may be there is blank line at the last of the main window, so check that and remove that,so you won't get the blank page
    2.Please check what have you defined as the NEXT PAGE for your first page. If so change it and make the first page itself as the next page.
    Hope it help you.
    Regrads,
    Lokesh.

  • 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

  • Finding last page in SAP Script when there are  multiple layouts involved?

    Hi,
    I want to find out the last page in the SAP script. I have used &NEXTPAGE& = '0', this is finding the last page of a one layout however I do have three layouts in my script. I have also used the &SAPSCRIPT-JOBPAGES(3ZC)& and I have taken one counter and comapred as follows-
    If &SAPSCRIPT-COUNTER_1(+)&  = &SAPSCRIPT-JOBPAGES(3ZC)&
    LAST PAGE.
    endif.
    This is also not working. Please advise if there is anyway to find out the last page from print program.
    Thanks,
    Jyoti

    Hi,
    U can do like this, Set a flag in ur driver program when u reach to print the last layout then pass this flag value to Script. In script check when this FLAG = 'X' & &NEXTPAGE& = 0 then u print the required in ur last page.
    Eg:
    define a FLAG in ur driver program and make the value as 'X' when it reach the last layout.
    in script, write the condition like:
    /:  IF &FLAG& = 'X' AND &NEXTPAGE& = 0
         write text.
    /:  ENDIF.
    Hope it helps!!
    Rgds,
    Pavan

  • How to print different pages of sap script  from diff. trays of printer

    Hi All,
    I have the requirement in SAP script. How to print different pages from different trays in the printer.
    For example  page 1 logo and address has to print from tray-1,
                        page 2 main data print from tray-2,
                        page 3 footer data print from tray-3.
    will appreciate if u come up with solutions asap.
    Thanks in advance.

    Hi,
    May be the links given below might help you,
    SAPScript:Selecting Different Tray in SAPscript
    Print to different output tray in SAPscript/Print Workbench
    Regards,
    Hema.
    Reward points if it is useful.

  • 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

  • Displaying last page in SAP Script.

    HI All
    I have created 3 pages.
    Data will be displayed in the first page and 3 page ie the last page will display a small Note.
    I have a requirement in which Both First and last page should be displayed.
    IF data is too long then after first the next page should get displayed  and then the last page.
    I tried using start_from and End_form . but the issues was not solved.
    Please help.

    Hi,
    Please try to control the printing of First and last page based on the Internal Table contents.
    Check if the internal table is empty after printing the first page and then put a if-condition in the script editor to control triggering of second page.
    Then you can print the last page with instructions.
    Regards,
    Lakshmi

Maybe you are looking for

  • How to filter the Event Data from the EventHub when consuming data?

    We know the EventHub has the filter function. I'm designing a new solution for a customer and it looks like EventHubs are great for sending and receiving our near-realtime data. Downside is when receiving the data, we receive all data of all our devi

  • Mail adapter fails when using Mail Package Format

    Hi. Using XI 3.0 stack level 9. When i set up the mail adapeter to Use mail package format (by ticking the "Use Mail Package") checkbox I get the following error : "error occured: [2005-09-14T09:42:46Z] unable to call the mailer; com.sap.aii.messagin

  • What are FS rules?

    Hi All, While doing the init without data transfer i am getting the error as :"Target BBB is not active or does not exist, or it has no active FS rules " however i checked the target in RSA1 it is active . i think problem is with update rules but i n

  • Extended program check and code inspector

    Hi Gurus, I developed on report . I wrote at end of  and at new in loop but extended code checking it showing one error  is: 1)The LOOP statement processing will be limited   (FROM, TO and WHERE additions in LOOP)   Interaction with group change proc

  • Back To The Front?

    Good Afternoon. I was trying to clear my 'unresolved questions' (7 to be exact) and they are all back on page 1. I had no idea that marking them solved or answered would bump them back up front. Is there anyway to move or delete them? mwn :o)