2008 Nov 18 11:29 AM
Hi All,
I am using FM GUI_UPLOAD to upload data from presentation server, but when I am browsing and executing program, I am getting error message 'Acess to file denied'. Following is the FM:
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = g_filename
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = g_data_tab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Any idea why this is happening?
Hi All,
I am using FM GUI_UPLOAD to upload data from presentation server, but when I am browsing and executing program, I am getting error message 'Acess to file denied'. Following is the FM:
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = g_filename
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = g_data_tab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Any idea why this is happening?
2008 Nov 18 11:31 AM
Hi,
It is self explainatory.
You dont have authorization to access the file.
Try putting the same file on your desktop and try accessing it with your program.
It works,
Cheers,
Simha.
2008 Nov 18 11:31 AM
Hi,
Check your uploaded file is opened in your desktop. Otherwise check the file structure and internal table structure should be same.
Regards,
Saran
2008 Nov 18 11:35 AM
Hi,
The file is not open and also I file is on my desktop with full permissions.
Any idea why?
Regards,
Prashant.
2008 Nov 18 11:37 AM
Hi,
In your code, comment the below line.
NO_AUTH_CHECK = ' ' Cheers,
Simha.
2008 Nov 18 11:46 AM
Hi,
I think u don't have rights to open/ Create a file in that path. It is restricted by administrator.
Try it in some other Drive path.
Regards,
Nandha
2008 Nov 18 11:39 AM
Check the file on your desktop to see if you have read / write and modify permissions on the file, provide all permissions to file and then try uploading it from your dektop.
2008 Nov 18 11:45 AM
Hi
First check r u able to create / open file in the presentation server in given path.
I think u r trying in system path.
Regards,
Nandha
2008 Nov 18 11:51 AM
Hi Prashant,
Please check if your file is already opened.
Regards,
Shobana.K
2008 Nov 18 11:51 AM
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |