Alv page numbers

Hi,
iam displaying output using alv grid(function modulues).
i want to display the page numbers like 1 of 4(total pages) in top-of-page.
how can i display?
Regards,
suresh.

This functionality can be triggerred only when u take a printout of the ALV!!
This code needs to be written in the END-of-Page event!
Here's come to to help u out
DATA:   v_temp TYPE f,
          v_rec TYPE i,
          v_page TYPE i,
          v_pagno TYPE string,
          v_cpage TYPE string,
          v_page2 TYPE string,
          v_div TYPE i,
          v_lincnt TYPE sy-linct.
* Calculate & Display the number of pages during printout
  v_lincnt = sy-linct.
  DESCRIBE TABLE it_output LINES v_rec.
  IF v_lincnt LE 11.
    v_lincnt = 58.
  ENDIF.
  v_div = v_lincnt - 11.
  v_temp = ( v_rec / v_div ).
  v_page = TRUNC( v_temp ).
  v_temp = FRAC( v_temp ).
  IF v_temp = 0.
  ELSE .
    v_page = v_page + 1.
  ENDIF.
  v_cpage = sy-pagno.
  v_page2 = v_page.
  CONCATENATE text-055 "page
              v_cpage
              text-056 "of
              v_page2
              INTO
              v_pagno SEPARATED BY space.
  IF sy-linct GT 11.
    WRITE AT (sy-linsz)  v_pagno RIGHT-JUSTIFIED.
  ENDIF.
try this link also.
https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action&pageid=27043
Hope this helps you.....
Regards
Hareesh

