‎2009 Sep 17 8:10 AM
HI,
in the selection screen, one of the filed BUKRS should have a drop down on the selection screen to get one record.shouldn't there
be more records.
please let me know drop down means should be declared as PARAMETER or anything else.
thanks in advance
‎2009 Sep 17 8:13 AM
Hi
type-pools: vrm.
data: it_val type vrm_values,
w_line like line of it_val.
parameters p_stat as listbox
visible length 1 obligatory.
initialization.
w_line-key = '1'.
w_line-text = 'A'.
append w_line to it_val.
w_line-key = '2'.
w_line-text = 'B'.
append w_line to it_val.
at selection-screen output.
call function 'VRM_SET_VALUES'
exporting
id = 'P_STAT'
values = it_val.
end-of-selection.
write: / p_stat.
Regards,
Sreeram
‎2009 Sep 17 8:17 AM
Hi,
Yes you have to use parameter to declare listbox.
Refer this link,
https://wiki.sdn.sap.com/wiki/display/Snippets/Drop-downListBoxintheSelectionScreenforWindowsNT,R3Release4.7
Regards,
Vijay
‎2009 Sep 17 8:18 AM
Give as Parameters;
PARAMETERS p_bukrs TYPE BUKRS AS LISTBOX VISIBLE LENGTH 4.See F1 help for parameters for more details.
Regards
Karthik D
‎2009 Sep 17 8:19 AM
Hi,
first creat data element with domain.
In domain in value ranges tab in fixed value memention ur compani code.
and finaly declare
‎2009 Sep 17 8:20 AM
Hi sree,
[Please follow this link, thank you.|http://forums.sdn.sap.com/search.jspa?objID=f50&q=dropdowninselectionscreen]
Kind regards,
Clemens
‎2009 Sep 17 8:27 AM
Hi Sree,
Try this way.
Thanks
Venkat.O
REPORT ztest_notepad.
"You need to use PARAMETERS to declare dropdown box like below.
PARAMETERS list AS LISTBOX VISIBLE LENGTH 20.
"SELECTION-SCREEN PBO.
AT SELECTION-SCREEN OUTPUT.
TYPE-POOLS vrm.
DATA: g_name TYPE vrm_id,
it_list TYPE vrm_values,
wa_list LIKE LINE OF it_list.
g_name = 'LIST'.
wa_list-key = '1'.
wa_list-text = '1 is selected'.
APPEND wa_list TO it_list.
CLEAR wa_list.
wa_list-key = '2'.
wa_list-text = '2 is selected'.
APPEND wa_list TO it_list.
CLEAR wa_list.
wa_list-key = '3'.
wa_list-text = '3 is selected'.
APPEND wa_list TO it_list.
CLEAR wa_list.
wa_list-key = '4'.
wa_list-text = '4 is selected'.
APPEND wa_list TO it_list.
CLEAR wa_list.
"We can default value to the drop-down field list
list = '1'.
"VRM_SET_VALUES passes the values to the dropdown box
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = g_name
values = it_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.