Setting first visible row in Web Dynpro ALV in Releases above 7.0

Hello Everybody,
I have an ALV in which a particular row should be set to lead selection and also set as the first visible row in this ALV for the first display. The index for this row is determined at runtime.
I used the method SET_FIRST_VISIBLE_ROW of the interface IF_SALV_WD_TABLE_SETTINGS and it worked fine in a system of Release 7.0.
However, after the system has been upgraded to 7.02, this is not working. The row is lead selected but it is not set as the first visible row and as a result I need to scroll down and look for the row that is lead selected.
Does anybody have suggestions?
Thanks!
Vidya

Hello Srilatha,
Thanks a lot for your suggestion! I am calling method SET_FIRST_VISIBLE_ROW in the wddoinit method of the view.
I tried checking in the debugging mode by inserting a call to GET_FIRST_VISIBLE_ROW in both the wddoinit method as well as wddomodifyview method.
The value of the first visible row is correct in both these methods but when the screen is rendered, the first row of the ALV continues to be the first visible row.
  CALL METHOD wd_this->lref_nd_node_rename->set_lead_selection_index
    EXPORTING
      index = lv_leadselection.
  wd_this->lref_table_settings ?= wd_this->lref_value.
  CALL METHOD wd_this->lref_table_settings->set_first_visible_row
    EXPORTING
      value = lv_leadselection.
  " Set vertical scrollbar height to 15 rows
  CALL METHOD wd_this->lref_table_settings->set_visible_row_count
    EXPORTING
      value = '15'.
Here lv_leadselection contains the index of the row that needs to be lead selected (in this case it is 3)
lref_value is of type CL_SALV_WD_CONFIG_TABLE
lref_table_settings is of type IF_SALV_WD_TABLE_SETTINGS
lref_value and lref_table_setings are view attributes.
Thanks and best regards,
Vidya

