Webdynpro + alv + dynamic dropdown

Hi,
I;m struggling with creating drop-down in alv grid and unfortunately I couldn't find any reasonable solution. One of the column in grid should be dropdown type, data in dropdown should come from internal table.
I would apreciate your help,
Adam

I think the easiest way is to post my complete method. Sorry, its long, because of 5 dropdown and some input fields:
METHOD wddoinit .
  DATA:lt_valueset TYPE wdr_context_attr_value_list,
       ls_valueset TYPE wdr_context_attr_value,
       lr_node TYPE REF TO if_wd_context_node,
       stru_total_list TYPE if_mainview=>element_node_dispo_tab,
       itab_total_list TYPE if_mainview=>elements_node_dispo_tab.
*Input for the Prio Dropdown
  lr_node = wd_context->get_child_node( name = 'NODE_DISPO_TAB' ).
  CLEAR: ls_valueset.
  ls_valueset-value = 'I'.
  ls_valueset-text = 'I'.
  INSERT ls_valueset INTO TABLE lt_valueset.
  CLEAR: ls_valueset.
  ls_valueset-value = 'II'.
  ls_valueset-text = 'II'.
  INSERT ls_valueset INTO TABLE lt_valueset.
  CLEAR: ls_valueset.
  ls_valueset-value = 'III'.
  ls_valueset-text = 'III'.
  INSERT ls_valueset INTO TABLE lt_valueset.
  CLEAR: stru_total_list.
  stru_total_list-prio_list = lt_valueset.
Input for the Status Dropdown
  CLEAR: ls_valueset, lt_valueset.
  ls_valueset-value = 'Offen'.
  ls_valueset-text = 'Offen'.
  INSERT ls_valueset INTO TABLE lt_valueset.
  CLEAR: ls_valueset.
  ls_valueset-value = 'Angebot'.
  ls_valueset-text = 'Angebot'.
  INSERT ls_valueset INTO TABLE lt_valueset.
  stru_total_list-status_list = lt_valueset.
*Input for the Remote Dropdown
  CLEAR: ls_valueset, lt_valueset.
  ls_valueset-value = 'Ja'.
  ls_valueset-text = 'Ja'.
  INSERT ls_valueset INTO TABLE lt_valueset.
  CLEAR: ls_valueset.
  ls_valueset-value = 'Nein'.
  ls_valueset-text = 'Nein'.
  INSERT ls_valueset INTO TABLE lt_valueset.
  stru_total_list-remote_list = lt_valueset.
Input for the Skill Dropdown
  CLEAR: ls_valueset, lt_valueset.
  ls_valueset-value = 'SAPScript'.
  ls_valueset-text = 'SAPScript'.
  INSERT ls_valueset INTO TABLE lt_valueset.
  CLEAR: ls_valueset.
  ls_valueset-value = 'Smartforms'.
  ls_valueset-text = 'Smartforms'.
  INSERT ls_valueset INTO TABLE lt_valueset.
  stru_total_list-skill_list = lt_valueset.
*Input for the Modul Dropdown
  CLEAR: ls_valueset, lt_valueset.
  ls_valueset-value = 'CO'.
  ls_valueset-text = 'CO'.
  INSERT ls_valueset INTO TABLE lt_valueset.
  CLEAR: ls_valueset.
  ls_valueset-value = 'CRMO'.
  ls_valueset-text = 'CRMO'.
  INSERT ls_valueset INTO TABLE lt_valueset.
*Input of dropdowns to internal table
  stru_total_list-modul_list = lt_valueset.
  INSERT stru_total_list INTO TABLE itab_total_list.
  DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table,
        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.
  l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
*ref to if_wd_context_node
  l_ref_interfacecontroller->set_data( r_node_data = lr_node ).
  DATA: l_value TYPE REF TO cl_salv_wd_config_table,
        lr_column TYPE REF TO cl_salv_wd_column,
        lr_column_settings TYPE REF TO if_salv_wd_column_settings,
        lr_dropdown1 TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
        lr_dropdown2 TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
        lr_dropdown3 TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
        lr_dropdown4 TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
        lr_dropdown5 TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
        lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
  l_value = l_ref_interfacecontroller->get_model( ).
  DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings,
        lr_std            TYPE REF TO if_salv_wd_std_functions.
*make alv editable
  lr_table_settings ?= l_value.
  lr_table_settings->set_read_only( abap_false ).
*Activating the functional sections of ALV-Output
  lr_table_settings->set_enabled( abap_true ).
*rows should not be selectable
  lr_table_settings->set_row_selectable( abap_false ).
