<?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: Help me ..! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3460363#M831447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Instead of using ASCII code....do this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare this stmt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants: con_tab value cl_abap_char_utilities=&amp;gt;horizontal_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and write the below stmt..instead of urs..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split jtab-data at con_tab into itab-matnr itab-mbrsh itab-meins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopr this helps u,&lt;/P&gt;&lt;P&gt;Regrds,&lt;/P&gt;&lt;P&gt;Arunsri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Arunsri on Mar 5, 2008 5:23 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Mar 2008 04:22:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-05T04:22:56Z</dc:date>
    <item>
      <title>Help me ..!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3460362#M831446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Plse help me in this.this is not giving me proper output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am having flat file with tab delimiter...i want to use split command to get the data.check my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;        matnr type c,&lt;/P&gt;&lt;P&gt;        mbrsh type c,&lt;/P&gt;&lt;P&gt;        meins type c,&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of jtab occurs 0,&lt;/P&gt;&lt;P&gt;        data(1024) type c,&lt;/P&gt;&lt;P&gt;       end of jtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : sep type xstring.   ****&lt;STRONG&gt;byte string&lt;/STRONG&gt;****&lt;/P&gt;&lt;P&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                      = 'C:\flat_files\sam.txt'&lt;/P&gt;&lt;P&gt;    FILETYPE                      = 'ASC'&lt;/P&gt;&lt;P&gt;    READ_BY_LINE                  = 'X'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab                      = jtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at jtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sep = 09.   *****ASCII code for tab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split jtab-data at sep into itab-matnr itab-mbrsh itab-meins.&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;loop at itab.&lt;/P&gt;&lt;P&gt;write : / itab-matnr ,itab-mbrsh , itab-meins.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 19:48:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3460362#M831446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-04T19:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help me ..!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3460363#M831447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Instead of using ASCII code....do this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare this stmt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants: con_tab value cl_abap_char_utilities=&amp;gt;horizontal_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and write the below stmt..instead of urs..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split jtab-data at con_tab into itab-matnr itab-mbrsh itab-meins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopr this helps u,&lt;/P&gt;&lt;P&gt;Regrds,&lt;/P&gt;&lt;P&gt;Arunsri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Arunsri on Mar 5, 2008 5:23 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 04:22:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3460363#M831447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T04:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help me ..!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3460364#M831448</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;IF you want to upload a tab separated file then just pass this parameter in GUI_UPLOAD&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;has_field_separator     = 'X'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No need to have separate coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 04:32:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3460364#M831448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T04:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help me ..!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3460365#M831449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;You didn't specify the length of fields in the itab structure. The length of the fields will be considered as 1 char. Here is the efficient way of reading data from a file which is tab delimited.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the function module GUI_UPLOAD there is a parameter "has_field_separator" for which you can &lt;/P&gt;&lt;P&gt;specify whether your file is tab delimited or comma delimited,etc. If it is tab delimited you assign 'X' . If you use this parameter you dont have to use "split" command. The data in the file will be uploaded into the fields of the internal table directly. I commented the unnecessary code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : begin of itab occurs 0,
matnr(18) type c,
mbrsh type c,
meins(3) type c,
end of itab.

*** data : begin of jtab occurs 0,
*** data(1024) type c,
*** end of jtab.

**** data : sep type string.

call function 'GUI_UPLOAD'
exporting
filename = 'C:\flat_files\sam.txt'
FILETYPE = 'ASC'
READ_BY_LINE = 'X'
has_field_separator = 'X'
tables
data_tab = itab.

**loop at jtab.
**
**sep = 09.
**
**split jtab-data at sep into itab-matnr itab-mbrsh itab-meins.
*endloop.

loop at itab.
write : / itab-matnr ,itab-mbrsh , itab-meins.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful answers..&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 04:39:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-me/m-p/3460365#M831449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T04:39:20Z</dc:date>
    </item>
  </channel>
</rss>

