‎2006 Mar 17 3:49 PM
Hi, I have a parameter field in the selection-screen which takes the values as 'DAILY",'WEEKLY','MONTHLY' and 'QUATERLY'. I want to show all these values as drill down for that field.Please let me know how to achieve this? Thanks....
‎2006 Mar 17 3:56 PM
Can you explain a little better? Do you mean a listbox?
report zrich_0005 .
type-pools: vrm.
parameters: p_val(20) type c as listbox visible length 20.
at selection-screen output.
perform build_user_drop_down_list.
start-of-selection.
write:/ p_val.
************************************************************************
* build user_drop_down_list
************************************************************************
form build_user_drop_down_list.
data: name type vrm_id,
list type vrm_values,
value like line of list.
clear list. refresh list.
name = 'P_VAL'.
clear value.
value-key = 'D'.
value-text = 'Daily'.
append value to list.
clear value.
value-key = 'W'.
value-text = 'Weekly'.
append value to list.
clear value.
value-key = 'M'.
value-text = 'Monthly'.
append value to list.
clear value.
value-key = 'Q'.
value-text = 'Quarterly'.
append value to list.
* Set the values
call function 'VRM_SET_VALUES'
exporting
id = name
values = list.
endform.
Regards,
Rich Heilman
‎2006 Mar 17 3:56 PM
Can you explain a little better? Do you mean a listbox?
report zrich_0005 .
type-pools: vrm.
parameters: p_val(20) type c as listbox visible length 20.
at selection-screen output.
perform build_user_drop_down_list.
start-of-selection.
write:/ p_val.
************************************************************************
* build user_drop_down_list
************************************************************************
form build_user_drop_down_list.
data: name type vrm_id,
list type vrm_values,
value like line of list.
clear list. refresh list.
name = 'P_VAL'.
clear value.
value-key = 'D'.
value-text = 'Daily'.
append value to list.
clear value.
value-key = 'W'.
value-text = 'Weekly'.
append value to list.
clear value.
value-key = 'M'.
value-text = 'Monthly'.
append value to list.
clear value.
value-key = 'Q'.
value-text = 'Quarterly'.
append value to list.
* Set the values
call function 'VRM_SET_VALUES'
exporting
id = name
values = list.
endform.
Regards,
Rich Heilman
‎2006 Mar 17 3:59 PM
Hi,
the simplest method I know is to create a data type refered to a domain.
In the definition of the domain you have a tab with the possible value.
You create the 4 values in the domain with description.
and in your report you could use the parameters (or the select-options) as :
parameters : p_toto type z_toto.
where z_toto is the data element you have created, point to the domain (for ex) z_toto (with the list of possible vlaue).
Rgd
Frédéric
‎2006 Mar 17 4:04 PM
Hey Rich, thanks a lot. I think that has solved my problem.
Thanks...