hide buttons "check", "delete row" and "insert row"
  lr_std ?= l_value.
  lr_std->set_edit_check_available( abap_false ).
  lr_std->set_edit_check_available( abap_false ).
  lr_std->set_edit_delete_row_allowed( abap_false ).
  lr_std->set_edit_insert_row_allowed( abap_false ).
create dropdown
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'PRIO' ).
  CREATE OBJECT lr_dropdown1
    EXPORTING
      selected_key_fieldname = 'PRIO'.
  lr_dropdown1->set_valueset_fieldname( value = 'PRIO_LIST' ).
  lr_dropdown1->set_read_only( value = abap_false ).
  lr_dropdown1->set_type( if_salv_wd_c_uie_drdn_by_index=>type_key_value ).
  lr_column->set_cell_editor( lr_dropdown1 ).
create dropdown
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'STATUS' ).
  CREATE OBJECT lr_dropdown2
    EXPORTING
      selected_key_fieldname = 'STATUS'.
  lr_dropdown2->set_valueset_fieldname( value = 'STATUS_LIST' ).
  lr_dropdown2->set_read_only( value = abap_false ).
  lr_dropdown2->set_type( if_salv_wd_c_uie_drdn_by_index=>type_key_value ).
  lr_column->set_cell_editor( lr_dropdown2 ).
create dropdown
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'THEMA' ).
  CREATE OBJECT lr_input_field
    EXPORTING
      value_fieldname = 'THEMA'.
  lr_column->set_cell_editor( lr_input_field ).
set cell editor for input field
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'KD_NR' ).
  CREATE OBJECT lr_input_field
    EXPORTING
      value_fieldname = 'KD_NR'.
  lr_column->set_cell_editor( lr_input_field ).
set cell editor for input field
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'KD_NAME' ).
  CREATE OBJECT lr_input_field
    EXPORTING
      value_fieldname = 'KD_NAME'.
  lr_column->set_cell_editor( lr_input_field ).
set cell editor for input field
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'KD_ORT' ).
  CREATE OBJECT lr_input_field
    EXPORTING
      value_fieldname = 'KD_ORT'.
  lr_column->set_cell_editor( lr_input_field ).
set cell editor for input field
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'KD_ANSPR' ).
  CREATE OBJECT lr_input_field
    EXPORTING
      value_fieldname = 'KD_ANSPR'.
  lr_column->set_cell_editor( lr_input_field ).
create dropdown
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'REMOTE' ).
  CREATE OBJECT lr_dropdown3
    EXPORTING
      selected_key_fieldname = 'REMOTE'.
  lr_dropdown3->set_valueset_fieldname( value = 'REMOTE_LIST' ).
  lr_dropdown3->set_read_only( value = abap_false ).
  lr_dropdown3->set_type( if_salv_wd_c_uie_drdn_by_index=>type_key_value ).
  lr_column->set_cell_editor( lr_dropdown3 ).
create dropdown
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'SKILL' ).
  CREATE OBJECT lr_dropdown4
    EXPORTING
      selected_key_fieldname = 'SKILL'.
  lr_dropdown4->set_valueset_fieldname( value = 'SKILL_LIST' ).
  lr_dropdown4->set_read_only( value = abap_false ).
  lr_dropdown4->set_type( if_salv_wd_c_uie_drdn_by_index=>type_key_value ).
  lr_column->set_cell_editor( lr_dropdown4 ).
create dropdown
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'MODUL' ).
  CREATE OBJECT lr_dropdown5
    EXPORTING
      selected_key_fieldname = 'MODUL'.
  lr_dropdown5->set_valueset_fieldname( value = 'MODUL_LIST' ).
  lr_dropdown5->set_read_only( value = abap_false ).
  lr_dropdown5->set_type( if_salv_wd_c_uie_drdn_by_index=>type_key_value ).
  lr_column->set_cell_editor( lr_dropdown5 ).
set cell editor for input fields
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'MA_NAME' ).
  CREATE OBJECT lr_input_field
    EXPORTING
      value_fieldname = 'MA_NAME'.
  lr_column->set_cell_editor( lr_input_field ).
set cell editor for input fields
  lr_column_settings ?= l_value.
  lr_column = lr_column_settings->get_column( 'TEAMLEITER' ).
  CREATE OBJECT lr_input_field
    EXPORTING
      value_fieldname = 'TEAMLEITER'.
  lr_column->set_cell_editor( lr_input_field ).
*bind content of internal table
  lr_node->bind_table( itab_total_list ).
