Tuesday, April 19, 2011

Create & Delete folder on presentation server

This small piece of code help to create and delete folder on Presentation Server.
REPORT ZKC_DIR.
*---function module to create folder on presentation server
CALL FUNCTION 'TMP_GUI_CREATE_DIRECTORY'
EXPORTING
dirname = 'C:\kc_test1'
NO_FLUSH = ' '
EXCEPTIONS
FAILED = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*---function module to delete folder on presentaion server
*---Uncomment the code if require to delete the folder
*CALL FUNCTION 'TMP_GUI_REMOVE_DIRECTORY'
* EXPORTING
* dirname = 'C:\kc_test'
* EXCEPTIONS
* FAILED = 1
* OTHERS = 2
* .
*IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.

No comments:

Post a Comment