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 help on Selection screen parameter

Former Member
0 Likes
728

Hello all,

Can anyone guide me on the procedure to provide f4 help on a parameter in the selection screen.

My requirement is:

- parameter declared of type 'localfile' inside a selection-screen declared as a 'window'. & provide a f4 help to browse a local file.

Thanks a lot in advance.

Teja.gk.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
683

Hi

At Selection on value request for p_file

You can call this FM FILENAME_GET

Check this link also:

http://sapprograms.blogspot.com/2008/11/f4-for-files-on-presentation-or.html

Regards

Neha

Edited by: Neha Shukla on Nov 29, 2008 10:31 PM

6 REPLIES 6
Read only

Former Member
0 Likes
684

Hi

At Selection on value request for p_file

You can call this FM FILENAME_GET

Check this link also:

http://sapprograms.blogspot.com/2008/11/f4-for-files-on-presentation-or.html

Regards

Neha

Edited by: Neha Shukla on Nov 29, 2008 10:31 PM

Read only

Former Member
0 Likes
683

This link has solution for your problem:

You can try 'F4_FILENAME' .

Regards

Neha

Edited by: Neha Shukla on Nov 29, 2008 10:35 PM

Read only

Former Member
0 Likes
683

Hi krishna,

Try using this below class....cl_gui_frontend_services this wil surely help u..

I have attached a sample code..

TABLES: file_table.

DATA: lt_file_names TYPE FILETABLE,

lwa_file_name TYPE FILE_TABLE,

lv_subrc TYPE i.

SELECT-OPTIONS: so_file FOR file_table NO INTERVALS.

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

CALL METHOD cl_gui_frontend_services=>file_open_dialog

EXPORTING

INITIAL_DIRECTORY = 'C:Temp'

MULTISELECTION = 'X'

CHANGING

file_table = lt_file_names[]

rc = lv_subrc

EXCEPTIONS

FILE_OPEN_DIALOG_FAILED = 1

CNTL_ERROR = 2

ERROR_NO_GUI = 3

others = 4.

IF sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Thanks and Regards,

Sai

Read only

Former Member
0 Likes
683

Hi Krishna,

You need to pick file name from the explorer browser, for that you may use the function module 'F4_FILENAME'.

parameters p_fnam type localfile.

define the event at selection-screen

At selection-screen on value-request for p_fnam.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = sy-cprog

dynpro_number = sy-dynnr

  • FIELD_NAME = ' '

IMPORTING

file_name = p_fnam.

this will upload the filename into the variable p_fnam, which can be further used.

Hope this helps in resolving your issue.

Thanks & Regards,

Sachin Dargan

Read only

former_member206439
Contributor
0 Likes
683

Hi

use this FM

CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
 EXPORTING
*   PROGRAM_NAME        = SYST-REPID
*   DYNPRO_NUMBER       = SYST-DYNNR
*   FIELD_NAME          = ' '
   STATIC              = 'X'
*   MASK                = ' '
  CHANGING
   file_name           = file_nm
 EXCEPTIONS
   MASK_TOO_LONG       = 1
   OTHERS              = 2
          .
IF sy-subrc <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Read only

Former Member
0 Likes
683

Hi,


form F4_FILENAME .

     CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME  = SYST-CPROG
      DYNPRO_NUMBER = SYST-DYNNR
    IMPORTING
      FILE_NAME     = P_FNAME
    EXCEPTIONS
      OTHERS        = 1.

endform.                    " F4_FILENAME

Thanks & Regards,

Krishna..