ENDMETHOD.
Message was edited by:
        Ingmar Kroll

Similar Messages

  • ABAP WebDynpro ALV Filter Dropdown

    Hi guys,
    Is it possbile to do the dropdown list of alv filter?
    If so , how to do that?
    Thanks in advance.
    Best regards,
    Vincent

    Hello Lakshmi,
    I did as follows.
    1. Go to WDComponent.
    2. Add SALV_WD_TABLE as Component use at Used Components tab.
    3. Go to ViewController.
    4. Add SALV_WD_TABLE as used Component and used Interface at Properties tab.
    5. Map FILTER_VALUES node from used Component of ALV to Context of ViewController at Context tab.
    6. Code as follows.
      DATA lo_nd_filter_values TYPE REF TO if_wd_context_node.
      DATA ls_filter_values TYPE REF TO if_wd_context_element.
      DATA l_wdy_key_value_table TYPE TABLE OF wdy_key_value.
      DATA l_wdy_key_value TYPE wdy_key_value.
      lo_nd_filter_values = wd_context->get_child_node( name = wd_this->wdctx_filter_values ).
      ls_filter_values = lo_nd_filter_values->create_element( ).
      ls_filter_values->set_attribute(
        name = `FIELDNAME`
        value = `ATTR1`          "Attribute name that you want to set filter.
    *Followings are filter values.
      l_wdy_key_value-key = `0`.
      l_wdy_key_value-value = ``.
      APPEND l_wdy_key_value TO l_wdy_key_value_table.
      l_wdy_key_value-key = `1`.
      l_wdy_key_value-value = `AAAA`.
      APPEND l_wdy_key_value TO l_wdy_key_value_table.
      l_wdy_key_value-key = `2`.
      l_wdy_key_value-value = `BBBB`.
      APPEND l_wdy_key_value TO l_wdy_key_value_table.
      l_wdy_key_value-key = `3`.
      l_wdy_key_value-value = `CCCC`.
      APPEND l_wdy_key_value TO l_wdy_key_value_table.
      ls_filter_values->set_attribute(
        name = `T_DROPDOWN_VALUES`
        value = l_wdy_key_value_table
      lo_nd_filter_values->bind_element( new_item = ls_filter_values set_initial_elements = abap_false ).
    Regards,
    Masaaki YANOKUCHI
    Edited by: Masaaki Yanokuchi on Jan 26, 2010 10:35 AM

  • Dynamic report output in a webdynpro alv

    Hi,
    I have created a dynamic report in the R/3 system . In this report, i am creating a report program within the report and subsequently executing this dynamically created report and displaying in the ALV..
    Is it possible to handle such a scenario in a webdynpro ALV. One option is to use ITS and display the report in the portal but is there some other way so that i can directly view this report in an alv grid in a view.
    all help appreciated!!
    regards,
    Priyank

    Hi Priyank,
    This could be one of the solution:
    1] Run the report in background mode (using submit statement, dn't forget to give printer as LOCL), get the spool id programatically. Use the FM's CONVERT_OTFSPOOLJOB_2_PDF or CONVERT_ABAPSPOOLJOB_2_PDF.
    Which returns the ouput of table tline, convert this to xtring and bind it to xtring attribute.
    In view add a interactive form and bind the xstring attribute to the Interactive form.
    By following the above steps, we can display the result in the PDF in WD ABAP.
    2] The report result is ALV and in most of the cases we generally do not have function modules or any other easy way to get the output.
    In such cases the best approach which we follow is, to run this in background mode and generate the spool and display the ouput in PDF.
    3] But if intertactive form is not present in your requirement then we need to debug the logic of the report (if no FM or class present) and get the results and display it in the View.
    You can create a service which takes the parameters of the report, submits it and
    transfers the result to HTML. In a view you use an IFRame which takes the URL of the service and shows the result HTML.
    just additionally read this thread,
    Display simple ABAPLIST
    Here an IFrame is used to display HTML output of report. But as IFRame gets obsolete the Suresh's solution seems to be pretty cool.
    Hope this will help you!
    Cheers,
    Darshna.

  • Search issue with dynamic dropdown array - PHP

    I'm currently trying to set up a search with a couple of
    dynamic dropdowns, basically to search for cars - so the parent
    list is car make, and the child is car model.
    I've gotten as far as a page with the dynamic array working,
    but not the search :
    dynamic array
    working
    (Ignore the cars and vans radio buttons)
    For testing there's an Audi A3 and and Audi A6, but this
    search doesn't work.
    The select code looks like :
    <select name="Model">
    <option value="" <?php if (!(strcmp("",
    $row_rsModels['Model']))) {echo "selected=\"selected\"";}
    ?>>Select a Model</option>
    </select>
    And the array code looks like :
    <?php
    if ($row_rsModels) {
    echo "<SC" . "RIPT>\n";
    echo "var WAJA = new Array();\n";
    $oldmainid = 0;
    $newmainid = $row_rsModels["Make"];
    if ($oldmainid == $newmainid) {
    $oldmainid = "";
    $n = 0;
    while ($row_rsModels) {
    if ($oldmainid != $newmainid) {
    echo "WAJA[".$n."] = new Array();\n";
    echo "WAJA[".$n."][0] = '".WA_DD_Replace($newmainid)."';\n";
    $m = 1;
    echo "WAJA[".$n."][".$m."] = new Array();\n";
    echo "WAJA[".$n."][".$m."][0] =
    "."'".WA_DD_Replace($row_rsModels["ModelID"])."'".";\n";
    echo "WAJA[".$n."][".$m."][1] =
    "."'".WA_DD_Replace($row_rsModels["Model"])."'".";\n";
    $m++;
    if ($oldmainid == 0) {
    $oldmainid = $newmainid;
    $oldmainid = $newmainid;
    $row_rsModels = mysql_fetch_assoc($rsModels);
    if ($row_rsModels) {
    $newmainid = $row_rsModels["Make"];
    if ($oldmainid != $newmainid) {
    $n++;
    echo "var rsModels_WAJA = WAJA;\n";
    echo "WAJA = null;\n";
    echo "</SC" . "RIPT>\n";
    function WA_DD_Replace($startStr) {
    $startStr = str_replace("'", "|WA|", $startStr);
    $startStr = str_replace("\\", "\\\\", $startStr);
    $startStr = preg_replace("/[\r\n]{1,}/", " ", $startStr);
    return $startStr;
    ?>
    ..to try and find the root of the problem, I've gotten as far
    as a similar page, without the dynamic
    array, with the child dropdown populated dynaically from the
    recordset :
    search working
    This seems to work exactly as advertised - all the car models
    are listed from the recordset, and if
    you search for Audi and A3, then it gets returned correctly.
    The select code here looks like :
    <select name="Model" id="Model">
    <option value="">Select a Model</option>
    <?php
    do {
    ?>
    <option value="<?php echo
    $row_rsModels['Model']?>"><?php echo
    $row_rsModels['Model']?
    ></option>
    <?php
    } while ($row_rsModels = mysql_fetch_assoc($rsModels));
    $rows = mysql_num_rows($rsModels);
    if($rows > 0) {
    mysql_data_seek($rsModels, 0);
    $row_rsModels = mysql_fetch_assoc($rsModels);
    ?>
    </select>
    ..so I guess the search is set up OK, but the issue is with
    how to pass the model from the select code generated by the dynamic
    array correctly....
    Its presumably because the option value is empty :
    <option value="" <?php if (!(strcmp("",
    $row_rsModels['Model']))) {echo "selected=\"selected\"";}
    ?>>Select a Model</option>
    So I've been trying various possibilities with no joy, such
    as :
    <?php if (!(strcmp("", $row_rsModels['Model']))) {echo
    "selected=\"selected\"";} ?>
    but without success.
    Even then, I'd have though if the value was empty, "", then
    it would return all results, rather than no results....?
    hope that makes some sense, and someone can shed some
    light...
    Cheers.

    Thomas Jung wrote:>
    > >
    Chris Paine wrote:
    > > That's a shame!
    > >
    > > Does this mean that using a drop down by index in an ALV is limited to having the same dropdown in every row of the table (it would certainly seem that this is the case).
    > >
    > > Cheers,
    > >
    > > Chris
    >
    > I would assume so as I can't think of a way around the subnode limitation. The system will actually allow you to have a subnode and everything works fine until you sort the ALV - then you get a short dump.
    >
    > I suppose you would have to fall back to using a regular table in this case.
    But how come the class documentation says its possible.
    Functionality
    Using class CL_SALV_WD_UIE_DROPDOWN_BY_IDX, you make all the settings for the UI element index-based dropdown list box, from which the user can select from a range of values.
    *You use the index-based dropdown list box if the dropdown list boxes in each cell of the column are to contain different entries.*
    You use the key-based dropdown list box if the dropdown list boxes in each cell of the column are to contain the same entries.
    To specify the entries in the dropdown list boxes, the context of your application requires an attribute for which the data type satisfies the following requirements:
    The attribute is a table
    The structure of this table contains at least one KEY column and a VALUE column.
    Note
    We recommend that you use the type WDY_KEY_VALUE_TABLE here.

  • How to code to get intermediate results in webdynpro ALV? Please help!

    Hi Experts,
    I got following info from help file to generate Intermediate Results(subtotal).
    Can somebody help me with sample code to achieve this?
    Basically I want to subtotal 'Qty' column based on 'Product' field.
    By default, all values in a field are used in the calculation during aggregation. However, you
    are also able to generate intermediate results. You group the data records that contain the
    values for an intermediate result and display each intermediate result in its own result row.
    To generate intermediate results, you have to provide certain information:
    &#9679; To specify in which field the values from which the intermediate results are calculated
    are located, generate an aggregation condition for the desired field. The overall result is
    displayed in the result row.
    &#9679; To specify which data records are contained in an intermediate result, group the data
    records: You sort the ALV output by the field that includes the criterion for the
    intermediate result.
    &#9679; To then generate the intermediate results, calculate the intermediate results using the
    field with the criterion.
    &#9679; To then display the intermediate results, switch on the display of intermediate results.
    You are able to make the following settings for intermediate results:
    &#9679; Generate intermediate results
    &#9679; Display intermediate results
    &#9679; Setting levels for drilling down intermediate results
    &#9679; Set the position of the result rows (see Settings for Aggregation [page 196])
    &#9679; Forbid the generation of intermediate results
    Prerequisites
    &#9679; You have generated an aggregation object for at least one aggregatable field.
    &#9679; The field with the criterion for intermediate results is not an aggregatable field, and
    therefore has an alphanumeric data type.
    Generate Intermediate Results
    To generate intermediate results in a field that already has an aggregation condition, generate
    a sort condition for the field of a column (another column) (see Sorting [page 190]).
    In this sort condition, define whether intermediate results are to be generated. To do this, use
    the methods of the class CL_SALV_WD_SORT_RULE.
    Methods for Generating Intermediate Results
    Function Method
    Generate intermediate results SET_GROUP_AGGREGATION
    Check whether intermediate results are displayed GET_GROUP_AGGREGATION
    Display Intermediate Results
    Once you have made all settings, to generate intermediate results you have to switch on the
    display of these intermediate results. You use the methods of the interface class
    IF_SALV_WD_FIELD_SETTINGS for this (implementing class
    CL_SALV_WD_CONFIG_TABLE).
    Methods for Displaying Intermediate Results
    Function Method
    Display intermediate results SET_GROUP_AGGR_DISPLAYED
    Check whether intermediate results are displayed GET_GROUP_AGGR_DISPLAYED
    I have tried a bit but it is not working. here is my code:
    get field and create aggregation rule of type total
    lr_field = l_value->if_salv_wd_field_settings~get_field( 'Qty' ).
    lr_field->if_salv_wd_aggr~create_aggr_rule( ).
    lr_aggr_rule = lr_field->if_salv_wd_aggr~get_aggr_rule(  ).
    lr_aggr_rule->set_aggregation_type( if_salv_wd_c_aggregation=>aggrtype_total ).
    l_field = l_value->if_salv_wd_field_settings~get_field( 'PRODUCT' ).
    l_sortrule = l_field->IF_SALV_WD_SORT~create_sort_rule( ).
    l_sortrule~SET_GROUP_AGGREGATION( 'Y').
    l_value->if_salv_wd_field_settings~SET_GROUP_AGGR_DISPLAYED( 'Y' ).
    Please help
    Message was edited by:
            gopalkrishna baliga

    Hi Gopalakrishna balgia,
    I think i have answered in the below thread. Check it out.
    How to show Subtotal in webdynpro ALV(ABAP)? Kindly help!
    Regards
    Rakesh

  • Help,Webdynpro ALV report

    Hello,
    My Webdynpro ALV report display SFLIGHT all fields .
    But I want to show only five fields,
    how code?
    CODE::
    data:node_flights type ref to if_wd_context_node,
           it_flights type sflight_tab1,
           is_flights type sflight,
           it_final type IF_MAIN=>elements_flights,
           is_final type IF_MAIN=>element_flights.
      select * from sflight into table it_flights up to 10 rows.
      node_flights = wd_context->get_child_node( 'FLIGHTS' ).
      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.
      data:l_ref_interfacecontroller type ref to iwci_salv_wd_table.
      l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
    navigate from <CONTEXT> to <NODE_FLIGHT> via lead selection
      node_flights = wd_context->get_child_node( name = `NODE_FLIGHT` ).
    fill context node
      node_flights ->bind_table( it_flight ).
    endmethod.
    thanks

    HI,
    There is no need to change your code.
    Do one thing.
    Create a node SFLIGHT and do not add dictionary structure SFLIGHT.
    Then create what are the required five attributes under it.
    Make sure all these five refer to the dictionary data elements.
    example: If you want carrid declare dectionary structure S_CARR_ID.
    Like wise.
    Now finally goto component usage->ALV->INTERFACECONTROLLER in the
    left side tree of web dynpro component.
    Then create component usage and drag SFLIGHT node to DATA of the context.
    It is one of the way.
    Second way is.
    Create SFLIGHT node and mention SFLIGHT as stricture and select five required attributes that you need.
    Now after creation of SFLIGHT NODE just delete the structure name present in the PROPERTIES of
    SFLIGHT NODE.
    Now finally goto component usage->ALV->INTERFACECONTROLLER in the
    left side tree of web dynpro component.
    Then create component usage and drag SFLIGHT node to DATA of the context.
    I hope it helped you.
    Regards and Best wishes.

  • Implementing a dynamic dropdown list

    Hi All,
    I am implementing an Adaptive RFC model that uses two custom RFC's. First RFC returns a table that has list of countries and the second RFC returns a table that lists the states of a particular country.
    Now using these two RFC's how do I implement a dynamic dropdown...i mean the first dropdown should show the list of countries and the second dropdown should show the list of states depending on the country selected.
    Thanks,
    Tom

    Hi Tom,
    Please try this,
    IWDNodeInfo multiplenode = multipleinfo.addChild("MultiNode" , null, true, false, true, true, false, true, null, null, null);
    multiplenode.addAttribute("roles", "ddic:com.sap.dictionary.string");
    Assign values for Dropdown
    IWDNode node1 = wdContext.nodeNodeA().getChildNode("MultiNode", IWDNode.NO_SELECTION);
    IWDNodeElement elem1;
    for(int s=0;s<5;s++){
    elem1 = node1.createElement();
    elem1.setAttributeValue("roles","Value"+s);
    node1.addElement(elem1);
    Inside Domodifyview create IWDDropDownByIndex UI Element and Bind it.
    IWDDropDownByIndex dropDownList = (IWDDropDownByIndex)view.createElement(IWDDropDownByIndex.class, "drop");
    IWDAttributeInfo info = wdContext.getNodeInfo().getChild("NodeA").getChild("MultiNode").getAttribute("roles");
    dropDownList.bindTexts(info);
    dropDownList.setWidth("100");
    Regards,
    Ramganesan K.

  • Export and Import functionality in WebDynpro ALV

    Hi Experts,
               I have done a webdynpro alv application and it is displaying the data as i wanted. However i have a requirement to get the alv displayed data in an excel sheet( which works with the export button on alv) and update that excel sheet which will be updated back in the alv table.(for eg any import button functinality on alv)
    Regards,
    Tashi

    Hi,
    For this you need to use file upload to upload the modified excel data back to ALV. Else why dont you make an ALV Editable.!
    For upload excel refer this wiki: [Upload excel in WDA|http://wiki.sdn.sap.com/wiki/display/WDABAP/ExcelFileUploadAndDisplayDataUsingWebDynPro+ABAP]
    hope this helps u.,
    Thanks & regards,
    Kiran.

  • Need Value and labed different for a dynamic Dropdown in an ADF page

    Hi,
    We have an ADF page with a drop down.
    This is populated dynamically.
    We have created using the below code.
    Issue: what we need is that each value the Label set should be different.
    Code : presently hard coded
    In the Java file for the page we had the following code:
    ===========================================================
    String haircolor;
    SelectItem[] haircolorSelectItems;
    ArrayList haircolorlist = new ArrayList();
    public PatientAdvSearch() {
    haircolorlist.add(new SelectItem("Black"));
    haircolorlist.add(new SelectItem("Blonde"));
    haircolorlist.add(new SelectItem("Red"));
    haircolorlist.add(new SelectItem("Others"));
    haircolorlist.add(new SelectItem("Grey"));
    SelectItem[] haircolors = (SelectItem[]) haircolorlist.toArray(new SelectItem[0]);
    haircolorSelectItems = haircolors;
    public void setHaircolor(String haircolor) { this.haircolor = haircolor; }
    public String gethaircolor() { return haircolor; }
    public SelectItem[] getHaircolorSelectItems() {
    return haircolorSelectItems;
    ===========================================================
    And the JSPX will have the following code.
    <af:selectOneChoice binding="#{backing_PatientAdvSearch.selectOneChoicerace11}"
    id="selectOneChoicerace11"
    unselectedLabel="&lt;Select>">
    <f:selectItems value="#{backing_PatientAdvSearch.haircolorSelectItems}" />
    </af:selectOneChoice>
    ===========================================================
    This populates both Lable and Value for the Select Item with one value.
    We need two different value.
    How do we go ahead with that.
    Thanks

    Yes.. actually i am also facing the same prob...
    i need value and label to be different for dynamic dropdown.
    Please help in case any one has faced the same issue.

  • Dynamic dropdown in Acrobat?

    Small business owner. Trying to create dynamic dropdowns in pdf that I open and fill with an ipad for on-site estimates. I know nothing about java, but I need a dropdown box that repopulates after a different one has a value selected: ie, Box one is material for a deck and box two is a color selection.  How can I make this happen? I found this link which is virtually identical to what I want minus the label changes. (http://jsfiddle.net/e9XvP/) How can I incorporate this into a PDF?

    Small business owner. Trying to create dynamic dropdowns in pdf that I open and fill with an ipad for on-site estimates. I know nothing about java, but I need a dropdown box that repopulates after a different one has a value selected: ie, Box one is material for a deck and box two is a color selection.  How can I make this happen? I found this link which is virtually identical to what I want minus the label changes. (http://jsfiddle.net/e9XvP/) How can I incorporate this into a PDF?

  • Webdynpro application with dropdown by key

    Hi,
    i' am creating an webdynpro application with dropdown key element. I have created a domain and in the value range tab i have given the entries like this
                                    Fixed Value            ShortDescription
                                  0000001                   ABCD
                                  0000002                   EFGH
                                  0000003                   IJKL
    now when i run the webdynpro application iam able to see only the values entered in the Short Description and not the values entered in the Fixed Values.
    may i know what has to be done to display the contents present in Fixed Value to get displayed in hte dropdownbykey in the webdynpro application.
    Thanks,
    BJR.

    Hi, Badni,
    If you can live without your custom domain, then you can use any standard data element and then programatically fill the attribute property with whatever content you want.
    For example, you can create the following method and call it from WDDOINIT of your view:
    METHOD set_values_for_dropdown_by_key.
    DATA:
        lo_nd_fli    TYPE REF TO if_wd_context_node,
        lo_info_fli  TYPE REF TO if_wd_context_node_info,
        lt_value_set TYPE wdr_context_attr_value_list,
        ls_value_set LIKE LINE OF lt_value_set,
        ls_scarr     TYPE scarr.
    * get node info
      lo_nd_fli   = wd_context->get_child_node( 'YOUR_NODE' ).
      lo_info_fli = lo_nd_fli->get_node_info( ).
    * set values
      ls_value_set-value = '0000001'.
      ls_value_set-text  = '1 - ABCD'.
      APPEND ls_value_set TO lt_value_set.
      ls_value_set-value = '0000002'.
      ls_value_set-text  = '2 - EFGH'.
      APPEND ls_value_set TO lt_value_set.
      ls_value_set-value = '0000003'.
      ls_value_set-text  = '3 - IJKL'.
      APPEND ls_value_set TO lt_value_set.
    * assign value set to attribute
      lo_info_fli->set_attribute_value_set(
        name      = 'YOUR_ATTRIBUTE_NAME'
        value_set = lt_value_set ).
    ENDMETHOD.
    Furthermore, if you insist on domain fixed values, you can get them from the tables DD07L and DD07T and include them in your DropdownByKey programatically with program similar to the above one.
    KR,
    Igor

  • How to build a fieldcatalog in webdynpro alv

    Hi friends,
    how to build a fieldcatalog in webdynpro alv ? can any give me with example
    Thnx
    Kumar Srini

    fieldcatalog in the sense, we can modify the alv table column names by using below code.
    DATA LO_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    LO_CMP_USAGE = WD_THIS->WD_CPUSE_ALV2( ).
    IF LO_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
      LO_CMP_USAGE->CREATE_COMPONENT( ).
    ENDIF.
    DATA LO_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
    LO_INTERFACECONTROLLER =   WD_THIS->WD_CPIFC_ALV2( ).
      DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
      LO_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
      LO_VALUE->IF_SALV_WD_TABLE_SETTINGS~SET_VISIBLE_ROW_COUNT( 5 ).
    for title
    DATA: LR_TABLE_SETTINGS TYPE REF TO IF_SALV_WD_TABLE_SETTINGS.
    DATA: LR_HEADER TYPE REF TO CL_SALV_WD_HEADER.
    LR_TABLE_SETTINGS ?= LO_VALUE.
    LR_HEADER = LR_TABLE_SETTINGS->GET_HEADER( ).
    LR_HEADER->SET_TEXT( 'Waiting for Travel Advance Approval ' ).
    **lr_table_Settings->set_Read_only( abap_false ).
    DATA L_HEADER TYPE REF TO CL_SALV_WD_COLUMN_HEADER.
    DATA: LO_COLUMN1 TYPE REF TO CL_SALV_WD_COLUMN.
    LO_COLUMN1 = LO_VALUE->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'TRAVELID' ).
    L_HEADER = LO_COLUMN1->GET_HEADER( ).
    L_HEADER->SET_TEXT( 'Travel Adv ID' ).
    DATA: LO_COLUMN2 TYPE REF TO CL_SALV_WD_COLUMN.
    LO_COLUMN2 = LO_VALUE->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'PERNR' ).
    L_HEADER = LO_COLUMN2->GET_HEADER( ).
    L_HEADER->SET_TEXT( 'Employee Name' ).
    In get_column you have to pass the attribute name
    is this what you are looking?
    Regards
    Srinivas

  • Print form with dynamic dropdown

    Dear all,
    I have a form (xdp) with dynamic dropdown inside. (i.e. The value list is empty in design time)
    And I have a problem that the print out (via the sendToPrinter service) will have the data value (e.g. EN) instead of the display value (e.g. English) for all the dynamic dropdown.
    Would like to know if there are any solution beside mapping all the values from data value to display value before print?
    Thanks in advance
    Regards
    Bill

    I'm also seeking the better solution instead of
    a) creating 2 field - one for capture data, one for printing (and it doesn't work using LC ES server component)
    b) creating 2 templates - one for capture data, one for printing (maintenance overhead)
    Ideally & logically, this should be achieve by using one field since it has already come with the presence & relevant attribute.
    Anyway, the main problem, why dropdown data is printed instead of display value?
    The user doesn't even know what's the technical data behind the dropdown screen value he/she selected.
    From user point of view, nobody wants to see the technical data printed instead of the display value...

  • Webdynpro alv display

    Hi ,
    I have one requirement in webdynpro ALV. I have to display all po header detail in one view and when user click on any po respective item detail from item table should display .
    i am facing problem in user interaction means how to handle click event in where i have to call and how its possible.

    Hi Abhishek,
    Try to post these type of questions in WD ABAP forum.
    Please check the below threads for a help on your issue.
    http://help.sap.com/saphelp_erp2005/helpdata/EN/f1/177741adb7167de10000000a155106/content.htm
    [ALV|https://wiki.sdn.sap.com/wiki/display/WDABAP/GettingtheRowSelectedIntheALV....andMuchMore..]
    Search on supply function in SDN, you will find more links.
    Thanks,
    Sreekanth
    Edited by: Sreekanth on Jul 24, 2009 8:30 AM

  • How to make all the rows editable in webdynpro alv output

    Hi,
    How to make all the rows editable in webdynpro alv output.
    Thanks
    Rakshar

    Hi Rakshar,
    Check this wiki:
    http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoeditconditionallyrowofaALVtableinWebDynprofor+ABAP
    Regards

Maybe you are looking for

  • BPM 11g and Webcenter integration

    Hi, I have a lot of doubts about how to use BPM 11g 'inside' or integrated with Webcenter. I need some tutorials, links and docs if possible. thanks!

  • Transparent box on image printing strage

    Hello, A .png image in a document has a transparent background, and it looks fine as a PDF, but is very clearly a different color when printed. Any thoughts on what this could be? Thanks!

  • 9i and 10g Replication

    Hi, Is there any difference between 9i and 10g Version of Oracle database with respect to Advanced Replication concepts, implementation procedures and methodologies. I mean is 9i Advanced replication concepts are same in 10g or in 11g. Looking for gu

  • Two most expensive Genesis Games worth even more if sealed.....

    Well, I did a bit of searching on the internet for this topic and these are the most 2 expensive games of all time: Virtua Racing (Genesis Version) Phantasy Star 4 As a matter of fact I remember the R 'US store only got the exclusive rights to sellin

  • Unable to rent or download???

    Anyone else with this problem today? No matter what I select via my ATV, it just spins and spins displaying " accessing iTunes store" and nothing ever happens. Are the servers down? What is going on?