When you hit F8 , the p_par will have the key fields value of selected list item.
*** Type Pool
type-pools : vrm.
.
.
*** Her's the definition of listbox parameter
parameters : p_par type mara-mtart as listbox visible length 15.
.
.
*** Event Block
at selection-screen output.
perform at_sel_output.
.
.
.
*&---------------------------------------------------------------------*
*& Form at_sel_output
*&---------------------------------------------------------------------*
form at_sel_output.
data : lt_list type vrm_values with header line .
lt_list-key = 'K1'.
lt_list-text = ' First One'.
append lt_list.
lt_list-key = 'K2'.
lt_list-text = ' Second One'.
append lt_list.
lt_list-key = 'K3'.
lt_list-text = ' Third One'.
append lt_list.
call function 'VRM_SET_VALUES'
exporting
id = 'P_PAR'
values = lt_list[]
exceptions
id_illegal_name = 1
others = 2.
endform. "at_sel_output
Tuesday, November 24, 2009
Set Listbox Values At Selection Screen
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment