ALV scroll event ?

Hello,
I need to display a long list using a ALV display.  For each line, there are data to be fetched from multiple tables so this can take quite long to accomplish.  To avoid having users to wait while gathering the data for the whole list I would like to be able to gather only data for the lines visible at each time.  So if a user scrolls down, I would select the data for the new lines displayed.
So I was wondering if anyone would know if there is an event in the ALV object which allows me to catch which lines are being displayed ?  The method get_scroll_info_via_id would allow me to know which lines are displayed in the beginning but if a user scrolls down I have no information about this as an PBO event is not triggered.
So if anyone could advise me or has an alternative approach to this problem I would be very grateful.
Regards,
Sigurjon

Hi,
  One solution I can think of is to add your own button to the ALV Toolbar (Like "Show Next Page") and then limit the initial display to certain N number of lines..
  And when user clicks on this button, you read next N number of records and then <b>add</b> these entries to the internal table that is used for ALV display and call REFRESH_TABLE_DISPLAY method..
  Once you reach the end, just disable the button..
  Since you are always adding the lines, if he wants to see previous page he can simply use paging keys or scrollbar...
  Hope this helps..
  May be you already know..but just..FYI, you can handle TOOLBAR event of ALV Grid to add your own buttons to the ALV Toolbar.. Please take a look at sample program BCALV_GRID_05 just in case you need reference on how to add the button..
Sri
Message was edited by: Srikanth Pinnamaneni

