Number of rows in the ALV, Web - dynpro

Hi all
I have an ALV in my ABAP web-dynpro. For this alv i would like to set the visible rows at the same number as there are rows in the internal table which is the supplier for the ALV.
In the TABLE component of the WEBDYNPRO you have a visible property who is controlling this.
I saw that for the ALV you had the same. Of the class IF_SALV_WD_TABLE_SETTINGS there is a method SET_VISIBLE_ROW_COUNT. So i thought this is the one where i can control it.
So when the table has 10 rows, 10 rows will be displayedon the screen and when the table has 20 rows, 20 rows will  be displayed on the screen.
But this is not the case.
Is there something i forget?
Kind regards,
Anton Pierhagen

METHOD wddoinit .
  DATA: lo_column TYPE REF TO cl_salv_wd_column,
        lo_cmp_usage TYPE REF TO if_wd_component_usage,
        lo_interfacecontroller TYPE REF TO iwci_salv_wd_table,
        lt_functions TYPE salv_wd_t_function_std_ref,
        ls_function TYPE salv_wd_s_function_std_ref,
        lo_function TYPE REF TO cl_salv_wd_function_std,
        lo_data TYPE REF TO if_wd_context_node,
        lo_element TYPE REF TO if_wd_context_element,
        lv_index TYPE i,
        lo_model TYPE REF TO cl_salv_wd_config_table.
Retrieve ALV object
  lo_cmp_usage = wd_this->wd_cpuse_alv( ).
Initial? Create new
  IF lo_cmp_usage->has_active_component( ) IS INITIAL.
    lo_cmp_usage->create_component( ).
  ENDIF.
Interfacecontroller
  lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
  lo_model = lo_interfacecontroller->get_model( ).
Get main NODE DATA, this is the node which supplies the ALV
  lo_data = wd_context->get_child_node( name = 'DATA' ).
How many rows has the table?
  lv_index = lo_data->GET_ELEMENT_COUNT( ).
Not more then 20 rows on the screen
  IF lv_index GT 20.
    lv_index = 20.
  ENDIF.
Put the number of rows in the screen
  lo_model->if_salv_wd_table_settings~set_visible_row_count( lv_index ).
should the screen set to freeze?
  lo_model->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).

