<?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 separator in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663337#M1288009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Use the below code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FM for the desired field sepator&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gt_format_tab TYPE truxs_t_text_data.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_field_seperator    = ';'      &lt;STRONG&gt;"Give the field sepetor&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_tab_sap_data       = itab&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      i_tab_converted_data = gt_format_tab&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      conversion_failed    = 1&lt;/P&gt;&lt;P&gt;      OTHERS               = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        filename                = file name&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        data_tab                = gt_format_tab1  &lt;STRONG&gt;"this table has the field seperated by ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jun 2009 08:12:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-05T08:12:51Z</dc:date>
    <item>
      <title>GUI_UPLOAD separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663334#M1288006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using this function to upload a file CSV composed by line where each line is composed by fields separated by semicolon " ; ". What I would like to know is if there is a way to say to GUI_UPLOAD that the separator is the ; because I see there is a flag has_separator, but reading here on sdn it seems that checking this the separator is the tab.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;gabriele&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Gabriele Montori on Jun 5, 2009 9:54 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 07:42:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663334#M1288006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-05T07:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: GUI_UPLOAD separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663335#M1288007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for CSV separator is ',' and not ';'.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u want ';'  or any other separators for ur functionality, please just search in sdn...there are a huge lot of posts regrading this.,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 07:56:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663335#M1288007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-05T07:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: GUI_UPLOAD separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663336#M1288008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The GUI_UPLOAD  function recognize only tab delimeted files when you pas 'X' at parameter&lt;/P&gt;&lt;P&gt;HAS_FIELD_SEPARATOR&lt;/P&gt;&lt;P&gt;try FM &lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'FILE_READ_AND_CONVERT_SAP_DATA'
      EXPORTING
        I_FILENAME                 = S_IFILE
        I_SERVERTYP                =  'PPRS' "GUI UPLOAD
*       i_fileformat                = SFILEFORMAT
         I_FIELD_SEPERATOR          = ';'
*     I_LINE_HEADER              =
*   IMPORTING
*     E_BIN_FILELENGTH           =
   TABLES
     I_TAB_RECEIVER             = I_TABLE
   EXCEPTIONS
     FILE_NOT_FOUND             = 1
     CLOSE_FAILED               = 2
     AUTHORIZATION_FAILED       = 3
     OPEN_FAILED                = 4
     CONVERSION_FAILED          = 5
     OTHERS                     = 6 .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 07:56:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663336#M1288008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-05T07:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: GUI_UPLOAD separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663337#M1288009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Use the below code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FM for the desired field sepator&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gt_format_tab TYPE truxs_t_text_data.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_field_seperator    = ';'      &lt;STRONG&gt;"Give the field sepetor&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_tab_sap_data       = itab&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      i_tab_converted_data = gt_format_tab&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      conversion_failed    = 1&lt;/P&gt;&lt;P&gt;      OTHERS               = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        filename                = file name&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        data_tab                = gt_format_tab1  &lt;STRONG&gt;"this table has the field seperated by ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 08:12:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663337#M1288009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-05T08:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: GUI_UPLOAD separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663338#M1288010</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;In GUI_UPLOAD you can give field separator as 'X',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or to upload CSV file you can use,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: it_raw TYPE truxs_t_text_data     .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;i_field_seperator    = 'X'&lt;/P&gt;&lt;P&gt; i_line_header        = 'X'&lt;/P&gt;&lt;P&gt;i_tab_raw_data       = it_raw &lt;/P&gt;&lt;P&gt; i_filename           = p_file_path   "selection screen file path name&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;  i_tab_converted_data = it_upload[]     "internal table having same struc as that of the flat files&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;  conversion_failed    = 1&lt;/P&gt;&lt;P&gt; OTHERS               = 2.&lt;/P&gt;&lt;P&gt;IF it_upload[] IS INITIAL.&lt;/P&gt;&lt;P&gt;   MESSAGE e002(zmsg).&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&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;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2009 08:20:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-upload-separator/m-p/5663338#M1288010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-05T08:20:13Z</dc:date>
    </item>
  </channel>
</rss>

