PopUp with selectMany List Box in JSF

Hi,
am a newbie to JSF....
I have a page with a hyperlink which opens a popup that has two multi select list boxes (values need to be moved to and fro within select boxes). Then i have a select button in the popup which should send the selected value from popup to main page. Can anyone please send me a clear implementation for this I don't know how to implement this with JSF. I do want to know how should i have the in my main page to populate the selected values from popup. This will be of great help if u could provide me in detail for implementing the scenario.
Note: My popUp page Implementation is like the one below and i don't have main page implementation other than the link calling javascript to open the popup....
<body><table>< tr></tr><tr>< td>
<h:selectManyListbox id="masterList" size="6">
<f:selectItems id="master" value="#{populateList.masterList}" />
</
h:selectManyListbox></td>< td><table><tr>
<
h:commandButton id="MoveRight" value="MoveRight" ></h:commandButton >
</
tr><tr>
<
h:commandButton id="MoveLeft" value="MoveLeft" ></h:commandButton >
</
tr></table></ td><td>
<
h:selectManyListbox id="selectList" value="#{populateList.selectList}" size="6" > <f:selectItems id="select" />
</
h:selectManyListbox>
</
td></tr>< tr></tr><tr></ tr><tr>
<h:commandButton id="selectButton" value="Select"></h:commandButton >
</tr></table></body >

any updates or help for this....
i have a link in my main page that pops up a window with two select many list boxes where values can be moved to and fro. popup has a select button that has to send the list values in right hand side select many list box to the main page field....
How should i achieve this in jsf....
Any help with codelines will be greatful and guiding....
Thanks
Naadiya

