Skip to Content
author's profile photo Former Member
Former Member

how can we use list box on selection screen

hi, howe can we use list box on selection screen and how can we populate the dat ainto the list box and how can we retrive data based on list box from ther database.

thanks in advance

raju

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Sep 21, 2006 at 12:25 PM

    Check the link to know how to populate values as a LIST(drop down list)

    list-box-in-report

    here is the sample piece of code,

    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 = 'NAME1'.

    APPEND value TO values.

    value-key = '2'.

    value-text = 'NAME2'.

    APPEND value TO values.

    *--and so onnn

    CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING id = param

    values = values.

    rgds

    anver

    if helped amrk points

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 21, 2006 at 12:26 PM

    Refer the sample program:

    DEMO_DROPDOWN_LIST_BOX

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2006 at 12:27 PM

    Use the VRM_SET_VALUES function module.

    DATA: list TYPE vrm_values,

    value LIKE LINE OF list.

    ***********************************************************************

    • AT SELECTION SCREEN OUTPUT

    ***********************************************************************

    AT SELECTION-SCREEN OUTPUT.

    name = 'P_OBJECT'.

    CLEAR list.

    REFRESH list.

    CLEAR value.

    value-key = '1'.

    value-text = 'Development Class'.

    APPEND value TO list.

    CLEAR value.

    value-key = '2'.

    value-text = 'Program'.

    APPEND value TO list.

    CLEAR value.

    value-key = '3'.

    value-text = 'Function Module'.

    APPEND value TO list.

    CLEAR value.

    value-key = '4'.

    value-text = 'Database Table'.

    APPEND value TO list.

    CLEAR value.

    value-key = '5'.

    value-text = 'Structure'.

    APPEND value TO list.

    CLEAR value.

    value-key = '6'.

    value-text = 'View'.

    APPEND value TO list.

    CLEAR value.

    value-key = '7'.

    value-text = 'Data Element'.

    APPEND value TO list.

    CLEAR value.

    value-key = '8'.

    value-text = 'Table Type'.

    APPEND value TO list.

    CLEAR value.

    value-key = '9'.

    value-text = 'Class / Interface'.

    APPEND value TO list.

    CLEAR value.

    value-key = '10'.

    value-text = 'Type Group'.

    APPEND value TO list.

    CLEAR value.

    value-key = '11'.

    value-text = 'Domain'.

    APPEND value TO list.

    CLEAR value.

    value-key = '12'.

    value-text = 'Search Help'.

    APPEND value TO list.

    CLEAR value.

    value-key = '13'.

    value-text = 'Lock Object'.

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2006 at 12:27 PM

    Hi raju,

    1. very simple

    2. There are two important things :

    a)PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.

    b) Fm VRM_SET_VALUES

    3. just copy paste

    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.

    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,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2006 at 12:37 PM

    Hello,

    Pupulate data and use FM 'VRM_SET_VALUES'.

    (OR)

    Go to transaction DWDM and look in to many complex controls with example source code.

    Regs,

    Venkat

    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.