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

search help

Former Member
0 Likes
417

Hi,

How to create the Search help "F4" functionality for RLGRAP-FILENAME field.

When I am trying to create using SE11---> Searchelp option I am getting error RLGRAP is not database table it's structure.

So can you please let me know how to create search help for FILENAME or any other was

Hi,

How to create the Search help "F4" functionality for RLGRAP-FILENAME field.

When I am trying to create using SE11---> Searchelp option I am getting error RLGRAP is not database table it's structure.

So can you please let me know how to create search help for FILENAME or any other was

3 REPLIES 3
Read only

former_member229729
Active Participant
0 Likes
390

Hi,

Here is a sample code:

*----------------------------------------------------------------------*
*      INITIAL   SCREEN DISPLAY
*----------------------------------------------------------------------*
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETER: p_fname    TYPE rlgrap-filename.
SELECTION-SCREEN: END OF BLOCK b1.
*----------------------------------------------------------------------*
*      SELECTION-SCREEN for specific Field EVENT
*----------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
* Function module to Select Files by pressing <F4> on the field P_FNAME
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name  = syst-cprog
      dynpro_number = syst-dynnr
      field_name    = ' '
    IMPORTING
      file_name     = p_fname.

Rgds,

Ramani N

Read only

Former Member
0 Likes
390

HI,

You cannot create the search help for the RLGRAP-FILENAME field. you need to have F4 help programatically


p_file is of type  RLGRAP-FILENAME 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  PERFORM get_filename_on_f4 USING p_file.

FORM get_filename_on_f4 USING p_fullpath TYPE rlgrap-filename.

  DATA:
     l_fullpath TYPE string,
     l_filename TYPE string,
     l_path TYPE string.

  CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
      window_title         = 'Save As'                      "#EC NOTEXT
      default_extension    = 'XLS'
      default_file_name    = g_filename
    CHANGING
      filename             = l_filename
      path                 = l_path
      fullpath             = l_fullpath
    EXCEPTIONS
      cntl_error           = 1
      error_no_gui         = 2
      not_supported_by_gui = 3
      OTHERS               = 4.
  IF sy-subrc EQ 0.
    p_fullpath = l_fullpath.
  ENDIF.

ENDFORM.                    " get_filename_on_f4

Read only

Former Member
0 Likes
390

The issue has been solved