<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: GUI_UPLOAD Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190358#M466916</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing  a problem while uploading data to internal table using Function module GUI_UPLOAD,it is showing a dump.I have sent the code along with this mail,Can you please let me the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_file like rlgrap-filename value 'C:\upld.txt'.&lt;/P&gt;&lt;P&gt;DATA: begin of it_datatab occurs 0,&lt;/P&gt;&lt;P&gt;                 row(500) type c,&lt;/P&gt;&lt;P&gt; end of it_datatab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = i_file&lt;/P&gt;&lt;P&gt;      filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;      has_field_separator     = 'X'  "file is TAB delimited&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                = it_datatab&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      file_open_error         = 1&lt;/P&gt;&lt;P&gt;      file_read_error         = 2&lt;/P&gt;&lt;P&gt;      no_batch                = 3&lt;/P&gt;&lt;P&gt;      gui_refuse_filetransfer = 4&lt;/P&gt;&lt;P&gt;      invalid_type            = 5&lt;/P&gt;&lt;P&gt;      no_authority            = 6&lt;/P&gt;&lt;P&gt;      unknown_error           = 7&lt;/P&gt;&lt;P&gt;      bad_data_format         = 8&lt;/P&gt;&lt;P&gt;      header_not_allowed      = 9&lt;/P&gt;&lt;P&gt;      separator_not_allowed   = 10&lt;/P&gt;&lt;P&gt;      header_too_long         = 11&lt;/P&gt;&lt;P&gt;      unknown_dp_error        = 12&lt;/P&gt;&lt;P&gt;      access_denied           = 13&lt;/P&gt;&lt;P&gt;      dp_out_of_memory        = 14&lt;/P&gt;&lt;P&gt;      disk_full               = 15&lt;/P&gt;&lt;P&gt;      dp_timeout              = 16&lt;/P&gt;&lt;P&gt;      OTHERS                  = 17.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;      write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.&lt;/P&gt;&lt;P&gt;      skip.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dinesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2007 06:58:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-24T06:58:17Z</dc:date>
    <item>
      <title>Re: GUI_UPLOAD Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190358#M466916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing  a problem while uploading data to internal table using Function module GUI_UPLOAD,it is showing a dump.I have sent the code along with this mail,Can you please let me the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_file like rlgrap-filename value 'C:\upld.txt'.&lt;/P&gt;&lt;P&gt;DATA: begin of it_datatab occurs 0,&lt;/P&gt;&lt;P&gt;                 row(500) type c,&lt;/P&gt;&lt;P&gt; end of it_datatab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = i_file&lt;/P&gt;&lt;P&gt;      filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;      has_field_separator     = 'X'  "file is TAB delimited&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                = it_datatab&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      file_open_error         = 1&lt;/P&gt;&lt;P&gt;      file_read_error         = 2&lt;/P&gt;&lt;P&gt;      no_batch                = 3&lt;/P&gt;&lt;P&gt;      gui_refuse_filetransfer = 4&lt;/P&gt;&lt;P&gt;      invalid_type            = 5&lt;/P&gt;&lt;P&gt;      no_authority            = 6&lt;/P&gt;&lt;P&gt;      unknown_error           = 7&lt;/P&gt;&lt;P&gt;      bad_data_format         = 8&lt;/P&gt;&lt;P&gt;      header_not_allowed      = 9&lt;/P&gt;&lt;P&gt;      separator_not_allowed   = 10&lt;/P&gt;&lt;P&gt;      header_too_long         = 11&lt;/P&gt;&lt;P&gt;      unknown_dp_error        = 12&lt;/P&gt;&lt;P&gt;      access_denied           = 13&lt;/P&gt;&lt;P&gt;      dp_out_of_memory        = 14&lt;/P&gt;&lt;P&gt;      disk_full               = 15&lt;/P&gt;&lt;P&gt;      dp_timeout              = 16&lt;/P&gt;&lt;P&gt;      OTHERS                  = 17.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;      write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.&lt;/P&gt;&lt;P&gt;      skip.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dinesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 06:58:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190358#M466916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T06:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re: GUI_UPLOAD Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190359#M466917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dinesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;change the hilighted code and reward if it solves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_file like rlgrap-filename value 'C:\upld.txt'.&lt;/P&gt;&lt;P&gt;DATA: begin of it_datatab occurs 0,&lt;/P&gt;&lt;P&gt;row(500) type c,&lt;/P&gt;&lt;P&gt;end of it_datatab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data: v_file type string.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;v_file = i_file.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;filename = &amp;lt;u&amp;gt;i_file&amp;lt;/u&amp;gt;  &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;change to&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; &amp;lt;u&amp;gt;&amp;lt;b&amp;gt;v_file&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;filetype = 'ASC'&lt;/P&gt;&lt;P&gt;has_field_separator = 'X' "file is TAB delimited&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = it_datatab&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;file_open_error = 1&lt;/P&gt;&lt;P&gt;file_read_error = 2&lt;/P&gt;&lt;P&gt;no_batch = 3&lt;/P&gt;&lt;P&gt;gui_refuse_filetransfer = 4&lt;/P&gt;&lt;P&gt;invalid_type = 5&lt;/P&gt;&lt;P&gt;no_authority = 6&lt;/P&gt;&lt;P&gt;unknown_error = 7&lt;/P&gt;&lt;P&gt;bad_data_format = 8&lt;/P&gt;&lt;P&gt;header_not_allowed = 9&lt;/P&gt;&lt;P&gt;separator_not_allowed = 10&lt;/P&gt;&lt;P&gt;header_too_long = 11&lt;/P&gt;&lt;P&gt;unknown_dp_error = 12&lt;/P&gt;&lt;P&gt;access_denied = 13&lt;/P&gt;&lt;P&gt;dp_out_of_memory = 14&lt;/P&gt;&lt;P&gt;disk_full = 15&lt;/P&gt;&lt;P&gt;dp_timeout = 16&lt;/P&gt;&lt;P&gt;OTHERS = 17.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.&lt;/P&gt;&lt;P&gt;skip.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 07:01:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190359#M466917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T07:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Re: GUI_UPLOAD Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190360#M466918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GUI Upload FM can take only String files as Input. &lt;/P&gt;&lt;P&gt;Change the file type and execute the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maheshwari V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 07:04:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190360#M466918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T07:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Re: GUI_UPLOAD Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190361#M466919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dinesh,&lt;/P&gt;&lt;P&gt;check this sample code .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT  zupload MESSAGE-ID bd.

