Application Development and Automation 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: 
Read only

Function Module Attributes

0 Likes
700

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
509

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.
 

3 REPLIES 3
Read only

Former Member
0 Likes
510

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.
 

Read only

Former Member
0 Likes
509

Hi,

U can use like:

If tabname = ' * '.

< call your function here>

Then it will display all the entries.

Read only

Former Member
0 Likes
509
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 '*'.