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

Former Member
0 Likes
903

Hi ,

What is the function module to get the file name through F4 help at selection screen in BI ECC 7.0 version.

Sandeep

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
806

F4_FILENAME - This displays selection of files on local PC

F4_FILENAME_SERVER - This displays selection of files on server

10 REPLIES 10
Read only

Former Member
0 Likes
806

For F4 help you can go for F4IF_INT_TABLE_VALUE_REQUEST. But no idea whether this is present in 7.0. Please just check..

Read only

Former Member
0 Likes
806

try this...


F4_FILENAME

Read only

Former Member
0 Likes
806

hi,


AT SELECTION-SCREEN  ON VALUE-REQUEST FOR p_file.

  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name = sy-repid
      field_name   = ' '
    IMPORTING
      file_name    = p_file.

Regards,

Mansi.I

Read only

Former Member
0 Likes
806

Use the method CALL METHOD cl_gui_frontend_services=>file_open_dialog

IN AT SELECTION-SCREEN ON VALUE-REQUEST FOR <FIELD>.

DATA:
   BEGIN OF fs_filename.
        INCLUDE STRUCTURE file_table.
DATA:
   END OF fs_filename.

DATA:
   t_srcfile LIKE TABLE OF fs_filename,
   return    TYPE i.

DATA:
  t_srfile(128)  TYPE c,
  t_detfile(128) TYPE c.

CALL METHOD cl_gui_frontend_services=>file_open_dialog
  CHANGING
    file_table              = t_srcfile
    rc                      = return
  EXCEPTIONS
    file_open_dialog_failed = 1
    cntl_error              = 2
    error_no_gui            = 3
    not_supported_by_gui    = 4
    OTHERS                  = 5.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

Regards,

Gurpreet

Read only

0 Likes
806

Thanks.

I am facing one problem that the selection screen filed is not compatible of the file_table.

So not able to assign the selection field to the file_table.

can u suggest

Read only

0 Likes
806
PARAMETERS:
 p_file(128). " LIKE rlgrap-filename.
DATA:w_file TYPE string ,
w_file1 TYPE string,
w_file_tab TYPE filetable,
w1 LIKE LINE OF w_file_tab,
w_rc TYPE i.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

  CALL METHOD cl_gui_frontend_services=>file_open_dialog
    CHANGING
      file_table              = w_file_tab
      rc                      = w_rc
*    USER_ACTION             =
    EXCEPTIONS
      file_open_dialog_failed = 1
      cntl_error              = 2
      error_no_gui            = 3
      not_supported_by_gui    = 4
      OTHERS                  = 5
          .
  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 TABLE w_file_tab INTO w1 INDEX 1.
  IF sy-subrc = 0.
    p_file = w1-filename.
  ENDIF.

These codes works.

Regards,

Gurpreet

Read only

0 Likes
806

pass the file name field type as STRING to the method.

PARAMETERS: p_file TYPE rglaf-filename. "selection-screen file name

data : lv_filename TYPE string.

lv_filename = p_file.

now u pass lv_filename to the method CL_GUI_FRONTEND_SERVICES-->FILE_OPEN_DIALOG.

Hope it helps!!

Regards,

Pavan

Read only

Former Member
0 Likes
806

Hi Sandeep,

You can use thias Fm

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

field_name = pi_field_name

IMPORTING

file_name = lv_file_name.

regards,

Lokesh

Read only

Former Member
0 Likes
807

F4_FILENAME - This displays selection of files on local PC

F4_FILENAME_SERVER - This displays selection of files on server

Read only

0 Likes
806

hi

CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

EXPORTING

STATIC = 'X'

CHANGING

FILE_NAME = PFNAME1.

~linganna