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

Similar Messages

  • Dynamic ALV columns in Web Dynpro ABAP

    Hello masters:
    Does anybody know how to build an ALV with dynamic columns in a WD4A?
    I know how to make an ALV with a dynamic context node (dynamic DDIC structure), but it isn't the problem. First, I need to validate data entries, and then I will know how many fields I have to show.
    I've been reading about interface IF_WD_CONTEXT_NODE_INFO. I think some of its methods can be useful to me. Can you help me to solve that?
    Thanks.

    Hi Rodrigo,
    There are two ways for it:
    1) Creating an attribute dynamically under the Staticly defined node.
    2) Creating a new node dynamically with your desired columns in it.
    I am explaining the second process, Here it as follows:
    1. Create a WDC, and use the component SALV_WD_TABLE.
    2. Create a node in the context to store the defined strucutre name.
    3. Read the node and set the structure name to that node from which you want to get the columns.
    4. Use this structure name and create a new node dynamically.
    5. Set the data to this dynamically created node.
    6. Set this context node to ALV.
    Here is the sample code:
    To get the strcutre from where you want to fecth the fields.
    tabname_node->get_attribute( Exporting name = 'TABLENAME'
                                  Importing value = tablename ).
    translate tablename to upper case.
    *create sub node named TEST1 of structure (tablename)
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
       parent_info = rootnode_info
       node_name = tablename
       structure_name = tablename
       is_multiple = abap_true ).
    DATA: stru_tab type ref to data.
      field-symbols: <tab> type table.*Create Internal Table
    create data stru_tab type table of (tablename).
    assign stru_tab->* to <tab>.*Get table content
    select * from (tablename) into corresponding  fields of table <tab>.*get  instance of new node
    dyn_node = wd_context->get_child_node( name = tablename ).*Bind Internal table to context node.
    dyn_node->bind_table( <tab> ).*instantiate alv component
    data: l_ref_cmp_usage type ref to if_wd_component_usage.l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
    if l_ref_cmp_usage->has_active_component( ) is initial.
      l_ref_cmp_usage->create_component( ).
    endif.*pass context node to alv
    data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
    l_ref_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      l_ref_interfacecontroller->set_data( dyn_node ).
    Hope it helps..
    Good day!
    Regards,
    Shashikanth. D

  • Help sign in table column in web dynpro abap

    Hi all,
    I am using a F4 help in a table's column.By using it ,it works fine but it does not displays its F4 sign .
    My query is , How to show that F4 help sign so that user can get aknowledgement about that facility.
    Thanks
    Sanket sethi

    hi,
    in component controller -> goto context tab.
    then double click on the node name.
    then u can find their poperties viz singleton,cardinalty,supply function,help etc...
    then go to help and it will show drop down list showing
    1.ddic help
    2.automatic
    3.ovs
    select ddic help or auto
    this will work
    thanx
    zenthil.

  • How to put dynamic search help in web dynpro ABAP.

    Hi,
    I have a table element with two columns in my web dynpro ABAP.Both the columns are F4 helps.
    Based on the value of the first column,the F4 help of second column must change dynamically.Kindly tell me how to do this.
    Thanks & Regards,
    Raji.

    Hi ,
    Use this code to dynamically assign search help and to deactivate search helps.
    data lo_nd_info type if_wd_context_node_info.
    lo_nd_info = lo_nd->get_node_info( ).
    CALL METHOD lo_nd_info->set_attribute_value_help
    EXPORTING
    name = 'ATTR1' " Your attribute Name
    value_help_mode = '121' " Valid value help mode
    value_help = 'Z187442'. " Search help name
    The various possible values that you can pass to value_help_mode are as shown below.
    deactivated 101
    automatic 111
    ddic 121
    ovs 131

  • 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 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

  • 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

  • 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.

  • Dynamic Context Mapping in Web Dynpro ABAP

    Hi Experts,
    How can I create two dynamic Context nodes, one in ViewController and the other in Component Controller and finally create a context mapping between them?
    Regards,
    Johan Kriek.

    Hi Johan,
    I found a method IF_WD_CONTEXT_NODE_INFO~ADD_NEW_MAPPED_CHILD_NODE that seems to be the one that I am looking for.
    I do have same idea but i have been trying to give solution by using above method,unfortunately here my server is down.check the below code. i didnt check this code due to server down.
    DATA: lo_nd_purchase_header TYPE REF TO if_wd_context_node,
          lo_el_purchase_header TYPE REF TO if_wd_context_element,
    ls_purchase_header TYPE wd_this->element_purchase_header,
          lo_node_info type ref to if_wd_context_node_info,
          lo_child_node_info type ref to if_wd_context_node_info,
          MAPPING_INFO type WDR_CONTEXT_MAPPING_INFO.
    * navigate from <CONTEXT> to <PURCHASE_HEADER> via lead selection
      lo_nd_purchase_header = wd_context->get_child_node( name = wd_this->wdctx_purchase_header ).
                  CALL METHOD LO_ND_PURCHSE_HEADER->GET_NODE_INFO
                    RECEIVING
                      NODE_INFO = lo_node_info.
           MAPPING_INFO-controller = 'ZWDC_ALV'. "conponent name
           MAPPING_INFO-path = 'PURCHASE_HEADER'. "Controller context node name
          CALL METHOD LO_NODE_INFO->ADD_NEW_MAPPED_CHILD_NODE
            EXPORTING
              CHILD_NAME      = 'PURCHASE_HEADER'
              MAPPING_INFO    =  MAPPING_INFO
    *          IS_STATIC       = ABAP_TRUE
            RECEIVING
              CHILD_NODE_INFO = lo_child_node_info

  • Creating Dynamic UI Elements in Web Dynpro ABAP

    Hi,
    I want to an application in which the context nodes and the UI Elements for the second screen get created dynamically at run time based on the input on the first screen
    First i have used this method :
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct()
    to  create the dynamic context nodes.
    I have checked in debugger and the dynamic context node is getting creates successfully.
    I have saved the reference for the context node in DYN_NODE.
    Now for creating the dynamic UI Elements corresponding to the attributes of this context node, i call the method :
    cl_wd_dynamic_tool=>create_form_from_node(
    ui_parent = group_1
    node = dyn_node
    inputlength = 20 ).
    But this thing is dumping.
    This is the dump.
    The following error text was processed in the system CG7 : Adapter error in &VIEW_ELEMENT_TYPE& "BP_ICLIENT" of view "ZWD_ONLINE_FORMS.FINAL_VIEW": Context binding of property VALUE cannot be resolved: Node FINAL_VIEW.1.BP does not contain any elements
    Where BP_ICLIENT is the first attribute of the dynmaic context node BP  created..
    Please Help.
    Thanks
    Shivi

    Refer this wiki :
    https://wiki.sdn.sap.com/wiki/display/WDABAP/CreatingUIElementsDynamicallyinAbapWebdynpro+Application
    More links are available on SDN reg Dynammci UI creations :
    Have a look at the documentation for the WDDOMODIFYVIEW section of the phase model:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d2/8acd409cc4dd50e10000000a1550b0/frameset.htm
    There is also the class CL_WD_DYNAMIC_TOOL:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/67/6935425394033be10000000a1550b0/frameset.htm
    Also have a look at the example application DEMODYNAMIC.
    eLearning on the topic here as well:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/201ddd3b-b4ce-2b10-8883-880ae8147f89
    Edited by: Saurav Mago on Oct 26, 2009 12:23 PM

  • Reading Dynamic Table Values in interactive form (web Dynpro ABAP)

    Hi All,
    I have created a Web Dynpro ABAP application which contains an Interactive Form, That Adobe Interactive Form contains Dynamic table (New rows can be added manually and deleted using a button).
    I am not able to read the Dynamic table values in Web Dynpro u201COn Submitu201D.
    In the Adobe form I have web Dynpro native button (I am using ZCI), while clicking the native button I need to read the dynamic table values.
    How can I resolve this problem.
    Thanks and Regards,
    Boopathi M

    that means, when u add the table instance at runtime, you will also have to add an element to the node that is bound to the table.
    probably addNew() mathos may be useful to you.
    it appends a new record to the record set.
    xfa.sourceSet.dataConnectionName.addNew()
    also when on the exit event of the table field, do the following:
    var i = xfa.parent.index
    $record.rootnodename.tablenodename.data<i>.fieldname = $.rawValue
    xfa.host.messageBox($record.rootnodename.tablenodename.data<i>.fieldname)

  • Portal dynamic iView from Web Dynpro ABAP?

    I wish to use a "Dynamic iView" from a Web Dynpro ABAP application, but it appears the API is only available in Web Dynpro Java.  Can this feature be used from Web Dynpro ABAP, or can this be accomplished in another way?
    Scenario: I have two iViews on a page, one Web Dynpro ABAP and another iView whose source I want to change dynamically based on something a user clicks in the Web Dynpro ABAP.
    Dynamic iView:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/a72c155df77038e10000000a422035/frameset.htm

    So you are suggesting the WDA fires an event to a new WDJ that we would need to create that would in turn use the Dynamic iView service mentioned in that help document?

  • Dynamic radio button in web dynpro abao

    Hi expert,
    I want to dynamic radio button by  web dynpro abap .
    Kindly give me a soulation ASAP.
    Thanks and regard's
    Vikash

    hi,
    method wddomodifyview .
    if first_time eq abap_true.
    data: LR_CONTAINER         type ref to CL_WD_UIELEMENT_CONTAINER,
          LR_RADIOBUTTON1            type ref to CL_WD_RADIOBUTTON,
          LR_RADIOBUTTON2            type ref to CL_WD_RADIOBUTTON,     
          LR_FLOW_DATA         type ref to CL_WD_FLOW_DATA.
    " bind text property will give TEXT that appears next to Radio Button
    CALL METHOD cl_wd_radiobutton=>new_radiobutton
      EXPORTING
       bind_selected_key   =  '01' 
       BIND_TEXT           =  'saurav'
      receiving
        control             = LR_RADIOBUTTON1.
    " bind text property will give TEXT that appears next to Radio Button
    CALL METHOD cl_wd_radiobutton=>new_radiobutton
      EXPORTING
        bind_selected_key   = '02'
       BIND_TEXT           = 'mago'
      receiving
        control             = LR_RADIOBUTTON2.
    LR_FLOW_DATA        =  CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_RADIOBUTTON1  ).
    LR_FLOW_DATA        =  CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_RADIOBUTTON2  ).
    LR_CONTAINER ?= view->GET_ELEMENT( 'ROOTUIELEMENTCONTAINER' ).
    LR_CONTAINER->ADD_CHILD( LR_RADIOBUTTON1  ).
    LR_CONTAINER->ADD_CHILD( LR_RADIOBUTTON2  ).
    endif.
    endmethod.
    Thanx.

  • Create dynamic table in web dynpro abap

    Hi Friends,
    I want to create several tables in a web dynpro. For this reason I have created a View, a group1 and a context node.
    Now I want create a table for each characteristic group from cabn in the ui group1.
    For this reason I want to use create_table_from_node and I have to craete dynamicly attributes in the node.
    Is it the propper way  or is there a different approach.
    So in this case
    1. I read the node
    2. craete attribute for each characteristic group in this node
    3. create a UI Table with create_table_from_node for each attribute
    4. bind the data to the UI Table
    Can I do the same without to craete attributes?
    Thank in advance.
    RG. Jimbob

    Hi Jimbob,
    Have you looked at using the row-repeater UI element? You could then have as many tables as per your characteristic groups.
    Although this would be more difficult if the attributes of each table were to also be only known at run-time. (I'm not sure that this is the case though from your description of the issue.)
    so have a context of the form:
    Context Root
    --->node_characteristic_group (0..n)
    >node_char_group_details(0...n) (non-singleton child node)
    then bind your row repeater to node "node_characteristic_group " and bind the table inside the row repeater to node "node_char_group_details".
    Each time you had a new element in the node_characteristic_group you would get a new table...
    Much easier to support that anything dynamically created.
    Cheers,
    Chris

  • Web dynpro Abap - Adobe Form Table Dynamic

    hi Friends ,
    I created one table in ADOBE interactive form  and i kept two button for row add and row delete in table
    it is working fine in Adobe fomr Preview form
    but i deployed in Web dynpro abap this functionality is not working is there any reason
    Pls give suggestion
    Regards
    Krishnan R.

    Krishnan,
    Check if the form is Interactive and also  have you installed Adobe Reader Rights on the server. If not please check note 736902 and ask BASIS to apply them.
    Chintan

Maybe you are looking for

  • OS update 2.1.0.1032 now my wifi connection doesn't work properly HELP

    My wifi worked perfectly until the recent OS update.  Now I can only get a connection to last for minutes before it stops working.  The green wifi signal will show but it won't actually work.   Is there anything I can do?  Try to reload the OS update

  • External Hard Disk has become undetectable

    My WD external harddrive 500Gb use to show up on my computer, and is suddenly undetectable. It does however show up on the Disc Utility, but I can't verify or repair it. I have important video footage on the drive, and would like to retrieve it.....

  • Fields for creating a line item

    Hi can anyone tell what are the fields that must be populated in VBAP table to create a line item in a sales order.

  • My right click on windows, running on mac

    right ive installed windows xp home edition on my macbook, and its running smoothly, and there isnt realy any problems, apart from my right click will not work. is this a case of it wont work because its a 1 click button or should it work, if it shou

  • ESS portal request approval thru blackberry

    Hi, I have a requirement of sending a request for approval on Blackberry as soon as a requisition is raised from ESS. The requisitions are Z-development and connected to a workflow which triggers once the requisition is raised. I want a approval requ