04-03-2008 2:03 PM
Hi,
I'm using an input help with mulitple selection using the function module 'F4IF_INT_TABLE_VALUE_REQUEST'.
My requirement is, if no selection is made, then all the entries must be selected.
Please, let me know how can this be achieved.
Thanks & Regards,
Lohit
04-03-2008 2:09 PM
F4IF_INT_TABLE_VALUE_REQUEST
F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.
Example:
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
o_begru-low = t_return-fieldval.
if o_begru-low = 'PAR*'.
o_begru-option = 'CP'.
else.
o_begru-option = 'EQ'.
endif.
o_begru-sign = 'I'.
append o_begru to s_begru.
else.
o_begru = i_begru.
endif.
04-03-2008 2:09 PM
F4IF_INT_TABLE_VALUE_REQUEST
F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.
Example:
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
o_begru-low = t_return-fieldval.
if o_begru-low = 'PAR*'.
o_begru-option = 'CP'.
else.
o_begru-option = 'EQ'.
endif.
o_begru-sign = 'I'.
append o_begru to s_begru.
else.
o_begru = i_begru.
endif.
04-03-2008 2:10 PM
Hi,
U can use like:
If tabname = ' * '.
< call your function here>
Then it will display all the entries.
04-03-2008 2:13 PM
F4IF_INT_TABLE_VALUE_REQUEST'
. will return the selected values. if you don't find any value selected then you leave blank in case of select-option. it will fetch every thing.
If it is parameter then you have to use '*'.