‎2008 Nov 20 10:02 AM
Hi experts,
THis is first time I am working on Dropdown boxes.
My Selection Screen has to contain 2 character dropdown box.
For example, Department
01 Finance
02 Sales
03 Production
05 Human Resource
Please suggest How Can i Achieve this?
Regards,
Helpful answers are surely rewarded
‎2008 Nov 20 10:07 AM
Hi Priyanka.
Try This,
PARAMETERS: matnr TYPE mara-matnr AS LISTBOX VISIBLE LENGTH 20.
Regards
Rasheed
‎2008 Nov 20 10:04 AM
use vrm_set_values fm
REPORT ZSRK_073 .
TYPE-POOLS : VRM.
PARAMETER : P_DEP(2) AS LISTBOX VISIBLE LENGTH 20.
DATA: G_NAME TYPE VRM_ID,
G_LIST TYPE VRM_VALUES,
G_VALUE LIKE LINE OF G_LIST.
INITIALIZATION.
REFRESH G_LIST.
G_NAME = 'P_DEP'.
G_VALUE-KEY = '01'.
G_VALUE-TEXT = 'Finance'.
APPEND G_VALUE TO G_LIST.
G_VALUE-KEY = '02'.
G_VALUE-TEXT = 'Sales'.
APPEND G_VALUE TO G_LIST.
G_VALUE-KEY = '03'.
G_VALUE-TEXT = 'Production'.
APPEND G_VALUE TO G_LIST.
G_VALUE-KEY = '05'.
G_VALUE-TEXT = 'Human Resource'.
APPEND G_VALUE TO G_LIST.
IF NOT G_LIST IS INITIAL.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = G_NAME
VALUES = G_LIST.
ENDIF.
Edited by: sreekanth reddy on Nov 20, 2008 3:42 PM
‎2008 Nov 20 10:07 AM
Hi Priyanka.
Try This,
PARAMETERS: matnr TYPE mara-matnr AS LISTBOX VISIBLE LENGTH 20.
Regards
Rasheed
‎2008 Nov 20 10:08 AM
Hi Priyanka,
Use the following FM.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'A'
values = v
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
Thanks
Nitesh
‎2008 Nov 20 10:08 AM
Hi Priyanka,
After declaring the variables in Top include and corresponding fields on screan use function moduel VRM_SET_VALUES.
pass required import and export parameters.
hope this will serve your purpose.
Regards
Ramchander Rao.K
‎2008 Nov 20 10:09 AM
Hi Priyanka,
After declaring the variables in Top include and corresponding fields on screan use function moduel VRM_SET_VALUES.
pass required import and export parameters.
hope this will serve your purpose.
Regards
Ramchander Rao.K
‎2008 Nov 20 10:09 AM
Try this logic
PROGRAM zcmtest01.
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.
‎2008 Nov 20 10:09 AM
AT SELECTION-SCREEN ON VALUE-REQUEST FOR zpdx_tab.
w_vrm_id = 'Field Name'
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = w_vrm_id
values = t_vrm_values " values table
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'No value found for request'(001).
ENDIF.
‎2008 Nov 20 10:16 AM
‎2008 Nov 20 10:23 AM
hi,
Just copy paste this code and check whether ur requirement its fulfilling
Parameters : P_Area type char20.
DATA : int_list TYPE vrm_values.
DATA : int_values LIKE LINE OF int_list.
To fill the list to be passed to the FM
wf_vrm_id = 'P_AREA.
int_values-key = u201801u2019.
int_values-text = u2018Financeu2019.
append int_values to int_list.
clear int_values.
int_values-key = u201802u2019.
int_values-text = u2018Sales.
append int_values to int_list.
clear int_values.
int_values-key = u201803u2019.
int_values-text = u2018Production.
append int_values to int_list.
clear int_values.
int_values-key = u201804u2019.
int_values-text = u2018Human Resource.
append int_values to int_list.
clear int_values.
FM to populate the drop down box.
call function 'VRM_SET_VALUES'
exporting
id = wf_vrm_id
values = int_list.
get back if u face any problem
thanks .....
‎2008 Nov 20 1:40 PM