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.

Similar Messages

  • Can't scroll to last row in a JTable

    I am having great difficulty in getting a scrollable
    JTable to scroll to the very last row.
    I've done the following:
    int lastRowIndex = table.getRowCount() - 1;
    Rectagle rect = table.getCellRect(lastRowIndex);
    table.scrollRectToVisible(rect, 0, true));
    BUT, it always scrolls the the row just prior to
    the last... never the last. I've checked, and my
    lastRowIndex is correct. I've even tried something
    as stupid as just increasing lastRowIndex by 1,
    and it still does not work.
    So, I am at a loss as to why this does not work.
    b.c

    Moving the scroll bar to the bottom (maximum) had
    no effect. In fact, doing that alone ought to
    acheive the same goal.
    However, I have discovered that if I do either
    (move scroll bar or set viewport to last cell's
    rectangle) TWICE, it works.
    I speculate that there is some kind of latency
    in the GUI "knowing" what the maximum extent really
    is. Trying to move to the end the first time fails,
    but it does cause the GUI to refresh itself
    immediately afterwards so that if I try this a
    second time, it works.
    I can achieve the same results if I simply
    ***force a re-paint before attempting to move
    the the last cell***. Then, it works.
    So, my solution was to do the following:
    __ int lastRowIndex = myTable.getRowCount() - 1;
    __ if (lastRowIndex > -1)
    _____ // repaint the window first.
    _____ Rectangle bounds = getBounds();
    _____ bounds.x = 0;
    _____ bounds.y = 0;
    _____ paintImmediately(bounds);
    _____ // Now, move to the last row
    _____ bounds = myTable.getCellRect(lastRowIndex, 0, true);
    _____ myTable.getScrollPane().getViewport(
    _____ ).scrollRectToVisible(bounds);

  • Datagrid last row flickering problem.

    Hi,
        I used flex 3.5 datagrid. It is a complex datagrid with lot of itemrenderers and itemeditors.when my datagrid has vertical scroll and when i scroll datagrid, last row keep on flickering.
         any idea or solution for this problem?   

    my grid contains 6 columns. Among 6, some of the column texts are  visible some of them hided.
    it is only happens to last row of the Datagrid.
    This is happened when i scroll my datagrid vertically.

  • How to auto scroll a table to last row when using Active Data Service?  11g

    Hi all,
    Has anyone got any experience with the ADF Active Data Service?
    I am using an af:table in combination with the ADF Active Data Service and I want the table to scroll to the latest row when new data arrives.
    It is basically a simple setup:
    The value attribute of my table points to a bean that extends CollectionModel and implements ActiveDataModel. This works perfectly. A soon as I receive new data in my bean, the table is automatically updated (e.g. a new row is inserted). I use JDev version: 11.1.1.3
    The problem is that I can not get the scroll bar to move down to the last row automatically when new data arrives. The auto scroll only works for the client that actually performs a submit. In other words the person that submits the new data, will see his scrollbar move down, this is because I added the following code:
    RowKeySet rowkeysset = chatTableBinding.getSelectedRowKeys();
    rowkeysset.clear();
    rowkeysset.add(getRowKey());
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.chatTableBinding);
    This does not work for the clients that receive the new data via the Active data model. Apparently the active data service partially refreshes the table, but not in such a way that it sets the selected row to the last row?
    My table definition:
    <af:table value="#{pageFlowScope.chatBean.instantMessagingChatwindowBean}" var="row"
    id="t1" columnStretching="last" rows="10"
    styleClass="AFStretchWidth" autoHeightRows="10" contentDelivery="immediate"
    horizontalGridVisible="false"
    verticalGridVisible="false"
    disableColumnReordering="true" displayRow="last"
    rowSelection="single"
    binding="#{pageFlowScope.chatBean.instantMessagingChatwindowBean.chatTableBinding}"
    inlineStyle="height:80px;">
    p.s.
    The table is used to show incoming chat message.
    I am building a chat client (taskflow) in a Webcenter application. The concept is similar of that presented by Lucas Jellemain in his blogpost on building a Google Talk Client http://www.oracle.com/technetwork/articles/jellema-googletalk-094343.html

    Dan,
    This is a thanks for posting your findings. You saved me quite some time.
    <af:selectBooleanCheckbox id="showOnlyActiveSubscriptions" selected="true"
    label="Show only active services:"
    value="#{servicePortfolioBean.showOnlyActiveSubscriptions}"
    autoSubmit="true" />
    <af:table binding="#{servicePortfolioBean.serviceTable}" ...
    partialTriggers="showOnlyActiveSubscriptions">
    Of course, when I add a "ValueChangeListener" to the selectBooleanCheckbox, the PPR stops working. :( I wonder why?

  • ALV grid to excel :    last row datas are missing   (Ecc6.0-GUI7.1)

    Hello,
    Some colums are empty in the last row by clicking into the excel icon???
    Please note ,I must not use the print preview.
    I have specified outputlen and datatype for the fieldcat but it doesn' t resolve the problem.
    Thank you very much,
    JcNavech.

    Hello,
    any idea about how to sove this problem? I have it as well.
    My ALV has 132 rows and 24 columns and when exporting to Excel last 19 coulmns of very last row are empty.
    I don't think that Suggested Note 1429136 solve this problem because I have much less that 256 columns and 65536 rows.
    Thank you!
    Best regards
    Guido
    PS: I have ECC 6.0 - SAB BASIS SAPKB70014 and SAP GUI 7.10

  • How to display the last row in a table

    I have a table that is constantly updating, and I always want to see the last row. How can I get my table to auto scroll?

    Hi žabić,
    there is a property called "top left visible row". You can use it to scroll your table.
    edit:
    Maybe this is not the exact name, but you can see an example here
    Mike
    Message Edited by MikeS81 on 05-27-2010 03:57 PM

  • How to set focus on the last row of JTextPane

    how to set focus on the last row of JTextPane?
    import javax.swing.*;
    import javax.swing.text.html.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyGUITest extends JPanel implements ActionListener
    {   public static void main(String[] args)
        {   SwingUtilities.invokeLater(new Runnable()
             {   public void run()
              {    JFrame f = new JFrame("My GUI");
                  MyGUITest GUI = new MyGUITest();
                  GUI.setOpaque(true);
                  f.setContentPane(GUI);
                  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  f.pack();
                  f.setLocationRelativeTo(null);
                  f.setVisible(true);
        JTextPane txtP;
        JButton add;
        HTMLEditorKit hek;
        HTMLDocument hd;
        String txt;
        MyGUITest()
        {     this.setLayout(new BorderLayout());
         this.setPreferredSize(new Dimension(400,200));
         txtP = new JTextPane();
         txtP.setEditable(false);
         txtP.setContentType("text/html");
         txtP.setText("");
         hek = new HTMLEditorKit();
         txtP.setEditorKit(hek);
         hd = new HTMLDocument();
         txtP.setDocument(hd);
         JScrollPane sTxtA = new JScrollPane(txtP);
         add = new JButton("add");
         add.addActionListener(this);
         sTxtA.setBorder(BorderFactory.createTitledBorder(""));
         this.add(sTxtA, BorderLayout.CENTER);
         add(add, BorderLayout.SOUTH);
         new Thread(new Runnable()
         {   public void run()
             {   while(true)
              {   try
                  {     Thread.sleep(100);
                  }catch(InterruptedException ex)
                  {     ex.printStackTrace();
                  appendText("This is <b>HTML</b> text");
                  //add.doClick();
         }).start();
        public void actionPerformed(ActionEvent e)
        {     txt = "<b>asd</b>";
         try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
        public void appendText(String txt)
        {     try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
    }thanks~

    anIdiot wrote:
    im not sure what is the caret location...So don't youthink you should have looked for it in the API?
    anyway, i want the scroll bar to scrolled down automatically when the output is displayed.
    normally, the scroll bar is scrolled down automatically when a new text is inserted, but it doesnt work on this timeGo through camockr's http://tips4java.wordpress.com/2008/10/22/text-area-scrolling/
    db

  • Abap WD ALV: Event for calculation row?

    Hi,
    i have one Abap WebDynpro ALV Component. It is possible to register an event (ON_CLICK) for Cells which are an Link_to_action for example.
    My Table:
    ID | Group | Var
    A1 | Test | 4
    A2 | Test | 5
    A3 | Dev | 4
    A4 | Dev | 6
    If i create the ON_CLICK event for the last row, which is then a link_to_action column, i can click on the numbers and the event is triggered
    Now i have a table which uses the ALV Calculation feature and the Intermediate Results for the grouping.
    My new output view is:
    ID | Group | Var
    ->---Test    9
      A1 | Test | 4
      A2 | Test | 5
    ->---Dev  10
      A3 | Dev | 4
      A4 | Dev | 6
    (It calculates the sum of the vars and groups it by the second column)
    Now I need an Event if someone clicks on the numbers in the Var Row of the intermediate results row (here: 9 and 10). How can i do this?
    If this is not possible, how can i register an event if someone expands or collapses a intermediate result row?
    Kind Regards,
    Thomas
    Edited by: Thomas Rodemer on Oct 9, 2008 3:30 PM
    Edited by: Thomas Rodemer on Oct 9, 2008 3:30 PM

    Hi,
    Is the DDLBK is filled with support function? if yes then look if you can enhance the method by post method exit etc..
    Thanks,
    Chandra

  • Lock datagrid last row with agregates (don't know what to do next :( )

    Hi,
    I have been googling for 2 hours and have been reading some forum posts, etc... but can't get this thing working. It seems an important flaw in datagrid, because I'm sure lota peopple needs this, but I've not found a good solution.
    What I need to do is add a row of agregates to a datagrid that contains flat data (it must be last one, and locked, I mean, must not scroll). I have been reading about this:
    http://blogs.adobe.com/aharui/2008/03/flex_3_datagrid_footers.html
    But this makes the row separated from the grid, I mean, It is not really a datagrid row. Other problems arise using this implementation like, impossibility to keep last row aligned with datagrid columns when scrolling (I need to scroll because I have lota columns), etc...
    So, could anybody please help here to accomplish this? I think it is a pretty common task and it is a bit dissapointing it can't be done easily with flex.
    Thanks in advance,
    Aron.

    I haven't seen this done.
    You can add a summary row fairly easily using the Advanced Data Grid:
    http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_10.html

  • Table Scrolling / Selecting a row

    Suppose you have a JTable with 100 rows, 4 columns, where only 20 rows are visible. Suppose also that the first row has focus. Now, I use the scroll bar to view the 50th row so that I am viewing somewhere in the middle of the table (that is, it is not the last row visible). If I click on the row to give it focus, the table repositions the table so that the 50th row is the last row visible.
    Why does this happen? Can I disable/work around this?
    It is not critical, although it is annoying to customers.
    Thanks.
    Vic

    I should make sure you are testing the right situation.
    The program is a GUI client for our software. The client window consists of a menu. From the menu you may select one of the programs features (enter invoice for example).
    One menu option will build a table as described in my original message. The table is dispalyed in a new window, which displays 20 lines of the 100+ row table. It is the table itself that scrolls, not the window.
    If this how you tested, then perhaps the runtime vs is in question?
    We are currently using JRE 1.3.1 (and JSDK 1.3.1).

  • Not able to see last row of the table

    Hi,
    I have a table in jsff page and it is displaying some rows. But if i navigate from some other page by Button, half of the last row of the table is not appearing(means vertical scroll bar is not displaying).
    I am using Mozilla firefox 3.6.21 and my resolution is 1366*768(highest one) with windows7 installed on laptop.
    The horizontal scrollbar overlaps half of the last record.Please refer the below screenshot.
    ftp://bugftp.us.oracle.com/upload/bug_13/bug13535381/Discovery_scan_no_vertical_scrollbar_for_first_time.jpg
    Regards,
    Raghu.

    Man, don't you get it?
    Post you question in an internal forum. We can't help you as we don't have access to Oracle internal stuff.
    And you can't attach anything in to public forum, no file no image, nothing at all.
    Please read the https://forums.oracle.com/forums/help.jspa and https://forums.oracle.com/forums/ann.jspa?annID=56 which covers this.
    Timo

  • How to get the last row in a resultset or query

    Hi All
    Say If I have a complex query which returns a resultset say 15 rows. Now I want to limit the output showing only the last row.
    How can we do this

    Keep in mind Oracle does not keep "row" order as such. Unlike a graphical type db like Access, Oracle will not always give you back the results in order.
    Even if you were to use a sequence, your query is never guaranteed to give back the results in the order you are expecting. You must then give an order by statement to all queries expecting the order.
    Your definition of last row too is vague - if it is in fact the greatest amount, use the inline view suggestion. If you simply want to see the last inserted row, consider adding a last_update_date column inserting the sysdate (by a trigger perhaps). This would then allow you to see the last inserted row.
    Enjoy!

  • How to get the last row of a database table.

    HI ,
    I want to get record exactly from the last row of a database table.
    How is that possible?

    Hi,
    To fetch last record from an internal table, just do find the number of records in it and read using index.
    DESCRIBE TABLE ITAB LINES L_LINES.
    READ TABLE ITAB INDEX L_LINES.
    You can also use LOOP .. ENDLOOP but the above method is better (performance wise).
    using LOOP .. ENDLOOP.
    LOOP AT ITAB.
    **do nothing
    ENDLOOP.
    **process ITAB (Header record of ITAB).
    **after ENLOOP, ITAB will have the last record of the internal table.
    [here ITAB is internal table as well as header record.]
    But what is the requirement?
    If you are looking for the current record of an employee then you can use ENDDA = HIGH_DATE.
    My advice is to review your requirement again and try to fetch only that record which you need.
    Mubeen

  • How do I create a new row on tab out of the last column, last row?

    JDev 11.1.2.1.0.
    I've seen a few topics on this but none that I think were really very good solutions.
    Use Case:
    On tab out of the last column in the last row, a new row should be added to the end of the table. Bonus points for setting the focus to the first <af:inputText> of the newly created row.
    Complications:
    1. I'm having a heck of a time trying to find a function that returns the column's displayed index. Sadly, <column binding>.getDisplayIndex() returns -1 unless the user has manually re-ordered the column.
    2. Value Change Listeners only fire if there is a value change. Guess that means I need to do client/server listeners to check each and every <af:inputText> for a tab press?
    3. I'm not even going to get into setting the focus. With all the templates, regions, etc. going on, it's dang near impossible.
    Any ideas on how to attack this one?
    Will

    Hi,
    You will need to use the Run Engine Installation Wizard found on the Tools menu. In addition you need to create a installation set for the operator interface.
    Look at Chapter 16 Distrubuting TestStand ( chapter 17 for version 2).
    Once you have created your installation, install is on your new system.
    The serial number etc is part of the process model. When you run the entry point 'Test UUTs' the PreUUT callback is executed which asks the user for the serial number.
    Hope this helps
    Ray Farmer
    Regards
    Ray Farmer

  • Sqlldr - can you skip last row from a data file

    Hi
    I need to skip last line from the data file when I load the data into the tables. Is that possible to do using sqlldr, if yes How?
    Also, the first row in the data file, which has a single column needs to be loaded into all the rows of the table. How can i do that?
    Example
    020051213
    1088110 0047245 A 000000000000GB 00000496546700
    1088110 0719210 A 000000000000GB 00001643982200
    1088110 0727871 A 000000000000GB 00000083008900
    9010163
    The first line needs to go into all the rows, and the last row needs to be skipped. Remaining can be loaded normally. I think this would take multiple loads. Can anybody please help.
    TIA

    here i am sending a control file sample which use the when clause
    in sql loader
    load data
    infile 'load_4.dat'
    discardfile 'load_4.dsc'
    insert
    into table sql_loader_4_a
    when field_2 = 'Fruit'
    field_1 position(1) char(8),
    field_2 position(9) char(5)
    into table sql_loader_4_b
    when field_2 = 'City'
    field_1 position(1) char(8),
    field_2 position(9) char(5)
    )

Maybe you are looking for