Similar Messages

  • Action on selected row in Web dynpro ALV grid

    Hello,
    i'm pretty new on web dynpro development, and i need some help.
    I have a working grid alv and i would like to create an event when i select a row (not editable).
    I have looked around and didn't find anything interesting.
    Do you have a solution?
    Thanks a lot.
    Cedric

    Hi.,
    U have to use onLeadSelection  Event Handler.,
    Check this tutorial.,: [ALV onLead Selection another ALV|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7020c76f-c40e-2e10-a795-d88e67740ee4?quicklink=index&overridelayout=true]
    hope this helps u.,
    Thanks & Regards
    Kiran.

  • Web Dynpro ALV grid filter on date

    Hi,
    I want to set a "view" on my web dynpro alv grid that uses the current date.  Is there a way to specify the current date in the filter values?  Thanks,
    Samir

    Thanks Thomas.  I will certainly look into using POWL in the future.
    A related question - Its possible to use a filter by entering something like " .01. " but it doesnt seem to allow me to save that value as its not a date.  Is there any way around this?  Thanks

  • Adding rows in web dynpro ABAP Dynamic Interactive form.

    Hi Experts,
              I am having problem in web dynpro ABAP Dynamic Interactive form.
    This is my scenario....
    I have a dynamic interactive form that has buttons to add and remove rows in a table. It works fine when I preview it , but when I render, view or save it using ADS, it no longer works. The "add" button actually does instantiate more repeating rows, because I put some trace messages in to count them, but the added rows are not displayed. How do I make them visible?
    In web dynpro java we write some coding in modify view to set the pdf form as dynamic
    IWDInteractiveForm iForm =
    (IWDInteractiveForm)view.getElement("<ID>");
    iForm.setDynamicPDF(true);
    simillarly what we need to write in web dynpro ABAP.
    Please give me solution for the same.
    Thanks,
    Sathish

    hi all,
             expecting reply from u all. pls help me and give some sugesstion.
    regards,
    vinoth.

  • Input field in Web Dynpro ALV does not have correct focus

    Hello Friends,
    Our client's SAP system is recently upgraded with ECC 6.0 SP 18.
    After that the focus in the editable field of Web Dynpro ALV does not working properly by down arrow navigation.
    The common scenario:
    The ALV has more than one rows and one column is editable...
    when user is selecting field of first row and making some entries...
    after that pressing down arrow it is going to next row and coloring the field like focusing...
    but the 'cursor' is not blinking so user can not make entry without clicking by mouse...
    this was working Ok before upgrade...
    Could you please anyone have a look and propose a suitable solution?
    Thanks
    Krish

    Hello,
    The problem was with Javascript....which play an important role in layout of web dynpro ALV...
    which resides in MIME repository -> SAP ->PUBLIC - >BC ->NW5 ->JS ->SAPURI_Ie6....
    We wrote to SAP for giving us the fix...
    after we got a new file from SAP the problem is solved...
    also we have to clear server cache through SMICM and client cache...
    Thanks.
    K.

  • How to Email POWL Reports / Apply Web Dynpro ALV Table Layout Settings

    Hi all,
    we want to be able to automatically extract POWL reports and email them to users in a batch job.
    We can refresh a POWL report using FM POWL_QUERY_REFRESH, and access the raw report data using method CL_POWL_QUERY_ACCESSOR=>GET_CACHED_RESULTS.
    However this merely gives us a table of raw data.  No view layout (ie. Web Dynpro ALV table layout) settings have been applied, so there is no hiding or arranging of columns, row sorting, calculations or filters.
    Ideally we would like to be able to specify a query and view layout.  The batch job would then refresh and extract the data, and format the data according to the view layout before sending it on as an attachment in an email.
    Does anyone know how to determine and apply Web Dynpro ALV table layout settings to format table data outside of the Web Dynpro environment ?
    Thanks & regards,
    Grogan

    Hi Grogan,
    Did you find out how this works..i also have the same issue.
    Thanks
    Jdsouza

  • Web Dynpro ALV grid column colour

    Hi,
    I have tried to set the colour of a column for my web dynpro alv with the below code but it the colour for this column has not changed - it seems to remain the standard colour.  Is there something else i need to do?
      DATA: lt_columns TYPE salv_wd_t_column_ref
          , ls_columns  TYPE salv_wd_s_column_ref
          , lr_column TYPE REF TO cl_salv_wd_column
      lt_columns = lo_value->if_salv_wd_column_settings~get_columns( ).
      LOOP AT lt_columns INTO ls_columns.
        IF ls_columns-id CS 'TOTAL_'.
          lr_column = ls_columns-r_column.
          lr_column->set_cell_design( cl_wd_abstr_master_table_col=>e_cell_design-positive ). "CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GROUP_LEVEL1
        ENDIF.
      ENDLOOP.

    Hi Samir,
    You will have to create an attribut WDUI_TABLE_CELL_DESIGN and bind this attribute with the cell design property of the column. Check this wiki link [https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Web%20Dynpro%20ALV%20-%20Change%20Cell%20Colour%20based%20on%20Content], it will solve your issue.
    Regards,
    Radhika.

  • Web Dynpro ALV grid totals

    Hi,
    I have created an application that uses a web dynpro alv grid.  I want to display totals - is there a setting that can do this automatically - if so, can you please tell me how to do this?    Thanks,

    Hi
    You can take help of following code snippet to create totals for a particular column
    Data: lr_function_settings TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_column          TYPE REF TO cl_salv_wd_column,
            lt_column type salv_wd_t_column_ref,
            ls_column type salv_wd_s_column_ref.
    Data:  lr_field_amnt type REF TO CL_SALV_WD_FIELD.
    * get reference of ALV component
      lr_salv_wd_table = wd_this->wd_cpifc_OVERVIEW_EARNED_ALV( ).
      wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
    *  get function settings
      lr_function_settings ?= wd_this->alv_config_table.
    * display columns in correct order
      lr_column_settings ?= wd_this->alv_config_table.
      lt_column = lr_column_settings->get_columns( ).
      loop at lt_column into ls_column.
    CASE ls_column-id.
    when 'AMOUNT'
    * aggregate field
            CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_FIELD_SETTINGS~GET_FIELD
              EXPORTING
                FIELDNAME = 'AMOUNT'
              RECEIVING
                VALUE     = lr_field_amnt.
    * create aggregate rule as total
            CALL METHOD LR_FIELD_AMNT->IF_SALV_WD_AGGR~CREATE_AGGR_RULE
              EXPORTING
                AGGREGATION_TYPE = IF_SALV_WD_C_AGGREGATION=>AGGRTYPE_TOTAL
              RECEIVING
                VALUE            = lv_aggr_rule.
    endcase.
    Regards
    Manas DUa

  • Web Dynpro ALV grid column width

    Hi,
    I have a web dynpro alv grid that has columns titles that are long.  What is the best way of displaying the data without taking up too much space with the titles? 
    For example is it possible to wrap the title into 2 or 3 rows
    Thanks,
    Samir

    Hi,
    DATA: lr_column type ref to cl_salv_wd_column,
    lr_colheader type ref to cl_salv_wd_column_header.
              CALL METHOD lrcolumn->get_header
                RECEIVING
                  value = lr_COLHEADER.
    lr_COLHEADER->set_ddic_binding_field( if_salv_wd_c_ddic_binding=>ddic_bind_short ).
    Refer this if_salv_wd_c_ddic_binding in se24 for more.
    Regards,
    Lekha.

  • Wrapping text with web dynpro ALV

    Hi there,
    I have got an web dynpro ALV and have set the SET_FIXED_TABLE_LAYOUT value to abap_true. This provides what i need apart from instead of not showing the text that can not be fit into the available column width I would like it to wrap the text, so it is all displayed. Is this possible?
    Also is there a way to allow the user to change the width of the columns by clicking on them and dragging them bigger/smaller.
    Thanks and Regards
    Mart

    Hi Mart,
    Please refer this [thread|Wrap in ALV], it might help.
    Also is there a way to allow the user to change the width of the columns by clicking on them and dragging them bigger/smaller.
    Refer the reply of Thomas Jung in this [thread|Adjusting Column width on Web Dynpro ALV].
    Regards
    Arjun
    Edited by: Arjun on Feb 23, 2009 10:48 AM

  • First visible row on a CatalogTable

    My first visible row property on a CatalogTable is always display at row 2.  I've set the property to 1 in the layout design and I've tried setting it using within the wdDoModifyView, but it still displays row 2 first.  This causes my users to perform a page up to see row 1.  Can anyone tell me why I cannot set it correctly?
    IWDTable tv = (IWDTable)view.getElement("CatalogTable");
    tv.setFirstVisibleRow(1);

    Hi Steve
    IWDTable tv = (IWDTable)view.getElement("CatalogTable");
    tv.setFirstVisibleRow(<b>0</b>);
    BR
    Sergei

  • Detail Button in Web Dynpro ALV

    Hi at all,
    when I create an ALV in Standard ABAP there is a small "Detail" button on the left side of the button row without any additional complex programming.
    How can I get this button in Web Dynpro ALV?
    Dirk

    The standard ALV Component in Web Dynpro doesn't have this features.  It wouldn't be too difficult to add manually.  You could simply bind a custom view to the lead selection of the same context you are using in the ALV and use the form wizard to generate the UI elements.  It isn't quite as nice becuase it woudl require a few manual steps for each usage of the ALV where you want this functionality.

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • Web dynpro Alv ENHANCEMENT

    hI,
    i HAVE a requirement to add extra 2 columns in web dynpro alv of standard web dynpro component
    what are the steps to be taken.

    Hi Madhav,
    Please cehck Thomus answer in this thread..
    is possible to enhance standard ALV?
    Enhancement Implementation - Removing columns in standard ALV table
    Cheers,
    Kris.

  • Web Dynpro ALV grid sub totals

    Hi,
    I have managed to get totals working with web dynpro ALV using code like this :
      DATA: lr_field TYPE REF TO cl_salv_wd_field.
    For total calculations...
      lo_value->if_salv_wd_std_functions~set_aggregation_allowed( abap_true ).
      lr_field = lo_value->if_salv_wd_field_settings~get_field( 'N_OF_DLRS' ).
      lr_field->if_salv_wd_aggr~create_aggr_rule( aggregation_type = if_salv_wd_c_aggregation=>aggrtype_total ).
    Please can someone advise how i can do subtotals also.  Thanks
    Edited by: Samir Vora on Jul 15, 2009 12:40 PM

    Hi,
    For creating subtotals, you can have a look at following article:
    [Tutorial for Creation Subtotals using ALV|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20abap/tutorial%20for%20creating%20totals%20and%20subtotals%20using%20alv.pdf].
    Hope this helps.
    Regards
    Manas Dua

