‎2014 Oct 29 7:29 AM
Hi guys,
Can I use select optionswithout a database field?
See, my requirement is that the user should enter minimum and maximum value of numeric type.I don't want to declare two parameters for this. Can I use the select options. if yes, how?
Select-options p_num for n.
after for, the type we are mentioning must refer some field from database table only or can it be a normal datatype like c,n etc?
Thanks a lot!!
‎2014 Oct 29 7:53 AM
Hi,
Yes, We can use a select options without db table.
DATA: n(5) TYPE n.
SELECT-OPTIONS: s_num FOR n.
instead of n you can use any type( c, p, x etc).
‎2014 Oct 29 7:36 AM
Hi Rose,
pls thry below logic
data: num type n.
Select-options p_num for num .
Thanks & Regards,
Polu
‎2014 Oct 29 7:53 AM
Hi,
Yes, We can use a select options without db table.
DATA: n(5) TYPE n.
SELECT-OPTIONS: s_num FOR n.
instead of n you can use any type( c, p, x etc).
‎2014 Oct 29 8:05 AM
Hi Rose,
Select-options always refers to an exiting dobj so you can use the following methods.
report test.
data lv_var TYPE n.
data ls_struct TYPE vbak.
data lv_vkorg TYPE vbak-vkorg.
SELECT-OPTIONS:
s_var for lv_var,
s_vbeln for ls_struct-vbeln,
s_vkorg for lv_vkorg.
Thanks
‎2014 Oct 29 8:19 AM
Read SELECT-OPTIONS documentation for FOR option : you have to use either an existing data object (e.g. any field defined in a DATA statement) or a ddic type reference. So if you define a field (before the statement) you are not required to use ddic reference.
Regards,
Raymond