Similar Messages

  • Action (navigation) when click on Hyperlink field in ALV web dynpro

    Hi - I had a question about Hyperlink in ALV web dynpro and it was answered in  Link: [web dynpro abap ALV link to (hyperlink);
    Now I need to click the Hyperlink field and navigate to another screen.
    i.e. I have a Object ID (PR Number) when I click the PR number I need to open the PR Document also another case is at the item level if the PR has more than one item I'm showing the word "MULTIPLE" so if the user click on Multiple I need to show all the items (material) in another ALV table that I already create.
    Thanks for your help!
    Jason P-V

    Hi,
    As per my understanding, there are PR number and Material and other columns in the SAME ALV table right.
    There is a ONCLICK event for ALV not for the VIEWCONTAINTERELEMENT.
    In the View where you have the ALV as component usage under view's properties, you have ALV usage right.
    Now, under the METHODS tab of the ALV, implement an event
    Onclick   EventHandler  ONCLICK(press F4) of that ALV.
    Now the Click event is implemented for that ALV. When ever you click on any column(Hyperlink) this gets called.
    Here there are parameters that you need to use it. R_PARAM has both the index and the element.
    Based on the COLUMN you can call the respective event.
    The index that you have clicked i shown from r_param->index and you can also know ATTRIBUTE name(column name).
    If attribute eq 'PRNUMBER'
    *call the Purchase requistion transaction
    elseif attribute eq 'MATNR'.
    *call the popup for other ALV as component usage to display item details.
    endif.
    Refer this Article -
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/bd28494a-0801-0010-45a3-fc359d82d3e8&overridelayout=true
    Hope this is clear.
    Regards,
    Lekha.
    Edited by: Lekha on Sep 26, 2009 12:57 PM

  • Number of rows in the WebADI sheet

    Hi,
    I have an Integrator with a PL/SQL interface where I run a post-process (also PL/SQL) wherin I would like to know how many rows the user has uploaded.
    Does anyone know if it is possible to retrieve the total number of rows that is in the WebADI sheet?
    Thank you.
    Jeroen

    METHOD wddoinit .
      DATA: lo_column TYPE REF TO cl_salv_wd_column,
            lo_cmp_usage TYPE REF TO if_wd_component_usage,
            lo_interfacecontroller TYPE REF TO iwci_salv_wd_table,
            lt_functions TYPE salv_wd_t_function_std_ref,
            ls_function TYPE salv_wd_s_function_std_ref,
            lo_function TYPE REF TO cl_salv_wd_function_std,
            lo_data TYPE REF TO if_wd_context_node,
            lo_element TYPE REF TO if_wd_context_element,
            lv_index TYPE i,
            lo_model TYPE REF TO cl_salv_wd_config_table.
    Retrieve ALV object
      lo_cmp_usage = wd_this->wd_cpuse_alv( ).
    Initial? Create new
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
    Interfacecontroller
      lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
      lo_model = lo_interfacecontroller->get_model( ).
    Get main NODE DATA, this is the node which supplies the ALV
      lo_data = wd_context->get_child_node( name = 'DATA' ).
    How many rows has the table?
      lv_index = lo_data->GET_ELEMENT_COUNT( ).
    Not more then 20 rows on the screen
      IF lv_index GT 20.
        lv_index = 20.
      ENDIF.
    Put the number of rows in the screen
      lo_model->if_salv_wd_table_settings~set_visible_row_count( lv_index ).
    should the screen set to freeze?
      lo_model->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).

  • XMLIndex: finding indexed XPaths and the number of rows in the path table

    Hi,
    I am storing non-schema-based binary XMLs in an XMLType column in 11g (11.1.0.6.0) and would like to index the XMLs either partially or fully using XMLIndex. I'm expecting to have a large number (tens of millions) of XML documents and have some concerns about the size of the XMLIndex path table.
    In short, I am worried that the path table might grow unmanageable large. In order to avoid this and to plan for table partitioning, I would like to create a report of all indexed XPaths in an XMLIndex and to find out how many times each path is actualized in the path table. I would do this for a representative XML sample.
    I have been creating XMLIndexes with different exclude/include paths, gathering stats with DBMS_STATS (estimate_percent = 100) and selecting the number of rows in the path table through USER_TABLES.
    If anyone knows a more straightforward way of doing this all advice is very much appreciated.
    Best Regards,
    Rasko Leinonen

    Thanks Marco,
    I managed to get out all indexed paths using the following SQL. It took a while to understand how the join the XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5 and XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5 tables together but got there in the end. This helps to clarify which XPaths are being currently indexed by the XMLIndex.
    begin
    for v_row in (select PATH from XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5)
    loop
    declare
    v_i BINARY_INTEGER := 1;
    v_id raw(8);
    v_len BINARY_INTEGER := 2;
    v_skip BINARY_INTEGER := 1;
    begin
    while v_i < utl_raw.length(v_row.path) and
    v_i + v_len <= utl_raw.length(v_row.path)
    loop
    v_i := v_i + v_skip;
    v_id := utl_raw.substr(v_row.path, v_i, v_len);
    --dbms_output.put_line(v_id);
    for v_row2 in (select LOCALNAME, flags from XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5
    where ID = v_id )
    loop
    if rawtohex(v_row2.flags) = '01'
    then
    dbms_output.put('@');
    end if;
    dbms_output.put(v_row2.localname);
    if v_i + v_len < utl_raw.length(v_row.path)
    then
    dbms_output.put('/');
    end if;
    end loop;
    v_i := v_i + v_len;
    end loop;
    dbms_output.put_line('');
    end;
    end loop;
    end;
    Example output:
    RUN
    RUN/@accession
    RUN/@alias
    RUN/@instrument_model
    RUN/@run_date
    RUN/@run_center
    RUN/@total_data_blocks
    RUN/EXPERIMENT_REF
    RUN/EXPERIMENT_REF/@accession
    RUN/EXPERIMENT_REF/@refname
    RUN/DATA_BLOCK
    RUN/DATA_BLOCK/@name
    RUN/DATA_BLOCK/@total_spots
    RUN/DATA_BLOCK/@total_reads
    RUN/DATA_BLOCK/@number_channels
    RUN/DATA_BLOCK/@format_code
    RUN/DATA_BLOCK/@sector
    RUN/DATA_BLOCK/FILES
    RUN/DATA_BLOCK/FILES/FILE
    RUN/DATA_BLOCK/FILES/FILE/@filename
    RUN/DATA_BLOCK/FILES/FILE/@filetype
    RUN/RUN_ATTRIBUTES
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/TAG
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/VALUE

  • Display the total number of rows for the report in OBIEE 11g

    Hi, In obiee 11g, the pagination will be 1-25. Is there any possiblity in obiee to show the total rows count next to pagination. Ex: if the result contains 120 rows. it should display after the pagination
    Records 1-25. Total of Records : 120
    Is there any way we can display the total number of rows for the report.
    Kindly help me.. Its very urgent requirement.
    MAny Thank in advacne

    Check this http://obiee100.blogspot.com/2011/07/display-total-number-of-records-in.html
    and
    http://docs.oracle.com/cd/E28280_01/bi.1111/e10544/appsql.htm#CHDCDIDA
    You have to go something like as suggested in previous link.
    Mark as correct/helpful

  • Can i get a number of rows in the select list??

    Hello~
    I am studying the "oracle call interface". but i don't know much about oci.
    Anyway i want to know that how can i get a number of rows.
    for example, there is a source code of the number of colums in the select list.
    The following is a list of DB(example)
    /*DB table*/
    ID NAME CODE ID
    1 A 1 A
    2 B 2 B
    /*source*/
    err = OCIAttrGet ((dvoid *) stmhp, (ub4)OCI_HTYPE_STMT, (dvoid*)
    &parmcnt, (ub4 *) 0, (ub4)OCI_ATTR_PARAM_COUNT, errhp);
    /*result*/
    The Column is 4. (ID, NAME, CODE, ID)
    So, i think that the row is 3 (ID, 1, 2) in the DB table.
    Simply, Can i get a number of rows in the select list??
    for example,
    err = OCIAttrGet ((dvoid *) stmhp, (ub4)OCI_HTYPE_STMT, (dvoid*)
    &parmcnt, (ub4 *) 0, (ub4)OCI_ATTR_RAW_COUNT, errhp);
    I'm trying to get the number of row count. but i can't find.
    Please, could you let me know that how can i get the number of row count.
    Thank you.

    Thank you for your reply.
    we are tested the source code by reply.
    The following is the test source code.
    /*source code*/
    strcpy (szStatement, "SELECT * from DB_TABLE");
    OCIStmtPrepare(gpOCIReadStmHandle, gpOCIErrHandle, szStatement,
         strlen(szStatement), OCI_NTV_SYNTAX, OCI_DEFAULT);
    OCIStmtExecute(gpOCISvcHandle, gpOCIReadStmHandle, gpOCIErrHandle,
         0, 0, 0, 0, OCI_DEFAULT);
    /* get a number of rows count , Reply : prajithparan*/
    OCIAttrGet((dvoid *)gpOCIReadStmHandle, OCI_HTYPE_STMT, (dvoid *)&nRowCount, NULL, OCI_ATTR_ROW_COUNT, gpOCIErrHandle))
    But There is a problem of the result value.
    The result value is 0. It's mean that the row count is 0. and then we are using the all of fuction is succeed.(return value)
    I don't know what is problem. Please let me know about the problem and solution.
    Thank you.

  • Eclipse environment does not appear the options "Web Dynpro Project"

    Hi all,
    I installed the SAP NetWeaver 7.1 Composition Environment SP03
    But in my eclipse environment does not appear the options "Web Dynpro Project" and not "Development Component Project".
    That is, I can not do a Web Dynpro project
    I have to do some more configuration in eclipse, for example, carry some plugin?
    How to do this, please help me
    Thanks,
    Vivian

    Hi,
             I think you are suffering from the problem below.
    Problem Statement:
    No Webdynpro Perspective is Visible
    only perspectives available are
        Debug
        Resource(default)
        Team Synchronizing
    How to Solve:
    There are many ways that this kind of error can occur.
    1.   It may occur due to "improper installation of NWDS"                                        
    How to Check and Resolve :    Is NWDS is displayed in intalled list in Control panel? If 'yes' then it is properly installed. If 'No' then reinstallation is needed.
    2.  It may occur due to "installation of Skeleton alone"
    How to Check:
                                      you can check if your installation includes Web Dynpro by selecting
    Help->Software Updates->Manage Configurations.
    When installing Developer studio 7.1 you only get the bare eclipse installation (Skeleton). You have to add web dynpro and all, after the initial install is complete.
    The installer installs the kernel of the Developer Studio. The kernel contains Eclipse and a few SAP additions, but is not equipped with the SAP features necessary for the Composition Environment. In order to install the required SAP features you have to install the SAP features.
               How to Resolve:
    Updating the NWDS software will resolve the problem.
    Go to Help->Software Updates->Find and Install. This will install the default SAP plugins that came with your NWDS CE 7.1 setup source and also the additional updates that are needed.

  • Customizing the standard web dynpro ABAP travel application

    Dear All,
    Scenario :
    We want to modify the existing travel application------> Create Travel Request should open an interactive adobe form
    which will capture all the data and update the backend table , instead of the web dynpro screen and similarly for plan trip .
    I wanted to know what is the best practice or approach for this and how to go about it.
    Regards,
    Geet

    Hi All,
    Need your valuable inputs on this.Also when I was trying to replace the standard web dynpro abap screen for create travel request...coudnt find the view.I mean on the overview of Trips and Expenses there is a button for Create Request but I am unable to find the view where this button is placed....I think its getting created dynamically.
    My concern is how to call my interactive form when the button for create request is clicked...dont know where to place it.
    Regards,
    Geet Bijlani

  • Can I "count" the number of rows excluding the header and footers

    I have some tables that consist of a different number of rows, as the number is part of an equation I need to know the number of rows excluding the header and footers. I have the work around in =ROWS(ColumnG)-3, but is there a tidier way? I want to be able to add footers (or headers) too and not have these counted.
    Many thanks
    Lee

    Hi Lee,
    Add a column to your table (for purposes of this discussion, the new column is placed before column C, and becomes the new column C). enter the formula below in all regular cells, but NOT in header or footer cells:
    =1
    Use the formula below, placed anywhere (except in a regular cell in column C) to get the number of non-header, non-footer cells:
    =COUNT($C)
    The first formula will automatically be placed in cells added to column C, and the results will change to reflect the added rows.
    Regards,
    Barry

  • Urgent :  how to select the rows in the ALV Grid Control

    How to select the rows in the ALV Grid control,
    I am facing the situation where i need to select the row/rows in the Grid control and then to lock the entries,
    If anyone have the solution please help me out
    <b>Its very Urgent</b>

    Hi Bharath,
    Go through this hope u can understand.
    SEL_MODE. Selection mode, determines how rows can be selected. Can have the following values:
    A Multiple columns, multiple rows with selection buttons.
    B Simple selection, listbox, Single row/column
    C Multiple rows without buttons
    D Multiple rows with buttons and select all ICON
    Setting and getting selected rows (Columns) and read line contents
    You can read which rows of the grid that has been selected, and dynamic select rows of the grid using methods get_selected_rows and set_selected_rows. There are similar methods for columns.
    Note that the grid table always has the rows in the same sequence as displayed in the grid, thus you can use the index of the selected row(s) to read the information in the rows from the table. In the examples below the grid table is named gi_sflight.
    Data declaration:
    DATA:
    Internal table for indexes of selected rows
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    Example 1: Reading index of selected row(s) and using it to read the grid table
      CALL METHOD go_grid->get_selected_rows
        IMPORTING
          et_index_rows = gi_index_rows.
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines = 0.
        CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
             EXPORTING
                  textline1 = 'You must choose a valid line'.
        EXIT.
      ENDIF.
      LOOP AT gi_index_rows INTO g_selected_row.
         READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
        ENDIF.
      ENDLOOP.
    Example 2: Set selected row(s).
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines > 0.
        CALL METHOD go_grid->set_selected_rows
            exporting
              it_index_rows = gi_index_rows.
      ENDIF.
    Reward points if helpful.
    Thanks
    Naveen khan

  • ALV Web Dynpro for ABAP enable/disable single row

    hi all,
    is it possible to change the layout of one single row or cell in a alv (component SALV_WD_TABLE) web dynpro for abap?
    i managed to get columns to be editable using the tutorial "Editing ALV in Web Dynpro for ABAP".
    but it is not described how to change a single row or cell in this tutorial. also the example programs i found do not get into this subject.
    did i miss something?
    thanks in advance

    Hi,
    I think you cannot set the focus to the particular cell.
    I think you can  loop at that row of that table and set the the cell design to apply some color to differentiate that way rather than focusing so that user can know that he has to do something in that cell.
    check out this example salv_wd_test_table_focus
    Regards,
    Lekha.

  • Need help in ALV web dynpro

    Hi all,
    I need help in the web dynpro ALV.
    I have an ALV generated dynamically. On the ALV, there is filter and settings link on the extreme right of the alv header.
    How is it possible to get them left align after the export button ?
    I want to maitain some gap between the export button, filter and settings.
    Please give me inputs.
    Thanks in Advance.

    Hi Jatra,
    I am working on an ALV table in a standard Web Dynpro ABAP application.
    The business requirement is to hide the header for the ALV table.
    The header has a dropdown to choose u201CStandard Viewu201D and 2 options: Filter and Settings.
    The footer for the ALV table containing the Row and Column numbering also needs to be hidden.
    I am looking at the IF_SALV_WD_TABLE_SETTINGS to find the relevant methods to hide the header and footer.
    Please let me know if I am on the right track and if there is an alternate way to do this through changing the layout of the ALV table. I tried to hide the header and footer manually via the layout but am unable to do so, as the ALV table is just displayed as ViewContainerUI Element.
    Please help me as to how to hide the header and footer as I am new to ALV in WDA.
    Thanks and Regards.

  • Maximum number of rows for an ALV

    Dear all,
    What is the maximum number of columns an ALV grid can handle .
    Best Regards,
    Manmohan.

    Hello Manmohan,
    As far as I know the total column size for a list screen is 1023 characters. ALV is actually making use of list screen instead of a dynpro. So as long as your total size of column if less than  1023, you can have as many columns as you want.
    For number of rows, I don't think there is limitation.

  • How to use EVS with different data in each row, in a Java Web Dynpro table?

    Hi all,
    I am using EVS in a column of java web dynpro table.
    Let's say the name, and context attribute, of this column is column1.
    It's filled dynamically using an RFC, that uses as input parameter the value of another column, and related context attribute, from the same table (Let's call it column2).  Obviously, from the same row. So, in other words: the values of the EVS in column1 of row1, are dependent of the value of column2 of row1. And the values of the EVS in column1 of row2, are dependent of the value of column2 of row2. And so on... Hope i could explain myself ok.
    The code I'm using works great for filling the EVS dynamically:
    IWDAttributeInfo attrInfo = wdContext.nodeDetail().getNodeInfo().getAttribute(nodeElement.COLUMN1);
    ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
    value.clear();
    if(this.initRFC_Input(nodeElement.getColumn2())){
         for (int i = 0; i < wdContext.nodeRFCresult().size(); i++){
              value.put(wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgort()
                 , wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgobe());
    In this code, nodeElement is the context row of the table that is passed dynamically to the method when the value of colum2 is changed.
    HOWEVER, the problem I'm having is that after executing this code, EACH NEW ROW that is added to the table has by default the same values as the first row, in the column1 EVS. And, for example, if I refresh the values of the column1 EVS in row 2, all EVS values in the other rows are also refreshed with the same values as the ones of EVS in row 2.
    How can I make sure each row EVS has its own set of independent values, so they don't mess with each other?
    Hope you guys can help me. And please, let me know if I didn't explain myself correctly!
    Thanks!

    I just did as you said (I think), but it's still having the same behaviour as before (same data for all EVS in the table).
    Here´s what I did:
    I
    In node "Detail" (cardinality 0...n, singleton set to true), which is binded to the table, I created a child node named "Column1Values" wth cardinality 1...1 and singleton set to false.
    "Column1Values" node has an attribute called "column1", of type String.
    I did the binding between attribute "column1" and the column1 inputfield celleditor in the table.
    I created an event called Column2Changed and binded it to the column2 celleditor of the table. I added a parameter called nodeElement of type IPrivateCompView.IDetailElement to this event, and mapped it to the column2 editor in the table so that I can dynamically get the nodeElement that is being affected.
    I added the following code to the onActionColumn2Changed(wdEvent, nodeElement) method that gets created in the view:
    IWDAttributeInfo attrInfo = nodeElement.nodeColumn1Values().getNodeInfo().getAttribute("column1");
    ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
    if(this.initRFC_Input(nodeElement.getColumn2())){
         for(int i =0; i < wdContext.nodeRFCresults().size(); i++){
              value.put(wdContext.nodeRFCresults().getRFCresultsElementAt(i).getId(),
                                  wdContext.nodeRFCresults().getRFCresultsElementAt(i).getDesc());
    And with this, I still get the original problem... When the EVS of one row is updated, ALL other EVS of the table get also updated with the same values.
    What am I missing? Sorry Govardan, I bet I'm not seeing something really obvious... hopefully you can point me in the right direction.
    Thanks!

  • Row selection in Table (Web Dynpro Abap)

    Hello,
    I have 2 views in my web dynpro component.
    In first view ,  i am taking carrid and on click of submit button , i am displaying connid,fldate,currency,planetype,seatsmax in second view.
    I have one button on second view to go back to fist screen.
    Now, My question is :
    if i select a one row of table , i want to dispaly deatils of that row in first view.
    How can i do this?
    Please help.

    The second part of the requirement is not clear on where woudl you click and where shoudl the data be shown.
    However, all this data should be ideally maintained in the component controller i.e. the c.controller should have the conterxts and map relevant nodes to the appropriate views.
    Now, all the data is in c.controller which can be accessed from any view within the component. This way you can show any data in contexts in preferred view.
    Regards,
    Sharath

Maybe you are looking for