‎2007 Jul 05 3:52 PM
‎2007 Jul 05 4:11 PM
Hi,
Try with this:
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
‎2007 Jul 05 4:06 PM
Hi,
Your requirement is to display the values in listbox instead of f4 help?.if that is the requirement you can change the field attribute in screen painter to listbox.hop this will solve your issue.
reward points if helpful.
‎2007 Jul 05 4:11 PM
Hi,
Try with this:
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
‎2007 Jul 05 4:53 PM
Hi Suresh,
in initialization of the program you can do this.
use the function module where the 'P_REAS' is the paramter name and the i_paramname contains the values.
*Use function module to get a drop down
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_REAS'
values = i_paramname.
Award points if found useful
Regards,
Divakar Goud
‎2007 Jul 05 5:02 PM
Hi Suresh,
<b><u>For your kind reference, please refer the below example:</u></b>
<b>report zlistbox.
type-pools: vrm.
data: it_val type vrm_values,
w_line like line of it_val.
parameters p_bukrs like t001-bukrs as listbox
visible length 25 obligatory.
initialization.
select bukrs butxt from t001 into (w_line-key, w_line-text).
append w_line to it_val.
check p_bukrs is initial.
p_bukrs = w_line-key.
endselect.
at selection-screen output.
call function 'VRM_SET_VALUES'
exporting
id = 'P_BUKRS'
values = it_val.
end-of-selection.
write: / 'Company Code:', p_bukrs.</b>
<b><u>You can check the following links for your kind reference:</u></b>
http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbabe435c111d1829f0000e829fbfe/content.htm
There was also a discussion on this topic sometime back in this forum, which you might find interesting -
<i><b>Reward points for all useful answers....
Cheers !
Moqeeth.</b></i>