Skip to Content
avatar image
Former Member

How to check if I have write access on my local system before writing/downloading an excel file

Hello All,

I have requirement where I need to check if User can download the excel file to their chosen file path. I am using the function module MS_EXCEL_OLE_STANDARD_DAT to download the excel file. My requirement is to send a warning message before the program execution if User don't have write access to C drive or any other path on local machine. I see some exceptions on GUI download but I want to check it once the file path is provided.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jun 01, 2015 at 04:14 PM

    Deepak,

    This FM calls GUI_DOWNLOAD within which the below authority object is checked.

    authority-check object 'S_GUI'

    id 'ACTVT'

    field '61'.

    if sy-subrc <> 0.

    checkresult = 1. " RAISE no_authority.

    exit.

    endif.

    If you can validate whether the user has the above authority object, that should help.

    Thanks,

    Vikram.M

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Vikram,

      I have seen this object but I guess this one is to check on SAP end whether User can download the file or not. Its called when we use the standard functionality to download the ALV output but can't tell you if you have write access on your C drive.