Drop down in table

hi,
I have a dropdown by key in a table with 50 values.when I select a value in this drop down the following method will be called.This method is used to set new values in a dropby index present in the same table.This is happening perfectly.When I press enter to go to the next row in the table,the dropdown by index is retaining previous values.when I select the value in it change in second row is reflected to the first row also.this should not happen.Old values in the previous row of the dynamic dropdown should be retained.Can u suggest what should be done.
public void onActionselectSkill(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionselectSkill(ServerEvent)
     //IPrivateDetails1.ISkillsNode nSkills = wdContext.nodeSkills();
     //IPrivateDetails1.INewskillNode nNewSkill = wdContext.nodeNewskill();
     int newsklen=wdContext.nodeNewskill().size();
     int sklength = wdContext.nodeSkills().size();
     boolean cppAdded = false;
String getsub="";
     for(int i=0;i<sklength;i++)
      getsub=wdContext.nodeSkills().getSkillsElementAt(i).getSubject();
     //String getsub=wdThis.wdGetContext().currentSkillsElement().getSubject();
      // String getsub=nSkills.currentSkillsElement().getSubject();
     // String getsub="50000138";
       if(getsub.equals("50000138"))
          IPrivateDetails1.ISkillsNode nSkills = wdContext.nodeSkills();
               IPrivateDetails1.INewskillNode nNewSkill = wdContext.nodeNewskill();
          List lis=new ArrayList();
          IPrivateDetails1.INewskillElement el1 = nNewSkill.createNewskillElement();
          el1.setTskill("abap");
          lis.add(el1);
          IPrivateDetails1.INewskillElement el2 = nNewSkill.createNewskillElement();
          el2.setTskill("workflow");
          lis.add(el2);
          //wdContext.nodeNewskill().bind(lis);
          nNewSkill.bind(lis);
          //nNewSkill.setLeadSelection(1);
      else if(getsub.equals("50000130"))
                    IPrivateDetails1.ISkillsNode nSkills = wdContext.nodeSkills();
                         IPrivateDetails1.INewskillNode nNewSkill = wdContext.nodeNewskill();
                              List lis=new ArrayList();
                                    IPrivateDetails1.INewskillElement el11 = nNewSkill.createNewskillElement();
                                    el11.setTskill(" C Programming");
                                    lis.add(el11);
                                    IPrivateDetails1.INewskillElement el21 = nNewSkill.createNewskillElement();
                                    el21.setTskill("C++ Programming");
                                    lis.add(el21);
                                    IPrivateDetails1.INewskillElement el31 = nNewSkill.createNewskillElement();
                                    el31.setTskill("C# Programming");
                                    lis.add(el31);
                                    IPrivateDetails1.INewskillElement el41 = nNewSkill.createNewskillElement();
                                    el41.setTskill("Java");
                                    lis.add(el41);
                                    IPrivateDetails1.INewskillElement el51 = nNewSkill.createNewskillElement();
                                    el51.setTskill(" Visual Basic");
                                    lis.add(el51);
                                    IPrivateDetails1.INewskillElement el61 = nNewSkill.createNewskillElement();
                                    el61.setTskill("Pascal");
                                    lis.add(el61);
                                    IPrivateDetails1.INewskillElement el71 = nNewSkill.createNewskillElement();
                                    el71.setTskill(".Net");
                                    lis.add(el71);
                                    nNewSkill.bind(lis);
                                    //nNewSkill.setLeadSelection(1);
       else if (!cppAdded)
          IPrivateDetails1.ISkillsNode nSkills = wdContext.nodeSkills();
               IPrivateDetails1.INewskillNode nNewSkill = wdContext.nodeNewskill();
          cppAdded = true;
          List lis=new ArrayList();
          IPrivateDetails1.INewskillElement elCpp = nNewSkill.currentNewskillElement();   
          if (null ==  elCpp) {
            elCpp = nNewSkill.createNewskillElement();
            elCpp.setTskill("Other");
            nNewSkill.addElement(elCpp);
            nNewSkill.bind(lis);
            //nNewSkill.setLeadSelection( nNewSkill.size() - 1);
          elCpp.setTskill("C++");
          nNewSkill.bind(lis);
    //@@end
The method that is called when I click enter in the table is
public void onActionaddSkills(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionaddSkills(ServerEvent)
    int sarea=0,keysk=0,pro=0,fdas=0,tdas=0;
     if(wdContext.nodeSkills().currentSkillsElement().getSubject()==null)
               sarea=1;
     if(wdContext.nodeNewskill().currentNewskillElement().getTskill()==null)
                    keysk=1;
     if(wdContext.nodeSkills().currentSkillsElement().getProficiency()==null)
                    pro=1;
     if(wdContext.nodeSkills().currentSkillsElement().getFromdateSkills()==null)
                    fdas=1;
     //if(wdContext.nodeSkills().currentSkillsElement().getTodateSkills()==null)
               //     tdas=1;
     if(sarea==1 || keysk==1 || pro==1 || fdas==1 )
             IWDControllerInfo ctrlInfo3=wdThis.wdGetAPI().getViewInfo().getViewController();
                 IWDConfirmationDialog dialog3=wdComponentAPI.getWindowManager().createConfirmationWindow("SkillSets Table Field Is Missing.""\n""Check ur entry!!!",ctrlInfo3.findInEventHandlers("ok"),"OK");
             dialog3.addChoice(ctrlInfo3.findInEventHandlers("cancel"),"cancel");
             dialog3.open();
             else
              skNode=wdContext.nodeSkills();
                  skEl=skNode.createSkillsElement();
                  skNode.addElement(skEl);
               //IPrivateDetails1.INewskillNode nsknewNode;
                // IPrivateDetails1.INewskillElement nsknewEl;
                  sknewNode=wdContext.nodeNewskill();
               sknewEl=sknewNode.createNewskillElement();
               sknewNode.addElement(sknewEl);
    //@@end

Hi,
I did not study your code, but the behaviour you describe is clear.
You have to create the 50 nodes dynamically for each table row (to be precise: for each nodeElement the row is bound to), and bind the Dropdown element in the particular row to each of these nodes (with 50 elements).
This must be done dynimcally if you don't know how many rows your table will contain. Otherwise, you can create the context for all table data design time.
Good luck.
Roelof

Similar Messages

  • How to get different values in drop down in  table rows

    Hi
    I have an application, which has a drop down in the table. Each row is to have different values in its drop down based on the "characteristic" parameter. For eg. first row has characteristic as color, and the corresponding drop down will contain the color names. Second row has charateristic as weight, and the drop down will carry corresponding weight values.
    I am getting the data from the backend as a flat table i.e. charaterisitc - value pair.
    I think i will have to use the Drop Down by Index control, but i dont know how exactly to go about it.
    Can any one please help in this regard.
    Thanks & regards,
    Anupreet

    Hi Maksim
    I am sorry, but i am not able to get you.
    This is the piece of code that i wrote for populating the drop down:
    IPrivateMaintainDocAttribView.IDropElement dropEle = null;
    for(int i = 0;i<size;i++)
                 dropEle = wdContext.nodeDrop().createDropElement();
                 dropEle.setDropval(wdContext.nodeCtxNode_DocAttribs().getCtxNode_DocAttribsElementAt(i).getCmpCtx_Value());
                 wdContext.nodeDrop().addElement(dropEle);
    Here, Dropis the sub node to which i am putting the data and thisis linked to the table.
    CtxNode_DocAttribs is the model node from where i am picking the data and setting in the subnode.
    Thanks & regards,
    Anupreet

  • How to put drop down in table control ?

    Hi All,
    I m writing one module pool program to edit table.
    I want dropdown to one field so that user can select the appropriate value. And also I want to save that record.
    So how to get the dropdown list and after editing that record how to save that in the database?
    Thanx in advance.
    -Umesh

    Hi Umesh,
    Please check this demo program RSDEMO_TABLE_CONTROL on how to add drop down list in table control. Also check this program DEMO_DYNPRO_TABCONT_LOOP_AT as well.
    To save to database you can code something like this in PAI.
    MODULE USER_COMMAND_0100 INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      CASE SAVE_OK.
        WHEN 'SAVE'.
          MODIFY <database table> FROM TABLE <table control>.
          IF SY-SUBRC = 0.
          ELSE.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Hope this will help.
    Regards,
    Ferry Lianto

  • Drop Down in table control

    Hi All,
    I am facing Problems here ;-
    I have developed a table control in WDA4 application i have 3 dropdowns which are dependent on each other i.e. when i select the entry in the first one then corresponding to that entry the data should be shown in next drop down and same goes for the third one .I am using dropdown by index here .
    Thnks ,
    Sahil

    Hello Sahiil,
          You need to bind the table to a context node and the three drop downs separately to three context nodes. when you click one one of the drop downs, populate the the other nodes.
    I hope this works for you.
    Please feel free to ask if you have any further doubts.
    Regards,
    Ritwik.

  • Drop down in Table Maintainence Gen

    Hi all,
    I'm facing a problem in table maintainence generator main view screen...i've got two fields in my db table and i've created search help for both the fields for drop down option for both the fields in main view screen.....but the first field shows up drop down option were in the other does'nt....i've changed the layout of the screen and lenght of the text element as well, even altered or changed the length of the view screen but its not working out....what i'm i suppose to do to get show up the drop down option for the other field too so as to make the the end user find the list of entries in the field..............any suggestion or changes would be really appreciated and correct answers would be surely rewarded....
    Answer need urgenlty..........

    Check whether in the attributes of the field, whether you have put the "Dropdown" value for your field as "Listbox" or "Listbox with key".
    Also check whether you have referenced the field directly to the data element.
    HOpe this helps.
    Thanks
    Balaji

  • Drop Downs in Table Control in Web dynproABAP

    Hi All,
    I am facing Problems here ;-
    I have developed a table control in WDA4 application i have 3  dropdowns which are dependent on each other  i.e. when i select the entry in the first one then corresponding to that entry the data should be shown in next drop down and same goes for the third one .I am using dropdown by index here .
    Thnks ,
    Sahil

    hi!
    you can bind the texts property  of your Dropdownbyindex
    to the required attribute.this will populate your data.
    thanks
    vishal

  • ESS Bsns pkg  Bnfts &Pymnt - Overview Drop down and table not populated

    Hi All,
      We have configured ESS business package. Payslips in form of PDF are available in Benefits and payment.
    Overview dropdown and table are not getting populated.
    I checked context node rem, vcdata and attribute overview_sel in VcRem2Selection comp.
    They are not populated at any place as well. How does this work?
    Please guide
    Regards,
    Ganga

    Hi Gangadharayya,
    There are 2 ways of populating the dropdown.
    Either u can create a simple type and bind the attribute to the SimpleType, or use the class ISimpleTypeModifiable and IModifiableValueSet to populate the values at run-time.
    Hope this helps u
    Regards,
    Poojith M V

  • Drop down in a Table

    Hi All,
    I have a scenario where I need a drop down in table.It is binded to a context and should be populated with values(yes/no) from the context. But based on the data selected from the other columns it should default to yes or no. and then let user choose . How is this achieved.
    Thanks all for your help.

    Hi,
    In a table, while u create binding,
    1.Select the context node
    2.In "Cell Editor of Table Column" u can select dropdown by index.
    By doing so u will get dropdown in the table.
    If the contexdt binded to the dropdown is character type, u can update the intenal table with "yes/no" and bind internal table to context node.
    If not add a new field and update the field with "yes/no" value.
    Thanks

  • Regd: Drop down option related

    hi gurus,
    am Created  an iView with a  drop down selection option.
    for example
    <b>Display as : Table
                    : Chart</b>
    it's working fine and displaying in the output as per the selection in the Drop down list.
    my Question is it's working in the <b>REVERSE</b> order also i.e. Once the table or chart is displayed ..If i am double clicking on the TABLE view,  AUTOMATICALLY it's changing to Chart view and vice versa. WHICH I DON"T WANT.
    it should work in ONE way only i.e. as per the Drop down selection.
    Can any body help  to solve it.
    Regards,
    prasad

    Hi Venkat, thanks for ur reply.
    Ok, here is what i have done.
    taken a datasource-->frm DS output >created an form view with drop down options (table and chart)>from the the <b>output of form view</b> --> created both a Table and chart outputs with required visibility condition.As i mentioned it's working fine BUT the revesre also working.
    please suggust where i have to correct.
    Thanks in advance.
    prasad

  • Bold text in drop down?

    Hi all
    Can we set bold text to drop down values. I am using drop down in table column. I want bold text at the time of defining values to dropdown or after selecting a value from drop down. Finally after selecting a value i want to display that text as BOLD. Could any help?
    Thanks,
    Madhan.

    Hi
    Not possible even if you use themes.
    i was thinking about using themes here but there also i have not found anything related to this particular requirment.
    thanks
    sarbjeet singh

  • Direct Database Request - Add Drop Down List

    Hi,
    I have created a direct database request and would like to represent the output in table format. How can I add a page drop down filter, I would like to move two columns as page drop down lists and also be able to view the columns in the table.
    I know how to acheive this with a pivot table, but can this also be done with a table layout?
    Thanks

    Here is the answer to your specific question: No, you can't do "page drop downs" in Table View. You will have to use Pivot Table as described in previous posts.
    You will have to use dashboard prompts to get your choices. You are probably saying, "but dashboard prompts must be built on a Subject Area column and I can't select it because I am using a direct database as my source. So how do I create the prompt?"
    Good question. My question is, on the columns that you need as the "drop down filters," are those columns in any existing Subject Area? I know that your request is built by direct database, but if the specific column you need for your dashboard prompt can be found in a Subject Area, then you can use that Subject Area on which to build your dashboard prompts.
    You can add a WHERE condition in your direct database to receive the presentation variables. Read below to learn how:
    http://108obiee.blogspot.com/2009/11/variables-in-direct-database-requests.html

  • 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

  • Trying to get Pivot table drop down list to affect bar chart below it

    Hi,
    In BI Answers I have a pivot table and a bar chart below it. At run time, I can choose a value from the
    drop down list for the pivot table, but the bar chart below it doesn't react to the new value chosen
    from the pivot table.
    Does anyone know a way to get the bar chart to receive new values, permeating down from a table view
    pivot table above it on the same report (apart from using prompted filters for the whole report).
    Many thanks,
    Jake

    you may want to try this...
    in you bar chart criteria, set prompted filters of all the dimension fields u want from the pivot table.
    in the pivot table, set action links on these dimension columns and loop it back to the current dashboard page.
    now, when u click on a value on the pivot table, the dim values of this will be passed as a parameter to the the bar chart filter set and your bar chart will change accordingly...
    -sharath

  • How to show "ALL" Values by default in Page Drop-Down Lists in Pivot Tables

    Hi Everyone,
    Iam stuck with 1 problem please can any 1 help me if u know the solution.
    Here is my problem:
    How to show "ALL" Values by default in Page Drop-Down Lists in Oracle BI Pivot Tables?
    For example, if you place Region in the pages area, a Region drop-down list allows the user to select a particular region, and see the data for only that region, rather than seeing all the Regions,But by default its not showing "ALL" option in the drop down list ,rather than doing that its showing result for only 1 region by default.
    And an other problem with this pages area is, if we palce the multiple attributes in the Pages area in the pivot table, the (Fields)result is showing in vertically, the attributes 1 by 1(Every attribute in a new line) ,rather than showing like that, is there any way to show the results in horizantally?(We want to have it as a seperate drop drown list for every field horizantally not as a concatenated list).

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • Change the display of the multiple Table items using a single Drop-down

    I have created a Web Template in BEx WAD (BW 3.5) with 4 Tables assigned to 4 dfferent Queries. Now I want to change the display of the all the Four Tables based on the selection of display properties chosen in a single Dropdown item. The properties to be selected  in the dropdown are like changing the Alternate style display of Rows, Suppress Alternate Style, Display only 30 Rows or 60 Rows.
    Please help me in writing the script necessary to pass the command from the dropdown to all the Tables to get the desired output.
    Thanks,
    Krishna
    Edited by: Hari Krishna Velampalli on Oct 26, 2008 12:00 AM

    Dipika, Thanks for the response.
    I tried using that option but again since we cannot give custom options in a drop-down,
    I created a Form with a drop-down list of options like Suppress Result Rows, Suppress alternate style of rows, Display only 30 Rows, Display only 100 rows .. and so on.
    Now I am able to change the display of my first table by selecting the options in the drop-down list. But my intention is to apply that selection to Multiple Tables.
    How can I achieve that?
    HK

Maybe you are looking for

  • Can two people with two iTunes account share an iPad

    Just a question.  I want to share my iPad but not my iTunes account.. How

  • Disable only one radio button in a Radiogroup using Dynamic Actions.

    Hello everyone, I'm using Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit with Application Express 4.1.1.00.23 I have a radio group which has 3 radio buttons. Now in certain situations I want only one of the radio buttons to be disa

  • Assigning the property value to signeddata

    Hi all, I want to use a property value like a signeddata. For example a have a property QUANTITY in MATERIAL dimension. *WHEN MATERIAL.QUANTITY *IS > 0 *REC(EXPRESSION=[MATERIAL].[QUANTITY], P_ACCT=120) *ELSE *REC(EXPRESSION=1, P_ACCT=120) *ENDWHEN A

  • How to decipher value from hexa dump of select-options

    Hi   Can someone tell me whether it is possible to interpret the value of select-option as entered in the report selection-screen from ABAP Dump as seen in ST22.   Other variables are decipherable. They are stored as octets. In my sample program s_mt

  • WAD RRI

    Hi ALL GURUS, my case is if i run a template, by using month view(ex: jan2005) , am getting all the absence types for the organisations inthat particular month, and a bar chartfor the absences , if i right click and goto employee view, am getting the