Application Development and Automation 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: 
Read only

fm replacement

Former Member
0 Likes
747

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
716

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.

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
716

You will find replacements for these functions as static methods of the CL_GUI_FRONTEND_SERVICES class. Please try using these.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
716

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.

Read only

former_member203501
Active Contributor
0 Likes
716

hi these are available in the ecc6.0

GUI_REMOVE_DIRECTORY

use this as the replacement for this ...

\

TMP_GUI_REMOVE_DIRECTORY

Read only

Former Member
0 Likes
716

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.

Read only

Former Member
0 Likes
717

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.