<?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: Problem with gui_upload in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244801#M1526863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why can't you use FM &lt;STRONG&gt;TEXT_CONVERT_XLS_TO_SAP&lt;/STRONG&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Oct 2010 18:15:33 GMT</pubDate>
    <dc:creator>former_member225631</dc:creator>
    <dc:date>2010-10-05T18:15:33Z</dc:date>
    <item>
      <title>Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244792#M1526854</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;   I have problem in uploading data into ztable from excel.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  I tried to use gui_upload but the data coming is in wrong format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  my code is as follows -&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
       filename                      = p_file
       filetype                      = 'DAT'
       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                      = t_rec1
*   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 &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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use code tagsa to format your code&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Oct 5, 2010 11:07 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 14:39:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244792#M1526854</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T14:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244793#M1526855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Deepali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          You mean that you are trying to upload excel sheet file right?? If yes then change the filetype from .dat  to .xls.I hope it wil work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 14:58:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244793#M1526855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T14:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244794#M1526856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the documentation for this FM. '#' is not a valid entry for HAS_FIELD_SEPARATOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 15:09:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244794#M1526856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T15:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244795#M1526857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make Has_field_separator as 'X'.  Also try field type 'ASC'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should work for you.&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;Edited by: Sumit Naik on Oct 5, 2010 7:26 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 17:23:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244795#M1526857</guid>
      <dc:creator>former_member193284</dc:creator>
      <dc:date>2010-10-05T17:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244796#M1526858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     I tried using space as field seperator...but still the problem ecxists....the values are not getting populated in my internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     My requirement is that user should be able to load values in ztable usind notepad file or excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Please suggest:)&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Thanks  in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 17:42:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244796#M1526858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T17:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244797#M1526859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the field separator you are using? Is it a tab?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 17:43:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244797#M1526859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T17:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244798#M1526860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Yes...i am using field seperator as TAB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 17:45:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244798#M1526860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T17:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244799#M1526861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then set has_field_separator to 'X'. (Not space, not '#').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 17:47:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244799#M1526861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T17:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244800#M1526862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I tried the same but still i am not getting the right data in my internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Below is my changed code -&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                      = p_file&lt;/P&gt;&lt;P&gt;       filetype                      = 'DAT'&lt;/P&gt;&lt;P&gt;       has_field_separator           = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HEADER_LENGTH                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    READ_BY_LINE                  = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DAT_MODE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    CODEPAGE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    IGNORE_CERR                   = ABAP_TRUE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    REPLACEMENT                   = '#'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    CHECK_BOM                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    VIRUS_SCAN_PROFILE            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NO_AUTH_CHECK                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FILELENGTH                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HEADER                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        data_tab                      = t_rec1&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FILE_READ_ERROR               = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NO_BATCH                      = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    GUI_REFUSE_FILETRANSFER       = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    INVALID_TYPE                  = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NO_AUTHORITY                  = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    UNKNOWN_ERROR                 = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    BAD_DATA_FORMAT               = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HEADER_NOT_ALLOWED            = 9&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    SEPARATOR_NOT_ALLOWED         = 10&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HEADER_TOO_LONG               = 11&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    UNKNOWN_DP_ERROR              = 12&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ACCESS_DENIED                 = 13&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DP_OUT_OF_MEMORY              = 14&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DISK_FULL                     = 15&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DP_TIMEOUT                    = 16&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OTHERS                        = 17&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_file is a string.,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 18:10:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244800#M1526862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T18:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244801#M1526863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why can't you use FM &lt;STRONG&gt;TEXT_CONVERT_XLS_TO_SAP&lt;/STRONG&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 18:15:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244801#M1526863</guid>
      <dc:creator>former_member225631</dc:creator>
      <dc:date>2010-10-05T18:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244802#M1526864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi anand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      in my requirement user should able to load data in ztable from text file or excel both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regardds,&lt;/P&gt;&lt;P&gt; nitin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 18:17:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244802#M1526864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T18:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244803#M1526865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt; what is the field type used in internal table &lt;STRONG&gt;t_rec1&lt;/STRONG&gt;  ? use char type .&lt;/P&gt;&lt;P&gt;if the user is going to upload  &lt;STRONG&gt;excel&lt;/STRONG&gt;  or &lt;STRONG&gt;text&lt;/STRONG&gt;  then u have to i dentify first the file which user is passing is  text ot excel. Then according to tat u have to pass the file type .&lt;/P&gt;&lt;P&gt;The FM which anand has suggested the right for excel file upload and for text u can use FM gui_upload.&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;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 04:49:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244803#M1526865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-06T04:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244804#M1526866</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;Try this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ztest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_tab,&lt;/P&gt;&lt;P&gt;        entno   TYPE zentno,&lt;/P&gt;&lt;P&gt;        matnr   TYPE matnr,&lt;/P&gt;&lt;P&gt;       END OF ty_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_upload TYPE STANDARD TABLE OF  ty_tab,&lt;/P&gt;&lt;P&gt;      wa_upload TYPE ty_tab,&lt;/P&gt;&lt;P&gt;      it_final  TYPE STANDARD TABLE OF ztafmsdens,&lt;/P&gt;&lt;P&gt;      wa_final  TYPE ztest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_file TYPE filetable,&lt;/P&gt;&lt;P&gt;      v_rc   TYPE i,&lt;/P&gt;&lt;P&gt;      v_cnt  TYPE i VALUE 0,&lt;/P&gt;&lt;P&gt;      v_wt   TYPE string. " Variable for Window Title&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: p_filename TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; v_wt = text-007.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_gui_frontend_services=&amp;gt;file_open_dialog&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      window_title            = v_wt&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      file_table              = v_file&lt;/P&gt;&lt;P&gt;      rc                      = v_rc&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      file_open_dialog_failed = 1&lt;/P&gt;&lt;P&gt;      cntl_error              = 2&lt;/P&gt;&lt;P&gt;      error_no_gui            = 3&lt;/P&gt;&lt;P&gt;      not_supported_by_gui    = 4&lt;/P&gt;&lt;P&gt;      OTHERS                  = 5.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MESSAGE e398(00) WITH text-005.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    READ TABLE v_file INDEX 1 INTO p_file.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  p_filename = p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = p_filename&lt;/P&gt;&lt;P&gt;      filetype                = 'DAT'&lt;/P&gt;&lt;P&gt;      dat_mode                = space&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      data_tab                = it_upload&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;      not_supported_by_gui    = 17&lt;/P&gt;&lt;P&gt;      error_no_gui            = 18&lt;/P&gt;&lt;P&gt;      OTHERS                  = 19.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MESSAGE e398(00) WITH text-006.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_upload INTO wa_upload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_final-entno  = wa_upload-entno.&lt;/P&gt;&lt;P&gt;    wa_final-matnr  = wa_upload-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND wa_final TO it_final.&lt;/P&gt;&lt;P&gt;    CLEAR  wa_final.&lt;/P&gt;&lt;P&gt;    v_cnt = v_cnt + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF it_final[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODIFY ztest FROM TABLE it_final.&lt;/P&gt;&lt;P&gt;&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;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    WRITE :  V_CNT, text-006.&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;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ragunathan.R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 04:51:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244804#M1526866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-06T04:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244805#M1526867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the data in the file whether it is in correct format and the itab table format there should not be any mismatch.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 06:25:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244805#M1526867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-06T06:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244806#M1526868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should check the file extension if it is txt, use FM GUI_UPLOAD; if it is xls, use FM TEXT_CONVERT_XLS_TO_SAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 07:00:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244806#M1526868</guid>
      <dc:creator>kerem_kayacan</dc:creator>
      <dc:date>2010-10-06T07:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244807#M1526869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please change file type to 'ASC'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and check the structure of your table t_rec1 .&lt;/P&gt;&lt;P&gt;It should be ideally same as the file data (text or excel will do but number of columns in file &amp;amp; structure matters).&lt;/P&gt;&lt;P&gt;And seperator 'X' if tab delimited file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 10:26:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-gui-upload/m-p/7244807#M1526869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-06T10:26:54Z</dc:date>
    </item>
  </channel>
</rss>

