Application Development 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: 

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

Former Member
0 Kudos

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.   

2 REPLIES 2

Former Member
0 Kudos

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

0 Kudos

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.