Can we scroll to the last page of an alv grid?

I am dispalying a report in ALV grid format - REUSE_ALV_GRID_DISPLAY.
As soon as the execute button is clicked it should show the last page with the totals.
User will then scroll upwards to see the details.
How to scroll to the end of the ALV grid?
(It is like goign to the last page of course)
Thanks,
Ven

Hi,
Yes..You can do it using the OO ALV...You can use the method set_current_cell_via_id ..to show the last record.
Check this example.
* Declarations.
DATA: l_lines TYPE int4,
      l_row_no TYPE lvc_s_roid.
DATA: ok_code LIKE sy-ucomm,
      g_container TYPE scrfname VALUE 'CONTAINER1',
      g_grid  TYPE REF TO cl_gui_alv_grid,
      g_custom_container TYPE REF TO cl_gui_custom_container,
      gs_layout TYPE lvc_s_layo.
DATA: gt_outtab TYPE TABLE OF t001w.
DATA: v_count TYPE i.
*       MAIN                                                          *
CALL SCREEN 100.
*       MODULE PBO OUTPUT                                             *
MODULE pbo OUTPUT.
  SET PF-STATUS 'TEST'.
  SET TITLEBAR 'MAIN100'.
* Create the grid.
  IF g_custom_container IS INITIAL.
    CREATE OBJECT g_custom_container
      EXPORTING
        container_name = g_container.
    CREATE OBJECT g_grid
      EXPORTING
        i_parent = g_custom_container.
* Get the data.
    SELECT * FROM t001w INTO TABLE gt_outtab.
    CALL METHOD g_grid->set_table_for_first_display
      EXPORTING
        i_structure_name = 'T001W'
        is_layout        = gs_layout
      CHANGING
        it_outtab        = gt_outtab.
    DESCRIBE TABLE gt_outtab LINES l_lines.
* Go to the last row.
    l_row_no-row_id =  l_lines.
    CALL METHOD g_grid->set_current_cell_via_id
      EXPORTING
        is_row_no = l_row_no.
  ENDIF.
ENDMODULE.                    "pbo OUTPUT
*       MODULE PAI INPUT                                              *
MODULE pai INPUT.
  CASE sy-ucomm.
    WHEN 'EXIT' OR 'BACK'.
      PERFORM exit_program.
  ENDCASE.
ENDMODULE.                    "pai INPUT
*       FORM EXIT_PROGRAM                                             *
FORM exit_program.
  LEAVE PROGRAM.
ENDFORM.                    "exit_program
Thanks
Naren

