Application Development 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: 

popup asking for filename

Former Member
0 Kudos

Hi,

Is there any FM for popup screen asking for filename.

Thanks

Vikranth Khimavath

7 REPLIES 7

suresh_datti
Active Contributor
0 Kudos

FILE_NAME_GET

~Suresh

Former Member
0 Kudos

Hi ,

Can use transaction <b>CG3Y or CG3Z</b> if you intend to upload or download data files.

Reward points if this helps.

Manish

Former Member
0 Kudos

Try FM 'F4_FILENAME'.

Former Member
0 Kudos

Khimavath,

Try 'C13Z_FRONTEND_FILENAME_GET’ FM.

-Anu

Former Member
0 Kudos

Hi,

Check

  CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    EXPORTING
       DEFAULT_FILENAME        = W_WSU_FILENAME01
    CHANGING
       FILE_TABLE              = ITAB_FILE1_TABLE
       RC                      = RC_FILE
     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,

Santosh

Former Member
0 Kudos

hi,

Depends on what you want to do.

If you want to give a popup in your program execution

Use Popup_get_values and in parameters give Filename.. this will popup a filename which you can feed in.. there are lots of popup function modules just say popupvalues* in se37

If you just want to upload or download use cg3y

and ofcourse there are function modules (which are not popups like filename_get etc).

Just check which option suits you

Regards,

Prince

Former Member
0 Kudos

Hi

you can use the FM

F4_DXFILENAME_TOPRECURSION

for files on the applicationserver or frontend depending on the parameter

I_LOCATION_FLAG

:


...
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

  DATA: ls_filelist TYPE rsfillst,
        lt_filelist LIKE TABLE OF ls_filelist,
        lv_path_in  TYPE dxfields-longpath,
        lv_path_out TYPE dxfields-longpath.

  
  CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
    EXPORTING
      i_location_flag       = 'A'
      i_server              = ' '
      i_path                = lv_path_in
      filemask              = '*.*'
      fileoperation         = 'R'
    IMPORTING
*   O_LOCATION_FLAG       =
*   O_SERVER              =
      o_path                = lv_path_out
*   ABEND_FLAG            =
    EXCEPTIONS
      rfc_error             = 1
      error_with_gui        = 2
      OTHERS                = 3.
…

Regards,

Stefan