cancel
Showing results for 
Search instead for 
Did you mean: 

Need function module

Former Member
0 Kudos

Hi All,

I am looking for a function module in which we can pass the internal table value. More Important that this function module should have the Readio button or any indicator. I have the function module F4IF_INT_TABLE_VALUE_REQUEST which have the check box.

Requirment is when this function module display the content of internal table, User can choose the only one record from function module and the selected row will be checked radio button. But in function module F4IF_INT_TABLE_VALUE_REQUEST user can select more that one. So i need radio button

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Check this thread

  • { START

DATA: retval LIKE ddshretval OCCURS 1 WITH HEADER LINE,

BEGIN OF search_help_tab OCCURS 10,

field_1(10),

field_2(10),

END OF search_help_tab.

PERFORM create_search_help_tab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'FIELD'

value_org = 'S'

window_title = text-001 " Dialog window

header text

TABLES

value_tab = search_help_tab " Pre-filled

with your data and the

return_tab = retval. "

fields/columns of your choice

READ TABLE retval INDEX 1.

my_selection_variable = retval-fieldval.

  • } END

Thanks & Regards,

Judith.

Message was edited by: Judith Jessie Selvi

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Here is the sample coding for the function module you mentioned.

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.

Former Member
0 Kudos

Hello Rakesh,

The function module has a parameter called MULTIPLE_CHOICE, which by default is SPACE. Make sure you are not passing anything to this parameter. That way, the user can only select one option.

Hope this helps,

Martin

Former Member
0 Kudos

Hi,

I know that if i will not pass anything to this parameter it will allow to select only one. But once after selection the record from function module , Again the user open this popup it should show that last time which recoed got selected.

Thanks

Rakesh

Former Member
0 Kudos

Hi Rakesh,

If you want to set a default for selection (which is what I think you mean), then I think you need to use the parameter MARK_TAB. It is a table, but just put in one value with the index of the value that is to be the default.

Cheers,

Martin