Drop down values for table in a view not getting populated dynamically

Hi Experts,
The problem which i am facing is as follows
In an existing web dynpro component , i already have a view and it consists of table which has 3 columns.All the three columns are non editable
MATERIAL     MAT_DESC     MAT_DEL_FLAG
ABC          
EFG          
HIJ
Now i need to add 2 more columns after the MAT_DEL_FLAG.These two PLANt and STORAGE LOCATION columns must have drop down values
The context refers to a standard Database ZTABLE to which these two fields are added.
MATERIAL     MAT_DESC     MAT_DEL_FLAG     PLANT     STORAGE_LOCATION
ABC                    
EFG                    
HIJ                    
The Plant column must have the drop down values based on Material .
If we select some value for Plant , then based on the value of plant the storage location drop down values must be populated.
So as per this logic , the drop down values for plant for each row must be different.
Please let me know how to achieve this.
This is a normal table and not an ALV table.
Also please let me know whether the drop down field must be drop down by key or drop down by index.
This is very urgent.
Thanks in advance
Sindhu

Refreshing things again for you -
1. As I have already pointed, create 2 context attributes for VALUESETS for both plant and St.loc.
2. Create dropdown by indexes for both of them, assign valusets to respective attributes using node information.
3. Go to the plant dropdown and create the action for it ONSELECT event - when you chagne the dropdown of plant then populate the respective storage loc.
4.Now, As you are selecting a row (leadselect) you have populated the plant and loc details....write the code for lead selection event of the table
You will get the lead selection index right using node interface (IF_WD_CONTEXT_NODE)
LOOP AT ITAB INTO WA_ITAB.
if sy-tabix eq lv_lead_index.
clear wa_valuset.
wa_valueset-key = 'X'.   "plant
wa_valueset-value = 'X'.
append wa_valueset to it_valueset1.
* popultae the storage location valuset based on the plant selected (bydefault it is 1 right in dropdown)
clear wa_valuset.
wa_valueset-key = 'XX'.   "storage loc
wa_valueset-value = 'XY'.
append wa_valueset to it_valueset2.
else.
* Fill the valusets for all other rows as different or as per your requirement.
endif.
wa_itab-valuset1 = lt_valueset1.
wa_itab-valuset2 = lt_valueset2.
modify itab from wa_itab transporting valuset1 valuset2.
clear wa_itab.
ENDLOOP.
lo_node->bind_table ( it_tab).
Now for that Row, if a plant value is changed, respective storgae loc has to be filled right...then in that ONSELECT of plnat drodpwon again you need to write a piece of code...using the same code with a little modifications.
Hope this is clear.
Check this article on the same - but here ALV is used...the concept is same  use it for your table -
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0cbdde3-fe58-2c10-fcbc-8db18e693877?QuickLink=index&overridelayout=true
the above code you hvae pasted  - i think it fills only for the 1st time....
Regards,
Lekha.
Edited by: Lekha on Dec 20, 2011 12:00 PM

