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

Declaring constant data in a list box - Dialog programming

i need to declarare some constant data 1...4 in list box in dialog programming i have done some coding its not working here is the code, can you plz tell me whats wrong in the code non of the values are displaying in drop downbox.

type-pools vrm.

DATA: name TYPE vrm_id,

list TYPE vrm_values,

value LIKE LINE OF list.

clear list.

REFRESH LIST.

value-key = '1'.

value-text = 'Sales & Distribution'.

append value to list.

value-key = '2'.

value-text = 'Material Management'.

append value to list.

value-key = '3'.

value-text = 'Finance & Controlling'.

append value to list.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'LISTBOX1'

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

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 08:04 AM

    Hi,

    Pls refer the program,

    demo_dynpro_dropdown_listbox

    Regards,

    Renjith Michael.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 08:44 AM

    You declared the the internal table ' value' using like line of

    when u pass multiple values it gives an error.

    So,

    declare value using "standard table of" .

    bye.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 09:12 AM

    I think your code is correct onlybut the problem may be where

    you are passing the internal table to the FM 'VRM_SET_VALUES' ...

    Try to use the following code..

    CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING

    id = 'LISTBOX1'

    values = list[]

    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.