Application Development and Automation 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: 
Read only

Problem with FM GUI_UPLOAD

Former Member
0 Likes
1,722

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?

9 REPLIES 9
Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
1,085

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.

Read only

saranwin
Contributor
0 Likes
1,085

Hi,

Check your uploaded file is opened in your desktop. Otherwise check the file structure and internal table structure should be same.

Regards,

Saran

Read only

Former Member
0 Likes
1,085

Hi,

The file is not open and also I file is on my desktop with full permissions.

Any idea why?

Regards,

Prashant.

Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
1,085

Hi,

In your code, comment the below line.

NO_AUTH_CHECK = ' ' 

Cheers,

Simha.

Read only

0 Likes
1,085

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

Read only

Former Member
0 Likes
1,085

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.

Read only

Former Member
0 Likes
1,085

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

Read only

Former Member
0 Likes
1,085

Hi Prashant,

Please check if your file is already opened.

Regards,

Shobana.K

Read only

Former Member
0 Likes
1,085

Thanks everybody for contributing, problem solved.