Similar Messages

  • Why do PDF files in email open in safari with a quick time logo but only one page shows and I can't scroll through the following pages?

    Why do PDF files in email open in safari with a quick time logo but only one page shows and I can't scroll through the following pages?

    Try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.

  • I can't scroll down the profile page on Facebook app

    I can't scroll down the profile page on Facebook app, resetting the phone by pressing down the home and sleep buttons for 15 seconds to reset the phone didn't work, deleting and re-installing the app didn't solve it either, is there any solution to the problem? Thanks!

    Tap Settings / General / Reset / Reset Network Settings.
    Restart your iPhone.
    Hold down the sleep / wake button until you see the red slider then swipe to power off. Then hold down the sleep / wake button until you see the Apple logo.
    I realize you are using the FB app but try deleting cookies.
    Tap Settings / Safari.
    Clear Cookies
    Try again.

  • When I load Safari on my IPAD2, the web page comes up, but I can't scroll down the page. No matter what web page I go to the content stays darker than the navigation bar. This just started today. All other applications work fine.

    When I bring up Safari on my IPAD2, the web page comes up, but I can't scroll down the page. This just started today. No matter what web site I go to, the content is darker than the navigation pane.

    If it's happening on all sites, then assuming that it's Safari that you're using, have you tried clearing it's cache : Settings > Safari > Clear Cache (other browsers should have similar options, possibly within the actual app instead of within Settings). You could also try closing the app completely : from the home screen double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app (or whichever browser you're using) to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.
    If it's only happening on a particular site then there may be content on that site that isn't supported on the iPad e.g. flash, java, silverlight

  • How can I disable the previous button in the first page and the next button in the last page?

    Hi all,
    I have created a new skin for a webhelp by modifying the layout and the buttons. However, I am not able to find a way where in we can
    disable the previous button ini the first page of the webhelp and hte the next page in the last page of the webhelp. If both the next and previous button is visibile in the first and last page, it is sort of misguiding the user.
    I am using Robohelp 9.
    Please advice.
    Thanks,
    Parag

    I think you are mixing Previous and Next in a browse sequence and the Previous and Next that you get in the browser itself.
    In a browse sequence, they are automatically disabled at the start and finish. When in the first topic in the sequence only Next will be enabled, when in the last topic only previous will be enabled.
    Previous and Next in the browser are working on the topics your user has viewed which is not the same thing.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How can I have a standard text block appear on the last page of my documents?

    How can I have a standard text block appear on the last page of my documents without having to type it in all the time? I have a terms statement with a line for a customer’s signature which I want on the last page of my invoices and right now I have to type it in each time or cut and paste it from a previous invoice. I already have a Master Page that includes the customer information and my company information at the top of each page and I am using data merge to fill each page with the items ordered and their pictures etc. I would just like to have this standard terms block automatically show up on the last page after the last item in the data merge.
    Thank you all in advance for your help.

    Thank you Peter. This works. I have the text block now at the bottom of a second master page which I apply to the last page. For aesthetics I can modify the position of the text block in the new master page to bring it up from the bottom under the last item ordered when there is less than 4 items on the page. (my data merge fits up to 4 items with their images on a page).  If the last page is full I’ll insert a final page using the second master and also bring it up to the top of the page.

  • Can you delete the last page of a document with a script?

    Hello, I have been building a script over the last week to help me remove formatting and reapply some of that formatting on a large number of files. I am still learning alot about how to build scripts and what the commmands are but I am almost doen with everything I need to put in it. One of the last things that I want to add is to delete the last page from the Indesign file whether it has content or not. Is this possible? Can anyone point me in the right direction? Thanks

    Something like this:
    if (app.activeDocument.pages.length > 1)
         app.activeDocument.pages[-1].remove();
    First check if document contains more than one page, and if does, remove last page.
    Hope that helps.
    Marijan (tomaxxi)
    http://tomaxxi.com

  • When reading an EBook, how can I mark the last page I have read?

    When reading a PDF EBook, how can I mark the last page I have read?

    Hi Pickles 77,
    Sorry to hear you are having issues with your iTunes Store purchase.   The following information should help you with this:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    To report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase, follow these steps:
    Find the email receipt for your purchase.
    Click Report a Problem under the app that is having the issue.
    When prompted, enter the Apple ID and password you used to purchase the item, then click Report a Problem.
    Click Report a Problem next to the item you are having an issue with.
    From the Choose Problem dropdown menu, choose the appropriate issue.
    Follow the onscreen instructions and—if prompted—type a description of the problem into the text field.
    Click Submit to have your issue reviewed.
    Hope this helps ....
    - Judy

  • HT4906 I want to download the new updates I think to the 10.9 but our mac was given to us and when it comes to the last page it asks for the user name and password but this mac was wiped clean. How do I find out this info so I can get iPhoto?

    I want to download the new updates I think to the 10.9 but our mac was given to us and when it comes to the last page it asks for the user name and password but this mac was wiped clean. How do I find out this info so I can get iPhoto? To be honest I'm not even sure what type of Mac I have and don't know how to find out what kind it is
    I'd also like to make address labels and don't know where to find that either

    You would make address lables with the Contacts app.
    If you don't have the user name and password used to set up the machine then you need to purchase the apps for yourself.

  • Can i get summary column value of one group appears at the last page once

    Hi,
    I am having one group G_Item.I need the summary column(CS_Total_quantity->source as :cp_quantity) value as Total quantity value of the report andprint it on the last page.How can i get that value?Please advise me.Urgent......Waiting for reply.
    Thank You

    try this...
    put a summery column outside the quey.
    & take sum of "CS_Total_quantity".
    set its reset at property to "report". & print object on "last page".
    hope this 'll work for u.
    Capri...

  • 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..

  • 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

  • How can i let firefox not to remember the last page that i've closed?

    At the beginning, Firefox asked me wither to remember the last page that i've closed or not. i accidently chose yes, but i dont know how to change it back.

    The [[passwords]] article shows how to delete individual usernames/passwords.

  • Terms and conditions not getting displayed on the last page

    Hi All,
    I have to display a smartform, on the front side of the page i have to display material details and on the back side of the page i have to display terms and conditions. I' am unable to print the material details and terms and conditions in duplex mode, but on the last page only material details are getting displayed, terms and conditions are not getting displayed.
    Can you please help me how to make the terms and conditions get printed on the back side of the last page.
    Thanks,

    I'm a bit confused by the statement "I' am unable to print the material details and terms and conditions in duplex mode".
    I suppose you meant to say "I am able to print the material details and terms and conditions in duplex mode", correct?
    If the problem is that on the last form page, the T&C is not getting printed on the back of the form, you could force the T&C page by using a flow logic command as the very last element of the main window, which gets processed when all the data is already output. For the command, use the 'Go to New Page' and specify the page name for the Terms & Conditions.
    In case this causes an issue that the last page is printed twice (since the T&C page is likely defined with the next page being NEXT_PAGE), then copy the already existing T&C page, call it LASTPAGE and leave the Next Page attribute empty.

  • Formatting - 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.
    Thanks in advance.

    Hello,
    I know this is an old post, but I have the same problem. I am unable to access the examples for Note.252881.1 (corrupted file). May I impose on you to send me examples via e-mail? If this is not possible can you point me in a direction where there is "good" documentation on frame manipulations? What I've found on metalink, otn, internet, etc. haven't been too forthcoming.
    Thank you.

Maybe you are looking for