How to display the rows dynamically in the table display in web dynpro abap

Hi experts,
               There is a visible row count tab where you can give the no of rows to be displayed in the output table, but i want it to be done dynamically as the row count of my table may change dynamically at runtime.
And i want to know how to reduce the width of a column as my table display is taking the length as per the binded table specifications.Can anyone please help me out in this issue.
Thanks in advance,
Anita.

Hi Anita
You can bind the visiblerowcount property to the a context attribute. and at runtime you can set the context attribute to the no of rows you want in your table,
Regards
Naresh

Similar Messages

  • How to add button ui element in alv table data in web Dynpro ABAP

    Hi Experts,
    I have one requirement,
    Actually I was devloped normal table in web Dynpro ABAP
    in that i have one column Display as a button .
    when i select that button need to display some data.
    same requirement i need to devlope in alv table.
    i am going to attach file please check.
    Thanks in advance.
    Regards,
    Subba Reddy.

    Hi,
    You can create Button in your ALV table column with below code
    DATA lo_button              TYPE REF TO cl_salv_wd_uie_button.
    CREATE OBJECT lo_button.
        CALL METHOD lv_value->if_salv_wd_column_settings~get_column
          EXPORTING
            id    = <your column name>
          RECEIVING
            value = lo_system_select_hdr.
        lo_button->set_enabled( value = abap_true ).
       lo_button->set_text( value = 'Avaliable List'  ).
        lo_button->set_tooltip( value = 'Avaliable List' ).
        lo_system_select_hdr->set_cell_editor( value = lo_button ).
    And for button click action,
    Create a method (say SHOW_DATA( ) ) with on_click event handler.And when you click button on your ALV table, SHOW_DATA( ) method will trigger.
    Thanks
    KH

  • Dynamic table columns in web dynpro abap

    Hi,
    In my current project I have got a requirement whose solution I am not able to figure out.
    My requirement is this:
    I will have a table containig budget owners name(since its compensation management in HR).There will be a table popin inside this table on the click of the personal number of the budget owner. Now the table popin will have another table with all employees name under that particular budget owner.
    The problem is that the table inside the popin will not be having fixed columns.Actually the columns will be coming from a standard java web dynpro application (say in the form of an internal table).
    My requirement is this how can this be handled?Can we include all the possible columns in the node(which i bind to the child table) and make them visible/invisible during runtime? or create a dynamic node and assign it to the table(but in this case a node needs to be bound to the table during design time,what to bind?)  ?
    Can u please help along with code snippets.
    Thanks and Regards,
    Saikat.

    Thnx for the input.
    I am abke to make the table columns inside the popin visible/invisible.
    I have a tabstrip.Indise one of the tabs is my main table and inside one of the columns is the popin.Inside that a transparent container and finally the table inside that.
    This is the code that worked for me.
    METHOD wddomodifyview .
      DATA lr_root_container TYPE REF TO cl_wd_uielement_container.
      DATA lr_table_popin TYPE REF TO cl_wd_table_popin.
      DATA lr_transparent_container TYPE REF TO cl_wd_transparent_container.
      DATA lr_table TYPE REF TO cl_wd_table.
      DATA lr_table_column TYPE REF TO cl_wd_table_column.
      DATA lr_table_in_table_popin TYPE REF TO cl_wd_table.
      DATA lr_node_header_node TYPE REF TO if_wd_context_node.
      DATA lr_node_item_node TYPE REF TO if_wd_context_node.
      DATA lr_tabstrip TYPE REF TO cl_wd_tabstrip.
      DATA lr_tab TYPE REF TO cl_wd_tab.
      data lr_tc type ref to CL_WD_TRANSPARENT_CONTAINER.
      data lr_table2 type ref to cl_wd_table.
      DATA lr_table2_column TYPE REF TO cl_wd_table_column.
      IF first_time = abap_false.
        lr_root_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
        lr_tabstrip ?= lr_root_container->get_child( id = 'TABSTRIP1' ).        "GETTING THE TABSTRIP
        lr_tab      ?= lr_tabstrip->get_tab( id = 'TAB1' ).        "GETTING THE TAB INSIDE TABSTRIP
        lr_table    ?= lr_tab->GET_CONTENT( ).      "GETTING THE CONTENT(TABLE IN THIS CASE) INSIDE TABSTRIP
        lr_table_column ?= lr_table->get_grouped_column( id = 'TABLE_MAIN_PERNR' ).   "GETTING THE COLUMN INSIDE THE TABLE
        "Table popin
        lr_table_popin ?=  lr_table_column->GET_POPIN( ).   "GETTING THE POPIN INSIDE THE TABLE
        lr_tc  ?= lr_table_popin->GET_CONTENT( ).   "GETTING THE CONTENT(TRANSPARENT CONTAINER IN THIS CASE)INSIDE THE TABLE
        lr_table2 ?= lr_tc->get_child( id = 'TABLE_EMPLOYEE' ).        "GETTING THE EMPLOYEE TABLE INSIDE THE TRANSPARENT CONTAINER
        lr_table2_column ?= lr_table2->get_grouped_column( id = 'TABLE_EMPLOYEE_PERNR' ).   "GETTING THE COLUMN INSIDE THE TABLE
        lr_table2_column->SET_VISIBLE( '02' ).  "SETTING VISIBILITY FOR THE COLUMN
      ENDIF.
    ENDMETHOD.
    But I'm still considering the dynamic node concept.Lets see if this works out or not.If not then I'll have to go for the dynamic node thing.
    Thanks,
    Saikat

  • How to set the First Line of Table UI in Web Dynpro ABAP

    Hi Team,
    I have a scenario where I'm displaying two Table controls one below the other. When a line is selected in the first(Top) table, I have a supply function(Event) and I fill the second(bottom) table. Everything works fine till here.
    The problem starts when I scroll the bottom table. Lets assume that I'm at line 20 of the second table and I press the lead selection to select another line on the first table. Here the second table is filled with new data but it is automatically scrolled to line 20. My questions:
    1) Do I have to set some specific property of the second table? If yes, which one and where should I set it (In the supply function? I already have the "visibleRowCount" set to "10")
    2) How do I dynamically get access to the Table Control properties?
    Thanks for your time

    Thank you Maksim,
    I did set the "selectionMode" to "Auto". I don't understand where In supply function I have to set lead selection of nested node to first element. Please elaborate on this. Are you talking about the context attribute bound to the second table? OR do I have to change the Importing parameters "Node" and "Parent_Element" of my supply function?
    Thanks for your time.

  • How to fix few rows in ALV after filtering on a column in Web Dynpro ABAP

    Hi,
    I have the following requirement:
    In an ALV, when i filter based on a column, then this filter should not be applied to 2 of its rows.
    These rows relate to totals. The totals are manually calculated as they require other component information too.
    Along with the filter result, these total rows have to be displayed.
    Let me know in case ALV in Web Dynpro ABAP supports this functionality.
    Regards,
    Rekha

    Hi,
    ALV table does not support this functionality.
    You can display the total in an another table instead.
    I had the same requirement with total and had to display the totals separately.
    Thanks,
    Feroz

  • How to create  some columns dynamically in the report designer depending upon the input selection

    Post Author: ekta
    CA Forum: Crystal Reports
    how  to create  some columns dynamically in the report designer depending upon the input selection 
    how  export  this dynamic  report in (pdf , xls,doc and rtf format)
    report format is as below:
    Element Codes
    1
    16
    14
    11
    19
    10
    2
    3
    Employee nos.
    Employee Name
    Normal
    RDO
    WC
    Breveavement
    LWOP
    Sick
    Carers leave
    AL
    O/T 1.5
    O/T 2.0
    Total Hours
    000004
    PHAN , Hanh Huynh
    68.40
    7.60
    76.00
    000010
    I , Jungue
    68.40
    7.60
    2.00
    5.00
    76.00
    000022
    GARFINKEL , Hersch
    66.30
    7.60
    2.10
    76.00
    In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
    if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
    Can anybody help me how do I design such report....
    Thanks

    Hi Developer life,
    According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
    As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric  values) in the details,  add  an filter to filter the data base on this column group, but if
    the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
    If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings 
    If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
    Any question, please feel free to let me know.
    Best Regards
    Vicky Liu

  • How to change the images dynamically in a table.

    Hai,
                     How to change the images dynamically in a table based on the condition in webdynpro abap.
    Edited by: Ravi.Seela on Oct 13, 2011 2:17 PM

    This has been much discussed earlier. Do search posts.
    For your scenario i would do the following.
    inside your node which is binded to the table, i create a new node image with cardinality 1 ..1 and a attribute called path of type string.
    create a  supply function for the node image .
    Supply method now has a Element (Parent element ) and node.
    Based on your record in element, set the right image source to path attribute and bind the node.
    This will make sure that the framework calls the image supply function for every row in a table.

  • How to save a row edited in the tableview

    Hi All
    I have implemented a flow logic based BSP table maintenance page as follows to display and maintain the data in SFLIGHTS table:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page>
        <htmlb:form>
          <htmlb:tableView id              = "tv1"
                           visibleRowCount = "10"
                           selectionMode   = "lineEdit"
                           table           = "<%= flights %>"
                           filter = "SERVER"
                           sort = "server"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    When I click on the row and edit the row and exit the edit mode I still do not see the data that I changed is not reflected back when I exit the edit mode nor it is saved in the database table. Can you please kindly share the code how I can make only the following columns editable:
    FLDATE
    PRICE
    CURRENCY
    PLANETYPE
    the rest of the columns I want to disable for editing and whatever the changed data in these columns I want to reflect it back to the database table.
    Please kindly share the code for implementing to capture what was edited and save it back to the database table
    Thanks
    Karen

    Pls search this forum, this has been discussed N number of times.
    Raja

  • How to add UI elements dynamically in the views of webdynpro

    Hi Experts,
    Here i have a requirement where 2 text-box get added on a click of "ADD" button in the view during the execution of the Application. so is it possible to add the text-box to the view or not?
    if yes how can it be done.
    Thanks in advance
    Regards
    Lalitkumar.

    Even with these expanded requirements I wouldn't necessarily recommend dynamic UI element creation in WDDOMODIFYVIEW.
    If the UI element requirements are fairly static (2 text boxes for each push of the button), then consider using a Multi-Pane (http://help.sap.com/saphelp_nw70ehp1/helpdata/en/df/da8b412bb5b35fe10000000a1550b0/frameset.htm) or Row Repeater (http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/93d3792e8c60d6e10000000a114a6b/frameset.htm) UI element. These constructs will both create a series of UI elements based upon the number of context elements in a bound node.  Therefore if you want to generate two textboxes for each push of a button, in the button event handler you simple add another context element to the context node.  You don't need dynamic UI element creation or dynamic data binding.
    If you feel that you must use dynamic UI element creation, then first read up on the WDDOMODIFYVIEW phase model event.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d2/8acd409cc4dd50e10000000a1550b0/frameset.htm
    You then probably want to study these three blogs on the topic:
    /people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements
    /people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements
    /people/thomas.szcs/blog/2006/02/22/dynamic-programming-in-web-dynpro-abap--part-iii-aggregations-and-ddic-binding-of-viewelements

  • How to obtain the row data in the component datatable?

    if I want to edit a row data, and then know which row is edited in the component datatable, and how to do?
    How to obtain the row data in the component datatable, and update it to database, not simplely edit a simple table
    Any ideas? Thanks

    Thank you very much for your help Alexander !
    It's quite confusing when you leave Struts and try to adapt your projects for JSF for the first time...
    I wanted to click on a row with a "onMouseClick" on the TR tag like I used to do in Struts/JSTL. But it seems to be impossible in a dataTable.
    Ok then. I've added a column at the end of the row with an icon.
    But eventually I didn't need to declare link parameters.
    In my BackingBean I did like this :
    public String selectEventForUpdate() throws IllegalAccessException, InvocationTargetException {
            PortletAgenda event = (PortletAgenda) JSFUtils.getInRequestMap("event");
            BeanUtils.copyProperties(this, event);
            return null;
       }JSFUtils.getInRequestMap(...) is a method I wrote in a util object :
    public static Object getInRequestMap(String name) {
            Object res = null;
            Map requestMap=FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
            if (requestMap!=null) {
                res=requestMap.get(name);
            return res;
    }  " event " is the name of the item in my dataTable list.
    My backingBean has the same attributes as "event".
    So when the page is reloaded I have a backingBean full with the selected properties to edit/update.
    Thanks to your reply I realized that putting this form in the middle of the dataTable seems to be impossible.
    So I put this form in a floating DIV in front of the table with a shadow.
    It works :o) !
    But I'm a little bit disapointed to be honest...
    I used to build my web applications with Struts and JSTL and doing this kind of interface was really easy.
    I've decided 3 days ago to convert into JSF because the "GUI Layer" seemed to be improved.
    But now I realize that I cannot put a onMouseOver and onMouseClick on a row and I cannot display a different row in the middle of a table....
    I think it's a shame because there is a facet for header and footer.
    And it would be great if we could create our own personal facet that appears only if a condition is true.
    For exemple " if the current item id is the same as the request parameter id then display the following facet content ....... (with a panel group and a form inside to update the row) "
    It's easy to do that with JSTL thanks to c:forEach and c:if but it seems to be impossible to use JSTL tags like this during the dataTable iteration.
    And JSF tags seems to have no logical tags like " if " or loops that can be nested in dataTable.
    I really need to realize this interface (you click on a row then an edit form appears where you clicked).
    Do I have to write a component myself that extends dataTable?
    Do you know if writing such a component is hard to do for a beginner like me?
    (I've juste discovered JSF 3 days ago and I've used Struts/JSTL for 2 years til now)
    I'd be glad to have much advices from you about that.
    Regards

  • How to increase the row height of the table in the smartform

    Hi,
    Can any one say,
    How to increase the row height of the table in the smartform.
    It is presently show the row width very small, i want to increase the row with of the table in the smartform.
    Plase say how can we increase the row height in the smartform.

    Hi Ravi,
         In Smartforms , Select the Table and you can adjust the cell hieghts in OUTPUT OPTIONs TAB.
        Reward points if that Helps.
    Manish

  • How to get the row count of a Table DATA?

    Hi,
      In my Adobe form layout, I have a Table node which is bound to an internal table. Now at runtime, I want to determine the number of rows that the internal table has, i.e the row count of the DATA node of the Table. How will I be able to determine the no. of rows of the internal table at runtime using Javascript? I am not being able to find any suitable answer in this forum. Please suggest. Thanks in advance.

    Hi,
    If you bind the interactive form table to the internal table and specify some properties, the table will vary its row size according to the number of data available in the internal table.
    You have to wrap the table in a sub form,  check 'allow page break with contents' and property 'flowed'.
    the table will automatically increase its row size...
    Is this the reason for which you wanted for the row count..?
    If so, this will help you..
    Regards.
    Surya

  • How to display the data of CJ2C(T-CODE) using web dynpro abap

    Hi all:
        How to display the data of CJ2C(T-CODE) using web dynpro abap.
        CJ2C used to display a Gantt Chart.
        Thanks.

    Hi,
    Create a Value attribute (resource) of type Resource, bind it with the property of File Upload UI element.
    On action place the code and Deploy the application
    byte[] bytes = new byte[ 1024];
    FileOutputStream out = new FileOutputStream( new File( <path in server>));
    InputStream in = resource.read( true);
    int len;
    while( ( len = in.read( bytes)) > 0)
         out.write( bytes, 0, len);
    in.close();
    out.close();
    Regards
         Vinod V

  • How to focus a row directly when the search found the result....in active w

    how to focus a row directly when the search found the result....in active widget

    Considering that I don't understand what you're talking about - does altering the selection of the widget and requesting the focus help?

  • Add row dynamically in the table.

    Please suggest me javascript function to add row dynamicly in the table whenever i click the add button..........
    thanks...........

    Put a "delete row" button to your repeating subform and use the following script on the click event:<br />form1.page1.<repeating_subform>.instanceManager.removeInstance(this.parent.index);<br /><br />Oguz<br />www.kgc.com.tr

Maybe you are looking for

  • What Safari am I supposed to use?

    I have os 10.3.9 and Safari version 1.3.2, which clearly is not the lastest, but both 2 and 3 are only for 10.4. What am I supposed to do? My safari doesn't open anything anymore because it is so outdated.

  • Error while Configuring  environment parameters

    Hi, I am installling Oracle Utilities Business Intelligence 2.3.2 version . I am getting error while configuring Environment Paramameters Database- Oracle 11g R2 OS- Windows Server 2008 1. Environment Description Environment Description: DEV01 2. Bus

  • Problem while installaing ADM management server.

    Hi all, I have installed siebel 8.1 with Oracle 10g. I have successfully installed everything but when I am trying to install ADM Management Server its giving error. Error: Unable to write out string table for language pack. Setup cannot continue.(SB

  • Vendor return export

    Dear all, We are having a scenario where in the machine part is to be exported for repair. Going by the threats posted which suggests that material by material type UNBW to be created and create sub-contracting order. But in our case we require an in

  • Regarding New transaction in BPM's

    Hi Everyone, 1.Are there any Prerequisites for defining BPM's? 2. In the Block Step Type,we have option as New Transaction. Can anyone tell me the use of this. please site some examples. 3. In some step Types like Send, Transformation, Receiver Deter