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: 

GUI_DOWNLOAD - Access Denied!! Why its throwing error message?

Former Member
0 Kudos

Hi Experts,

While am using the <i><b>GUI_DOWNLOAD</b></i> for extracting purpose, am getting the error as "<i><b>Access is denied i.e. #15</b></i>", am here doing paste the piece of code.

So, pls. let me know that, How to fix it?

<i><b>wa_name = 'C:\EXTRACT3.TXT '.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

filename = wa_name

filetype = 'ASC'

  • APPEND = ' '

  • WRITE_FIELD_SEPARATOR = ' '

  • HEADER = '00'

  • TRUNC_TRAILING_BLANKS = ' '

  • WRITE_LF = 'X'

  • COL_SELECT = ' '

  • COL_SELECT_MASK = ' '

  • DAT_MODE = ' '

  • CONFIRM_OVERWRITE = ' '

  • NO_AUTH_CHECK = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • WRITE_BOM = ' '

  • TRUNC_TRAILING_BLANKS_EOL = 'X'

  • IMPORTING

  • FILELENGTH =

TABLES

data_tab = char_extract6

  • FIELDNAMES =

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.</b></i>

thanq.

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

Perhaps you don't have authorization to access and write a file to the presentation server directory.

Regards,

Ferry Lianto

4 REPLIES 4

ferry_lianto
Active Contributor
0 Kudos

Hi,

Perhaps you don't have authorization to access and write a file to the presentation server directory.

Regards,

Ferry Lianto

0 Kudos

This is the part of the function module which throws exception "Access Denied". Keep a break point here and run your program. check in debug why you are getting this error.

IF NOT prc_result IS INITIAL.

IF NOT CONFIRM_OVERWRITE IS INITIAL.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

TEXT_QUESTION = 'Soll die Datei überschrieben werden?'(002)

DISPLAY_CANCEL_BUTTON = ' '

IMPORTING

ANSWER = prc_result

EXCEPTIONS

TEXT_NOT_FOUND = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

prc_result = 2.

ENDIF.

IF prc_result = 2.

MESSAGE ID 'FES' TYPE 'E' NUMBER '012' RAISING ACCESS_DENIED.

ENDIF.

ENDIF.

Former Member
0 Kudos

Hi,

You do not have the access to connect the Presentation server from SAP, so contact your basis people, they will provide the access

Regards

Sudheer

Former Member
0 Kudos

hi

good

have you debug your code?

you have not mentioned where exactly you r getting the error,if you r working on Home PC than you might not have authorization to use the GUI_DOWNLOAD,if you r working in the home pc than reinstall the SAP,i hope there is some problem while installing the sap in your PC.

thanks

mrutyun^