Skip to Content
0
Feb 24, 2009 at 08:31 PM

GUI_UPLOAD - issues with the filename

119 Views

I am trying to use GUI_UPLOAD to upload a PDF onto the applicaiton server. I have done this many times but for some reason I am having issues with it this time. Below is what I have:

*************************************************************************
* Convert Smartform to PDF
*************************************************************************
  call function 'CONVERT_OTF_2_PDF'
    importing
      bin_filesize           = v_bin_filesize
    tables
      otf                    = st_job_output_info-otfdata
      doctab_archive         = it_docs
      lines                  = it_lines
    exceptions
      err_conv_not_possible  = 1
      err_otf_mc_noendmarker = 2
      others                 = 3.
  if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.

  concatenate d_dokar d_doknr d_doktl d_dokvr '.pdf' into d_temp_string.
  concatenate c_path d_temp_string into d_filename separated by '\'.

  call function 'GUI_UPLOAD'
    exporting
      filename                      = d_filename
      filetype                      = 'BIN'
*     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                      = it_lines
   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.
    break-point.
  endif.

Every time the return code is '1'. However, I can verify that the path is correct by manually uploading a document using CG3Z. I have also confirmed that the table IT_LINES contains data.

This is a sample filename:
CREWECO\DMS\XMT000000001000000000000022200000.pdf

Any ideas?

Regards,

Davis