How to insert new values in dropdown box through coding

hi,
  I want to insert new values in dropdown box in a table.
Please provide me the corresponding coding.i already did this code but result is empty dropdown.I mapped the context properly..
int sklength=wdContext.nodeSkills().size();
      for(int i=0;i<sklength;i++)
    String getsub=wdContext.currentSkillsElement().getSubject();
    if(getsub.equals("50000138"))
         //IPrivateDetails1.INewskillElement el=wdContext.createNewskillElement();
         List lis=new ArrayList();
         //lis.add("Abap");
         //lis.add("Workflow");
         IPrivateDetails1.INewskillElement el=wdContext.createNewskillElement();
         el.setTskill("abap");
         lis.add(el);
          el.setTskill("workflow");
          lis.add(el);
          wdContext.nodeNewskill().bind(lis);
          //wdContext.nodeMonthsOfYear().bind(MonthsOfYear);
          wdContext.nodeNewskill().setLeadSelection(1);
    else
          wdContext.currentNewskillElement().setTskill("C++");
waiting for a positive reply......
with regards,
S.Kiruthika

kiruthika,
Too many logical errors to explian.
Should be:
IPrivateDetails1.ISkillsNode nSkills = wdContext.nodeSkills();
IPrivateDetails1.INewskillNode nNewSkill = wdContext.nodeNewskill();
int sklength = nSkills.size();
boolean cppAdded = false;
for(int i=0;i<sklength;i++)
  String getsub=nSkills.getSkillsElementAt(i).getSubject();
  if(getsub.equals("50000138"))
    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);
    nNewSkill.bind(lis);
    nNewSkill.setLeadSelection(1);
  else if (!cppAdded)
    cppAdded = true;
    IPrivateDetails1.INewskillElement elCpp = nNewSkill.currentNewskillElement();   
    if (null ==  elCpp) {
      elCpp = nNewSkill.createNewskillElement();
      nNewskill.addElement(elCpp);
      nNewskill.setLeadSelection( nNewskill.size() - 1);
    elCpp.setTskill("C++");
VS

Similar Messages

  • How to insert new value into an array

    I have an already declared array (including the size) and want to write a method for inserting a new value. Do I have to re-declare the array to the new size? ie old size + 1, then add the new value or is there a java method for this. I can't find one.
    Thanks in advance....
    Mike

    Hi,
    there is no method for that. Look up class Vector. That class implements automatic growing of the Vector.
    Phil

  • How to insert new Item in JCombox through setEditable?

    Hey guys,
    Is there somebody who can help me on how to insert new Item in the JComboBox through setEditable?
    JComboBox box  = new JComboBox();
    box.addItem("");box.addItem("a");
    box.addItem("b");
    box.setEditable(true);
    When I run it and selected the index 0 which the one which color red, I want to edit it and when I press enter key it will add a new item, but preserving this " box.addItem(""); , what I want is to add like this one, box.addItem("The new text entered"); "
    Can you help me with this one... Thanks

    hello,
    the following demo may help,
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.DefaultComboBoxModel;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    * comobo.java
    * Version 1.0
    * Date Jan 3, 2006
    * Copyright spatika
    public class comobo extends JFrame implements ActionListener{
         JComboBox jc = new JComboBox();
         DefaultComboBoxModel lm = new DefaultComboBoxModel();
         JButton jb = new JButton("add");
         public comobo(){
              lm.addElement("");
              lm.addElement("1");
              lm.addElement("2");
              lm.addElement("3");
              jc.setModel(lm);
              jc.setEditable(true);
              jb.addActionListener(this);
              getContentPane().add(jb,BorderLayout.NORTH);
              getContentPane().add(jc,BorderLayout.SOUTH);
              pack();
              setVisible(true);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
         public void actionPerformed(ActionEvent i){
              Object text = jc.getSelectedItem();
              jc.setSelectedItem(null);
              lm.addElement(text);
         public static void main(String artgs[]){
              new comobo();
    }thanks
    daya

  • How to insert new line in the copied schema with transaction code PE01?

    Dear Experts,
             I have copied HKT0 to ZKT0 , i want to insert new line between  line 150 and line 160 in ZKT0, I don't know how to insert new line 160, who can tell me ?
             Looking forward to your reply.
    Best Regards,
    Merry

    Hi,
    1. Open your schema,
    2. In first colume "Line" select line where you want to add new line,
    3. Replace first value in the column field (that indicates number of line) with character I (means insert),
    4. Press enter
    The line will be added. The same way you can add lines to PCR.
    To delete use character D.
    Cheers

  • How to insert new line break in XSLT mapping

    Hi experts,
    I am doing file to mail scenario, i am sending the text file as an attachment using reciever mail adapter.
    I did everything, i can able to send the mail with text file attachment, but with in the file i got multiple rows, i need to put line break in XSLT mapping.
    I did use following statement but it is inserting small rectangle between the records, the records are not separating with new lines, all are in one line.
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    Can anyone suggest me how to insert new line in XSLT mapping.
    My XSLT mapping as look like:
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns0="http://www.Coj.co.za/SapIsuToABSA/DirectDebitFile">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:variable name="break">&lt;br/&gt;</xsl:variable>
    <xsl:variable name="space"> </xsl:variable>
    <xsl:variable name="newline"><xsl:text></xsl:text></xsl:variable>
    <xsl:template match="/">
    <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
    <Subject>Please Check Attached Direct Debit File</Subject>
    <From>S@za</From>
    <To>P@za</To>
    <Content_Type>text/plain</Content_Type>
    <Content>
    <xsl:for-each select="MT_SapIsuToABSA_DirectDebitFile/DirectDebitRec/Body">
    <xsl:value-of select="Space1"/>
    <xsl:value-of select="Cust_AccNo"/>
    <xsl:value-of select="Reserve_1"/>
    <xsl:value-of select="Cust_Name"/>
    <xsl:value-of select="Cust_Name1"/>
    <xsl:value-of select="Cust_Bank_AccNo"/>
    <xsl:value-of select="Space2"/>
    <xsl:value-of select="Cust_Bank_BranchNo"/>
    <xsl:value-of select="Reserve_2"/>
    <xsl:value-of select="Space3"/>
    <xsl:value-of select="Cust_AccNo_1"/>
    <xsl:value-of select="Space4"/>
    <xsl:value-of select="Reserve_3"/>
    <xsl:value-of select="Deduction_Amnt"/>
    <xsl:value-of select="Space5"/>
    <xsl:value-of select="Reserve_4"/>
    <xsl:value-of select="Space6"/>
    <xsl:value-of select="Action_Date"/>
    <xsl:value-of select="Space7"/>
    <xsl:value-of select="Reserve_5"/>
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    </xsl:for-each>
    </Content>
      </ns1:Mail>
      </xsl:template>
      </xsl:stylesheet>
    Kind regards,
    Praveen

    Hi,
    I think <xsl:text>#xa;</xsl:text> should do the trick, but depending on which OS (ux or win), the "new line" chars sequence is different (win would require a CRLF like <xsl:text>#xd;*#xa;</xsl:text>)
    Chris
    -> &
    Edited by: Christophe PFERTZEL on Apr 14, 2010 2:16 PM

  • How to insert a value from sequence in Bussiness Components?

    How to insert a value from sequence in Bussiness Components?
    I would like to do it, but without a triger that would do it before insert.
    I know that there is a type DBSequence in BC where you can insert a sequence name but it does not work when I type there my sequence name.
    Do you now how to fix that problem?
    Bart.

    The newer way to do it is to make the type DBSequence and enter the name of the Sequence object in the sequence field. It must match the same name of the sequence object in the database. Next, you have to create a before insert for each row trigger on the table. Basically, something like this:
    CREATE OR REPLACE TRIGGER TGB_THEME_SEQ
    BEFORE INSERT ON THEME
    FOR EACH ROW
    DECLARE
    BEGIN
    -- Assign the id from the sequence if null
         IF( :new.theme_id IS NULL ) THEN
              SELECT THEME_ID_SEQ.nextval
              INTO :new.theme_id
              FROM dual;
         END IF;
    END;
    In the above example, THEME_ID_SEQ is the seuence object name in the database. If you have the name right but it still fails, then the user you are logging in as probably doesn't have access to the sequence in the database.
    Hope this helps.
    Erik

  • How to hold the value in List box.

    Hi All,
    On my screen painter Screen I am displaying the Sold to party and ship to party with thier address.
    I am also displaying the Shipping condition based on ship to party. To display the shipping condition i am using list box. Once the user enter the sold to party automatically all the field is going to populate in their respective fields. I am facing the problem that, The list box getting populated with shipping condition but once you choose the shipping condition and hit the enter the list box getting refreshed. I am using this code in PAI event. And I can Only use this in PAI.
    The Function i am using for list box is CALL FUNCTION 'VRM_SET_VALUES'.
    Pls suggest me how to hold the value in List box.
    Thanks,
    Rakesh

    Hi,
    Now i am using in PBO.
    the code below in in PBO.It is still not holding the value.
          if list[] is initial.
          perform SHP_COND.
          endif.
    form SHP_COND .
    *DATA: SHOP(80).
        clear : GT_VSBED, list.
        refresh : GT_VSBED, list.
         select vsbed
           from knvv AS K
           into table GT_VSBED
          where Kvkorg = vbak-vkorg  "Kkunnr = GV_STPH
          and K~vtweg = vbak-vtweg
          and K~spart = vbak-spart.
        select VSBED vtext
          from TVSBT
        into table list
        for all entries in GT_VSBED
        where spras = sy-langu
        and vsbed = GT_VSBED-VSBED.
    *break-point.
    NAME = 'SHP_CON'.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        id                    = NAME
        values                = 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.
    endform.                    " SHP_COND
    Thanks,
    Rakesh

  • How to insert new line character?

    Hi all,
    I have two lines to print.
    out.println("Available number of columns="+cols);
    out.println("Number of columns must be present=10");My problem is:
    i want both the lines to be printed one below the other. But, it is displayed in one single line.....
    Can anyone please tell me how to insert new line character?
    I tried with \n, '\n' and \r\n but, in vain......
    Thanks for your time.
    Regards,
    Ashvini

    You should never use "\n" directly.
    The line separator character is different on different operating systems.
    And putting quotes around it in your string will make absolutely no difference in the JSP.
    To find out what the line separator is you should use System.getProperty("line.separator");
    The JSPWriter and PrintWriter classes will automatically use this property with a println statement, so a println will always finish with a line separator.
    The issue here was that HTML by default ignores all whitespace.
    The solutions provided
    - use a <br> tag instead of a carriage return
    - use <pre> tags, which tells the browser not to ignore whitespace. That can be troublesome in JSP which generates a lot of extraneous carriage returns into the code.
    Cheers,
    evnafets

  • How to insert / Update value for PFAKT in BP Relationship

    Hi Friends / Experts,
    How to insert the value for PFAKT ( Function value ) in BP Relationship in BP tcode , in SAP CRM.
    I have tried it but it BAPI_BUPR_CONTP_CREATE. But I need it with BAPI_BUPR_RELATIONSHIP_CREATE Function Module.
    Please help me out.
    Any Enhancement points in BAPI_BUPR_RELATIONSHIP_CREATE or any user exists. Please let me know.
    Regards,
    KMF.

    you can also acheive this using MERGE( available in sql 2008 and above).
    also, you are referring to DTS. DTS is legacy solution now..are you using sql 2000,  you can use ssis, if you want and it available in sql 2005. as said, there are multiple ways you can do this.. it find the below one a easy solution, since your are
    talking about only one table.. 
    try this example..
    create table test1(sno int primary key,sname varchar(20),scity varchar(20))
    go
    create table test2(sno int primary key,sname varchar(20),scity varchar(20))
    go
    insert into test1
    values(1,'stan','atlanta'),(2,'william','newyork')
    go
    insert into test2
    values(1,'robin','orlando')
    go
    --set this in you sql job and let it run for every half an hour
    MERGE test2 t2
    USING test1 t1
    ON t2.sno = t1.sno
    WHEN MATCHED THEN
    UPDATE
    SET t2.sname = t1.sname,t2.scity=t1.scity
    WHEN NOT MATCHED by target THEN
    Insert(sno,sname,scity)
    values (sno,sname,scity);
    go
    --check this table and clean up
    select * from test2
    go
    drop table test1
    go
    drop table test2
    Hope it Helps!!

  • Set Default value in dropdown box.

    I used selection= "Default Value" in dropdown box to do this functionality.But when i selected other value it is
    selecting the default value and saving also.but i want that page initiated the default value should be there and user can select other values and save.
    Please give me solution for that as soon as possible.
    Thnks in advance.

    Actually i m using the following code and it is fetching value from a table.Can u understand this code n provide me solution for default value.
    <htmlb:gridLayoutCell columnIndex       = "5"
                                  rowIndex          = "2"
                                  colSpan           = "1"
                                  wrapping          = "FALSE"
                                  verticalAlignment = "TOP" >
              <htmlb:dropdownListBox id                = "unitDropdownListBox"
                                     table             = "<%= IT_MSEHI %>"
                                     nameOfKeyColumn   = "MSEHI"
                                     nameOfValueColumn = "ZMSEHI"
                                     onSelect          = "setunitValue"
                                     disabled          = "<%= LV_MODEITEM %>"
                                 selection         = "<%= it_item-unit %>" />

  • How to add new value to 'Partition by' from RPD

    HI..
    in the presentation services when queried my request.. i am getting query below like that.this time i am getting wrong values. if i include c8 in partition by for c13 then i able to get the correct values.
    Can you plz tell me how to include new value to the partion by ..from RPD.
    SAWITH0.c7 as c7,
    SAWITH0.c8 as c8,
    SAWITH0.c9 as c9,
    SAWITH0.c10 as c10,
    SAWITH0.c11 as c11,
    SAWITH0.c12 as c12,
    sum(SAWITH0.c13) over (partition by SAWITH0.c10, SAWITH0.c14, SAWITH0.c11, SAWITH0.c12) as c13,
    SAWITH0.c14 as c14
    Thank you.

    Hi,
    I guess you made a mistake in your business model. The c8 column should be coming from a separate dimension.
    Good Luck,
    Daan Bakboord
    http://obiee.nl

  • How to insert varchar2 value in timestamp column in table?

    Hi all,
    Hope doing well,
    sir i am using one stored procedure and storing time in varchar2 variable in this format: 08:00:00
    now i have to insert this value in timestamp column in table. how to insert this value in timestamp column?
    thanks

    952646 wrote:
    Hi all,
    Hope doing well,
    sir i am using one stored procedure and storing time in varchar2 variable A "Very Bad Idea"(tm)
    When you do this, there is no fundamental difference between "08:00:00" and "here's your sign".
    Data should always be stored in the correct data type. For dates and times, that data type is either DATE or TIMESTAMP. Period.
    in this format: 08:00:00
    now i have to insert this value in timestamp column in table. how to insert this value in timestamp column?
    Hopefully as remediation to the original bad design.
    thanks

  • How to concatenate new values

    hi experts,
    i have query how to add new values through concatenate like
    concatenate ZCHILDDESC '->' CHILDDESC '->' test into desc.
    now this 'test' value is increase as new value is added.
    how to write the code for this.
    thanks
    vipul

    I think i understood the question though not exactly sure.
    As  the value of test increases, he may want to add additional nodes with -> based on the value of test.
    For Ex,
    If the value of test is 2,
    concatenate ZCHILDDESC '->' CHILDDESC '->' test1 -> test2 into desc.
    similarly if its 3,
    concatenate ZCHILDDESC '->' CHILDDESC '->' test1 '->' test2 '->' test3 into desc.
    @ Vipul: Kindly confirm if this is what your question is else please explain it clearly
    Vikranth

  • How to add new operand in installation facts through FMs

    Hi,
    Please guide me for the following query:
    How to add new operands in installation facts through Function Module?
    Please guide me with any function module through which i can acheive the above requirement.
    Thanks and Regards

    Hi,
    Thanks for your reply please.
    Through the BAPI which you have specified i have not been able to add any new operand in the installation facts.
    Please guide me with the parameters which are required to be passed to create a new operand entry in the installation facts.
    Please guide.
    Thanks and Regards
    Edited by: MP Vashishth on Aug 11, 2011 1:43 PM

  • How to insert multiple values from a single LOV box...?(cont)

    Hi..I have a medical form and under the conclusions box, I have set up a LOV with various values. That part works fine.
    The thing is I do not want to pick a single value. The format which I write in the conclusions in that box is
    1. "............"
    2. " "
    3...etc...
    But when I go to choose the 2nd value, it replaces the first one I had inserted. Any tips please??

    "My way", should have done exactly that. Every time you open the lov and choose a value it should be aapended to the already existing value in the textfield (assuming taht the length of the textfield is long enough)."
    -Well thats the thing, If I try to add more than one value into ONE text field when I open up the LOV..it just replaces the first value with teh second value. Right now wihtout the LOV this is the format it gets stored into the database. The conclusions are typed in manually and when i query from sql plus it comes the way I typed it in. For example:
    1. Mild concentric LVH
    2. Normal LV systolic function ; EF 75 %
    3. Diastolic dysfunction
    I just copy/pasted that from sql. This is saved in a column in a table named ProcedureSummary. I want to insert values exactly this way into one field. Except when i do that currently with the LOV, it replaces the old value with a new value.
    I hope i make sense, sorry for the bother!

Maybe you are looking for

  • How can I have two iTunes accounts?

    Hi, I currently live in a country but I've grown up in another country. When I set up my iTunes account I provided the details of the country where I live; however it happens that songs or magazines I would like to buy are only available in the iTune

  • How do I get to the bottom of a dialogue box that isn't visible? Critical Mail problem!

    I tried sending an email to a long list of recipients in a group. For some reason, I got a werid dialogue box about how it my SMTP server didn't recognize some addresses (though they all seem fine). No big deal, normally I would just edit the message

  • Mac Pro won't boot up unless in Safe Mode

    When I try to boot my Mac Pro the fans start revolving very quickly and it loads to the spinning wheel/apple logo screen. I can get it to start up in Safe Mode, and 9 times out of 10 if I restart the computer from Safe Mode I can get everything to lo

  • Startdoc fails on Adobe PDF printer

    I am doing an hdc.startdoc on the Adobe PDF printer. It fails with a pop up message that asks me to repair the installation or not. Previously, I had several other adobe products (Acrobat Reader 7, Photoshop Elements 5.0, and Flash) on my system and

  • What JVM support jdk1.3.1?

    Hi, i am new in this field. Can someone tell me whay JVM should i use to run an application based on jdk1.3.1? I want to run that application on pocket pc 2002. Thank you for the answer.