‎2009 Feb 26 3:33 PM
Hi,
is there any way to check the existence of the file at the specified location.
Thanks,
Sreeram.
‎2009 Feb 26 3:35 PM
Hi Sreeram,
Check with TMP_GUI_GET_FILE_EXIST.
Hope this solves your problem.
Regards,
SB.
‎2009 Feb 26 3:35 PM
Hi Sreeram,
Check with TMP_GUI_GET_FILE_EXIST.
Hope this solves your problem.
Regards,
SB.
‎2009 Feb 26 3:43 PM
CL_GUI_FRONTEND_SERVICES=>FILE_EXISTExample:
data:RCbool type ABAP_BOOL.
WRITE: / 'TEST METHOD FILE_EXIST'.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_EXIST
EXPORTING
FILE = 'c:\temp\test_frontend_services.txt'
RECEIVING
RESULT = rcbool
* EXCEPTIONS
* CNTL_ERROR = 1
* ERROR_NO_GUI = 2
* WRONG_PARAMETER = 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.
WRITE: / RCbool.
‎2009 Feb 26 6:17 PM
Hi,
You can check existence of a file in one of the 2 ways mentioned below:
1. Using function module 'DX_FILE_EXISTENCE_CHECK'.
2. Using Class Static Method 'CL_GUI_FRONTEND_SERVICES=>FILE_EXIST'
Do search on them and you will get all the details necessary.
Regards.