Similar Messages

  • Printing page numbers in an ALV report with multiple grids

    Hi,
    I have developed a report using OO ALV GRID. The output is having multiple grids navigated using a menu button appended to the standard tool bar
    (Ref report: BCALV_GRID_07). On navigation, we are able to display specific titles when each grid is displayed.
    When we print those individual pages (the grids), we are able to print the page numbers and the title for the first grid but when we display the next grid and print, we are unable to initialise the page number
    and print specific title. The page numbers continues from the last printing.
    I am looking at identifying the grid when the print event - PRINT_TOP_OF_PAGE is triggered so that a grid specific title can be printed and also page number initialised.
    Any suggestions is highly appreciated.
    Thanks.
    Mani.

    You cannot have one event for all the grids as you cannot identify for which grid the event has fired. You need to activate the event for each of the grid and handle the code independently.
    regards,
    Ravi
    Note - Please mark the helpful answers

  • Can we add page numbers to ALV Grid Control.

    Hi All,
    1.My requirement is to display page numbers when we down load the list in to EXCEL.
    Can we do this in ALV Grid Control.
    2.Can we display the page numbers in the SAP Query,when we down load the out put list in to the EXCEL.
    Thanks & Regards,
    Seshadri G

    Hi Seshadri,
    No, it is not possible to print the page number when you download the list to EXCEL. Because in ALV grid the report output is display as table contorl and this data can not be divided into page when you download to EXCEL.
    Regards,
    Satya.

  • Printing Page numbers in ALV grid with oops

    Hi ,
    I have a ALV grid display with OOPS , there are also fields in top of page and end of page that go along with the print. I want to print the page numbers also . If I give a variable and increment it along with every call to top of page , then if a second print is issued, the variable can not be cleared out. Is there any other way.
    Thank you .

    Regarding  ALV Grid  Control using OOPs concepts
    Please give me reward point if it is useful.
    Thanks
    Murali Poli

  • How to realize page numbers when printing from an ALV-Grid

    Dear ABAPers,
    with resprect to SAP note 402627 ALV-Grids in 4.6-Systems
    do not produce a header with Actual date, report title
    and page number as it does from release 610 on.
    I've spent almost the entire day on searching the SDN
    for an answer on how I could produce a page numbering.
    I've also tried quite a lot, for example by using the
    END_OF_PAGE event, but nothing worked.
    I'm using the FM REUSE_ALV_GRID_DISPLAY, but even an SAP
    sample report BCALV_GRID_01, which is supposed to
    demonstrate the object-oriented use of the several
    PRINT-events does not process PRINT_END_OF_PAGE in our
    4.6C-System.
    Is my search in vain or does anybody have experience
    with those kinds of problems under 4.6x ?
    Thanks in advance
    Andreas Flügel

    I think you should be able to use PRINT_END_OF_PAGE event for the same. That should work. Use SY-PAGNO variable to print the page no in this event.
    You will have to register this event and set the handler for the same.
    Did you try this?
    Regards,
    Ravi

  • Display Page numbers in ALV

    Hi,
    I would like to know how to display page numbers in an ALv display(both grid display and list display).I tried to use the system variable sy-pagno .But couldn't get the desired output.

    Hi,
    I don't think you will be able to display page numbers in case of ALV Grid, unless you are in the list view. In case you are using the ALV Grid, you have to implement the top_of_page method (an event handler) for ALV Grid class and write the page number there. The page numbers will be displayed once you choose the list view.
    Hope this helps.
    Regards
    Message was edited by: Shehryar Khan

  • Printing page numbers in ALV Hierarchical

    Hi All,
    I have a requirement to display page numbers in the report and also when in printing the page numbers will be displayed like this 'Page xx of yy'. I placed this one in the top_of_page event of the function module REUSE_ALV_HIERSEQ_LIST_DISPLAY. The only display is the Page xx while yy is not. For xx i used the sy-pagno but for the yy as total numbers i try all system fields but still not display. Please help its urgent guys.

    Hi,
      Check thease therds
    https://forums.sdn.sap.com/click.jspa?searchID=12193297&messageID=269935
    https://forums.sdn.sap.com/click.jspa?searchID=12193297&messageID=2461055
    Regards
    Kiran Sure

  • How to display page numbers in report

    hi all,
    i would like to know how to display page numbers in this format " 1 of 5" in the report.
    Any help would be much appreciated.
    thanks
    seema

    Hi,
    Check this too...
    Page No. in ALV output
    If you query is solved, kindly close the thread.
    Regards,
    Anjali
    Message was edited by: Anjali Devi Vishwanathan

  • How to display Page numbers in XMLreport(on PDF)

    hi all,
    we have a requirement where we need to display page numbers(e.g.page 1 of 10),on an XML report.
    can anybody suggest me the solution.

    Hi,
    Check this too...
    Page No. in ALV output
    If you query is solved, kindly close the thread.
    Regards,
    Anjali
    Message was edited by: Anjali Devi Vishwanathan

  • Previewing Pages document in Preview shows page numbers incorrectly

    Previewing Pages (5.2) document in Preview (7.0) shows page numbers incorrectly. Regardless of starting page number preview shows as Page 1.
    Suggestions appreciated...

    That appears to be YABIP5 (Yet Another Bug In Pages 5].
    Pages .09 documents are fine.
    No prizes however for finding bugs in Pages 5/5.2 it's swarming with them.
    Peter

  • How to print page numbers in adobe form

    Hi,
    Can anybody tell me how to print page numbers in adobe form.
    Thanks in advance
    Chaitanya

    Hi,
    Yes the field page n of m is used normally for printing page numbers. But it won't display the current page of total pages by itself. You have to set the run time property to n (current page ) and m (Total number of pages). Carefully select the # (current page ) and ## (Total number of pages). Hope this works for you.
    My requirement is to have the user control on current page. For Example:
    Example for a Invoice with 5 PO items (stands on 2 pages) :
    1st  page is the letter : no page number
    2nd page is the 1st page of the 1st copy of the invoice : we should read u201C1 / 2u201D
    3rd page is the 2nd page of the 1st copy of the invoice : we should read u201C2 / 2u201D
    4th page is the 1st page of the 2nd copy of the invoice : we should read u201C1 / 2u201D
    5th page is the 2nd page of the 2nd copy of the invoice : we should read u201C2 / 2u201D
    Presently i cam getting the current page number for page 4th as 3 / 2 and for 5th page 4 / 2. I could able to control the total number of pages from print program. But when i am printing the second copy (4th and 5th pages), I couldn't able to control the current page number. I need to initialize the Current page count (4th page ) as 1.
    I have used the follwing java scripting:
    this.rawValue = wv_pages - xfa.layout.page(this)
    where wv_pages is total no of pages calculated from print program.
    Please help me in this regard with some formcal or java scripting conditions.
    Thank You,
    Regards,
    Naresh.

  • I need to start the page numbers over for a new section in a document (i.e. first six pages are roman numerals, next 70 need to be in arabic numerals), but for some reason, the automatic page numbering has started over at number 3 instead of 1. Help!!

    If anyone has any idea why it's doing this, or what I can do to fix it, please help!

    No idea why it's doing this.
    You should be able to fix it by using Insert > Page Number, rather than 'Automatic Page Numbering.'
    Set Page Numbers in your second section to "Start at:" 1
    Regards,
    Barry

  • Page numbering in rtf templates

    Hi All,
    I have an rtf template and what I want is to display page numbers. I can achieve this with the following : <?fo:page-number?> but I want to display it by different way:
    For example if the total pages in the output is 10 pages I want the page number to be displayed as Page 1 of 10, 2 of 10, 3 of 10 etc.
    Any ideas?
    Thanks in advance,
    Konska tor

    Well, it's fixed itself. It still doesn't work on my home computer, but it does work on my work computer... as long as it works in Oracle eBus I'm happy :) Must be a certain version of word that causes the problem.

  • Page numbers in a photo book / keepsake

    Can anyone tell me how i can get page numbers to display in a photo book? In the help section it says that i can go to settings and turn this function on, however, I don't have that option in there. I need it to make a slideshow preview for others involved to review pages and make suggestions to layouts. They need to be able to quote the page number that needs adjusting.

    The page number setting it the bottom check box in the settings menu - if it is checked and you do not have page numbers displayed on your pages then they are not available with the theme/layout you have chosen
    See Liz Castro's web page for samples of each theme and the layouts for each theme - http://www.lizcastro.com/iphotobookthemes/pmwiki.php?n=Main.Travel - I'm not sure she specifically addresses page numbers
    LN

  • Page numbers in PDF?

    I cannot figure out how to identify the page numbers of a PDF document when I view it in Safari 5.0.3. The original paper document has its own numbering system, but the PDF page-numbers are completely different. When I go to print individual pages of the PDF document, I don't know what page numbers to put into the printer window.
    I asked the publisher of the PDF document for advice. This is what it advised:
    "This is an issue with printing PDFs (Portable Document Files) in general, and does not pertain exclusively to printing PDFs in FDsys. When printing a PDF document in your web browser, the web browser is printing the pages of the electronic file (the PDF) not the page numbers that appear on the original publication (from which the PDF is derived). The page numbers of a PDF document do not always match the page numbers appearing on the publication itself. For example, in the example you cited (http://www.gpo.gov:80/fdsys/pkg/USCODE-2009-title26/pdf/USCODE-2009-title26-subt itleA.pdf), the page number on the publication is page 347. However, if you click anywhere in that page, you will see that the PDF reader you are using indicates the corresponding page in the PDF file in the toolbar at the top of the page (next to the up/down arrow icons). The page number indicated in the toolbar refers to the page numbers in the PDF file, and it is these page numbers that your browser is referring to during the printing process."
    None of those instructions work in Safari. How do I find the page numbers for a PDF document in Safari?

    Hi Richard
    the best bet is to open it in Preview using the relevant button that appears when you hover at the bottom of a pdf in safari. Although the page numbers that appear on each page still won't necessarily match, you can at least make preview show the 'pdf' numbers in the toolbar, which will match those you choose when printing.
    a plugin like adobe's or http://schubert-it.com/pluginpdf/ may show page numbers within Safari, but that doesn't mean they'll match those which appear on the pages, in the example link you gave, and others.

Maybe you are looking for

  • Path selection acts weird

    Hi everyone, Help me please! I made a path and after selecting it the selection makes a different form than the path. Like this: This is only happening at this area, other parts are good. Do any of you have an idea what to do with it? Thanks a lot.

  • Payment through a GL account

    Dear experts Check printing is working fine in case of customer and vendor.However if i make a direct check payment through a GL account, without involving a customer/vendor, how do i print the check. pls help me out of this issue Thanks  in advance

  • Multiple programs in the same VM

    I don't have lots on memory and whenever I run 2 java programs, it becomes very slow. Is it possible to have a JVM running a "launcher" aplication and starting programs all in the same VM? I guess it would have security risks, but I think it would be

  • Sound to tv

    If I use  thunderbolt out from the computer via HDMI into the TV. How can I get sound to the TV?

  • Solution for Help files problem

    Hi everyone, A solution is now available for the problem that some people experience with the Help files not opening from Photoshop Elements 6, Premiere Elements 4, and Audition 3. Please read Tech Note kb402707: http://www.adobe.com/go/kb402707 Down