07-29-2008 6:42 AM
Hi,
I want to display help for directory list in presentation server.
User can select the directory where they want to store data.
If they entered a directory then how to check existence of that directory in presentation server.
1) FM to diaplay and select list of directories in presentation server
2) How to check given directory exist in presentation server or not.
Thanks,
Balamurugan.R
07-29-2008 6:43 AM
Hi
Use Function module F4_FILENAME.
or
F4_DXFILENAME_TOPRECURSION
Regards
pavan
07-29-2008 6:44 AM
Hi Bala,
Use the function module F4_FILENAME.
CALL FUNCTION 'F4_FILENAME'
* EXPORTING
* PROGRAM_NAME = SYST-CPROG
* DYNPRO_NUMBER = SYST-DYNNR
* FIELD_NAME = ' '
IMPORTING
file_name = file_path.
Declare file_path of TYPE ibipparms-path.
Check this link for sample code.
http://www.sap-img.com/abap/using-function-modules-f4-filename.htm
Hope this helps you.
regards,
Chandra Sekhar
07-29-2008 6:45 AM
07-29-2008 6:47 AM
Hi,
CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
Goto SE24 & type CL_GUI_FRONTEND_SERVICES
Click Display
Goto METHODS tab
call method cl_gui_frontend_services=>directory_exist for Directory exists or not.
Regards,
Omkaram.
07-29-2008 6:48 AM
using the class
CL_GUI_FRONTEND_SERVICES
1) FM to diaplay and select list of directories in presentation server
2) How to check given directory exist in presentation server or not.
methods : DIRECTORY_EXIST "for checking the Directory existance
DIRECTORY_LIST_FILES " for getting the list of files in the Directory.
07-29-2008 6:48 AM
hi,
Use the FM F4_FILENAME
PARAMETER: p_file TYPE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = ''
IMPORTING
file_name = p_file.
Regards,
Srilatha
07-29-2008 6:48 AM
hi,
Use the FM F4_FILENAME
PARAMETER: p_file TYPE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = ''
IMPORTING
file_name = p_file.
Regards,
Srilatha
07-29-2008 6:49 AM
Hello,
Check these FM
PLF_CHECK_DIRECTORY
this FM checks whether the directory exists or not.
TMP_GUI_DIRECTORY_LIST_FILES
this FM gives the list of files in the directory
Check out these other FM if interested..
TRINT_FI_GET_DIRECTORY_NAMES
TMP_GUI_CREATE_DIRECTORY
TMP_GUI_READ_DIRECTORY
TMP_GUI_REMOVE_DIRECTORY
Regards
Indu.
07-29-2008 10:39 AM
Hi Indu,
My task is , I want to give a help to select directory from the presentation server. (ie F4 help)
Secondely , if they entered the directory name , I have to check it is existing or not.
F4_filename will take care for files, but my part is directory
Thanks,
Balamurugan
07-31-2008 2:08 PM
Hello Balamurugan,
in the AT SELECTION-SCREEN FOR VALUE REQUEST <p_file>
call the FM, F4_FILENAME.
If you enter the name directly, to check whether it is valid or not, use the FM, PLF_CHECK_DIRECTORY in the validation of the field.
i.e.,
first call F4_FILENAME, then call PLF_CHECK_DIRECTORY in the same event.
AT SELECTION-SCREEN FOR VALUE REQUEST ON <p_file>
CALL F4_FILENAME
...........
...........
CALL PLF_CHECK_DIRECTORY
.........
........
IF sy-subrc ne 0.
message 'file doesnt exist' type 'E'.
endif.
Hope this helps you.
Regards
Indu.
07-29-2008 6:51 AM
for sample code..
check here..
https://forums.sdn.sap.com/click.jspa?searchID=14584913&messageID=5881162
07-31-2008 2:12 PM