Skip to Content
author's profile photo Former Member
Former Member

Create a Directory in the user local hardisk

Hi,

How to Create a Directory in the user local hardisk

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 29, 2008 at 09:28 AM

    Hi,

    When using WS_DOWNLOAD, if the directory exists on the PC then the download is successful. However, if the directory does not exist then the download fails. Therefore, you can use GUI_CREATE_DIRECTORY to create the directory at the begining of your ABAP programs. If the directory or folder already exists on the personal computer, the command will just be ignored.

    Tested in 4.6x

    REPORT ZGUI_DIR.

    call function 'GUI_CREATE_DIRECTORY'

    exporting

    dirname = 'C:\TEST'

    EXCEPTIONS

    FAILED = 1

    OTHERS = 2.

    if sy-subrc <> 0.

    WRITE: / 'Error Code ',SY-SUBRC.

    endif.

    Reward points if found helpful..

    Cheers,

    Barli.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 29, 2008 at 08:08 AM

    CALL FUNCTION GUI_CREATE_DIRECTORY

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 29, 2008 at 08:38 AM

    Hi,

    use the function module as follows.

    call function gui_create_directory.

    IMPORTING

    DIRNAME = 'C:\TEST'

    EXCEPTIONS

    FAILED = 1.

    Regards,

    Sanki.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.