‎2008 Nov 25 4:10 PM
Hi,
I am upgrading 4.6c version to ECC 6.0.Found fm 'GUI_REMOVE_DIRECTORY' as obsolete.Can you provide me a replacement for this Fm? The code is as below,
CALL FUNCTION 'GUI_REMOVE_DIRECTORY'
EXPORTING
DIRNAME = LF_PATH
EXCEPTIONS
FAILED = 1
OTHERS = 2.
<removed_by_moderator>
Thanks n Regards,
guru
Edited by: Julius Bussche on Nov 25, 2008 5:26 PM
‎2008 Nov 26 6:20 AM
Hi,
Please find the replacement as below,
DATA: l_lfpath type STRING,
RC type I.
l_lfpath = lf_path.
CALL METHOD cl_gui_frontend_services=>directory_delete
EXPORTING
directory = l_lfpath
changing
rc = rc
EXCEPTIONS
directory_delete_failed = 1
cntl_error = 2
error_no_gui = 3
path_not_found = 4
directory_access_denied = 5
unknown_error = 6
not_supported_by_gui = 7
wrong_parameter = 8
others = 9
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2008 Nov 25 4:12 PM
‎2008 Nov 25 4:15 PM
use DIRECTORY_DELETE method of class CL_GUI_FRONTEND_SERVICES
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_DELETE
EXPORTING
DIRECTORY =
CHANGING
RC =
* EXCEPTIONS
* DIRECTORY_DELETE_FAILED = 1
* CNTL_ERROR = 2
* ERROR_NO_GUI = 3
* PATH_NOT_FOUND = 4
* DIRECTORY_ACCESS_DENIED = 5
* UNKNOWN_ERROR = 6
* NOT_SUPPORTED_BY_GUI = 7
* WRONG_PARAMETER = 8
* OTHERS = 9
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2008 Nov 25 4:16 PM
hi these are available in the ecc6.0
GUI_REMOVE_DIRECTORY
use this as the replacement for this ...
\
TMP_GUI_REMOVE_DIRECTORY
‎2008 Nov 26 6:18 AM
Hi,
use CALL METHOD cl_gui_frontend_services=>directory_delete as replacement
declare a varible of type string and pass it to 'directory' in EXPORTING parameters.
‎2008 Nov 26 6:20 AM
Hi,
Please find the replacement as below,
DATA: l_lfpath type STRING,
RC type I.
l_lfpath = lf_path.
CALL METHOD cl_gui_frontend_services=>directory_delete
EXPORTING
directory = l_lfpath
changing
rc = rc
EXCEPTIONS
directory_delete_failed = 1
cntl_error = 2
error_no_gui = 3
path_not_found = 4
directory_access_denied = 5
unknown_error = 6
not_supported_by_gui = 7
wrong_parameter = 8
others = 9
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.