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 code for F4 Help

Former Member
0 Likes
1,324

Hi All,

I have a requirement where I should insert a F$ functionality to a screen field.

Already used serach help and F4IF_INT_TABLE_VALUE_REQUEST.

But when Im testing the functionality, an error "Function code cannot be selected" is being displayed.

Please help. Thanks!

3 REPLIES 3
Read only

Former Member
0 Likes
940

Hi Mark,

this is an example for customized f4 help for personal number..

collect the no of fields which you want to show for input f4 help in a table according to the requirement.

and pass this as value table in
"F4IF_INT_TABLE_VALUE_REQUEST" FM  hope this helps you.

**** F4 Help for Personal Number with last and first name.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_pernr-low.

  CLEAR : itsel_01,it_sel.

   SELECT NACHN

          VORNA

          pernr

          FROM pa0002

          INTO TABLE itsel_01

          WHERE ( begda <= p_date  AND endda >= p_date )  .

   IF sy-subrc = 0.

     SORT itsel_01 by NACHN.

      DELETE ADJACENT DUPLICATES FROM itsel_01 COMPARING ALL FIELDS.

      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

        EXPORTING

          retfield        = 'Personal Number'

          dynpprog        = sy-repid

          dynpnr          = sy-dynnr

          dynprofield     = 'S_PERNR'

          window_title    = 'Personal Number'

*         value           = lv_val

          value_org       = 'S'

        TABLES

          value_tab       = itsel_01

          return_tab      = it_sel

        EXCEPTIONS

          parameter_error = 1

          no_values_found = 2

          OTHERS          = 3.

      IF sy-subrc <> 0.

        MESSAGE 'Error In F4 Help For Personal Number' TYPE 'W'.

      ENDIF.

    ENDIF.

Regards,

Nitin

Read only

0 Likes
940

Hi Nitin,

Will try this one. Thanks.

But the error is showing when I click the botton for selection. and it cannot be debugged.

Regards,

Mark

Read only

Former Member
0 Likes
940

Hi Mark,

Try along this line:

     data it_scarr type standard of scarr.

  SELECT   Carrid carrname

                  FROM scarr

                  INTO CORRESPONDING FIELDS OF TABLE it_scarr.


  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

      retfield        = 'carrid'

      value_org       = 'S'

    TABLES

      value_tab       = it_scarr

    EXCEPTIONS

      parameter_error = 1

      no_values_found = 2

      OTHERS          = 3.

  IF sy-subrc <> 0.

    (MESSAGE  'Choose from dropdown list ').

  ENDIF.