Drop down in selection-screen

hi,
suppose in the selection screen i have Customer No. and i want the result for only 4 customers like 1000, 1002, 1009, 1020. can anyone help me how to select only those in the selection screen.
thanks,
swamy

hi,
Check this example
check this code..
copy paste it and see...
REPORT  ZTEST_CODE_VRM.
TYPE-POOLS: VRM.
TYPES: NAME TYPE VRM_VALUE-TEXT.
DATA: V_VBELN LIKE VBAK-VBELN.
DATA: IT_VALUES TYPE STANDARD TABLE OF VRM_VALUE.
DATA: WA TYPE VRM_VALUE.
TABLES: KNA1.
SELECT-OPTIONS: S_VBELN FOR V_VBELN.
PARAMETERS: P_KUNNR AS CHECKBOX USER-COMMAND ABC.
PARAMETERS: P_CHK1 AS CHECKBOX USER-COMMAND ABC.
PARAMETERS: P_KUNNR1 TYPE NAME AS LISTBOX VISIBLE LENGTH 30.
INITIALIZATION.
  S_VBELN-LOW = '123'.
  APPEND S_VBELN.
  WA-KEY = '1'.
  WA-TEXT = 'One'.
  APPEND WA TO IT_VALUES.
  CLEAR WA.
  WA-KEY = '2'.
  WA-TEXT = 'Two'.
  APPEND WA TO IT_VALUES.
  CLEAR WA.
  READ TABLE IT_VALUES INTO WA INDEX 1.
  P_KUNNR1 = WA-KEY.
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      ID              = 'P_KUNNR1'
      VALUES          = IT_VALUES
    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.
  CLEAR S_VBELN.
  REFRESH S_VBELN.
  S_VBELN-LOW = '456'.
  APPEND S_VBELN.
AT SELECTION-SCREEN ON P_KUNNR.
* This event should fire only only for parameters not for select options
  P_KUNNR = 'X'.
AT SELECTION-SCREEN OUTPUT.
  IF P_KUNNR = 'X'.
    P_KUNNR = ' '.
  ENDIF.
  IF P_CHK1 = ' '.
    P_CHK1 = 'X'.
  ELSE.
    P_CHK1 = ' '.
  ENDIF.
regards
vijay

