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

module pool

Former Member
0 Likes
616

In a modulepool How to set drop down list?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
521

Hi

REPORT zwa_test2.

TYPE-POOLS : vrm.

tables: bkpf.

DATA : values TYPE vrm_values.

DATA : wa LIKE LINE OF values.

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

PARAMETERS: dd type bkpf-BSTAT user-command abc.

select-options: a for bkpf-bukrs MODIF ID buk.

select-options: b for bkpf-belnr MODIF ID SEL.

at selection-screen output.

If list_box = 2.

loop at screen.

if screen-group1 = 'SEL'.

screen-input = 0.

modify screen.

endif.

endloop.

endif.

INITIALIZATION.

wa-key = '1'.

wa-text = 'Orange'.

APPEND wa TO values.

wa-key = '2'.

wa-text = 'Red'.

APPEND wa TO values.

wa-key = '3'.

wa-text = 'Blue'.

APPEND wa TO values.

wa-key = '4'.

wa-text = 'Gray'.

APPEND wa TO values.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'LIST_BOX'

values = values

EXCEPTIONS

id_illegal_name = 1

OTHERS = 2.

Ref Program: DEMO_DROPDOWN_LIST_BOX

Link:

Reward points if useful

Regards

Anji

4 REPLIES 4
Read only

Former Member
0 Likes
522

Hi

REPORT zwa_test2.

TYPE-POOLS : vrm.

tables: bkpf.

DATA : values TYPE vrm_values.

DATA : wa LIKE LINE OF values.

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

PARAMETERS: dd type bkpf-BSTAT user-command abc.

select-options: a for bkpf-bukrs MODIF ID buk.

select-options: b for bkpf-belnr MODIF ID SEL.

at selection-screen output.

If list_box = 2.

loop at screen.

if screen-group1 = 'SEL'.

screen-input = 0.

modify screen.

endif.

endloop.

endif.

INITIALIZATION.

wa-key = '1'.

wa-text = 'Orange'.

APPEND wa TO values.

wa-key = '2'.

wa-text = 'Red'.

APPEND wa TO values.

wa-key = '3'.

wa-text = 'Blue'.

APPEND wa TO values.

wa-key = '4'.

wa-text = 'Gray'.

APPEND wa TO values.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'LIST_BOX'

values = values

EXCEPTIONS

id_illegal_name = 1

OTHERS = 2.

Ref Program: DEMO_DROPDOWN_LIST_BOX

Link:

Reward points if useful

Regards

Anji

Read only

Former Member
0 Likes
521

Hi manjula,

First put one input field on screen in screen painter if u double click on input field it displays attributes window. In that u have to select drop down list .

Thanks,

Suma.

Read only

Former Member
0 Likes
521

Hi,

In se51, click on the input/output parameter , u will get ATTRIBUTES box , in that u can use the option DROPDOWN(as LIST BOX or LIST BOX WITH KEY) .

Revert back if any issues,

Reward with points if helpful.

Regards,

Naveen

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
521

Hi Manjula

Is the TBBILLDATEFROM the name of the variable in the Screen field. You will have to assign the Screen Name in the Interface of the FM VRM_SET_VALUES.

That is the only issue i can see in the code.

Also you will have to refresh the Internal table datevalues before you append records to it.

Regards,

Sree