Similar Messages

  • Configuring drop down value for product type.

    Hi All,
    By default we get two values as the product type while creating a shopping cart.
    These values appear in drop down as 'Material' & 'Service'.
    My requirement is only to keep 'Material' in the drop down.
    Please show me some way to do that.
    Thanks & Regards
    Archana

    Hi,
    Instead of chnaging the dropdown values for the field "product type",you can simply implement the BADI "BBP_DOC_CHECK_BADI" to restrict users from creating  a service Shopping cart.In the BADi,check the field product type value.If "02"(Service),display error message.
    BR,
    Deepti.

  • Drop down Values in Adobe form

    Dear All,
         Greetings.
         I am using the Adobe interactive form for E Recruitement(copying the standard and changing it as per the requirement). When i am using the Drop down value for one of the field. Instead of the drop down its showing as a POP-UP with all the possible values.
    I am not able to predict what the problem is. I need to have a drop down, instead of the pop up.
    Please help me in solving the issue.
    Thanks
    Ram M

    Hi Ram,
    Please use a Enumerated Drop down list ffrom the library, seems currently you have Extended Value selctor in your form.
    This will hopefully resolve the issue.
    Regards,
    Arafat

  • Drop down menu for services button

    This is the code i have for the buttons on the website.
    <div id="cssButton" align="center">
        <a href="index3.html" class="button custom">HOME</a>  
        <a href="news.html" class="button custom">NEWS</a>  
        <a href="services.html" class="button custom">SERVICES</a>    
        <a href="portfolio.html" class="button custom">PORTFOLIO</a>    
        <a href="about.html" class="button custom">ABOUT US</a>    
        <a href="contact.html" class="button custom">CONTACT US</a>            
      </div>
    I'm trying to create a drop down menu for the services button, but not sure how to go about it.
    Any help would be much appreciated.
    Aaron

    Structurally, you really should use unordered lists for menus.  And use sub-lists for your drop-menus.
    <nav>
    <ul id="menu">
    <li>Menu 1</li>
    <li>Menu 2</li>
    <li>Menu 3</li>
    <li>Menu 4<ul>
         <li>Sub-Menu 4.1</li>
         <li>Sub-Menu 4.2</li>
         <li>Sub-Menu 4.3</li>
    </ul>
    </li>
    <li>Menu 5</li>
    </ul>
    </nav>
    With some creative CSS, you can have button styled lists that drop.  See links below for details:
    CSS Menu - JSFiddle
    http://jsfiddle.net/zN7fU/28/
    Nancy O.

  • Drop down list for a field in table maintainance

    Hi,
    I have created a table maintainance for ztable. I need a drop down list for field so that user can select values present in the list while giving entries.
    I can not use fixed values in domain, because feild length is more and it wont fit into fixed values.
    I am trying to use VRM_SET_VALUES FM but not getting output. Can any one help me on this.
    Thank you,
    Regards,
    Kusuma K.

    TYPE-POOLS: vrm.        Include this in your program
    DATA: l_name  TYPE vrm_id,
          l_list  TYPE vrm_values,
          l_value LIKE LINE OF l_list.
      LOOP AT it_paym INTO w_paym.
        l_value-key = w_paym-pay_method.
        l_value-text = w_paym-text.
        APPEND l_value TO l_list.
      ENDLOOP.
      l_name = 'Table-field'.   change it as per your requirement this has to be perfect
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = l_list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Hope it helps you,
    Abhijit G. Borkar

  • Retrieving the drop down value used in wdr_select_options for default

    Hello Experts,
    I populated drop down using the method add_parameter_field by using WDR_SELECT_OPTIONS component.
    Now my requirement is I need to default the value in some other parameter field based on drop down selection value.But the problem is WDDOMODIFY method is not triggreing while selecting the value from this dropdown for defaulting the value and even there is no method or option in the interface if_wd_select_options for creating an action while selecting the drop down like on slect in our manually creation drop down.
    Please let me know if there is any solution for this.
    Thanks and Regards,
    Venkat

    Hi venkatesh,
                    The eventhandlet ONENTER of WDR_SELECT_OPTIONS wont work for the drop down and also
                    there is no ONSELECT event of drop down in select options.
                    So i think there must be some kind of button action.
                    As you told you need to default the value of selection screen field based on drop down selection
                    why dont you remove that field from selection screen as you can however use the value later
                    while executing depending on drop down value.

  • Technical names for drop down values through webui

    Hi All, I have ECC 6.0 (SAPKH61705) transactions being launched in CRM 7.0 (SAPKU71305) through the transaction launcher. We are able to display technical names for values in ECC through the gui, and in CRM in both the gui and webui. Is it possible to display the technical names for ECC through the webui? Apologies if this is not the correct forum, I was not sure where to post. For further clarification of the issue, I hope these screen shots assist: ECC gui with 'display technical names' activated: qui - tech names on.jpg CRM webUI with 'display technical names' activated in both ECC and CRM: webui - tech names not visible.jpg Assistance appreciated.

    Hi Amy,
    Yes, it's possible.
    You can achieve it by coding. Instead of passing only the description to your drop down values, we can send technical name and description simultaneously to your drop down value. That's it.
    BR,
    RAM.

  • Drop down in a table not in ALV table but the normal table

    Dear All,
    My question is regarding the drop down in a table.
    I am trying to put the drop down in a table and i am trying to fetch the data from the Data dictionary.
    Since my table contains more than 3 records all the columns are fetched accordingly but the drop down column is not getting set as per the reords of the database.
    When there is one record in the table then i am able to set the value of drop down as per the database and fill the drop down but when there are multiple records in the database all the values are set as same .
    For eg my datbase consits of 2 records and 1st record consists of drop down value as ""open"" and my 2nd record as "Cancelled"   then the two values are over written as ""Cancelled " "Cancelled".
    To over come this situation suggest me with a solution .
    Hope  i am clear with my question.
    Regards,
    Sana.

    Hi......
    I too got the same prblm like you but i solved it... here is the solution...
    first i have  used dropdownbykey list box for my scenario...
    then in the wd_doint...
      DATA LS_VALUESET  TYPE WDR_CONTEXT_ATTR_VALUE.
      DATA LT_VALUESET  TYPE WDR_CONTEXT_ATTR_VALUE_LIST.
    DATA LO_ND_INFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
      DATA LO_ND_ND_EDUCATION TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA LO_EL_ND_EDUCATION TYPE REF TO IF_WD_CONTEXT_ELEMENT.
    navigate from <CONTEXT> to <ND_EDUCATION> via lead selection
      LO_ND_ND_EDUCATION = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_ND_EDUCATION ).
    get element via lead selection
      LO_EL_ND_EDUCATION = LO_ND_ND_EDUCATION->GET_ELEMENT(  ).
    get element via lead selection
      LO_ND_INFO = LO_ND_ND_EDUCATION->GET_NODE_INFO( ).
    i have the values in lt_subty fetched from database.
      LOOP AT LT_SUBTY INTO LS_SUBTY.
        LS_VALUESET-VALUE = LS_SUBTY-SLART.
        LS_VALUESET-TEXT  = LS_SUBTY-STEXT.
        APPEND LS_VALUESET TO LT_VALUESET.
      ENDLOOP.
    get all declared attributes
      LO_ND_INFO->SET_ATTRIBUTE_VALUE_SET(
        EXPORTING
            NAME = 'SLART'
            VALUE_SET = LT_VALUESET ).
    Hope this will help you.....
    if still dint come.... reply me....
    Thanks & regards
    Raja

  • Crystal report Chose from List or drop down value in parameter from UDT

    Hi Experts,
    I had face a issue while creating a report for my client in crystal report , I had create a report and in the parameter field I want to select the value from the chose from list or drop down value from the User define table.
    In parameter had written field as : Code@Select * from dbo. [@UDT] ;  but in the report filled I am not able to select the value.
    Please Help me ! Thanks in Advance. :

    HI
    Welcome to the Forum...
    You cannot put all the values in a single parameter field so you need to select each field for each parameter...
    Better you post it in this link for more reponses:
    Reporting and Printing

  • WebPart drop down values working fine on PostBack in Dev. Environment (Single Machine) not in Farm

    We have three drop downs (ddlRotation, ddlOnCallType and ddlHospital) in our webpart. All values are being populated dynamically. One from list (ddlHospital) and other from tool part properties. For dropdown populated from list, we are storing values  in
    View State.
    WebPart is working fine in development environment (single  machine) while on production ( 1 front end, 1 index and 1 db server), drop down values disappear after post back. Below is the code.
    protected void Page_Load(object sender, EventArgs e)
    try
    if (!Page.IsPostBack)
    LoadData();
    if (!string.IsNullOrEmpty(webPart._rotationDetail))
    ddlRotation.Items.Add(new ListItem("All", "0"));
    int i = 1;
    string[] strRotationDetail = webPart._rotationDetail.Split(':');
    foreach (string str in strRotationDetail)
    ddlRotation.Items.Add(new ListItem(str, i.ToString()));
    i++;
    if (!string.IsNullOrEmpty(webPart._onCallTypes))
    ddlOnCallType.Items.Add(new ListItem("All", "0"));
    int j = 1;
    string[] strOnCallTypes = webPart._onCallTypes.Split(':');
    foreach (string str in strOnCallTypes)
    ddlOnCallType.Items.Add(new ListItem(str, j.ToString()));
    j++;
    catch (Exception ex)
    private void LoadData()
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite spSite = new SPSite("SITE_URL"))
    using (SPWeb spWeb = spSite.OpenWeb())
    SPList oList = spWeb.Lists[webPart.destListName];
    SPListItemCollection setuplistItems = oList.Items;
    if (setuplistItems != null && setuplistItems.Count > 0)
    DataTable dtSetupData = setuplistItems.GetDataTable();
    if (ViewState["SetupData"] != null)
    ViewState.Remove("SetupData");
    ViewState.Add("SetupData", dtSetupData);
    else
    ViewState.Add("SetupData", dtSetupData);
    LoadHospitalCombo();
    dateControl.SelectedDate = DateTime.Now;
    else
    // some error message
    private void LoadHospitalCombo()
    if (ViewState["SetupData"] != null)
    DataTable dt = (DataTable)ViewState["SetupData"];
    DataView dv = dt.DefaultView;
    ddlHospital.Items.Clear();
    ddlHospital.DataTextField = "TITLE";
    ddlHospital.DataValueField = "TITLE";
    ddlHospital.DataSource = dv.ToTable(true, "TITLE");
    ddlHospital.DataBind();
    ddlHospital.Items.Insert(0, "All");
    Any help?
    http://farhanfaiz.wordpress.com

    Running your code in try/catch and doing nothing on exception, is not a good idea. Please try to put logging in your code as I believe your code is throwing exception. It's difficult to say seeing such a code what's wrong. Maybe the list doesn't exist or
    exists with different name/title, or viewstate is disabled or webpart properties are not populated... there's so many possibilities. Also if possible refactor your code as shown below:
    //Your Code, you are loading all items from database and then counting it
    SPListItemCollection setuplistItems = oList.Items;
    if (setuplistItems != null && setuplistItems.Count > 0)
    //Refactored Code
    if (oList.ItemCount > 0)
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • Populate Drop down values to Adobe forms

    Hello,
    I am in the process of developing the HCM forms for PCR's. This is using old technology. How can I pass values to the Adobe forms based on certain condition selected in previous screen. For eg. Based on Position selected, I should have a certain value in Drop down pre-selected on the next screen and when the user does a drop down a list of the values should be listed. Where should do the coding for the subsequent drop down values?
    Appropriate points rewarded.
    Prasad

    Here a change in the question below. Based on Position selected, I should have a certain value in Drop down pre-selected on the next screen from table IT1008
    and when job is selected drop down from table T500P should be listed. Does this need to be handled in badi or in the Adove form scripting?
    Thanks
    Prasad

  • Need to delete drop down values of activity in travel request portal

    Hi,
    We need to hide/delete few of the drop down values from activity in travel request creation in portal, i know that if we delete in R/3 it will effect here, as per the client requirement we need values in R/3 system but that few of the values should not appear drop down list .
    Regards
    Ganesh

    Hi Ganesh,
    Try the below code in POSTexit of WDDOMODIFYVIEW( ) method of your view
    DATA drp_info       TYPE REF TO if_wd_context_node_info.
    data   lo_node        type ref to if_wd_context_node.
    DATA drp_value_set  TYPE wdr_context_attr_value.
    DATA drp_value_list TYPE wdr_context_attr_value_list.
    DATA index TYPE n.
    DO 5 TIMES.
    index = sy-index .
    CONCATENATE ' Value ' index  INTO drp_value_set-value SEPARATED BY space.
    CONCATENATE ' Value ' index  INTO drp_value_set-text SEPARATED BY space.
    INSERT drp_value_set INTO TABLE drp_value_list.
    ENDDO.
    SORT drp_value_list BY value.
    DELETE ADJACENT DUPLICATES FROM drp_value_list COMPARING value.
    lo_node  = drp_info->get_child_node('GENERAL_DATA').
    drp_info = lo_node->get_node_info(  ).
    drp_info->set_attribute_value_set(
    name = 'T_ACTYPE'  value_set = drp_value_list ).
    Hope this helps you.
    Regards,
    Rama

  • Linking 2 drops downs and having tables appear

    I need to link 2 drop downs together so that the second is dependant on the first. I also need to have a table appear when the second drop down option is selected. If they change their mind and select a different option in the 2nd drop down a different table needs to appear. Currently i have 2 drop downs that are linked so that the options in the 2nd will change but i cant link this for a table to appear? Im not great with Java or scripting.

    Hi Melissa,
    In the change event of 2nd DropDown you can put the following code.
    var a = xfa.event.newText
    if(a == 5) // Set the value that you want.
                        Table2.presence = "hidden";
    else {
                        Table2.presence = "visible";
    Thanks,
    Bibhu.

  • WAD - How to Minimize the Space Between Drop-Down Box and Table

    Hi all,
      I am trying to display a query in 'Table' with Web Application Designer (WAD). First, I have placed the 'Drop-down box' web-item and 'Table' web-item below it in the Web Template. There is an half-inch of space between the 'Drop-down box' and the 'Table' when it displays on the browser. It doesn't look good with this gap.
      How can I eliminate or minimize this gap, PLEASE ?.
    Thanks.

    Hi Ingo & Hari,
       Thanks a lot for your help. Now it reduced the gap between the drop-down box and table to 3mm on browser.
    But, there is no gap on web template. If we change some settings, we could still further reduce the gap while displaying it on browser.
      Any new suggestions, PLEASE.  Thanks again.
    <!--BW HTML data source object tags: -->
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_PROPERTIES"/>
             <param name="TEMPLATE_ID" value="TESTWBOLAPQUERYUSER1"/>
             TEMPLATE PROPERTIES
    </object>
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_DATA_PROVIDER"/>
             <param name="NAME" value="DATAPROVIDER_1"/>
             <param name="QUERY" value="Z_BWSTAT_OLAP_PER_QUERY_USER"/>
             <param name="INFOCUBE" value="0BWTC_C10"/>
             DATA_PROVIDER:             DATAPROVIDER_1
    </object>
    <html>
      <head>
        <title>BW Web Application</title>
        <link href="/sap/bw/Mime/BEx/StyleSheets/BWReports.css" type="text/css" rel="stylesheet"/>
      </head>
      <body>
    <P align=left>
    <TABLE cellSpacing=1 cellPadding=1 width="75%" border=0>
      <TR>
        <TD vAlign=top><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="DROPDOWNBOX_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="69"/>
             <param name="IOBJNM" value="0TCTUSERNM"/>
             ITEM:            DROPDOWNBOX_1
    </object></TD>
        <TD vAlign=top><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="DROPDOWNBOX_2"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="19"/>
             <param name="IOBJNM" value="0TCTIFCUBE"/>
             <param name="MAXVALUES" value="1"/>
             ITEM:            DROPDOWNBOX_2
    </object></TD>
        <TD vAlign=top><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="DROPDOWNBOX_3"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="34"/>
             <param name="IOBJNM" value="0CALDAY"/>
             ITEM:            DROPDOWNBOX_3
    </object></TD>
        <TD vAlign=top><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="DROPDOWNBOX_4"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="22"/>
             <param name="IOBJNM" value="0TCTQUERY"/>
             ITEM:            DROPDOWNBOX_4
    </object></TD></TR></TABLE>
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="TABLE_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="505"/>
             <param name="BORDER_STYLE" value="FORM"/>
             <param name="ALT_STYLES" value=""/>
             ITEM:            TABLE_1
    </object></P>
    <P align=left> </P>
    <P align=left> </P><FONT color=#0000ff size=2>
    <P align=center></FONT> </P>
    <P align=center> </P>
    <P align=center> </P>
      </body>
    </html>

  • HCM F&P - How to set the field as Required based on drop down values

    Hi Experts,
    I have a requirement to set the Date field as mandatory when a particular value is selected in drop down list. I have already tried with MessageBox though it displays the error message but process moves further i.e. on clicking Check & Send button it throws an error message but still it moves further and i can see only Send button. Ideally it should halt there itself.
    Thanks & Regards,
    Jitesh Talreja

    Thanks for your valuable inputs
    Chintan
    I have already tried this. It only highlight the field with the red border but still allow to move further.
    Mukesh
    Yes, we can definately control this from the backend but that would be the last option i should execute. Ideally, this is something to be controlled in front end itself
    Poornima
    By setting the field attrbiute Required will set the field mandatory as a whole irrespective of drop down values or any other UI element.
    Regards,
    Jitesh Talreja

Maybe you are looking for

  • AIR 3.9.0.880 StageWebView and Retina MBP

    When I compile my app using AIR 3.9.0.880, my StageWebView is 1/4 size on my Retina MBP unless I pass true to the StageWebView constructor for the "useNative" parameter. Is this by design? I have this set in my app descriptor: <requestedDisplayResolu

  • Out XML element values extract

    hi their How can I out XML element the values extract and in a loop in variable and/or in an array store? Example: [loop] <SA>'MS','GYM'</SA> Values 'MS' and 'GYM' should be in variables e.g var1='MS' and var2='GYM' [end loop] Please, help me!!!! Urg

  • Business Object XI R1 to SAPBW and SAPR3

    Hi,       How to connect Business Object XI R1 System to a SAP BW and SAP R3 Systems. Thanks, venkat ramana

  • How to run the samplecode JMF20_guide.pdf provide?

    The pdf document has a samplecode in page 100,but how to run the code?My code like this: public static void main(String[] args) CaptureAudio ca=new CaptureAudio(); ca.captureDevice(); //capture and play audio from a microphone public void captureDevi

  • Mass variant changes

    Hi experts Is there any way to make the mass changes in the variants created for standard as well as z reports. I had created variant for all periods of 2009 year. Now i want to create variant for 2010 year but in one go (by making mass changes). Pls