Adding list box

I have not done dailog programing much. Can some one tell me how to get values in the list box. I need to add some 10 values in my list box. Please help.

Hi Arshad,
1. For Dialog programming
2.
MODULE pai_1000.
PROCESS ON VALUE-REQUEST.
field mylistab module abc.
Where
field = fieldname on screen
abc = module name (see code below)
3.
*&  Include           ZAMMOD03_F01                                     *
*&      Module  abc  INPUT
      text
MODULE abc INPUT.
  DATA : BEGIN OF itab OCCURS 0,
         bukrs LIKE t001-bukrs,
         butxt LIKE t001-butxt,
         END OF itab.
  SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE itab.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'BUKRS'
      value_org       = 'S'
      dynprofield     = 'MYLISTTAB'
      dynpprog        = sy-repid
      dynpnr          = sy-dynnr
    TABLES
      value_tab       = itab
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.
ENDMODULE.                 " abc  INPUT
regards,
amit m.

Similar Messages

  • Adding element in a List box

    How do we add an element to an existing List box in swings?

    Read this section from the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/list.html]How to Use Lists.

  • Adding data in a list box

    Hi all,
    I created a list-box on the selection-screen using
    PARAMETERS p_mtart type mtart AS LISTBOX VISIBLE LENGTH 20
    But, I don't find a way to add data to this list-box.
    Please help me.
    Regards,
    Saurabh Buksh.

    Hi,
    Sorry to bother you.
    I solved it.
    Regards,
    Saurabh Buksh.

  • How to get the selected value/key of a drop down list box in webdynpro Java

    Dear SDN Members,
    I have added some static data into a drop down list box by key UI element using the procedure specified in value help tutorial.
    Now i want to display the value selected in a dropdown list box on view whenever i select an item in a dropdown list box.
    Can any one put here the code part relating to this.
    Your help will be awarded.
    Thanks in advance,
    Regards,
    Sireesha.B

    Hi Sireesha,
        You want to display value based on the key selected in dropdown list. If you want to do like that
    1) Create a context attribute for ex: key_value
    2)In the properties of the attribute select the calculated as true.
    3)It will create getter and setter methods for your attribute.
    4)Go to implementation add the following code in getter method of your attribute
    String attributeName = IPrivateCreate.IContextElement.KEY;
    //KEY is your dropdown key attribute not the value attribute.
    IWDAttributeInfo attributeInfo = element.node().getNodeInfo().getAttribute(attributeName);
    ISimpleTypeModifiable simpleType = attributeInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet valueset = simpleType.getSVServices().getModifiableSimpleValueSet();
    Object key = element.getAttributeAsText(attributeName);
    return valueset.getText(key);
    Regards
    Suresh

  • How do you add a multiple entries at once to a drop-down list box?

    I'm making a form for students to fill out and I want them to be able to pick from about 200 different courses. In the Field/List Items place, it would appear that you can only enter one item one at a time. I did this for 56 faculty,which took too much time, but for over 200 course titles, it would be much more convenient just to copy/paste them from an Excel spreadsheet, which is what I've tried doing. Any help or tips would be appreciated. I've attached a PDF of what I'm working on. The drop-down box is the one next to "Course." Thanks.

    Hi,
    The next version of LiveCycle Designer ES2 will allow user to copy and paste a long list of items into a dropdown or list box at design time. But until then your choices are limited.
    Paste them one at a time;
    You could set up a global variable in the (File/Form Properties) with the 200 items in the one variable. Then it would depend if your users have Acrobat/Reader v9 or earlier versions of Acrobat/Reader. John Brinkman has (several) blogs on this topic: http://blogs.adobe.com/formfeed/2009/01/populating_list_boxes.html
    If you are going with v9 then you can use the setItem script. However if you want your form to be compatible with earlier versions then you will need the addItem script.
    Also check out a sample by Steve Walker. http://forums.adobe.com/message/1939873#1939873 and  http://forums.adobe.com/message/2038932#2038932  The first one dealt with adding user entered data onto a dropdown, which is not exactly what you are after, but it will give you direction in populating a dropdown from an array.
    You would place the script in the docReady event of the dropdown, which would populate the dropdown every time the form is opened.
    Good luck,
    Niall

  • How to add data into a List box

    CS3 SDk:Windows<br /><br />Hi all,<br />I am trying to add  data into a basic List box in CS3??<br /><br />// .fr<br />GenericPanelWidget<br />     (<br />     // CControlView properties<br />     kInvalidWidgetID, // widget ID<br />     kPMRsrcID_None, // PMRsrc ID<br />     kBindNone, // frame binding<br />     Frame(0,0,250,90) // left, top, right, bottom<br />     kTrue, // visible<br />     kTrue, // enabled<br />     // GroupPanelAttributes properties<br />     "", // header widget ID<br />     { <br />     <br />     WidgetListBoxWidgetN<br />     (<br />     kWFPListBoxWidgetID, kSysListBoxPMRsrcId, // WidgetId,RsrcId<br />     kBindAll, // Frame binding<br />     Frame(0,0,250,90) // Frame<br />     kTrue, kTrue, // Visible, Enabled<br />     1,0, // List dimensions<br />     19, // Cell height<br />     1, // Border width<br />     kFalse,kTrue, // Has scroll bar (h,v)<br />     kTrue, // Multiselection<br />     kTrue, // List items can be reordered<br />     kTrue, // Draggable to new/delete buttons<br />     kFalse, // Drag/Dropable to other windows<br />     kTrue, // An item always has to be selected<br />     kFalse,// Don't notify on reselect<br />     kFalse, <br />     {               <br />     }     <br />                    <br />),<br />},<br />),<br /><br />//-------ID.h--------<br />DECLARE_PMID(kWidgetIDSpace, kWFPListBoxWidgetID, kWFPPrefix + 2)<br /><br />//observer.cpp-----------WFPDialogObserver::Update<br /><br />//get currently selected/active widget <br />WidgetID theSelectedWidget = controlView->GetWidgetID();<br /><br />// ist it the text edit field? <br />if (theSelectedWidget == kWFPInsertButtonWidgetID && theChange == kTrueStateMessage) <br />{ <br /><br />IControlView* listBox = panelControlData->FindWidget(kWFPListBoxWidgetID);<br /><br />InterfacePtr<IListControlData> listControlData(listBox, UseDefaultIID()); <br /><br />//Insert the string into listbox <br />PMString strText = dialogCtrl->GetTextControlData(kWFPTextEditBoxWidgetID); <br /><br />// obviously there can't be a translation for text entered by user <br />strText.SetTranslatable(kFalse);<br />listControlData->Add(strText,kWFPTextEditBoxWidgetID); <br />dialogCtrl->SetTextControlData(kWFPTextEditBoxWidgetID, ""); <br />break;      <br /><br />I am not able to Add items into list box.<br /><br />I tried based on Discussion <br />http://www.adobeforums.com/webx/.3bc43877<br /><br />but not able to locate  SDKListBoxHelper file .it is not available in SDK.<br /><br />Please ,<br />Tell me Where I am going wrong.<br /><br />Thanks,<br />Adil

    resource VSPDialogWidget (kSDKDefDialogResourceID + index_enUS)
         __FILE__,
         __LINE__,
         kVSPDialogWidgetID, // WidgetID
         kPMRsrcID_None, // RsrcID
         kBindNone, // Binding
         Frame(5,0,491,266) // Frame (l,t,r,b)
         kTrue,
         kTrue, // Visible, Enabled
         kVSPDialogTitleKey, // Dialog name
              DefaultButtonWidget
                   kOKButtonWidgetID, // WidgetID
                   kSysButtonPMRsrcId, // RsrcID
                   kBindNone, // Binding
                   Frame(9,234,89,254) // Frame (l,t,r,b)
                   kTrue,
                   kTrue, // Visible, Enabled
                   kSDKDefOKButtonApplicationKey,  // Button text
              CancelButtonWidget
                   kCancelButton_WidgetID, // WidgetID
                   kSysButtonPMRsrcId, // RsrcID
                   kBindNone, // Binding
                   Frame(394,234,474,254) // Frame (l,t,r,b)
                   kTrue,
                   kTrue, // Visible, Enabled
                   kSDKDefCancelButtonApplicationKey, // Button name
                   kTrue,  // Change to Reset on option-click.
              WLBCmpListBox   //Tree view
                   kWLBCmpListBoxWidgetID, kPMRsrcID_None,     // WidgetId, RsrcId
                   kBindAll,                                                       // Frame binding
                   Frame(299,49,475,170)           // Frame
                   kTrue, kTrue,                                             // Visible, Enabled
                   kTrue,                               // EraseBeforeDraw
                   kInterfacePaletteFill,           // InterfaceColor
                   kHideRootNode | kDrawEndLine,     // Options. Display root node
                   kFalse,          // Use H Scroll bar
                   kTrue,          // Use V scroll bar
                   20,               // fVScrollButtonIncrement
                   20,               // fVThumbScrollIncrement
                   0,               // fHScrollButtonIncrement
                   0,               // fHThumbScrollIncrement
                   2,               // Items selectable, 0 = No Selection, 1 = Single Selection, 2 = Multiple Selection
                   kFalse,          // Allow children from multiple parents to be selected
                   kTrue,          // Allow discontiguous selection
                        //The tree view is dynamically created.          
    // added to support the list elements in the list box
    resource LocaleIndex (kWLBCmpListElementRsrcID)
         kViewRsrcType,
              kWildFS, k_Wild, kWLBCmpListElementRsrcID + index_enUS
    resource WLBCmpNodeWidget (kWLBCmpListElementRsrcID + index_enUS)
         __FILE__, __LINE__,
         kWLBCmpListParentWidgetId, kPMRsrcID_None,     // WidgetId, RsrcId
         kBindLeft | kBindRight,               // Frame binding
         Frame(0, 0, 194, 20),               // Frame
         kTrue, kTrue,                         // Visible, Enabled
         "",                                        // Panel name
                   // Just a info-static text widget with about-box text view to get white bg.
              WLBCmpTextWidget
                   kWLBCmpTextWidgetID, kPMRsrcID_None,          // WidgetId, RsrcId
                   kBindLeft | kBindRight,                                        // Frame binding
                   Frame(45,1,194,18)                                             // Frame
                   kTrue, kTrue, kAlignLeft,kEllipsizeEnd                    // Visible, Enabled, Ellipsize style
                   "",                                                                 // Initial text
                   0,                                                                 // Associated widget for focus
                   kPaletteWindowSystemScriptFontId,                         // default font
                   kPaletteWindowSystemScriptHiliteFontId,                    // for highlight state.
    If you still got problems, post you email here - I'll send you the complete project/code then.
    -Marc

  • Help needed in removing duplicate items of list box  in java

    How to remove duplicate items of list box while dynamically inserting (on-click event)
    It is not identifying duplicate data
    Variable name is HP_G1
    HP_dmg1 = (DefaultListModel) HP_G1.getModel();
    int a = HP_G1.getModel().getSize();
    System.out.println("HP list no--------> "+a);
    if(a!=0)
    for (int j=0; j<a; j++)
    String item1 = String.valueOf(HP_List.getModel().getElementAt(j));
    System.out.println("HP list added--------> "+item1);
    if(HP_dmg1.equals(item1)){
    HP_dmg1.remove(j);
    else
    HP_dmg1.addElement(GPL);
    }

    Your code is unreadable, so I'll ignore it. In the future please press the message editor's CODE button to format code.
    As to your problem, to the point you normally use a Set instead of List when you don't want duplicates in a collection.

  • Index of Values in the List Boxes on a Selection Screen

    Hi,
    I have a list box on the selection screen for Month field. It has the values Jan, Feb, Mar....etc in it.
    These entries, I added thru the VRM_SET_VALUES.
    Now, I want to default the month to current month SY-DATUM+4(2).
    Is there any FM to which I can send this SY-DATUM+4(2) as an Index and the corresponding value gets set for the Month field.
    As an alternatvie, I could use<b> Case Sy-DATUM+4(2). when '01'. p_month = 'Jan'.  etc etc..</b> But I want to avoid this big case statement.
    Please suggest.
    Thanks,
    Suryakiran D.

    Hi Suryakiran,
      Try to use the func <b>MONTH_NAMES_GET</b>.It will
      return the month name along with the number.
      And also you can directly select from table <b>T247</b>
    Thanks&Regards,
    Siri.
    Message was edited by: Srilatha T

  • How to add a list box with values for a ztable in SM30

    Hello Gurus,
                    I had created a table maintenance for Ztable and added many extra functionality to that. Now i would like to add a list box or check table for a field. Can i do that with out Regenerating my table maintenance. Please help me its..very urgent.

    Have referred this domain to the data element, this should be the Field type in ur table for the particular field.
    Eg: <b>SE11 > table name > fields-ZTEST > fieldtype-ZZTEST</b>
    ZZTEST in the data element > create a domain for this data element and in that specify teh value range.
    Save and activate it.
    Make sure that u regenerate teh table maintenance generator else u cant see the changes.
    Now if u press F4 u can see only thevalues specified, also u will see only the list box with values in SM30.
    Try this,please let me know if u face any difficulties.

  • List Box in ITS template and use of 'FIELD_SET'

    Hello EveryOne,
    I am working in SRM5.0. Can some one guide me, If we can create a List box in custom ITS template. I am trying to use SELECT statement on HTML to create LIst Box. Is this right way to do that?
    Does any one know better way to create a List BOx connected to custom field, that is filled in PAI. We do not have a search help added to this field. So I can not use F4 modules.
    Also does any one know If use of macros 'FIELD_SET' is still allowed in the PBO/PAI  ?
    Really appreciate any help in this regard.

    Dear srivallika,
    first you have do build up an steploop on your dynpro for the it_ccode-bukrs
    AT PBO
    loop at it_ccode cursor g_ccode_cur into wa_cccode.
    my set loopc
    module ccode_loopc.
    endloop.
    Include PBO
    module ccode_loopc.
      g_ccode_loopc = sy-loopc.
    endmodule.
    You only see via DIAG Dialog the displayed rows on the Dynpro.
    So if you only have a steploop of 4 rows -- you only get 4 rows to the wgate.
    Better use the field-set makro.
    AT PBO
    module rfc_fieldset_ccode.
    INCLUDE PBO
    module rfc_fieldset_ccode.
    data: ls_ccode like line of it_ccode.
    data: i type i.
    I'll use deeper structure
      perform rfc_fieldset_ccode.
    but you also can define the code here
    loop at it_ccode into ls_ccode.
         add 1 to i.
         field-set 'INDX'       i i .
         field-set 'BUKRS'   i   ls_ccode-bukrs .
    endloop.
    endmodule.
    Why to do this? The field-set makro (don't forget to include AVWRTCXM at your topinclude) will send the data from internal table via AGATE to the WGATE.
    Here now you can define the dropdown list:
    srivallika, i'll hope i could help you a little. If you have any questions, you won't bother me. ASK!
    With best regards
    Thorsten

  • How to submit a multiple-selection list box in an Infopath Sharepoint form as multiple entries on a Sharepoint list?

    I would like to be able to submit an Infopath form with a multiple selection list box in Sharepoint as multiple entries on a Sharepoint list.
    For example, a user has to complete the following fields:
    First Name:
    Last Name:
    Favorite Color (can select more than one):
    [] Blue
    [] Red
    [] Yellow
    [] Green
    If the user picks blue AND red and submits the form, the Sharepoint list would feature TWO entries, both with their first and last names, but with different colors in the "Favorite Color" column.
    Please let me know if there is a way to do this. Any guidance would be helpful!

    Hi redhotc,
    According to your description, my understanding is that you want to set multiple default values for a multiple checkbox list in InfoPath form.
    I did a test with SQL database table. I set three default values for the checkbox list by adding three values field under the group field(Data->Default values), each value field is for a default value. Then publish it to my SharePoint site, everything
    was fine.Please have a try as the below link:
    http://www.bizsupportonline.net/infopath2010/pre-select-items-multiple-selection-list-box-infopath-2010.htm
    Note: if you are using SQL databse table, you may need to enable ‘Allow cross-domain data access for user form templates that use connection settings in a data connection file’ in CA. More information, please refer to:
    http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010customization.aspx?ID=418b9423-a96c-4e5e-91f9-6a1b010ebb69
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Multiple List Box showing Duplicate Options in Existing Form Library forms.

    Good day.  I currently have an InfoPath 2010 form library template that has a view containing 4 multiple selection list boxes.  These list boxes get their values from a hidden view that contains 4 repeating tables in which I've set default values
    for Value and Display name to populate the multiple selection list boxes.
    The issue I am having is this: When adding new options to the repeating tables through the Default Values option window and publish, new forms display the new selection options successfully, while existing forms in the library when opened are displayed duplicates
    of the first default value in the table in the place of the new options. (Example, Create Data[display] - 10[value] is displaying 4 times after adding 3 new options to the characteristics table that contains Create Data as it's first row item.)
    When comparing the .XML of a new form to an existing form, groupX in this case shows all options in the new form .XML, but shows the duplicates in the .XML of an existing .XML file.
    Is there a way to resolve this issue so that existing documents will display the proper selection options instead of the duplicates?  I'd like to note that another list box had a value added and it displayed the value properly when published in both
    new and existing forms.
    Thanks!

    Hi Hemendra:
    There are no rules on Section A.
    Two out of three forms used so far by the users have these problems.
    We did extensive trending study on all the submitted forms on both where the submit was successful and ones with Section A frozen up. Also, requested a user to submit a few forms per our instructions on different browsers.  Even though there are some
    forms in the past which could be claimed as success has some attachment uploaded to the Section A of the form, currently every time an attempt by any usetr to attach a smallest document the section A, it wipes out all the existing completed fields and freezes
    up all the rest of the controls of that section and not any other part of the form.
    Thanks,
    SRA
    SRAEngineer

  • Dynamic retrieval in list boxes using JSP

    Dear All,
    I have a list box in a form which is created by extracting data from oracle database. There are approximately 26000 records which are added dynamically in the list box. There are five rows in the form and each row has to have a list box with all records. Now if i retrieve all records for all list boxes, the page takes high time to load. I also tried using String array to read once and write them using loops in list box. But even then the loading time is quiet high. Is there some better way so that the page loads fast enough. I am using Oracle Database and the table is indexed.
    Thanks & Regards,
    Gagan Arora

    Well, it's big enough to make any page slow... but you can try to load all the list boxes in the client side with javascript.
    i make that usually, create a javascript strings array and on the "onLoad" event fill all the list boxes with the values in that array.
    but anyway is too much data.

  • Spawning pages from entries in a list box with entry text as title

    The background: I have a form with a list box which a user can populate with their own text via a text box and an 'add' button. This works fine.
    I've just added a template page with different content and 'spawn' button. This also works fine.
    The task: What I want to be able to do is use the entries in the list box from page 1 to spawn the same number of pages as entries and also populate a field in each newly spawned page with the name of the corresponding entry (to act as a title).
    How do I go about coding this?
    Current spawn code:
    var t = this.templates;
    var T = t[0];
    var XO = T.spawn(this.numPages, false, false);
    for (var i=0; i<m; i++) T.spawn(this.numPages, false, false, XO);

    This script will spawn pages depending on the number of items in myComboBox:
         var f = this.getField("myComboBox");
         var expTplt = getTemplate("tpltExpenses");
         for (var i=0; i<f.numItems; i++){
         expTplt.spawn(this.numPages,true,false);
    I'm not sure how to auto fill the text fields on the spawned pages though.

  • HOw to add list box using enhacement of standard infotype

    Hi,
    Using enahancement infotype, I wanted to add a list box field in inftyp 01.
    The module pool ZP000100 & screen no 200 already existed .In the layout editor the field didnot get displayed hence I took it from dictionary.
    I have adde the code in pbo & pai for adding values in list box.
    problem is that data is not getting saved when i enter data in pa30 inftyp 01.
    Kindly guide me.
    Regards,
    Rachel

    *

Maybe you are looking for