cancel
Showing results for 
Search instead for 
Did you mean: 

cl_gui_frontend_services=>file_exist is not reading files from C drive

Former Member
0 Kudos

Hi experts ,

I am using the method 'cl_gui_frontend_services=>file_exist' to check whether a file exists in frontend machine or not. This method works fine and gives corerct result when i keep the file on desktop and provide the path of the files as parameter to the program but it is unable to check the existance of the same file if kept in C drive under folder program files e.g.(C:/Program files/Documware/Barcode.exe). Is this a limitation of the method or is due to some restriction/access permitions at system level that files could not be read from program files in C drive . kinldy provide your useful inputs if any one faced same issue and what is the  solution for this problem .

Regards

Priyank

Accepted Solutions (0)

Answers (4)

Answers (4)

Matt_Fraser
Active Contributor
0 Kudos

By default access to files under C:\Program Files and C:\Program Files(x86) requires a UAC acknowledgment, and the user must be a local administrator to the machine.  Access to the desktop is not so restricted.  So, enduser permissions to the OS is probably the cause.

satyabrata_sahoo3
Contributor
0 Kudos

You can Check Admin/Access rights of the user on the system. I had similar case once. User was unable to save file on C drive but was able to save on Desktop. So your case is reading... so might be relevant...

former_member230391
Participant
0 Kudos

ALL FUNCTION 'DX_FILE_EXISTENCE_CHECK'

    EXPORTING

      filename             = file

      pc                       = 'X'

*   SERVER              =

    IMPORTING

      file_exists           = file_exist

IF NOT ( sy-subrc = 0 and file_exist = 'X' )

  MESSAGE  'the input file does not exist.' TYPE 'E'.

ENDIF.

sravanthi_polu
Contributor
0 Kudos

Hi,

Please check the below link,

Working With Files - Code Gallery - SCN Wiki

Why you want to store the file in system program files,as far as my knowledge it may not be a good practice.Is it a part of requirement?

Regards,

Sravanthi Polu

Former Member
0 Kudos

Hi Sravanthi,

Yes this a part of requirement . User will only be keeping that file in the C drive program files folder )

Regards

Priyank