Similar Messages

  • Drop Down In Selection Screen Field

    Hi experts,
    I have an requirement to add Drop Down in one of my Selection Screen Field. This field is for Status where the values are stored in short text manner like R,M etc. In Drop Down I have to define the Abbreviation for these . Please if anybody can help me through code or options for the same.
    Thanks in Advance.

    take this example
    PARAMETERS: P_YEAR(8) AS LISTBOX VISIBLE LENGTH 8.
    AT SELECTION-SCREEN OUTPUT ."ON P_YEAR  .
    NAME = 'P_YEAR'.
    VALUE-KEY = 'A'.
    VALUE-TEXT = '2008'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'B'.
    VALUE-TEXT = '2009'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'C'.
    VALUE-TEXT = '2010'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'D'.
    VALUE-TEXT = '2011'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'E'.
    VALUE-TEXT = '2012'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'F'.
    VALUE-TEXT = '2013'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'G'.
    VALUE-TEXT = '2014'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'H'.
    VALUE-TEXT = '2015'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'I'.
    VALUE-TEXT = '2016'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'J'.
    VALUE-TEXT = '2017'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'K'.
    VALUE-TEXT = '2018'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'L'.
    VALUE-TEXT = '2019'.
    APPEND VALUE TO LIST.
    NAME = 'P_YEAR'.
    VALUE-KEY = 'M'.
    VALUE-TEXT = '2020'.
    APPEND VALUE TO LIST.
    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.

  • How can I get a drop-down list selection also be selected in another field with the same list but a different name?

    I have a street address and a billing address. A question is posed with a checkbox — "Is the billing address the same as the street address?" If Yes is checked, the street address automatically fills the billing fields. If No is checked, the user must fill in new information. In both the street address and billing addres, the State field is a drop-down list. How can I get the drop-down list selection in the street address State also be selected in drop-down list for the billing address State?

    Has anyone done this?

  • How do I make a drop down menu selection show up in another web page?

    What I am trying to accomplish is this.  I have a page with various drop down menu selections that I want to transfer the selection to a secured web page. What happens now is once the selection is made it goes to the secure page but then the user has to again select the choice again.  Is there way to keep the selection chosen in the linked page?

    You can set the "selected" value in the second page based on the input from the first page.
    Ignor the language referance used below for the example and simple use the concept with your desired language.
    Second Page form:
    <form id="form1" name="form1" method="post" action="">
      <select name="testing" id="testing">
        <option value="Value 1" <% if ( Passed values == Value 1 ) { %>selected="selected"<% } %>>Lable 1</option>
        <option value="Value 2" <% if ( Passed values == Value 2 ) { %>selected="selected"<% } %>>Lable 2</option>
      </select>

  • How to create Drop Down box in screen painter..??

    Can anybody give me sample code or detailed description about creating Drop-Down Box in a screen...??
    I have created the drop down box in screen..
    But how to make data to be visible in Dropdown box, when i click the drop icon in that box...???
    Regards
    Pavan Sanganal

    Here are couple of DEMO programs for the same functionality
    DEMO_DROPDOWN_LIST_BOX       
    DEMO_DYNPRO_DROPDOWN_LISTBOX 
    You execution sequence will be PBO - Process before output, then the screen is displayed and the PAI Process after input.
    Regards,
    Ravi
    Note : Please mark all the helpful answers

  • User command in drop down in select options

    Hi. I am able to build a drop down in select options via the method add_parameter_field, and setting option I_AS_DROPDOWN as true.
    Now I want to trigger a user command when any value in the drop down is selected. Is it possible? I cannot find any method / means to do it.
    Thanks in adv.

    Dear Aishi,
    Try this code on your Dropdownindex object. Events->onSelecet(ONACTIONSELECT).
    method ONACTIONSELECT .
      wd_context->set_attribute( name = 'DROPDOWN_BY_IDX_1_INFO' value = index ).
    if index = 1.
                      wd_this->onactionon_action1( EXPORTING wdevent = wdevent ). " action1 action
    endif. index = 2.
                      wd_this->onactionon_action2( EXPORTING wdevent = wdevent ). " action2 action
    endif.
    endmethod.
    Bulent

  • Setting values in Drop down list in Screen Painter

    Hello Freinds,
    I have the requirement as, I have drop down list in screen painter and want to fill the values in that list using database table.
    So using foreign key table I have updated the values in the list.
    But now client wants me to fill the dropdown list with ID as well as description..
    Please suggest me how to achieve this.
    Thanks and Regards
    Nishad

    Hi,
    You the FM 'F4IF_INT_TABLE_VALUE_REQUEST'  and try.
    Fill the internal table with the key and description and pass the same to above FM.
    You will get sample code by searching the forum.
    Thanks.
    Anversha

  • How to add Drop Down City Selection Menu?

    How is the best way to  add a Drop Down City Selection Menu to my site next to MyCITY logo?  This page should be selection on Los Angeles (w arrow icon next to it), but I need 4 other city choices.  It needs to drop down like RESTAURANTS with an arrow.  Not sure the best way to approach this.
    http://www.tammyfarringtoncreative.com/test/index.html
    Thanks, Tammy

    Are you looking for a form select list?
    http://www.w3schools.com/tags/tag_select.asp
    Nancy O.

  • Drop Down Menu selection query for recordset.

    I am looking to utilize a dynamic drop down menu to query a recordset...I am using Colfusion to import an MS Access database that contains the following fields: "Model Date", "Name", "Points" and "Target".  Each time the database updates, the "Model Date" field contains the date and time the model was run.  I have figured out how to create a dynamic drop down using SELECT DISTINCT "model date" and have also figured out how to create the dynamic recordset to be displayed showing the "Name", "Points" and "Target" data. 
    I want the user to select the "Model Date" from the drop down, hit a submit button and then have the appropriate "Name", "Points" and "Target" data queried and shown below.
    The query should take the selection from the "model date" dropdown and then query the "name", "points" and "target" fields for that particular "model date"
    I admit my knowledge of SQL and Coldfusion is not the best, but it seems like this is a somewhat simple task and I am just missing one or two pieces of the cog to put it all together.
    The database basically looks like this:
    Model Date...........Name..........Points........Target
    8/1/2010 08:00......John Doe.....1,250.........5.55%
    8/1/2010 08:00......Jane Doe.....850............2.35%
    8/1/2010 08:00......Bill Smith....11,832........-123.23%
    8/2/2010 09:02......John Doe.....1,323.........6.67%
    8/2/2010 09:02......Jane Doe.....1,001.........3.21%
    8/2/2010 09:02......Bill Smith....10,235........-110.26%
    The dropdown will only show the "model dates"
    8/1/2010 08:00
    8/2/2010 09:02
    For example, if 8/1/2010 08:00 was selected from the dropdown, I want the following displayed:
    Name..................Points...................Target
    John Doe.............1,250....................5.55%
    Jane Doe.............850.......................2.35%
    Bill Smith............11,832...................-123.23%
    Any help or suggestions would be greatly appreciated!!!
    Thanks,
    Mike

    My second paragraph talks about just displaying the filtered data, so I'm assuming that's what you're looking for, but still not quite sure based on what the other responses are. 
    But I head on anyway -
    On your first page, make note of the instance name of your drop down menu, such as "ModelDate".  Make sure it's in a Form and set the form action to the page where you want to display your data, set the form action to POST.
    On the results page, create a table with cells for each of the data elements you want to display. Create a recordset which you can do in Simple mode. Leave it at select all, and set the filter drop down to the database field which contains your Model Date. In the box to the right, select "=". the next dropdown selct "Form Variable" and the variable name type in the instance name of the drop down on the first page. 
    I may not have the terminology right, doing it from memory.
    From the data bindings tab, expand your recordset and locate each of the database fields you want to display.  Drag each one to the table cell on the page where you want it displayed.  The table cells have to be in a linear row.
    Now, select the table row buy selecting the TR tag in the tags just above the properties panel.  In the server behaviors tab, select repeat region and "All Records"
    Publish your pages and test!

  • How to fill the drop down menu in screen programming

    Hi, Experts,
    I have a drop down menu on the screen I want to fill that drop down menu with different values how can I do that I think that there are to ways
    Value List      from     dist/flow logic
                          A from program
    Please help me out in this way.
    Kind regards,
    Faisal.

    Hi Faisal,
      VRM_SET_VALUES function module is used to display drop down values in the screen.
    Use the following code
    * Selection screen elements                                            *
    SELECTION-SCREEN BEGIN OF BLOCK BLC1 WITH FRAME
                                        TITLE TEXT-000.
    PARAMETERS:
      P_BUKRS  TYPE BKPF-BUKRS OBLIGATORY  " Company code
               DEFAULT '1000',
      P_WERKS  TYPE VBRP-WERKS OBLIGATORY. " Plant
    SELECTION-SCREEN SKIP.
    PARAMETERS:
      P_GJAHR TYPE BKPF-GJAHR OBLIGATORY,  " Fiscal Year
      P_QUAT  TYPE CHAR20                  " Quarter
                AS LISTBOX VISIBLE LENGTH 30
                LOWER CASE OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK BLC1.
    Data:
    * To hold quarter details, these details are used to display in list box of
    * the parameter called Quarter in the selection screen.
      T_QUARTERS TYPE VRM_VALUES.
    *              AT SELECTION-SCREEN ON VALUE-REQUEST                    *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_QUAT.
    * To fill quarters......................................................
      PERFORM FILL_QUARTERS.
    * To display quarters in dropdown box...................................
      PERFORM DISPLAY_QUARTERS.
    * FORM DISPLAY_QUARTERS                                                *
    * This subroutine is used to display quarters in the dropdown box.     *
    * There are no interface parameters to be passed to this subroutine.   *
    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 NE 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.                               " F SY-SUBRC NE 0.
    ENDFORM.                               " DISPLAY_QUARTERS
    * FORM FILL_QUARTERS                                                   *
    * This subroutine is used to fill quarters.                            *
    * There are no interface parameters to be passed to this subroutine.   *
    FORM FILL_QUARTERS .
    * Local field string declaration........................................
      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
    Regards,
    Mahi.

  • The back/forward buttons on the tool bar only go one page at a time. I used to be able to click a drop-down and select how far back/forward I wanted to go. How can I get that back

    I can only navigate back/forward one page at a time. The drop down box that used to allow me to see the recent pages and select the page I wanted to go to was immediately to the right of the "forward" button. I can right click over the forward/back buttons and get the dropdown list of recent sites.

    Use right-click on the back/forward buttons to bring up the context menu, the drop down was never needed, and I had suppressed it for a long time to save space.
    that is item #5 in the following, you might want to check out other items there.
    You can make '''Firefox 6.0.1''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
    * http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface
    There is a lot more beyond those first 10 steps listed, if you want to make Firefox more functional.
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • UI - How to make Columns in a Drop Down List Selection?

    I am altering a code from Peter Kahrel "Beginning Script UI". I am trying to make a searchable drop down list that will have 4 columns. So far, the search works and I have headings in the search, but I cannot seem to make the columns for the actual data. I believe I need to change the type_ahead since the array is looking at this data. I'm stuck in the water. Can someone tell me what I need to do to get the list to show up as columns? How do I turn the picked = type_ahead data into four columns? Code and Screenshot below:
    picked = type_ahead (["bat", "bear", "beaver", "bee", "cat", "cats_and_dogs",
    "dog", "maggot", "moose", "moth", "mouse"]);
    function type_ahead (array)
    var w = new Window ("dialog", "Quick select");
    var entry = w.add ("edittext", [0, 0, 800, 22]);
    entry.active = true;
    var list = w.add ("listbox",  [0, 0,800, 500], "",
    {numberOfColumns: 4, showHeaders: true,
    columnTitles: ["Non-Approved Word", "Approved Alternative", "Approved Use", "Non-Approved Use"], columnWidths: [200,200,200,200]});
    list.selection = 0;
    entry.onChanging = function ()
    var temp = this.text;
    list.removeAll ();
    for (var i = 0; i < array.length; i++)
    if (array[i].toLowerCase().indexOf (temp) == 0)
    list.add ("item", array[i]);
    if (list.items.length > 0)
    list.selection = 0;
    entry.onChange = function () {w.close (1)}
    if (w.show () != 2)
    return list.selection.text;
    else
    w.close ();

    Hi Peter,
    This is one of those developments that push the limits of my knowledge-base and when things do that, I lose sleep until I figure it out. With that said :-) here is where I have ended up.
    Basically I made a new array for the table data.  I then use an array lookup to sort the array in the listbox based on the 0 array item. See the code below. Once it is loaded type in "b" and the list will start to sort.
    I need to try to get this to work as a pallete instead of a dialog box. Do palletes support this type of functionality?
    var newarray = new Array(
    new Array('Butterfly ','has wings','can fly'),
    new Array('bohemith moth','has wings','cannot fly very good'),
    new Array('word 3','replacement word','use case'));
    picked = type_ahead (newarray);
    function type_ahead (array)
    var w = new Window ("dialog", "STE Checker");
    var entry = w.add ("edittext", [0, 0, 800, 22]);
    entry.active = true;
    var list = w.add ("listbox",  [0, 0,800, 500], "",
    {numberOfColumns: 3, showHeaders: true,
    columnTitles: ["Column 1",  "Column 2", "Column 3" ], columnWidths: [200,200,400]});
    list.selection = 0;
    entry.onChanging = function ()
    var temp = this.text;
    list.removeAll ();
    for (var i = 0; i < array.length; i++)
    if (array[i][0].toLowerCase().indexOf (temp) == 0)
    with (list.add ("item", array[i][0]))
    subItems[0].text = array[i][1];
    subItems[1].text = array[i][2];
    if (list.items.length > 0)
    list.selection = 0;
    entry.onChange = function () {}
    if (w.show () != 2)
    return list.selection.text;
    else
    w.close ();

  • Drop Down for Selecting the doc type while uploading?

    Hi all,
    Is it possible to create some document type in KM so that we can select the doc type and  upload the file to specific folder.
    What I mean from Doc type is like Doc for Meetings, Doc for activity report.
    Is it possible using standard KM features? Urgent help needed pls reply.
    Pls send the document regarding this to [email protected]

    Hi Karan,
    I'm not sure if I have understood your issue correctly, but let me try:
    1. You want to upload documents to KM
    2. Uploading them, you want to categorize them in some way, so that they can be identified as docs for meetings, docs for unit XYZ, etc..
    3. After upload, you want each doc to end up in a folder according to its category
    If this is what you want, try the following:
    1. Create a custom resource property called "category" or something similiar.
    2. You may define your possible values for that property. This makes it a drop down box containing the possible values in property view. (You can see property view when uploadinga document)
    3. Mark the property as searchable
    4. Create a taxonomy using TREX searching your repository for the given values of your custom property
    Now you can upload documents, fill the custom property, and some minutes later TREX will create a link to the document in the specified 'category folder'.
    If you need some more detailed assistance, please come back.
    HTH,
    Carsten

  • When sending a PDF form by email, is there a way to make a button into a drop-down to select multiple email addresses?

    Basically, I'm wanting to have multiple recipients set up within a button, so I can pick and choose who and when I send the form to. I can only seem to get it to either send to only one email address, or to send to multiple email addresses all at one time, without the option to select a recipient upon pressing the button.
    If anyone could help, I'd be really grateful.
    Many thanks in advance.
    James

    First of all, a drop-down menu doesn't allow for multiple item selection. You'll need a list-box field for that.
    Once you have that set up you can use the value(s) selected in this field as the recipients of the email.

  • Pass Multiple Parameters to SQL query in Drop down or Select Boxes

    Post Author: JasonW
    CA Forum: Data Connectivity and SQL
    Hello all- I am using CR XI and SQL server 2000.I have written a SQL statement and used that statement as a 'command' in the Database Expert, to pull data into a report.  There are two issues I have that I need some help/advice on.-. The report needs 4 parameters.  A, B, C, D.-. I can create Parameters in the Database Expert that will prompt me for the data when I refresh the report. However,-. I need to be able to select those parameters in drop down boxes based on data in the SQL database.  The problem is that the parameter cannot pull the data without the criteria - so a drop down box seems impossible.  OR is it?  That is part of my question.  The other part is - Even if it is possible, can Crystal do this somehow?  NOTE: The query is selecting the data rather than Crystal - so Creating a Parameter field IN the report is futile. -. The other half of this problem is that users would like the ability to select multiple values from Field A and from Field B.  

    Post Author: JasonW
    CA Forum: Data Connectivity and SQL
    I ended up using a stored procedure.  This queries the proper data, and allows me to use Dynamic Parameters to make multiple selections on the data.  (I query out a large portion of the data in the stored procedure, then pair it down using Dynamic Parameters in Crystal.) Here is the new problem this has created:My Dynamic Parameters are not pulling all the values from the query.  Ex.  One field in the query is a "directory" listing.  It has 227 unique values in it.  (It has multiple values, it is not constrained.)  When I create a Dynamic Parameter off of this field, I only get 18 of the 227 as available selections in the drop down box.  However, I can type in any of the 227 values into the field manually, I pull the proper data.  So the data is there, its just not showing up in the drop down box.   Anyone have any ideas on this?

Maybe you are looking for

  • How do I move a file instead of copy it?

    I want to move files to, from and between computer, usb stick and usb hdd and I do not want to make duplicates. What do I need todo in order to simply move the file, not copy it?

  • Search iCal for all events in a specific calendar?

    Is it possible to search for all events that I have listed in a specific calendar? For example, I have one set up as "guests" and would like to see a list of all the events I have under that. I tried doing an ical search for guests, but nothing came

  • Host Name configuration

    How or where can I change the Host Name for the Engine Node? Anyone?

  • Image Transfer from PC to Mac

    How does one transfer all images from a PC to a Mac AND ensure that the meta data and tags are included? At present I have my entire catalog backed up on an external hard drive ready to go.

  • New phone - iMessage and Facetime not working with number?

    I had a 4s and recently got a 5s, and now iMessage on my Mac only has my email as an option. My phone number is the same. I searched around for a solution, and one involved signing out and back into both iMessage and Facetime on my Mac, so I did, and