Page number not printing on last page

Hi all,
I am ablt to print the total no of pages  in all pages ecept the last page.
whats wromg in my code ?
REPORT  ZDEMO_EOF NO STANDARD PAGE HEADING LINE-SIZE 100 line-count 27(2).
types: BEGIN OF t_mara,
        matnr TYPE mara-matnr,
        ernam type mara-ernam,
       end of t_mara.
data: itab TYPE TABLE OF t_mara,
      wa TYPE t_mara.
select matnr ernam FROM mara INTO TABLE itab
  WHERE matnr BETWEEN '000000000000000001' and '000000000000000777'.
  sort itab by matnr.
  delete itab WHERE matnr is INITIAL.
  LOOP AT itab INTO wa .
    WRITE:/ sy-tabix,'!', wa-matnr, wa-ernam.
  ENDLOOP.
  data: v TYPE n.
  v = sy-linct - sy-linno.
  skip v.
end-OF-PAGE.
  data: zline type i,
        temp TYPE f,
        zpages TYPE i,
        temp1 TYPE i.
  CLEAR: zline,temp,zpages,temp1.
DESCRIBE TABLE itab LINES zline.
temp = zline / sy-srows.
zpages = TRUNC( temp ).
temp1 = FRAC( temp ).
if temp1 > 0.
zpages = zpages + 1.
endif.
write: /'Page ',sy-pagno, ' of ', zpages RIGHT-JUSTIFIED.
Thanks in advance
krupali

hi ,
TYPES: BEGIN OF t_mara,
matnr TYPE mara-matnr,
ernam TYPE mara-ernam,
END OF t_mara.
DATA: itab TYPE TABLE OF t_mara,
wa TYPE t_mara.
SELECT matnr ernam FROM mara INTO TABLE itab
WHERE matnr BETWEEN '000000000000000001' AND '000000000000000777'.
SORT itab BY matnr.
DELETE itab WHERE matnr IS INITIAL.
DATA: v TYPE i.
v = sy-linct - sy-linno.
LOOP AT itab INTO wa .
  WRITE:/ sy-tabix,'!', wa-matnr, wa-ernam.
ENDLOOP.
RESERVE v LINES.  "-----> reserve lines
*SKIP v.
END-OF-PAGE.
  DATA: zline TYPE i,
  temp TYPE f,
  zpages TYPE i,
  temp1 TYPE i.
  CLEAR: zline,temp,zpages,temp1.
  DESCRIBE TABLE itab LINES zline.
  temp = zline / sy-srows.
  zpages = TRUNC( temp ).
  temp1 = FRAC( temp ).
  IF temp1 > 0.
    zpages = zpages + 1.
  ENDIF.
  WRITE: /'Page ',sy-pagno, ' of ', zpages RIGHT-JUSTIFIED.
Thanks & Regards