Maybe you are looking for

  • Regarding customer open items

    hi all, I am developing a new zreport. In that i want to retrieve customer line items till date. how can i retrieve it. As rfpdu is not a standard table!!! Can any one help me out!!

  • External Drive for itunes library.

    Hello, I was just hoping that someone could answer what is probably a very silly question. I currently use my ibook as a working computer and itunes library. This is causing problems now as i'm running out of disk space. Is it possible to buy an exte

  • Replace WRT54 with WRT600N, xp-vista problem

    In the wired network are: XP (host) 1Vista 32 and 1 Vista 64. With WRT54GS everything worked fine. I replaced WRT54GS with WRT600N. The VISTA32 and XP are working finne. The VISTA 64 does not see the router as computer anymore and also does not see t

  • [svn:fx-3.x] 12371: The main AccImpl was updated to handle accessible naming conventions differently than before .

    Revision: 12371 Revision: 12371 Author:   [email protected] Date:     2009-12-02 08:51:12 -0800 (Wed, 02 Dec 2009) Log Message: The main AccImpl was updated to handle accessible naming conventions differently than before.  This change was made to mak

  • Replace APP-V 4.6 Sp1 with APP-V 5.0

    Hi All, I have been using APP-V 4.6 Sp1 in my production. Now as the APP-V 5.0 is available I want to replace the APP-V 4.6 Sp1 with APP-V 5.0 using SCCM 2012. I have already created the TS for it. I have also created a vb script to uninstall the APP