‎2008 Aug 04 1:02 PM
Hi Friends,
I have created a ztable and in the report selection screen, for some of the fields of this table, I want to create a drop down list box.
Kindly guide me create this.
TIA.
Regards,
Mark K
‎2008 Aug 04 1:04 PM
Hi,
For Declaring List box Write-
PARAMETERS: name(n) AS LISTBOX VISIBLE LENGTH n.
For populating Listbox check this link-
http://sap.niraj.tripod.com/id38.html
Regards,
Sujit
‎2008 Aug 04 1:04 PM
Hi,
For Declaring List box Write-
PARAMETERS: name(n) AS LISTBOX VISIBLE LENGTH n.
For populating Listbox check this link-
http://sap.niraj.tripod.com/id38.html
Regards,
Sujit
‎2008 Aug 04 1:10 PM
Mark,
ZTEST.
TYPE-POOLS vrm.
**"Table declarations...................................................
*TABLES sscrfields.
*"Table declarations...................................................
PARAMETERS:
p_connid(11) AS LISTBOX
VISIBLE LENGTH 20 default 'FOREX-ANANTH'.
p_value TYPE i MODIF ID QWR.
*" Data declarations...................................................
"--------------------------------------------------------------------
Work variables *
"--------------------------------------------------------------------
DATA:
w_char(20) TYPE c,
w_flag TYPE i.
"--------------------------------------------------------------------
INITIALIZATION. EVENT *
"--------------------------------------------------------------------
INITIALIZATION.
"--------------------------------------------------------------------
Internal table to hold delivery header data *
"--------------------------------------------------------------------
DATA:
t_table TYPE
STANDARD TABLE
OF vrm_value,
vrm_values1 LIKE LINE OF t_table.
vrm_values1-key = 'a'.
vrm_values1-text = 'sap'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = '2'.
vrm_values1-text = 'testing'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = '2'.
vrm_values1-text = 'java'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = '4'.
vrm_values1-text = '.net'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = '5'.
vrm_values1-text = 'vc++'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'che'.
vrm_values1-text = 'chetta-ram'.
APPEND vrm_values1 TO t_table.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'p_connid'
values = t_table
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
‎2008 Aug 04 1:10 PM
hi, chk this code
PARAMETERS:
listbox(1) AS LISTBOX VISIBLE LENGTH 10 DEFAULT 'N'.
AT SELECTION-SCREEN OUTPUT.
DATA:
name TYPE vrm_id,
list TYPE vrm_values,
value TYPE vrm_value.
name = 'LISTBOX'. " Name should be in UPPER CASE
value-key = '1'.
value-text = 'Text 1'.
APPEND value TO list.
value-key = '2'.
value-text = 'Text 2'.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list
EXCEPTIONS
id_illegal_name = 0
OTHERS = 0.
‎2008 Aug 04 1:12 PM
Hi Mark,
[drop down list box|http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabe435c111d1829f0000e829fbfe/content.htm]
Regards,
Sravanthi
‎2008 Aug 05 5:21 AM
Hi mark,
u can try like this....
PARAMETERS: name type ztable-field AS LISTBOX VISIBLE LENGTH n.
and you can set fixed values at the domain level.(for ztable-field)
ie:double-click on domain->go to value ranges->Enter fix values and short text