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

F4_FIELD_ON_VALUE_REQUEST Function Module

uygur_burak
Active Contributor
0 Likes
1,357

Hello,

In Z report's selection screen, I'm changing a parameter's search help for radio button selections.

I have a module which is name F4_VALUES in screen 1000.

The code is like below.


MODULE F4_VALUES INPUT.
  DATA:  CFNAME(30),
         TABNAME LIKE HELP_INFO-TABNAME,
         FIELDNAME LIKE HELP_INFO-FIELDNAME,
         H_DYNFIELD TYPE HELP_INFO-DYNPROFLD.
  CLEAR: TABNAME, FIELDNAME.
  DATA : LT_RETURN LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE.

  GET CURSOR FIELD CFNAME.
  SPLIT CFNAME AT '-' INTO TABNAME FIELDNAME.

  H_DYNFIELD = FIELDNAME.

  IF RBS EQ 'X'.
    CALL FUNCTION 'F4_FIELD_ON_VALUE_REQUEST'
      EXPORTING
        TABNAME           = TABNAME
        FIELDNAME         = FIELDNAME
        SEARCHHELP        = 'ZFI_SH_BANKL'
        DYNPPROG          = SY-REPID
        DYNPNR            = SY-DYNNR
        DYNPROFIELD       = H_DYNFIELD
      TABLES
        RETURN_TAB        = LT_RETURN
      EXCEPTIONS
        FIELD_NOT_FOUND   = 1
        NO_HELP_FOR_FIELD = 2
        INCONSISTENT_HELP = 3
        NO_VALUES_FOUND   = 4
        OTHERS            = 5.
    IF SY-SUBRC <> 0.
      MESSAGE I429(MO).
    ELSE.
      READ TABLE LT_RETURN INDEX 1.
      PBANKL = LT_RETURN-FIELDVAL.
    ENDIF.
  ELSEIF RBM EQ 'X'.
    CALL FUNCTION 'F4_FIELD_ON_VALUE_REQUEST'
      EXPORTING
        TABNAME           = TABNAME
        FIELDNAME         = FIELDNAME
        SEARCHHELP        = 'ZFI_SH_BANKL2'
        DYNPPROG          = SY-REPID
        DYNPNR            = SY-DYNNR
        DYNPROFIELD       = H_DYNFIELD
      TABLES
        RETURN_TAB        = LT_RETURN
      EXCEPTIONS
        FIELD_NOT_FOUND   = 1
        NO_HELP_FOR_FIELD = 2
        INCONSISTENT_HELP = 3
        NO_VALUES_FOUND   = 4
        OTHERS            = 5.
    IF SY-SUBRC <> 0.
      MESSAGE I429(MO).
    ELSE.
      READ TABLE LT_RETURN INDEX 1.
      PBANKL = LT_RETURN-FIELDVAL.
    ENDIF.
  ENDIF.

ENDMODULE.                 " F4_VALUES  INPUT

The question is,

Search help ZFI_SH_BANKL and ZFI_SH_BANKL2 are both having dialog type C in SE11.

But when I press F4 in selection-screen this search help behaving dailog type D. Values are listed directly. I'm running test those search helps with using SE11, there is no problem. I'm seeing the entry pop-up. But in this FM values are listed directly. How can I solve this issue?

Regards,

Burak

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
707

Hi,

Pass the parameter 'SELECTION_SCREEN = X' and check.

Himanshu

2 REPLIES 2
Read only

Former Member
0 Likes
708

Hi,

Pass the parameter 'SELECTION_SCREEN = X' and check.

Himanshu

Read only

0 Likes
707

Hello Himanshu,

I tried it before thread open. But It doesn't solved my problem. Any other ideas about this issue?

Regards,

Burak