Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

F4 help in table control based on another field value in TCL

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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.

former_member181962
Active Contributor
0 Kudos

Refer this thread:

Regards,

Ravi

Former Member
0 Kudos

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^