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 GUI_DOWNLOAD

Former Member
0 Likes
5,508

Hi, the problem is:

after run the FM GUI_UPLOAD i have

sy-subrc = 15: ACCESS DENIED.

The FM is:

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

bin_filesize = 60000

filename = wa_file_dest "E' TYPE STRING

filetype = 'BIN'

  • APPEND = ' '

  • WRITE_FIELD_SEPARATOR = ' '

  • HEADER = '00'

  • TRUNC_TRAILING_BLANKS = ' '

  • WRITE_LF = 'X'

  • COL_SELECT = ' '

  • COL_SELECT_MASK = ' '

  • DAT_MODE = ' '

  • IMPORTING

  • FILELENGTH =

TABLES

data_tab = tab_bmp

EXCEPTIONS

file_write_error = 1

no_batch = 2

gui_refuse_filetransfer = 3

invalid_type = 4

no_authority = 5

unknown_error = 6

header_not_allowed = 7

separator_not_allowed = 8

filesize_not_allowed = 9

header_too_long = 10

dp_error_create = 11

dp_error_send = 12

dp_error_write = 13

unknown_dp_error = 14

access_denied = 15

dp_out_of_memory = 16

disk_full = 17

dp_timeout = 18

file_not_found = 19

dataprovider_exception = 20

control_flush_error = 21

OTHERS = 22

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

The wa_file_dest is C:\filename.

This errors appears only on few PC's, probably they have C:\ directory protected in writing\creating files?

Is there a solution to this?

Thanks for answers.

Hi, the problem is:

after run the FM GUI_UPLOAD i have

sy-subrc = 15: ACCESS DENIED.

The FM is:

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

bin_filesize = 60000

filename = wa_file_dest "E' TYPE STRING

filetype = 'BIN'

  • APPEND = ' '

  • WRITE_FIELD_SEPARATOR = ' '

  • HEADER = '00'

  • TRUNC_TRAILING_BLANKS = ' '

  • WRITE_LF = 'X'

  • COL_SELECT = ' '

  • COL_SELECT_MASK = ' '

  • DAT_MODE = ' '

  • IMPORTING

  • FILELENGTH =

TABLES

data_tab = tab_bmp

EXCEPTIONS

file_write_error = 1

no_batch = 2

gui_refuse_filetransfer = 3

invalid_type = 4

no_authority = 5

unknown_error = 6

header_not_allowed = 7

separator_not_allowed = 8

filesize_not_allowed = 9

header_too_long = 10

dp_error_create = 11

dp_error_send = 12

dp_error_write = 13

unknown_dp_error = 14

access_denied = 15

dp_out_of_memory = 16

disk_full = 17

dp_timeout = 18

file_not_found = 19

dataprovider_exception = 20

control_flush_error = 21

OTHERS = 22

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

The wa_file_dest is C:\filename.

This errors appears only on few PC's, probably they have C:\ directory protected in writing\creating files?

Is there a solution to this?

Thanks for answers.

9 REPLIES 9
Read only

Former Member
0 Likes
3,846

As its a access issue there is nothing much we can do about it. We need to give a directory where the WRITE access will be available.

Regards,

Ravi

Read only

Former Member
0 Likes
3,846

yes, you do not have rights to save on the C: drive.

Try a network folder where everyone has access to.

Read only

Former Member
0 Likes
3,846

Hi

I don't think because the problem is on the client and not on SAP.

You can only show that message.

But the user could choise the path, u scan use the method FILE_OPEN_DIALOG of class CL_GUI_FRONTEND_SERVICES to do that.

Max

Read only

Former Member
0 Likes
3,846

Hi avalor,

1. Probably the file has been opened

somewhere in another windows session.

regards,

amit m.

Read only

0 Likes
3,846

? Can you explain?

Read only

0 Likes
3,846

Hi

The system prevents to overwrite files are opening.

Max

Read only

0 Likes
3,846

Hi,

see the sample code:

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = V_FIL_NAM

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = 'X'

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • IMPORTING

  • FILELENGTH =

  • HEADER =

TABLES

DATA_TAB = I_FINAL[]

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

<b>ACCESS_DENIED = 13</b>

DP_OUT_OF_MEMORY = 14

DISK_FULL = 15

DP_TIMEOUT = 16

OTHERS = 17.

<b>IF SY-SUBRC <> 0.

CASE SY-SUBRC .

WHEN 13.

  • Generate an Information message "Sequential file could not be

  • opened"

MESSAGE I899 WITH TEXT-055.

LEAVE TO SCREEN 0.

ENDCASE.

ENDIF.</b>

Hope this will help you.

Read only

Former Member
0 Likes
3,846

Try to down load in some other drive or in a separate dirctory other that C:

Regards,

Subhasish

Read only

Former Member
0 Likes
3,846

Hi,

there are two reasons

the file is already open or

you don't have write permission to that file in Presentation server in few systems.

Regards

vijay