DATA: w_tab TYPE ZTEST.
DATA: i_tab TYPE STANDARD TABLE OF ZTEST.

DATA: v_subrc(2),
      v_recswritten(6).

PARAMETERS: p_file(80)
       DEFAULT 'C:TempZTEST.TXT'.

DATA: filename TYPE string,
      w_ans(1) TYPE c.

filename = p_file.


CALL FUNCTION 'POPUP_TO_CONFIRM'
  EXPORTING
   titlebar                    = 'Upload Confirmation'
*   DIAGNOSE_OBJECT             = ' '
    text_question               = p_file
   text_button_1               = 'Yes'(001)
*   ICON_BUTTON_1               = ' '
   text_button_2               = 'No'(002)
*   ICON_BUTTON_2               = ' '
   default_button              = '2'
*   DISPLAY_CANCEL_BUTTON       = 'X'
*   USERDEFINED_F1_HELP         = ' '
*   START_COLUMN                = 25
*   START_ROW                   = 6
*   POPUP_TYPE                  =
*   IV_QUICKINFO_BUTTON_1       = ' '
*   IV_QUICKINFO_BUTTON_2       = ' '
 IMPORTING
   answer                      = w_ans
* TABLES
*   PARAMETER                   =
* EXCEPTIONS
*   TEXT_NOT_FOUND              = 1
*   OTHERS                      = 2
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


CHECK w_ans = 1.


CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    filename                      = filename
*    FILETYPE                      = 'ASC
    has_field_separator           = 'X'
*   HEADER_LENGTH                 = 0
*   READ_BY_LINE                  = 'X'
* IMPORTING
*    FILELENGTH                    =
*   HEADER                        =
  TABLES
    data_tab                      = i_tab
 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.

* SYST FIELDS ARE NOT SET BY THIS FUNCTION SO DISPLAY THE ERROR CODE *

IF sy-subrc &amp;lt;&amp;gt; 0.
  v_subrc = sy-subrc.
  MESSAGE e899 WITH 'File Open Error' v_subrc.
ENDIF.


INSERT ZTEST FROM TABLE i_tab.

COMMIT WORK AND WAIT.

MESSAGE i899 WITH sy-dbcnt 'Records Written to ZTEST'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 07:05:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190361#M466919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T07:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Re: GUI_UPLOAD Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190362#M466920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Babu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  change the filename like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_file type string .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;i_file =   'C:\upld.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 07:06:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-gui-upload-problem/m-p/2190362#M466920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T07:06:51Z</dc:date>
    </item>
  </channel>
</rss>