Similar Messages

  • Selectmany list box autoscrolling

    Hi,
    I have a <h:selectMany list box which has around 9000 values.
    I need the listbox scroller to scroll to the location in the list as i type.
    for example consider the list as having all country names there may be 10s of countries whose name starts with A(like Argentina,Austrlia, etc)When i type A it should come to list with As and as i type Au it should scroll to Australia etc.What i need to know is if there is a way that i can do it within jsf.
    Thanks

    Generic JSF does not have such functionality. You'll need one of the additional component libraries to get such a component. For example Richfaces has an autocomplete box that basically does what you want.

  • IS there a way to fix the issue with text list boxes where they shift (empty space is smaller than the text size) when two text lsit boxes are side by side?

    Currently I have a webpage I designed for a company where I have multiple text list boxes side by side for the purpose of displaying data in each one based on a category in the database. So a text list box for the primary key, name, serial number, etc. I have to use Firefox as it typically works best for printing and functionality for the page. The single issue we are having is that in Firefox if the field is null as far as text the text are shrinks meaning all the data in that list box shifts up and is no longer in line with its congruent data in the other text list boxes. In other browsers that's not a problem and everything stays lined up regardless of whether there's text in the box or not.
    Unfortunately I cannot provide a link but if contacted I will provide screen shots.

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • Need help with dependent lists boxes with ADF.

    Hello,
    I am doing a project that use tree dependent list boxes.
    Ex. State---->
    College---->
    List of courses of the college chosen above----->
    The way this should work is when I select the state automatically I want it to change to the correspondent list of colleges of that state and after i choose the colleges I want to be able to get all the courses that are given in that college.
    To implement the first two list boxes I create tree views on JDeveloper and and using SelectOneChoice for both State and Colleges. In the binding editor I bind the first View with the second and then the second view with the third and at this point if I execute the first SelectOneChoice would give me all the state and the second SelectOneChoice would give me the list of all the colleges that exist.
    Now on the third view that I create a binding variable and i put a Where state=:TheBindingVariable on the query.
    Also I set the first SelectOneChoice the outoSubmit property to true, id to StateId and PartialTrigger property to CollegeId.
    On pageDef.xml in the bindings I create action form where I select the third view from Date Collection and select Action as ExecuteWithParams. And I set the value under the parameters section to #{bindings.state.inputValue}.
    Under executables still in pageDef.xml I create a invokeAction and I set binds = ExecuteWithParams.
    On first SelectOneChoice on the ChangeValueListener i create a new ManageBeans which generate me a java class and I create a new method as well to use it to change the binding variable on the second SelectOneChoice.
    Here is the method:
    public void Change_StateId(ValueChangeEvent valueChangeEvent) {
    String StateId;
    valueChangeEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
    FacesContext adi = FacesContext.getCurrentInstance();
    ValueBinding vb = adi.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer bc = (DCBindingContainer)vb.getValue(adi);
    if(valueChangeEvent.getNewValue().toString().equals("0")){
    StateId = "MA";
    OperationBinding opBindingCollegeLovIter = (OperationBinding) bc.get("ExecuteWithParams");
    opBindingCollegeLovIter.getParamsMap().put("TheState",StateId);
    opBindingCollegeLovIter.execute();
    }else{
    DCIteratorBinding statesLovIter = (DCIteratorBinding) bc.get("CollegeProvaView1Iterator");
    Row rw = statesLovIter.getRowAtRangeIndex(((Integer)valueChangeEvent.getNewValue()).intValue());
    StateId = (String) rw.getAttribute("State");
    OperationBinding opBindingCollegeLovIter = (OperationBinding) bc.get("ExecuteWithParams");
    opBindingCollegeLovIter.getParamsMap().put("TheState",StateId);
    opBindingCollegeLovIter.execute();
    I don't know what I have done wrong because I am new in this field and a little support would be really helpful.
    I am using JDeveloper 10.1.3.1.0 and Oracle SOA Suite 10.1.3.1.0.
    I would appreciate any help.
    Thanks a lot.

    user8116089 wrote:
    For some reason the first selectonechoice doesn't give me all the states that are in the database it gives me just the first 10.check the value of RangeSize for itarator in pageDef. in this case to show all items it must be set to -1
    Also there is a way to assign the first value of the first selectonechoice to null at the start.this is a problematic requirement since all items are bound to iterator and basically this should serve for navigation purpose so the first item is set as selected, but maybe some workaround exists...
    regards,
    Branislav

  • Working with 2 list boxes in a tableview

    Hai Friends,
    I have a table view in which the first column is a dropdown listbox and second column is also another dropdown list box.
    Case1: I am working with first row of the tableview
    I am selecting a value say 'Q' in the the first dropdown and its corresponding values say (Q1,Q2,Q3.....) which has to be populated in the second dropdown of the same row.
    Case2: I am working with second row of the tableview.
    I am selecting another value say 'D' in the the first dropdown and its corresponding values say (D1,D2,D3.....) which has to be populated in the second dropdown of the same row.
    I am now coming to the problem that i am facing now.
    Note: i have selected Q in the first row and its corresponding values is Q1,Q2....!
    When i am selecting 'D' in the second row ( D1,D2,D3...) i am getting D1,D2,D3 in the second dropdown <b>in both rows</b>.
    Actually i have to keep Q and corresponding values Q1,Q2... in the first row as i have selected 'Q' in the first row allready. when i am selecting another value value D in second row , first row values should be kept as such with Q and corresponding values Q1,Q2....., and second row should be D with D1,D2,D3.....
    Now i am getting
    Q                              D1,D2,D3
    D                              D1,D2,D3
    Actually it should be
    Q                               Q1,Q2,Q3
    D                               D1,D2,D3
    Problem i am facing is in the iterator class method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START
    when 'secondfield'.
    Here i am getting values from cookie that i have set in the do_handle_event of the controller.
    Given, code that i have written in iterator class method.
    WHEN 'ETYSHT'.
    **************dropdownlist box**************************************
    IF p_edit_mode IS not INITIAL.
            DATA: etysht TYPE string.
            etysht = m_row_ref->etysht.
            p_replacement_bee = cl_htmlb_textview=>factory( text = etysht ).
            dropdownlistbox = cl_htmlb_dropdownlistbox=>factory( id = p_cell_id ).
            CALL METHOD cl_bsp_server_side_cookie=>get_server_cookie
              EXPORTING
                name                  = 'COURSEGROUP_TO_COURSETYPE'
                application_namespace = application_namespace
                application_name      = application_name
                username              = sy-uname
                session_id            = session_id
                data_name             = 'COURSEGROUP_TO_COURSETYPE'
              CHANGING
                data_value            = itl_cstypenew.
            GET REFERENCE OF itl_cstypenew INTO m_locid_ref.
            dropdownlistbox->table     = m_locid_ref.
            dropdownlistbox->nameofkeycolumn   = 'ETYID'.
            dropdownlistbox->nameofvaluecolumn = 'ETYSHT'.
            dropdownlistbox->selection = m_row_ref->etyid.
            dropdownlistbox->onselect          = 'click'.
            p_replacement_bee = dropdownlistbox.
          ENDIF.
    Looking forward for your valuable suggestion.
    Thanks & Regards,
    Renju.

    Hi Renju,
    I see that you retrieving your drop down values from a cookie but I do not see any code where you are actually selecting the data that you need for second drop down box...
    I mean when Q is selected in the first row...you should be reading only values related to Q in the firs dropdown and then popualte them. Similarly when user is on the second row and selecting D - the you should read values realting to D only (in this case D1, D2, D3). This should help you in keeping the values of the first row and second row as expected. Let me know if this works.
    Cheers

  • Help with dialog list box(acrobat javascript)

    The following code is an example in the guide of acrobat. Now i want to list some names store in an array. So i did some changes.But it can't work.ther are errors with subl:{}. hope some help.
    var dialog3 = {
    name=new Array();
    name[1]=lucy;
    name[2]=lily;
    name[3]=han;
    // This dialog gets called when the dialog is created
    initialize: function(dialog) {
    this.loadDefaults(dialog);
    // This dialog gets called when the OK button is hit.
    commit: function(dialog) {
    // See the Dialog Object for a description of how dialog.load
    // and dialog.store work.
    var elements = dialog.store()["subl"];
    // do something with the data.
    // Callback for when the button "butn" is hit.
    butn: function(dialog) {
    var elements = dialog.store()["subl"]
    for(var i in elements) {
    if ( elements[i] > 0 ) {
    app.alert("You chose \"" + i
    + "\", which has a value of " + elements[i] );
    loadDefaults: function (dialog) {
    dialog.load({
    subl:
         for(i=1;i<4;i++)
              name[i]:+i
    // The Dialog Description
    description:
    name: "Adobe Acrobat Products", // Title of dialog
    elements: // Child Element Array
    type: "view",
    align_children: "align_left",
    elements: // Child Element Array
    type: "cluster",
    name: "Select",
    elements: // Child Element Array
    type: "static_text",
    name: "Select Acrobat you use",
    font: "default"
    type: "list_box",
    item_id: "subl",
    width: 200,
    height: 60
    type: "button",
    item_id: "butn",
    name: "Press Me"
    type: "ok_cancel"
    app.execDialog(dialog3);

    sorry ,the code is like this:
    name=new Array();
    name[1]='lucy';
    name[2]='lily';
    name[3]='han';
    var dialog3 = {
    // This dialog gets called when the dialog is created
    initialize: function(dialog) {
    this.loadDefaults(dialog);
    // This dialog gets called when the OK button is hit.
    commit: function(dialog) {
    // See the Dialog Object for a description of how dialog.load
    // and dialog.store work.
    var elements = dialog.store()["subl"];
    // do something with the data.
    // Callback for when the button "butn" is hit.
    butn: function(dialog) {
    var elements = dialog.store()["subl"]
    for(var i in elements) {
    if ( elements[i] > 0 ) {
    app.alert("You chose \"" + i
    + "\", which has a value of " + elements[i] );
    loadDefaults: function (dialog) {
    dialog.load({
    subl:
          for(i=1;i<4;i++)
            "name[i]":-i
    // The Dialog Description
    description:
    name: "Adobe Acrobat Products", // Title of dialog
    elements: // Child Element Array
    type: "view",
    align_children: "align_left",
    elements: // Child Element Array
    type: "cluster",
    name: "Select",
    elements: // Child Element Array
    type: "static_text",
    name: "Select Acrobat you use",
    font: "default"
    type: "list_box",
    item_id: "subl",
    width: 200,
    height: 60
    type: "button",
    item_id: "butn",
    name: "Press Me"
    type: "ok_cancel"
    app.execDialog(dialog3);

  • 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 Do I Filter a Report Using a Multi Select List Box and Specifying Date Between Begin Date and End Date

    Hope someone can help.  I have tried to find the best way to do this and can't seem to make sense of anything.  I'm using an Access 2013 Database and I have a report that is based on a query.  I've created a Report Criteria Form.  I
    need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date.  I then need my report to return only the records that meet all selected criteria.  It works fine with a ComboBox and 1 selection but can't
    get it to work with a List Box so they can select multiple items.  Any help is greatly appreciated while I still have hair left. 

    The query should return all records.
    Let's say you have the following controls on your report criteria form:
    txtStart: text box, formatted as a date.
    txtEnd: text box, formatted as a date.
    lbxMulti: multi-select list box.
    cmdOpenReport: command button used to open the report.
    The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
    The report to be opened is rptReport.
    The On Click event procedure for the command button could look like this:
    Private Sub cmdOpenReport_Click()
    Dim strWhere As String
    Dim strIn As String
    Dim varItm As Variant
    On Error GoTo ErrHandler
    If Not IsNull(Me.txtStart) Then
    strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
    End If
    If Not IsNull(Me.txtEnd) Then
    strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
    End If
    For Each varItm In Me.lbxMulti.ItemsSelected
    strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    Next varItm
    If strIn <> "" Then
    ' Remove initial comma
    strIn = Mid(strIn, 2)
    strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
    End If
    If strWhere <> "" Then
    ' Remove initial " AND "
    strWhere = Mid(strWhere, 6)
    End If
    DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
    Exit Sub
    ErrHandler:
    If Err = 2501 Then
    ' Report cancelled - ignore
    Else
    MsgBox Err.Description, vbExclamation
    End If
    End Sub
    If SomeField is a text field instead of a number field, change the line
            strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    to
            strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • How can I export multiple selections in a list box into a .csv file?

    Hi all, I've created a form in Acrobat X with a list box enabled for multiple selections. When I try to export the filled out form into a .csv file, only the first selection shows up. Can anyone help me figure out how to get all selections to export? Thanks!

    Thank you for your quick response!
    Once a recipient fills out the form (which has two questions with list boxes and multiple selection enabled) they send the completed form back to me. When I open the completed form, I am given the option add the completed form to a reponse file which was set up when I distributed the form. When I open the reponse file, it lists all of the responses in rows, and the values that were chosen in the form are arranged in columns. In this file, the list boxe columns have multiple values, separated by commas (which is what I'm looking for). At this point there is an option to export into a .csv file or an .xml file. If I choose the .csv file and open in excel, only the first selection shows in the list box column rather than all selections that were initially made by the responder.

  • ALV-Grid list box in Cell Event when a value is selected

    Hello to all,
    I've got a editable alv grid with a list box in one cell.
    Is there any event fired after user selection in order to update other cells?
    A workaround may be to use event "data_changed" but I think this isn't a smart way.
    Any ideas?
    Best regards
    Christian

    Hi Christian,
    I think data_changed is right one here, as this one has is recording couple "states":
    METHODS: handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
                                  IMPORTING er_data_changed e_onf4 e_onf4_before e_onf4_after,
    "these are fired up in different "state" of control during selection itself
    "e_onF4
    "e_onf4_before
    "e_onf4_after
    You can. however, try with handle_on_f4 . This works fine for input help, I didn't test it for listbox but should work as well. First you need to register this event with:
    DATA: lt_fields_f4 TYPE lvc_t_f4,
            ls_fields_f4 TYPE lvc_s_f4.
    "activate event F4 only for particular fields
      ls_fields_f4-fieldname = 'SEATSMAX_F'.
      ls_fields_f4-register = 'X'.
      ls_fields_f4-getbefore = 'X'.
      ls_fields_f4-chngeafter = 'X'.
      APPEND ls_fields_f4 TO lt_fields_f4.
      CALL METHOD g_alv_grid_ref->register_f4_for_fields
        EXPORTING
          it_f4 = lt_fields_f4[].
    ...and then just method handler
    METHODS: handle_on_f4 FOR EVENT onf4 OF cl_gui_alv_grid
                               IMPORTING e_fieldname e_fieldvalue er_event_data,
    SET HANDLER ...
    Regards
    Marcin

  • List box values in module pool

    Hi All,
    Plz help me out in this regard..
    I have designed a screen with 20 list boxes around and i am getting values for list boxes also.the main problem is coming when after selecting values....
    that is after selecting values if i press enter on the screen the values are over written by space..
    The default value for list boxes are space.
    how to over come this problem...Plz help me out
    Regards,
    Sudha

    PAI
    MODULE user_command_1000 INPUT.
    CASE sy-ucomm.
    WHEN 'SAVER'.
             IF zrule_date_from  > zrule_date_to.
                MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(001)
                                    'Than RUN_VALIDITY_FROM_DATE'(002).
                EXIT.
             ENDIF.
             IF zrule_date_to  < sy-datum.
                MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(003)
                                    'Than System Date.'(004).
                EXIT.
             ENDIF.
             wa_rule-zrule_date_from  = zrule_date_from.
             wa_rule-zrule_date_to    = zrule_date_to.
             wa_rule-zrule_name       = zrule_name.
             wa_rule-zrule_id         = zrule_id.
             wa_rule-zrule_pref       = zrule_pref.
    ONCATENATE 'Where'  rule_for1a  operator1a  values1a
                 andor1  rule_for2a  operator2a  values2a
                 andor2  rule_for3a  operator3a  values3a
                 andor3  rule_for4a  operator4a  values4a
                 andor4  rule_for5a  operator5a  values5a
                 andor5  rule_for6a  operator6a  values6a
                 andor6  rule_for7a  operator7a  values7a
                 andor7  rule_for8a  operator8a  values8a
                          INTO wa_rule-zrule_clause SEPARATED BY space.
    In this code andor6(7,8,etc) has (and or)
    and operator8a(7a,6a etc) has (+,- <,>) and when i do enter these two get cleared. why does this happen?
    MY PBO code is
    MODULE status_1000 OUTPUT.
      SET PF-STATUS 'RULE'.
      SET TITLEBAR  '1000'.
    ENDMODULE.                 " STATUS_1000  OUTPUT
    *&      Module  fill_lists  OUTPUT
    For Filling List Boxes
    MODULE fill_lists OUTPUT.
    **********1
        name       = 'ANDOR1'.
        value-key  = 1.
        value-text = 'AND'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        value-key  = 2.
        value-text = 'OR'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        PERFORM LIST_BOX.
        CLEAR LIST.
    **************2
        name       = 'ANDOR2'.
        value-key  = 1.
        value-text = 'AND'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        value-key  = 2.
        value-text = 'OR'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        PERFORM LIST_BOX.
        CLEAR LIST.
    ************3
        name       = 'ANDOR3'.
        value-key  = 1.
        value-text = 'AND'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        value-key  = 2.
        value-text = 'OR'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        PERFORM LIST_BOX.
        CLEAR LIST.
    etc.

  • Hide the list box

    Hi;
    how to hide the GUI objets when a page is printed : for example when I print a page with a list box, the list appears into the paper (its very obstructing).
    Regards;

    Yes, hidden page items and application items are never available for manipulation by the user. I think the situation the OP is seeking help with is a regular visible form item which is conditionally rendered on the page.
    you can't set the value of that item (and use the new value) in the current page submit process because it's not in the page at the time of the page submit
    I disagree. If a page item (with any display-as type) is rendered on a page, it is saved into session state when the page is submitted.
    But even if it is not rendered on the page, the value of the page item can still be manipulated by after-submit processes.
    In other words, if a page has a item called P1_FOO defined, regardless of whether the item is rendered on the page, you can
    a. read that item's value using :P1_FOO/v('P1_FOO')/&P1_FOO. during after-submit processing.
    b. change the value using :P1_FOO := 'blah' or apex_util.set_session_state().

  • List box features

    SIR I A BEGINER IN SAP ABAP . THE ISSUE IS WITH THE LIST BOX . 
    I have  2 list boxs .
    1st  LIST BOX  will have  OPTIONS TO PAY BILLS    LIKE   THE    FOLLOWING .   
    A.  ELECTRICITY BILL.
    B.  TELEPHONE   BILL
    C   INSURANCE BILL.
    IF ONE CHOSE  TELEPHONE   BILL  PAYMENT   OPTION IN   1ST  LIST BOX
    THEN   2nd  LIST BOX  SHOULD SHOW  ALL THE TELEPHONE COMPANIS  LIKE   AIRTEL   BSNL, ETC.
    IF  ONE CHOSE INSURANCE  BILL  PAYMENT
    THEN  THE    SAME  2ND LIST BOX   SHOULD BE LOADED WITH this  time   " INSURANCE COMPANYS NAMES'  LIKE
    LIC
    BIRLA INSURANCE
    ETC...............
    PLEASE SOME BODY HELP ME .
    THE SAME GOES WITH THE 3RD OPTION  THAT   IS ELECTRICITY  BILL .
    REGARDS

    Sorry   for   using  caps.
    Well the following is my data base structure or table .
    sorry for posting our queries in caps.
    Let me put my questions in a very much briefed manner.
    first my database name is zybilltyp
    consist of the fillowing fields
    zaccno
    zaccnname
    zbillty
    zbillname
    zcorpname
    in the zbilltyp i have value range ie. 1) EB -Electricity 2) TB Telephone And Finally 3) In -Insurance
    In Module Pool Screen i am having these three value to be appended into the listbox named -zbilltyp
    My difficulty is that based upon the value choosed in the first listbox dynamically the value of the second listbox should change.
    For instance in first listbox i have choosen Telephone Bill. Then in the second list box it should display all the telephone related companies names But these values should not be in from the database we have to manually hardcode the value.                         
    In the second listbox it should display like this
    Airtel
    BSNL
    Vodafone
    Like this.
    Please suggest some points regarding this. it Will be a great favour for us.
    Thanks in advance.                    
    Condition :
    1) If bill type is PB for telephone bill  then the corporation list box should show  telephone conpanies names like Airtel or bsnl etc .
    In corporation  list box .
    2) If bill type is IN  for Insurance then the corporation list box should show  Insurance  conpanies names like LIc or  Birla insurance , Reliance  etc . In corporation LIst box

  • List box example

    hi,
    I had made a report in which i have to display the list box option in which there will be 3 options . i had searched about it but i am not able to have examples of it which fulfill my requierment.
    Can anybody provide me examples of it as i had never used list box.

    Hi,
    Here is the steps to create list box....
    You can create according to ur need.. i hope this will help u..-
    LIST BOX                     
    Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
      The sap list box allows to select a value from the list but we cannot enter our own value in the list box .The value list that will be displayed consists of two
    fields TEXT field of TYPE 80(C) and internal KEY field of TYPE 40(C).
    In screen painter to create a input/output field into list box we use
    'L" as a value for dropdown attribute for the i/o field.
    In screen painter to determine the type of method that will be used to fill the value
    list we use the attribute value list.
    If it is blank  the value list will be filled by the first column of the input help assigned to the screen field.This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system.SAP recommends value list field should be blank.
    or
    The value  can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field.
    If a function code is attached to the list box the selection of a value triggers a PAI
    otherwise PAI will not trigger.
    LIST BOX in SELECTION SCREEN
      List Box is created in selection screen using PARAMETERS staement
    with AS LISTBOX addition other attributes like VISIBLE LENGTH (width of listbox)
    can be specified with the declaration.
    PARAMETERS name(n) AS LISTBOX VISIBLE LENGTH n.
    Here n is an integer and name is the name of parameter.
    To populate the value list we use the FM VRM_SET_VALUES  and the
    selection screen event AT SELECTION-SCREEN OUTPUT is used to write the code to fill it.
    VRM_SET_VALUES    
    The function module VRM_SET_VALUES is used to fill the value list associated with a List Box .This FM uses types which are declared in type group VRM. So
    we should declare TYPE-POOLS VRM before using this FM.
    Some important types declared in the VRM type group are
    VRM_ID
       It refers to the name of the input/output field associated with list box
    VRM_VALUES
      It refers to the internal table consisting of two fields TEXT(80C) and KEY(40)C
    that will be used to create the list values.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
          ID                =  name of screen element ,it is of TYPE VRM_ID
          VALUES      =  internal table containing values,of TYPE VRM_VALUES 
    LIST BOX with value list from input help
    In this example the screen element attribute value list is set to blank as such the value list will be filled with the 1st column of the input help,We use PROCESS ON VALUE-REQUEST event to pass the value list  to the listbox.In the MODULE call used to fill the value list we can use FM like F4IF_INT_TABLE_VALUE_REQUEST to create input help as explained in the input help.The value of first column will be shown in the field when selected.
    PROCESS ON VALUE-REQUEST
    FIELD list MODULE fill_list_100
    FIELD list MODULE fill_list_100 INPUT
    SELECT f1 f2 FROM table INTO int
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'input/output screen field'
                value_org       = 'S'
           TABLES
                value_tab       = itab "it contains 2 fields that will be shown in the list box
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
    ENDIF.
    ENDMODULE.
    VALUE LIST CREATED IN PBO
    In this method we set the value list attribute to 'A'.The value list will be filled in the PBO by using FM VRM_SET_VALUES .
    TYPE-POOLS : VRM
    DATA : field_id TYPE VRM_ID ,
                values  TYPE VRM_VALUES,
                 value   LIKE LINE OF values.
    PROCESS BEFORE OUTPUT
    MODULE list_fill_100
    MODULE list_fill_100 OUTPUT
    SELECT f1 f2 f3  FROM tab WHERE condition.
    value-KEY = f1.
    value-TEXT = f2
    APPEND value TO VALUES
    CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id     = 'i/o screen field'
                values = values.
    ENDMODULE.
    LIST BOX with Selection Screen
    For this the FM VRM_SET_VALUES is used to fill the value table and is passed to the parameter created with TYPE LISTBOX in the selection screen event
    AT SELECTION-SCREEN.
    PROGRAM zlist
    TYPE-POOLS : VRM.
    DATA: param TYPE vrm_id,
           values     TYPE vrm_values,
           value LIKE LINE OF values.
    PARAMETERS: p_name(10) AS LISTBOX VISIBLE LENGTH 10.
    AT SELECTION-SCREEN OUTPUT.
      param = 'P_NAME'.
      value-key = '1'.
      value-text = 'JOHN'.
      APPEND value TO values.
      value-key = '2'.
      value-text = 'PETER'.
      APPEND value TO values.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING id     = param
                  values = values.
    Thanks & Regards
    Ashu Singh.

  • List Box doesn't appear in Spreadsheet

    I have many other fields in a form that I Reader-enabled, but only the List Box fails to appear. To test it alone, I created a new form with only a list box. I Reader-enabled it and then selected one of the items and saved the form. Then in Acrobat X Pro, I merged that file into a spreadsheet. All that appears is the name of the PDF. There is no column heading for the object and the selected value does not appear. Does the list box work at all? And from this sequence of steps, what am I missing?
    I'm interested in using the List Box as a preferable alternative to a series of checkboxes. I get values for those, but each checkbox value appears in a separate column in a spreadsheet, which makes for more scanning horizontally. I thought that with a List Box, I could let a user grab a couple of values, which would then be displayed in one column and that would suit my purposes admirably.
    Is this sort of plan something that will work in LC ES2?

    I just unchecked "Allow Multiple Selection" and the form worked normally. Is there a workaround so that I can save multiple values for one List Box object?

Maybe you are looking for

  • HP Officejet 4500-m drivers for windows 8.1 64 bit

    Hi. can anyone help me to install drivers. I downloaded drivers from HP but it is not working. can anyone give me link and tutorials.thank you in advance.

  • Exporting from FCP for iPhone...

    OK... So we have almost 100 videos on our website from the last couple years. I was under the impression they worked on ipods/iphones..... I was wrong. Here is step by step how I export them from FCP, I'm hoping someone can point out why they wont pl

  • Export a Joint to Excel

    Hello, i want to export a joint to Excel. When i export this joint, can i  save the hierarchie as a Excel worksheet ?? System BI 7.0 Thanks to all barish

  • SCREEN ISSUE - REG

    Hello there , I recently bought theHPK203tx which was facing problem from the 2nd day now the service engineer near has rectified stuffs after informing to the CS, now recently i have  been facing issues with the screen or display i.e while working t

  • Cant authorise Digital Editions

    Hi. I am using Windows 7 Home Premium ver 6.1 and I can't Authorise Digital Editions 2.01. Keep getting Error: "could not connect to the activation server". I am connected to the internet. I already have an Adobe Account which I can access OK. Shockw