Skip to Content

drop down list

Hi All,

How do i implement a drop down list wth select options in the selection screen.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Dec 27, 2007 at 07:03 PM

    Hi,

    Whatever way you opt (case1 or case2) you have to define search help at the table level. You cannot define the values for the drop down in the selection screens.

    Case1. If you are using the standard SAP fields for definition (Ex: Zmatnr FOR MARA-MATNR) then the drop down will show up as the MATNR field had the search help defined in MARA table.

    Case2. If you are using any fields from Z-table then you have to define the check table for the field in Z-table and use the same field in your select options.

    I hope this helps. Please let me know if you have any furture questions.

    Thanks,

    Karuna.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 12:00 PM

    hi ,

    these are some of the ways to declared a drop down

    hope it ll help your cause.

    Report Z_STD.

    • 1st way

    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.

    *2nd way

    PARAMETERS : p_a TYPE pernr DEFAULT '01'

    AS LISTBOX VISIBLE LENGTH 20.

    *3rd way

    TYPE-POOLS: VRM.

    DATA: NAME TYPE VRM_ID,

    LIST TYPE VRM_VALUES,

    VALUE LIKE LINE OF LIST.

    PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.

    AT SELECTION-SCREEN OUTPUT.

    NAME = 'PS_PARM'.

    VALUE-KEY = '1'.

    VALUE-TEXT = 'LINE 1'.

    APPEND VALUE TO LIST. VALUE-KEY = '2'.

    VALUE-TEXT = 'LINE 2'.

    APPEND VALUE TO LIST.

    CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.

    START-OF-SELECTION.

    WRITE: / 'PARAMETER:', PS_PARM.

    reward if helpful

    regrads

    anuj.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.