Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Listbox codes error

Former Member
0 Likes
428

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?

2 REPLIES 2
Read only

Former Member
0 Likes
391

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.

Read only

Former Member
0 Likes
391

Hi,

Pls refer to the demo program DEMO_DYNPRO_DROPDOWN_LISTBOX.

Regards,

Renjith Michael.