Similar Messages

  • Print range does not print the last page in the range.

    Adobe Reader for New IPAD - The print range function does not print the last page in the range. For example, if you enter a print range of 2-18, pages 2-17 print and page 18 does not print.  Also, if you enter a print range of 9-9, page 8 prints and page 9 does not print.

    I have the Epson 4540 printer. I don't know for sure if it connects via AirPrint.  I didn't do any thing to set up Air Print.  The printer is attached directly to my network router and it shows up IPad apps.  I have not printed docs from other apps, but I will give it try and let you know.
    Christopher J. Bilcz
    [email protected]

  • LaserJet P2055dn is not printing the last page

    Hello! Our LaserJet P2055dn prints all pages in a multipage document but not the last one. When a new document is sent to the printer, it first prints the final page of the previous document, then the new document (again without the last page). If a one page document is printed, it works without a problem.
    Anyone know how to solve this?

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.
    Make sure you provide the URL for the problematic page, so they can see the problem for themselves.

  • Page totals not printing on any pages except the last

    How do you get page totals to display one each page and "float" with the output? I created a summary object for the column with reset at page and put it in a frame that is displayed on all pages. There is, of course, a repeating group above it. But the repeating group clobbers the page totals on all except the last page. Shouldn't there be an implicit anchor that prevents this? that's what the Oracle documentation says anyway. This is probably real simple, but I find nothing in any documentation, white papers, or anything.
    Will somebody please, please help me?

    Hi,
    Step 1: Select the parent frame of the summary column.
    Step 2: Open properties of that frame
    Step 3: Set the property "Print Object On" to "All Pages" value.
    (Default value for this property is "Last Page"
    Regards,
    Sailaja

  • Page nos not printing on all pages

    I've a prob...The page no is printed only in the first or first few pages of a multi page report developed in discoverer and viewed using 3i viewer...can anyone pls tell me if that is the prob in code or is there any setting which i can change... What wud b the staus if i try to view the same report using 4i viewer instead of 3i?
    Also can anyone pls tell me if there are any significant changes in 4i viewere over 3i?
    Thanks

    Hi,
    Step 1: Select the parent frame of the summary column.
    Step 2: Open properties of that frame
    Step 3: Set the property "Print Object On" to "All Pages" value.
    (Default value for this property is "Last Page"
    Regards,
    Sailaja

  • SCRIPT: second page is not print but need spool number

    Hi Friends,
    I'm creating a script. It has only one page. if the line item is exceeds in main window then it automatically print the next page.
    now my requirement isgiven below
      I need to print the first page and the second page should not print. But i need seperate spool request for 2nd page. whenever the user wants second page at that time he use the 2nd page spool number to take the print.
    is there any solution or alternative method?
    Thanks in Advance.
    Vallamuthu.M

    Hmmm if i knew your exact requirement i would be able to propose something better i guess, since this seems a little weird to be honest.
    E.G. having a own output type for your page 2.
    Anyway, returning to what you asked. You opened your form using FM OPEN_FORM. and when you are ready you use CLOSE_FORM to close it again.
    You could make use of END_FORM followed by START_FORM when page 2 is to be printed.
    This will give you page 1 and page in seperate spools.
    you could as well close your form and open it again with ITCPO-TDNEWID = 'X' inmstead of using end_form and start_form.
    But still i highly doubt that complete scenario.

  • 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

  • HP LaserJet P2055dn Printer won't print the last page of documents & envelope problem

    My HP LaserJet P2055dn Printer won't print the last page of documents until i send another document, then it will print the last page of the previous document, but omit the last page of the current document.  I need to keep printing a blank page or any other page to get my previous documents completely printed.  Also, the envelopes print with large rectangular boxes on them and no address (I don't know if this is a result of the previous stated problem or not - it started happening at the same time) I use the envelope feature in Microsoft Word 2010.  I never used to have either of these problems - didn't make any changes to the system or add any software to the computer, so I know it's not that.  Any help would be greatly appreciated!!

    This seems to be a commercial product. For the best chance at finding a solution I would suggest posting in the forum for HP Business Support!
    You can find the Commercial Laserjet board here:
    http://h30499.www3.hp.com/t5/Printers-LaserJet/bd-p/bsc-413
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Hp officejet pro k550 will not print a test page using control keys on the printer.

    How do I print a test page to ensure that this printer is still operational?
     I have tried all instructions for clearing the printer of possible jams, removed and reinserted the print heads, and cleaned the rollers.  When pressing the appropriate keys on the front of the printer, it will not print a test page.  and no error lights appear.
    The printer has been connected to a different computer and ceased working last summer.  The printer would not respond to commands from the computer nor would it respond to keys on the front of the printer itself.  I can get the printhead to move using the controls on the front of the printer, however.  The printer is not currently connected to any computer and the nearest computer does not have the appropriate drivers installed.  Originally the printer was connected to a Dell desktop running Windows XP (sp 3).
    This question was solved.
    View Solution.

    Here's how to print a self-test page from the control panel.  
    I am an HP employee.

  • When text is low on the page, it does not print on the page!

    Office Jet J6480, Windows 7 32 bit.
    Sometimes pages with a content line near the bottom of the page, does not print or the characters are only partially
    printed on the output page.

    Hello, you may be able to fix this problem on your HP Officejet J6480 All-in-One Printer by following the steps in the following document: "The Product Does Not Print the Bottom Page Border in Microsoft Office": 
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01671543&tmp_task=solveCategory&cc=us&dlc=en&la...
    There are two more links inside that web page with some other solutions if you are experiencing this problem with other Operative System:
    -Printed Text is Cut Off on the Last Line of the Page in Windows XP
    -Printed Text is Cut Off on the Last Line of the Page in Windows Vista
    I am an HP employee, Printer/All-in-One Expert.
    Give Kudos to say "thanks" by clicking on the "thumps Up icon"
    Please mark the post that solves your problem as an Accepted Solution so other forum users can utilize the solution.

  • When I print, a last page is printed with a summary of document printed - file name, directory, ...

    When I print, a last page is printed with a summary of document printed - file name, directory, ... Just got Windows 8. Is this something I can stop? Waste of paper and ink!!

    Hi RebeccaQ,
    Generally speaking, a summary page, document summary or document properties page is often generated based on a setting in the software application being used as opposed to the printer driver or menu setting.  For example, in MS Word you can select to print this page with each printed document.  In this case, depending on your version of Word, you can enable/disable the feature often in "Word Options", "Display", "Printing Options", "Print Document Properties".
    Does this help?  If not, which printer model and software application is being used when the summary is printed? 
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • Photosmart C6380 only prints the last page in documents

    My printer only prints the last page of multi page documents. To choose more than one page in a page interval in the print menu does not help, but it is possible to print all pages in a document if I only print one page at a time which takes forever for longer documents. I use Windows 7 64 bits and it used to work until the end of 2011. If I uninstall drivers and reinstall, it sometimes work for a short while and then the problem comes back. All my drivers are updated and I run the printer on wifi.

    Just to add some information: I do not get any error messages, blinking lamps or anything like that. I've got the same problem independent of file-format as it seems. I have tried word-files, pdf-files and to print from the web browser Explorer.

  • Adobe PDF printer and "Start printing after last page is spooled"

    Hi,
    After calling the Belgian Support for Adobe Product, I'm trying to have some information here.
    Hope to get some help.
    We use acrobat pro XI on windows 7 client and when we print a test page with the "adobe pdf" print queue on network share, we get a printing error when the "start printing after last page is spooled" is selected in the advanced tab of the printer queue. (document is not generated, and stay in the spooler with an error).
    This problem is not present if printed localy or when we use the "start printing immediately" or "print directly to the printer".
    The support agent from adobe Belgium told me that the reason is generating adobe pdf on network share is not a supported operation. We have to save the document localy all the time.
    Is it really an answer from Adobe ?
    Do you have an other explanation ?
    Thanks for your help,

    Thanks for your very good explanation Dov.
    We use Adobe livecycle for this kind of purpose.
    The situation described is diffrent, but you completely repond and I will be able to have some element to find a solution.
    In fact, I'm implementing a softwate called DeviceLock, used to control connected devices (usb, network, drive). But this software, once installed, change the local printer parameters from "print directly to the printer" to ""start printing after last page is spooled".
    As we use redirected folder in our environment and users cannot use local drive (for user's data backup) you will understand the problem.
    Of course, we should be able to force the correct settings back, But Devicelock seem to change this settings after policy refresh.
    I have contact with Devicelock about this problem of course as their software modify the settings, but was looking for a reason why we were not able to use the "start printing after last page is spooled" parameters with adobe Printer.
    Thanks for your explanation,
    PS:The driver's dialog won't prevent you from setting “Start printing after last page is spooled” or “Print directly to the printer” but setting either of those options will cause the operations to fail as you note.
    note that only "Start printing after last page is spooled" cause an error and this, only for network share location. The "print directly to the printer" or the "start printing immediately" work fine either on a local drive and a network share

  • I don't want to print the last page of a smartform when there is no content

    I don't want to print the last page of a smartform when there is no content. Kindly help

    If the last page is printed, there are two possibilities
    -1- The MAIN WINDOW is only in this page
    -2- The page is explicitly printed from another page (new-page)
    -3- There is date but its only space or skip line.
    So in your form
    -1- Redefine the logic of your form
    -2- Check that, there are some data to be printed before calling the NEW-PAGE
    -3- Do skip or write space lines before printing an actual line and not after
    Regards

  • Page data not printed in smartform...

    I have a smartform in which I want to print some data in the last page. So after the NEXT Page, I inserted the following nodes
    1. Page node - LAST. Its next page is also set as LAST. The next page of NEXT page is also set as LAST.
    2. Page window. window type - main window.
    3. Program lines node. Here I fetch data from some tables a create an internal table with 2 columns of data. I am not able to debug this code during runtime and so I cannot confirm
    if data is being fetched here !!! How to do that ??
    4. Loop node - Here I loop thr the internal table populated in the program lines and store in a structure , say ST_TEMP.
    5. Under loop node I have the TEXT node where I display the data as:
       &ST_TEMP-COL1&        &ST_TEMP-COL2&
    Now the issue is data is not printed on this page. What could be wrong ? I tried inserting a hard break point in the program lines but control did not stop there.
    Is there any way I can figure out what can be wrong ?
    thnks

    >
    > Looks like the last page is not called !!! I can see data only on one page and it shows page 1 of 1.
    >
    > "make sure ST_TEMP is filled with data" how do I do this ?? My program line node has the data filled in the internal table it_temp and the loop node has the data transferred to st_temp for every row. How can I debug the program lines code ??
    > > Have a break <username> in the program lines. and check it_temp has data in it.
    > "use a command and call the last page at end of the loop on internal table"...how to do this ?
    > > like program lines there is a "command line" do a little search on SDN for more info on how to use command lines for next page.
    >

Maybe you are looking for