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

Listbox codes error

I got an error when I put these codes when I am trying to populate values to the listbox(ZDROPDOWNLIST) :

-


data: itab type standard table of ZPROGRAM_TABLE WITH HEADER LINE,

wa_itab type ZPROGRAM_TABLE.

DATA : K TYPE I VALUE 1.

START-OF-SELECTION.

CALL SCREEN 1000.

----


  • MODULE STATUS_1000 OUTPUT

----


*

----


MODULE STATUS_1000 OUTPUT.

SET PF-STATUS 'SCREEN_1000'.

SET TITLEBAR 'TITLE_1000'.

select DISTINCT PROGRAM_ID from ZPROGRAM_TABLE

into table itab.

loop at itab.

clear wa_itab.

wa_itab-PROGRAM_ID = K .

wa_itab-PROGRAM_CODE = itab-PROGRAM_CODE.

append wa_itab to itab.

K = K + 1.

endloop.

call function 'VRM_SET_VALUES'

exporting

id = 'ZDROPDOWNLIST' "Here use your input box name in which you need dropdown

values = itab

exceptions

id_illegal_name = 1

others = 2.

ENDMODULE. "STATUS_1000 OUTPUT

-


Here is the link of how the error look like:

http://img529.imageshack.us/img529/9650/screenee6.png

Can someone tell me how to solve it and where is the error?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 05:32 AM

    TYPE-POOLS : vrm.

    DATA:wa_itab TYPE vrm_value,

    it_itab TYPE vrm_values.

    CLEAR wa_itab.

    • Add your value here what you need in the Listbox

    wa_itab-key = '1'.

    wa_itab-text = '1'.

    APPEND wa_itab TO it_itab.

    wa_itab-key = '2'.

    wa_itab-text = '2'.

    APPEND wa_itab TO it_itab.

    wa_itab-key = '3'.

    wa_itab-text = '3'.

    APPEND wa_itab TO it_itab.

    CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING

    id = 'ZMATERIAL' "Field name in which you need the listbox values

    values = it_itab

    EXCEPTIONS

    id_illegal_name = 1

    OTHERS = 2.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 06:43 AM

    Hi,

    Pls refer to the demo program DEMO_DYNPRO_DROPDOWN_LISTBOX.

    Regards,

    Renjith Michael.

    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.