How to create the list box in the selection screen.

hai friends..
i want to create the list box for the selection screen input boxes.
thanks,
velu.

hi..
1. There are two important things :
a)PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
b) Fm VRM_SET_VALUES
2. just copy paste
3.
REPORT abc.
TYPE-POOLS : vrm.
DATA : v TYPE vrm_values.
DATA : vw LIKE LINE OF v.
PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
INITIALIZATION.
vw-key = '1'.
vw-text = 'Jan'.
APPEND vw TO v.
vw-key = '2'.
vw-text = 'Feb'.
APPEND vw TO v.
vw-key = '3'.
vw-text = 'Mar'.
APPEND vw TO v.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'A'
values = v
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
regards,
veeresh

Similar Messages

  • How to Create a DropDown Box in a Selection Screen.

    Hi,
    I have a question. i.e, How to create a dropdown box in a Selection Screen. Could you please assist me.
    Thanks & Regards
    Sathish Kumar

    hi satish,
    The following can assist u to create a drop down ....
    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.
    Example
    Dropdown list boxes
    REPORT DEMO_DYNPRO_DROPDOWN_LISTBOX.
    TYPE-POOLS VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST.
    DATA: WA_SPFLI TYPE SPFLI,
          OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM.
    TABLES DEMOF4HELP.
    NAME = 'DEMOF4HELP-CONNID'.
    CALL SCREEN 100.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE INIT_LISTBOX OUTPUT.
      CLEAR DEMOF4HELP-CONNID.
      SELECT  CONNID CITYFROM CITYTO DEPTIME
        FROM  SPFLI
        INTO  CORRESPONDING FIELDS OF WA_SPFLI
       WHERE  CARRID = DEMOF4HELP-CARRIER2.
        VALUE-KEY  = WA_SPFLI-CONNID.
        WRITE WA_SPFLI-DEPTIME TO VALUE-TEXT
                               USING EDIT MASK '__:__:__'.
        CONCATENATE VALUE-TEXT
                    WA_SPFLI-CITYFROM
                    WA_SPFLI-CITYTO
                    INTO VALUE-TEXT SEPARATED BY SPACE.
        APPEND VALUE TO LIST.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                ID              = NAME
                VALUES          = LIST.
    ENDMODULE.
    MODULE USER_COMMAND_100.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'CARRIER'
         AND NOT DEMOF4HELP-CARRIER2 IS INITIAL.
        LEAVE TO SCREEN 200.
      ELSE.
        SET SCREEN 100.
      ENDIF.
    ENDMODULE.
    MODULE USER_COMMAND_200.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'SELECTED'.
        MESSAGE I888(BCTRAIN) WITH TEXT-001 DEMOF4HELP-CARRIER2
                                            DEMOF4HELP-CONNID.
      ENDIF.
    ENDMODULE.
    Reward if useful.
    Thank you,
    Regards.

  • 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 create dependent list boxes in a table -Frank Sample

    hi everyone i would like to ask a suggestion about Frank's example on How-to create dependent list boxes in a table -Frank Sample ...
    i want to extend this example for 3 dependent lists... including locations, departaments and employes....
    this the ListboxBean java that Frank is using in his example.... and this is only for locations and departaments tables and it works ok... i want to add the third list for employers wich is dependent only from departaments list.... as i am not good in java i would like to ask u a suggestion on how to develop the third list in this java class ...
    public class ListboxBean {
    private SelectItem[] locationsSelectItems = null;
    private SelectItem[] departmentsSelectItems = null;
    public SelectItem[] getLocationsSelectItems() {
    if (locationsSelectItems == null){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vbinding = fctx.getApplication().createValueBinding("#{bindings.LocationsView1Iterator}");
    DCIteratorBinding locationsIterBinding = (DCIteratorBinding) vbinding.getValue(fctx);
    locationsIterBinding.executeQuery();
    Row[] locRowsArray = locationsIterBinding.getAllRowsInRange();
    // define select items
    locationsSelectItems = new SelectItem[locRowsArray.length];
    for (int indx = 0; indx < locRowsArray.length; indx++) {
    SelectItem addItem = new SelectItem();
    addItem.setLabel((String)locRowsArray[indx].getAttribute("City"));
    addItem.setValue(locRowsArray[indx].getAttribute("LocationId"));
    locationsSelectItems[indx] = addItem;
    return locationsSelectItems;
    return locationsSelectItems;
    public SelectItem[] getDepartmentsSelectItems() {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vbinding = fctx.getApplication().createValueBinding("#{row}");
    JUCtrlValueBindingRef rwJUCtrlValueBinding = (JUCtrlValueBindingRef) vbinding.getValue(fctx);
    Row rw = rwJUCtrlValueBinding.getRow();
    if (rw.getAttribute(6) != null){
    OperationBinding oBinding = (OperationBinding) fctx.getApplication().createValueBinding("#{bindings.ExecuteWithParams}").getValue(fctx);
    oBinding.getParamsMap().put("locId",rw.getAttribute(6).toString());
    oBinding.execute();
    ValueBinding vbinding2 = fctx.getApplication().createValueBinding("#{bindings.DepartmentsView2Iterator}");
    DCIteratorBinding departmentsIterBinding = (DCIteratorBinding) vbinding2.getValue(fctx);
    departmentsIterBinding.executeQuery();
    Row[] depRowsArray = departmentsIterBinding.getAllRowsInRange();
    // define select items
    departmentsSelectItems = new SelectItem[depRowsArray.length];
    for (int indx = 0; indx < depRowsArray.length; indx++) {
    SelectItem addItem = new SelectItem();
    addItem.setLabel((String)depRowsArray[indx].getAttribute("DepartmentName"));
    addItem.setValue(depRowsArray[indx].getAttribute("DepartmentId"));
    departmentsSelectItems[indx] = addItem;
    return departmentsSelectItems;
    public void setLocationsSelectItems(SelectItem[] locationsSelectItems) {
    this.locationsSelectItems = locationsSelectItems;
    public void setDepartmentsSelectItems(SelectItem[] departmentsSelectItems) {
    this.departmentsSelectItems = departmentsSelectItems;
    Thanks in advance :0

    Hi,
    I think that all you need to do is to look at how I implemented the dependent detail for querying the Employees select items
    Then you make sure the DepartmentsVO and the EmployeesVO have bind variable to query them according to the pre-selected value in their respective master list
    Frank

  • How to create tcode for modulepool program with selection screen?

    hi,
       How to create tcode for modulepool program with selection screen?
    thanks,
    sagar

    Hi,
    We need to goto SE80.
    In our program we right click on object name and goto create
    -> transaction. Enter the module pool program and screen number and save and activate.
    Or by SE93 also we can create a transaction code for our program.
    Hope ths helps.
    plz reward if useful.
    thanks,
    dhanashri..
    Edited by: Dhanashri Pawar on Jul 22, 2008 8:29 AM

  • Creating a list box to the selection screen field

    Hi folks,
             Could any one suggest me how to add a list box (drop down list) to a selection screen field.
              Thanks,
              Santosh.
    Edited by: shyam prasad on Apr 3, 2009 6:07 AM

    Hi,
    just follow the code like below,
    TYPE-POOLS: vrm.
    TABLES sscrfields.
    PARAMETERS: p_values AS LISTBOX VISIBLE LENGTH 10.
    PARAMETERS: p_key TYPE char40 DEFAULT '5',
                p_text TYPE char80 DEFAULT 'Motorcycle'.
    SELECTION-SCREEN PUSHBUTTON /10(10) but USER-COMMAND abc.
    DATA: i_val TYPE vrm_values,
          wa_val TYPE vrm_value.
    AT SELECTION-SCREEN OUTPUT.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = 'P_VALUES'
          values          = i_val
        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.
    AT SELECTION-SCREEN.
      IF sscrfields-ucomm = 'ABC'.
        IF p_key IS INITIAL AND p_text IS INITIAL.
          MESSAGE e001(00) WITH 'Enter both Key and Text to add value'.
        ELSE.
          CLEAR: wa_val.
          wa_val-key = p_key.
          wa_val-text = p_text.
          APPEND wa_val TO i_val.
        ENDIF.
      ENDIF.
    INITIALIZATION.
      CLEAR: wa_val.
      wa_val-key = 1.
      wa_val-text = 'Bus'.
      APPEND wa_val TO i_val.
      CLEAR: wa_val.
      wa_val-key = 2.
      wa_val-text = 'Car'.
      APPEND wa_val TO i_val.
      CLEAR: wa_val.
      wa_val-key = 3.
      wa_val-text = 'Van'.
      APPEND wa_val TO i_val.
      CLEAR: wa_val.
      wa_val-key = 4.
      wa_val-text = 'Bicycle'.
      APPEND wa_val TO i_val.
    Hope it helps!!
    Regards,
    Pavan

  • How to populate a list box linked to selection in combo box?

    Hi All,
    I am a beginner in Xcelsius. I am having problem on how to populate a list box based on the selection on my combo box.
    I have a combo box and a list box.  The combo box value consist of Countries. Values are:
    Singapore
    Indonesia
    Thailand
    When I select, for i.e. Indonesia, I want to populate the list box with all the Postal Code of Indonesia. When I select Thailand, i want to do the same.
    Can anyone shed some lights on how to achieve this?
    My spreadsheet data is as follow
    Country         Postal Code
    Singapore     680123
    Singapore     680124
    Singapore     680125
    Indonesia     155123
    Indonesia     155124
    Indonesia     155125
    Indonesia     155126
    Thailand       333123
    Many Thanks,
    Harianto

    Hi,
    I am detailing the complete steps below:
    In the combobox select the entire range of Country while seeing the records from the Combobox, Xcelsius will automatically show the unique values in the selection.
    After that in the "Data Insertion" section for Combobox select the "Insertion Type" as "Filtered Rows" (please click on the question mark beside this option and it will show how the selection works).
    In the source select the postal code, in the destination select the range which will be used as a data source for the list box.
    This will resolve the concern. Please remember to select the question mark beside the "Insertion Type" option, it explains the working in specific details.
    Best of luck.
    Regards,
    Gourav

  • List Boxes on a Selection Screen

    Hi,
    I have a list box on the selection screen. In the At Selection Screen Output, I filled the List box with 12 Values.
    Now, I want to default the List box value with one of those values.
    So, after the CALL FM 'VRM_SET_VALUES', I say p_field = 'Value'.
    But this Value is being shown in the Drop down list twice.
    I could not understand the mistake.
    Please suggest.
    Thanks,
    Suryakiran D.

    Hi suryakiran,
    1. Its happening bcos
       u must be giving NAME
    2. give p_field  = Key
    3. ie. 1 for Jan
            2 for Feb etc
    in the FM VRM_SET_VALUES
    we are filling the parameter VALUES
    VALUES-key
    VALUES-TEXT
    so, give KEY, (and not text)
    after calling this FM.
    4.
    REPORT abc.
    TYPE-POOLS : vrm.
    DATA : v TYPE vrm_values.
    DATA : vw LIKE LINE OF v.
    PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
    vw-key = '1'.
    vw-text = 'Jan'.
    APPEND vw TO v.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = 'A'
          values          = v
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
          a = '1'.
    Problem
          a = 'Jan'.
    regards,
    amit m.
    Message was edited by: Amit Mittal

  • How to create dropwdown list box values and checkbox in screen painter.

    Hi Experts,
    I need to know the creation of dropdown list box values and the checkbox to use in screen painter.
    I have 3 values to insert as:-
    INR,USD,EUR
    if user selects INR/USD/EUR, then it will store into the table field.
    And also want to know the checkbox functioning in screen painter, i.e. what should we write in PBO/PAI.
    I have found some sites to get knowledge, but didnot found anything that relates to my questions.
    So please help me!
    Thanks,
    Deepanshu

    Hi,
    For dropdown list box in Screen create a input field and choose Drop down by index.
    To populate the values write the logic in PBO as follows
    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.

  • How to move up the List Box for para. values in the "Edit Values" window?

    Hi,
    I am using Crystal Reprots 11.
    I create 10 subreports, and each subreport contains a Parameters Field.
    The 10 subreports are put in 10 footer sections in increasing order, i.e. subreport1, subreport2, subreport3, ..., subreport10.
    When I use "Print Preview" to take a look at the whole report, CR prompts a "Edit Values" window for selecting parameter values.
    Maybe because I created subreport3 & subreport4 after I completed other subreports, the List Box with the values required to select for subreport3 & subreport4 were located at the bottom of the "Edit Values" window.
    How to move List Box with the values required to select for subreport3 & subreport4 up to the proper location (based on the order of subreports) in the "Edit Values" window?
    Thank you in adavance.

    Hi,
    Yes, that is true. The subreport parameters are prompted in the order you insert the subreport.
    The only way to fix this is to save subreports from 5 through 10 (Right-click subreport > select Save Subreport as) first.
    So, now all you have is Subreports 1, 2 and 3. Go ahead and add the Subreports from 5 to 10 in order and the prompts should be in order too.
    -Abhilash

  • How to change the order of the List box entries in GET attributes - Account

    Hi,
    We have four entries in the List box for the GET attribute in the Account. Please help me out, how we could change the order of the entries ? Is there any place in PCUI I can do the changes ?
    Thanks & Regards,
    Jagadees K Arumugam

    Hey Doc!
    Thanks for your effort!
    Seems like the picture I posted was confusing, I actually wanted to show, what indesign does, not what I want to achieve!
    I downloaded your template and that's exactly what I want to achieve! But I still have trouble reconstructing what you did:
    How did you link the captions to the TOC?
    The captions have a paragraph style which looks exactly like mine, also the paragraph style of the TOC doesn't look much different. So where does the difference hide?
    EDIT: Kannst Du mir sagen, wie diese Verlinkung auf Deutsch heißt? Dann find ich's vielleicht auch von selbst

  • List box for the select-options

    Hi All
      Can anyone send me a sample code to create a list-box for the select-options.

    Hi vighnesh vasudevan,
    Do like this for your select options for low and high also.
    Parameters:
        p_quat  TYPE char20
                AS LISTBOX VISIBLE LENGTH 30
                LOWER CASE OBLIGATORY.
    *              AT SELECTION-SCREEN ON VALUE-REQUEST                    *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_quat.
      PERFORM fill_quarters.
      PERFORM display_quarters.
    *&      Form  fill_quarters
    *       text
    FORM fill_quarters .
      DATA:
    * Field string to fill quarters in the year
        lfs_quarters TYPE LINE OF vrm_values.
      REFRESH t_quarters.
      lfs_quarters-key  = '1'.
      lfs_quarters-text = text-qu1.
      APPEND lfs_quarters TO t_quarters.
      lfs_quarters-key  = '2'.
      lfs_quarters-text = text-qu2.
      APPEND lfs_quarters TO t_quarters.
      lfs_quarters-key  = '3'.
      lfs_quarters-text = text-qu3.
      APPEND lfs_quarters TO t_quarters.
      lfs_quarters-key  = '4'.
      lfs_quarters-text = text-qu4.
      APPEND lfs_quarters TO t_quarters.
    ENDFORM.                    " fill_quarters
    *&      Form  display_quarters
    *       text
    FORM display_quarters .
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = 'P_QUAT'
          values          = t_quarters[]
        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.                    " display_quarters
    Note: I think we are not able to display the list box for select options because i am not ever seen the list box in select options . No Probs try like above code.
    See the following like it may help for you
    Listbox for Select Options
    Regards,
    Mahi.

  • To provide the list box for field

    hi experts
    my problem is in me53n screen.in that screen i have to provide the list box for the screen field 'requisitioner'.ple tell me whats the way to provide the list box for the field.

    Hi ,
           Use FM VRM_SET_VALUES
    which has a table of key and values .
    and import parameter for fieldname where listbox has to be provided.
    below is the code.
    form fill_list_box .
      data : s_listbox type vrm_value .
      data : t_listbox type standard table of vrm_value initial size 0 .
      s_listbox-key = '1' .
      s_listbox-text = 'Class/Interface' .
      append s_listbox to t_listbox .
      s_listbox-key = '2' .
      s_listbox-text = 'Description' .
      append s_listbox to t_listbox .
      s_listbox-key = '3' .
      s_listbox-text = 'Method' .
      append s_listbox to t_listbox .
      g_vrm_id =  'ZCW_LIST-T1' .
    *loop at t_listbox into s_listbox .
      set parameter id 'AUN' field space.
      call function 'VRM_SET_VALUES'
           exporting
                id              = g_vrm_id
                values          = t_listbox
           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.                    " fill_list_box

  • Input box on default selection screen

    Hi,
       how to create an input box on the default selection screen which will accept only 1275 characters.
      Can u please help me?
    Thanks in Advance,
    Sreekala.

    Hi Sreekala,
    You need to use the  CL_GUI_TEXTEDIT for creating the box, also you need use the dialog program for that.
    For more info on that class check this
    Usage of CL_GUI_TEXTEDIT
    Text box on selection screen
    Hope they helps you.
    Regards!

  • How to add more elements in the list box bean

    Hi,
    I have created a list box bean on a seeded page. I have an array of 573 elements.
    When I tried to add all those values in my list box, only 251 of those values got inserted in it.
    Please suggest me how can I insert all the 573 values in that list box.
    Regards,
    Gaurav.

    Thanks Gyan.
    Below is the code for creating list box :
    OAApplicationModule am = pageContext.getRootApplicationModule();
    OAViewObject listVO=(OAViewObject)am.findViewObject("LocationsLOVVO");
    OAWebBeanFactory list1 = pageContext.getWebBeanFactory();
    OADefaultListBean list = (OADefaultListBean)list1.createWebBean(pageContext, OAWebBeanConstants.DEFAULT_LIST_BEAN, null, "LocationsList");
    list.setListViewObjectDefinitionName("oracle.apps.irc.lov.server.LocationsLOVVO");
    list.setListValueAttribute("LocationCode");
    list.setListDisplayAttribute("LocationCode");
    list.setSize(6);
    list.setMultiple(true);
    list.setName("Location");
    OAMessageLayoutBean listboxbean = (OAMessageLayoutBean)webBean.findChildRecursive("AplmessageLayout");
    listboxbean.addIndexedChild(list);
    But it is not inserting all the location values in the list.
    Regards,
    Gaurav.

Maybe you are looking for

  • External Hard Drive won't start or load

    I have a Western Digital 750G external hard drive that I have been using on my MacBook Pro for about 6 months. Last night it shut down and now I can't get it to even turn on or load onto the computer. Has this happened to anyone before and does anyon

  • Export file formats from flash?

    Hi, I have an issue concearning existing file formats for export in Flash CS4. According to the user's manual in Italian I have found, http://help.adobe.com/it_IT/Flash/10.0_UsingFlash/WS0E26E472-1533-4297-A904-59476E8E1935.h tml available formts inc

  • Maximize server uptime - memory leak?

    Since we stabilized the newly introduced WLI 8.1 application we are now fine tuning the JVM. We are facing some kind of memory leak which forces us to reboot the WLS instances daily. I'm now asked to identify some strategies how we could let the WLI

  • Log File Sync

    Hi all, I am using Oracle 10gR2 on Solaris 10. It did a SQL Trace and came up with the following resultMisses in library cache during parse: 591 Elapsed times include waiting on following events:   Event waited on                             Times  

  • Having trouble with iDVD 7.1.2

    I recently installed Lion on my computer and the new ilife to have idvd. Idvd open fine. When I add the avi files (movie, videos) the file added is completly white. even when you burn the dvd its just a white screen, does anybody know whats going on?