List Box on the Selection Screen

by Sunitha

We can use the function module VRM_SET_VALUES for displaying the list box on the selection-screen.

REPORT zlistbox_demo.

TYPE-POOLS: vrm.

PARAMETERS p_carrid LIKE scarr-carrid AS LISTBOX
VISIBLE LENGTH 20 OBLIGATORY.

DATA: t_carrid TYPE vrm_values,
w_line LIKE LINE OF t_carrid.

INITIALIZATION.

SELECT carrid carrname FROM scarr INTO (w_line-key, w_line-text).
APPEND w_line TO t_carrid.
ENDSELECT.

AT SELECTION-SCREEN OUTPUT.

CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_CARRID'
values = t_carrid.

END-OF-SELECTION.

WRITE: / 'Selected Carrid value:', p_carrid.

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image