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

creating drop down list program?

Former Member
0 Likes
523

how to create the dropdownlist program?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
497

Hi

see the sample program

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:

<b>Reward points for useful Answers</b>

Regards

Anji

4 REPLIES 4
Read only

Former Member
0 Likes
497

hi,

drop-down list program means the interactive reporting.

If u want f4 u can use the function module for f4 help.

Read only

Former Member
0 Likes
497

Hello,

Check the sample report

<b>demo_dynpro_dropdown_listbox</b>

VAsanth

Read only

Former Member
0 Likes
498

Hi

see the sample program

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:

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
497

Hi,

Try with the following code:

TYPE-POOLS: VRM.

DATA: NAME TYPE VRM_ID,

LIST TYPE VRM_VALUES,

VALUE LIKE LINE OF LIST.

PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.

AT SELECTION-SCREEN OUTPUT.

NAME = 'PS_PARM'.

VALUE-KEY = '1'.

VALUE-TEXT = 'LINE 1'.

APPEND VALUE TO LIST. VALUE-KEY = '2'.

VALUE-TEXT = 'LINE 2'.

APPEND VALUE TO LIST.

CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.

START-OF-SELECTION.

WRITE: / 'PARAMETER:', PS_PARM.

Regards,

Bhaskar