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

GUI_UPLOAD

Former Member
0 Likes
436

Hello,

I'm facing a problem with GUI_UPLOAD in that it sometimes fails with return code 13 (ACCESS_DENIED). It fails less than 1% of the time but due to the hundreds of calls a day I still need to handle several failures a day. The failure can occur on any workstation and for any user but it is not consistent to any workstation or user. Here's the call I make:

CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
  filename = wf_local_file_path
  filetype = 'BIN'
IMPORTING
  filelength = wf_file_size
CHANGING
  data_tab = int_file_data
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 
  not_supported_by_gui = 17 
  error_no_gui = 18 
  OTHERS = 19.

Has anyone faced anything similar? Anyone know what the cause might be? The fact that this failure only occurs 1% of the time makes it very hard to pin down.

Thanks,

Ahmad Shono

2 REPLIES 2
Read only

Former Member
0 Likes
409

Hi Ahmad,

I suppose you would be taking the file from shared folder where several persons can access the same file.

if one or more persons trying to access the same file then we will encounter the Access Denied exception.

Thanks.

Note:Reward Points if you find useful.

Read only

0 Likes
409

Thanks, your answer was very helpful.

Actually, I realized the problem a few minutes ago. There's a script that should close the file before the upload takes place and it seems that 1% of the time the script doesn't finish in time before the upload so the access denied result occurs.

The solution I did was to wait a few seconds if the upload fails and then try again. Since it only happens 1% of the time it doesn't affect the users much.

Edited by: Ahmad Shono on Feb 11, 2008 2:01 PM