‎2006 Oct 28 2:54 PM
Hi,
Is there any function module to give a popup to enter the local file path.
User should be able to either enter the path directly in the popup or select it by F4 help. Both must be possible.
Entered filepath must be verified before returning it.
Any pointers on it will be a great help.
Thanks and regards,
Karthik
‎2006 Oct 28 2:55 PM
‎2006 Oct 28 2:57 PM
‎2006 Oct 28 6:45 PM
Hi Karthikeyan,
Apart from GUI_UPLOAD and GUI_DOWNLOAD, which are better if you are uploading or downloading files, you can also use the following methods of class CL_GUI_FRONTEND_SERVICES.
CHECK_GUI_SUPPORT (checks GUI features)
DIRECTORY_EXIST (checks if a directory exists in the client)
FILE_EXIST (checks if a file exists)
FILE_OPEN_DIALOG (Displays a File Open Dialog)
FILE_SAVE_DIALOG (Shows a File Save Dialog )
Hope this helps : -)
Sameer
‎2006 Oct 28 8:01 PM
Hi Karthik,
Check out following code.
DATA: IT_FILES TYPE FILETABLE,
WA_FILES LIKE LINE OF IT_FILES,
LV_RC TYPE I.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PCPATH.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG.
EXPORTING
WINDOW_TITLE = 'Select Files'
DEFAULT_EXTENSION = '*.txt'
DEFAULT_FILENAME =
FILE_FILTER =
WITH_ENCODING =
INITIAL_DIRECTORY =
MULTISELECTION = 'X'
CHANGING
FILE_TABLE = IT_FILES
RC = LV_RC
<i> IT_FILES will contain list of files selected or
name of file selected if
MULTISELECTION = ' '</i>
Hope this helps you.
Enjoy SAP.
Pankaj Singh