Skip to Content
author's profile photo Former Member
Former Member

Error while uploading the file

Hi ,

I am trying to upload a file using GUI_UPLOAD... But sy-subrc 5 is raised which says that it's invalid type ... I have tried using both the DAT as well as the ASC in the filetype line... Can any one help whats wrong in program.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Feb 24, 2005 at 06:25 PM

    Looking at the function module code, the exception is raised two places....

    * filetype parameter valid ?
      CASE filetype.
        WHEN 'BIN' OR 'ASC'.
        WHEN OTHERS.

    So then you can only use 'BIN' or 'ASC'.

    You said that you tried 'ASC', so then your exception has to be being raised from the second place which is

        call function 'ITS_UPLOAD'
                  codepage                = codepage
                  filename                = tempfile
                  filetype                = typ
                  trunclen                = read_by_line
                  filelength              = filelength
                  data_tab                = data_tab
                  conversion_error        = 1
                  file_read_error         = 2
                  gui_refuse_filetransfer = 3
                  others                  = 4.
        IF sy-subrc = 1.
          RAISE invalid_type.
        ELSEIF sy-subrc = 2.
          RAISE file_read_error.
        ELSEIF sy-subrc = 3.
          RAISE gui_refuse_filetransfer.
        ELSEIF sy-subrc = 4.
          RAISE unknown_error.

    But I believe that this code is only executed when the interface is ITS.

    Can you post your code?


    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.