Similar Messages

  • How could control the scroll events in ALV OO?

    Hello experts!
    I'm programing a report, inside there is a field that need time of processing. I'm using ALV OO.
    I have thought that it could only calculate the field for the lines that visualize.
    How could control the scroll events to calculate the field of the visualized lines?
    I'm using CL_SALV_TABLE class and cl_salv_events_table to control the events, but there aren't any event to control the scroll.
    best regards!

    Hi Sriram,
    I did view the information that you was attaching, but this don't resolve my problem. With methods get_scroll_info_via_id and set_scroll_info_via_id, we can get and put information of selection and view rows in the screen but we don't control when the user click in the scroll for advance or to back down a page.
    I would like to refresh the data in ALV when the user view news rows.
    I want your genial ideas.
    Best regards!

  • In ALV End_of_list Event  Scrolling Option

    Hi Experts,
    In ALV END_OF_LIST Event if I want to display more records approx:50 .
    iam able to display using Reuse_Alv_Commentary_Write But .Due to high volume of Records Its Overlaping Main List  I need to drag Manually.
    My Question : is There any option where Scrolling is Available for Reuse_Alv_Commentary.
    Thank You.Please Reply.

    Hi,
    Use do_sum = 'X', in the fieldcatalog for the fields for which you need to do the summation.
    Best Regards,
    Durga Naresh Bayireddy

  • Mouse wheel scroll event ON CHANGE?

    Colleagues,
    Very simple question:
    How to get mouse wheel scrolling event on change? Without polling?
    Is Acquire Input Data.vi the only way to get it?
    Thank you in advance,
    Andrey.

    Hi Andrey,
    i think it's not build in. I wrote some years ago the attched vi's, because i also miss this feature. These vi's use the "acquire input data.vi", but it only polls if a control has registered for it.
    Hope it helps.
    Mike
    Attachments:
    ScrollEvent_LV71.zip ‏461 KB

  • Handling Scroll Event?

    Hi i wanted to trap Scroll Event of a JScrollPane's scroll bar
    Can somebody tell how can that be done???
    i wanted to do some action when the scroll bar is moved (that includes dragging the scroll and clicking the up and down buttons)
    ............thanks!

          scrollPane.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener()
            public void adjustmentValueChanged(AdjustmentEvent e)
              // do your thing
          scrollPane.getHorizontalScrollBar().addAdjustmentListener(new AdjustmentListener()
            public void adjustmentValueChanged(AdjustmentEvent e)
              // do your thing
          });

  • Collapse Element on Window Scroll event?

    Hi
    I am trying to implement a functionality wherein:
    I have  a page with multiple panels. I have made the panels expand and collapse enabled.
    When I scroll my page, I would like to be able to collapse the panel, which goes out of scope.
    I tried to apply the logic of reducing the height of the panel for doing this. However, since it needs window.scrollTop to generate the condition to collapse or expand the pane, based on the position of the scroll, it is impossible at the moment.
    I found that we cannot use the window.scrollTop() functionality on SAPUI5 controls. It always ends up gving a 0 value.
    Is there any other way to implement this?
    Can someone please guide me on this??
    Here is an example of what I am trying to achieve in SAPUI5. Please help!
    Edit fiddle - JSFiddle

    Hi Anaya,
    Window.Scroll() will not work. Content in the SAPUI5 application are not directly added to body part.
    In SAPUI5 we have App view which contains Header and Section.
    The page content goes to Section. The CSS property overflow-y of Section is set to auto. so the scroll bar appears at the right side of window is the scroll bar of Section.
    Use,
    $('#id_of_section').scroll(function(){
             alert("Scrolling Happend");  
    It will get the scrolling event. Here you can set the Collapsed true for your panel.
    Regards,
    KK

  • ALV Scrolls to last row

    Hello everybody,
    I have a problem with my WebDynpro ALV. When I am using the calculation functions the ALV scrolls down to the totals line. When I set "Display Calculations at Start of Table" it scrolls to the first row in the Table (which is in fact the behaviour I want to achieve).
    Is it possible to convince my ALV to start at the first row and displaying the totals at the bottom of the Table? I have searched in the cl_salv_wd_config_table, but I did not find anything what soved my problem.
    Anyone any ideas?
    Thanks
    Daniel

    Hi,
    Are you using the standard ALV total functioanlity or custom caluculation.
    Can you be more clear in your requriement.
    Check the method cl_salv_wd_config_table -
    IF_SALV_WD_TABLE_SETTINGS~SET_FIRST_VISIBLE_ROW to set the first visible row.
    Regards,
    Lekha.

  • ALV  ONF4 event

    Hi All,
    I have used the ALV onF4 event for F4 help for a field in an ALV display....But the problem is that this is not getting triggered on pressing F4.....
    What might be the problem..
    I have referred the program : BCALV_EDIT_08.
    -SatyaPriya

    Hi ,
      Please check whether you have created the class to handle events and also set the handlers for it.
    Regards
    Arun

  • Handling a table scroll event

    Hi experts,
    I have a table with several columns. In one column there is a small image thumbnail. After the content (JSONModel) has rendered in the table, a javascript is triggered, which searches for the thumbnails and generates on mouseover bigger preview of that image. However, if I scroll down the table, then the preview is not generated and I would like to re-run that script again. Therefore I would like to handle a table scroll event.
    How could a listener to the scroll event of a sapui5 table be handeled?
    Regards
    Stefan

    HI Stefan
    Here is an example. But it is not officially supported.
    Example
    -D

  • Scroll Event on a hierarchical tree

    Is it possible to intercept a scroll event on a hierarchical
    tree item, and how much the tree has been scrolled?
    many thanks in advance,
    Michele Pantaleo
    null

    Hello,
    I was able to reproduce your issue fast.I was able, also to find a solution to your issue, solution that came after performing several tests.
    What i found out:
    --the expansion begins from root and ends with the last leaf.That is why the scroll bar stays at the bottom.
    --if you click on leaf node and then click expansion(which after the while loop has the following code:
    node := Ftree.Find_Tree_Node(htree, '');
    Ftree.Set_Tree_Selection(htree, node, Ftree.SELECT_ON);)
    it will work to achieve what you want.
    Here is the full procedure for the expanded tree that lets the scroll bar at the top:
    PROCEDURE explose_tree IS
    node ftree.node;
    htree ITEM;
    state varchar2(30);
    state1 varchar2(30);
    BEGIN
    -- Search the tree identifiant --
    htree := Find_Item('block2.tree4');
    -- Search the root --
         node := Ftree.Find_Tree_Node(htree, '');
         --Ftree.Set_Tree_Selection(htree, node, Ftree.SELECT_ON);
    -- Expand all nodes --
    WHILE NOT Ftree.ID_NULL(node) LOOP
    state := Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_STATE);
    IF state = Ftree.COLLAPSED_NODE THEN
    Ftree.Set_Tree_Node_Property(htree, node, Ftree.NODE_STATE, Ftree.EXPANDED_NODE);
    elsIF state = Ftree.LEAF_NODE then --this is the key that help to solve your problem
         Ftree.Set_Tree_Selection(htree, node, Ftree.SELECT_ON);
    END IF;
    node := Ftree.Find_Tree_Node(htree, '', ftree.find_NEXT,Ftree.NODE_LABEL,'', node);
    END LOOP;
    -- Now go the root --
         node := Ftree.Find_Tree_Node(htree, '');
    --you need to select the root, otherwise the scroll bar will be at the bottom     
    Ftree.Set_Tree_Selection(htree, node, Ftree.SELECT_ON);
    end;
    Regards,
    Alex

  • ALV Print event in Custom Button

    Hi,
    I have requirement to call ALV print event in Custom Button after some condition. Can anyone give me the solution or link to achieve this requirement.
    Thank in advance.

    Hi Mani,
    On that ALV button event, write the following code.
      DATA lo_component TYPE REF TO if_wd_component.
      DATA lo_appl      TYPE REF TO if_wd_application.
      lo_component = wd_comp_controller->wd_get_api( ).
      lo_appl      = lo_component->get_application( ).
      lo_appl->print_page( ).
      DATA lo_app_info TYPE REF TO if_wd_rr_application .
      lo_app_info = lo_appl->get_application_info( ).
      DATA lv_app_name TYPE string .
      lv_app_name = lo_app_info->get_name( ).
    It helps you to print the table contents. Hope this helps you.
    Thanks
    KH

  • Wrong messagetype while processing in an alv grid event

    Hello,
    a brief discription of my problem:
    I am processing a standard SAP form "PERIODE_PRUEFEN" which calls the function "READ_CUSTOMIZED_MESSAGE". The routine is called inside an event-handler of the ALV Grid event 'user_command'. The messagetype is selected from a customising table 'T100C'. Despite the messagetype 'W' the program is always aborted with an 'E' message.
    What I have tried so far:
    1. I debugged the SAP standard transaction 'fb08' which runs exactly the same functions with the same values and it works.
    2. I changed the messagetype in the debugger - no success
    3. I searched the SAP notes, but theres nothing about my problem
    I guess the problem is somewhere in the ALV Grid event, because this is the only difference between the SAP standard an my program. Maybe the message is processed wrong while beeing called within an event.
    It would be great to get some useful hints to solve this problem

    Hi,
    The ABAP runtime environment handles messages according to the type declared in the MESSAGE statement and the context in which the message was sent.
    The behaviour of message type 'W' in a dialog is different from a report program.
    Run demo program DEMO_MESSAGES, select Main Program, Type 'W' and execute. You will get an error message instead of warning message.
    This behaviour is well documeneted in the on-line help for MESSAGE statement.
    Regards,
    Rao A

  • Stopping animations temporarily on scroll event

    Hey everyone!
    I'm currently working on a rather large edge animate project and I ran into a small problem. I have a lot of animation and effects going happening on my page and I have tested how quickly the animation renders on many devices and I am well pleased with how smoothly the animations play, however when I am using an older computer using google chrome (chrome seems to be the browser that I have the most problems with when using edge animate for some reason?) and I try to scroll down the page it becomes very glitchy and it takes a while for everything to catch back up. So I was wondering if there was a way to detect the scroll event of a symbol (not the stage because it is the symbols that scroll, not the stage) and pause the code from rendering for that time. Please let me know if anyone has any solutions for this!
    Thank you so much in advance!

    Hey everyone!
    I'm currently working on a rather large edge animate project and I ran into a small problem. I have a lot of animation and effects going happening on my page and I have tested how quickly the animation renders on many devices and I am well pleased with how smoothly the animations play, however when I am using an older computer using google chrome (chrome seems to be the browser that I have the most problems with when using edge animate for some reason?) and I try to scroll down the page it becomes very glitchy and it takes a while for everything to catch back up. So I was wondering if there was a way to detect the scroll event of a symbol (not the stage because it is the symbols that scroll, not the stage) and pause the code from rendering for that time. Please let me know if anyone has any solutions for this!
    Thank you so much in advance!

  • Drop Down List in ALV with Event handler

    Hi All ,
    I have created an ALV grid with a dropdown as one of the columns. This all works fine, except that I want to be able to react to a change in the value of each line's dropdown the next column values should change according to the user selection in the 1st column .
    Is this possible?
    As an example, I have a table of records with one column as a dropdown called " Replace Function Module "   and in 2nd column i have call function of that Replace Function Module , If a  change in " Replace Function Module " should change the call function of in the 2nd column .
    I am using these objects lvc_t_drop , lvc_s_drop and  the method  " set_drop_down_table ",
    Please Can any 1 tel me how to do this with any event handler ar any other way !

    Hi,
    You need to use event handler for this. Check if the below link gives some direction.
    [http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01]
    I guess you should create a method inside which you call the FM using the FM name from the selected cell in ALV.
    I have not tried it out, but its worth a try.
    Hope this helps!
    Regards,
    Saumya

  • ALV Tree event registration doesn't work

    Hello Experts,
    the following is the registration-form which shall register a item-double-click event to my alv-tree-object. when doing the double-click it doesn't open my own methods in the event-handler class but the standard ones and nothing happens further.
    Any ideas?
    Many thanks in advance!
    Tobias
    FORM register_events.
      DATA: lt_events TYPE cntl_simple_events,
            l_event TYPE cntl_simple_event.
      CALL METHOD g_alv_tree->get_registered_events
        IMPORTING
          events = lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
      APPEND l_event TO lt_events.
      CALL METHOD g_alv_tree->set_registered_events
        EXPORTING
          events                    = lt_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      IF sy-subrc <> 0.
        MESSAGE x208(00) WITH 'ERROR'.                          "#EC NOTEXT
      ENDIF.
      CREATE OBJECT event_handler.
      SET HANDLER event_handler->handle_item_double_click FOR g_alv_tree.
    ENDFORM.

    It doesn't matter where I place my double-click. The standard event handling "handle_event" is called.
    Instead of this I would like to have my coding.....
    Changing the cl_gui_alv_tree to cl_gui_column_tree doesn't work since my tree isn't a reference of column_tree but of alv_tree. So I would have to rebuild nearly the entire tree. This cannot be a solution since I guess the double-click item should work anyway.
    What I am wondering furthermore is my button declaration not being displayed. The following is my fieldcatalog declaration:
    FORM create_tree_fc.
      DATA: ls_fc TYPE lvc_s_fcat.
      DATA: lo_descrref   TYPE REF TO cl_abap_typedescr.
      DATA: lo_tableref TYPE REF TO cl_abap_tabledescr.
      DATA: lo_structref TYPE REF TO cl_abap_structdescr.
      FIELD-SYMBOLS: <fs_str> TYPE abap_compdescr.
      lo_tableref ?= cl_abap_tabledescr=>describe_by_data( lt_report_tree ).
      lo_descrref ?= lo_tableref->get_table_line_type( ).
      lo_structref ?= lo_descrref.
      CLEAR gt_fc[].
      LOOP AT lo_structref->components ASSIGNING <fs_str>.
        CLEAR ls_fc.
        ls_fc-fieldname = <fs_str>-name.
        ls_fc-intlen = <fs_str>-length.
        ls_fc-inttype = <fs_str>-type_kind.
        ls_fc-decimals = <fs_str>-decimals.
        CASE <fs_str>-name.
          WHEN 'PROCESS_TYPE'.
            ls_fc-tooltip = 'Process Type'.
            ls_fc-coltext = 'Process Type'.
            ls_fc-emphasize = 'C110'.
            ls_fc-no_sum = 'X'.
            ls_fc-style = cl_gui_column_tree=>item_class_button.
            ls_fc-outputlen = 20.
          WHEN 'SMI_PROJECT'.
            ls_fc-tooltip = 'Project Relation'.
            ls_fc-coltext = 'Project'.
            ls_fc-hotspot = 'X'.
            ls_fc-no_sum = 'X'.
            ls_fc-style = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
            ls_fc-outputlen = <fs_str>-length.
          WHEN 'TRORDER_NUMBER'.
            ls_fc-tooltip = 'ID of Transport Request'.
            ls_fc-coltext = 'Transport Request'.
            ls_fc-no_sum = 'X'.
            ls_fc-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.
            ls_fc-outputlen = 30.
        ENDCASE.
        APPEND ls_fc TO gt_fc.
      ENDLOOP.
    ENDFORM.
    Edited by: Tobias Fickinger on Jun 10, 2009 9:59 AM
    Edited by: Tobias Fickinger on Jun 10, 2009 10:00 AM
    Edited by: Tobias Fickinger on Jun 10, 2009 10:03 AM

Maybe you are looking for