11-15-2006 9:41 AM
just as we design a selection screen in module pool, i want f4 help for one field say customer type based on another field value say branch type in TABLE CONTROL.
How can we do this?
Any clues?
regds
kiran
11-15-2006 12:38 PM
Hi,
You can make use of the field <tablecontrol>-currentline but it will create a problem when you press page down .So you need to use a small logic.
Process on value request.
index = tc1-topline - tc1-currentline + 1.
read internal table at index.
select from table for value selected and populate in an internal table..
then there is a function module "F4IF_INT_TABLE_VALUE_REQUEST" where we can pass the internal table and return values will be populated in the table control.
11-15-2006 12:44 PM
11-15-2006 1:10 PM
hi
good
try this
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.
thanks
mrutyun^