<?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: File Handling on Application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503293#M232836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. we can use like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. suppose your whole 1st line,&lt;/P&gt;&lt;P&gt;  is in some long character variable myline,&lt;/P&gt;&lt;P&gt;  (after uploading)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. and itab is your final internal table, &lt;/P&gt;&lt;P&gt;  where  values should go,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.&lt;/P&gt;&lt;P&gt;split myline at CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB&lt;/P&gt;&lt;P&gt;into table itab.&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Aug 2006 10:38:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-14T10:38:14Z</dc:date>
    <item>
      <title>File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503287#M232830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After lots of hard work I am posting this query. It may be easy for you but I need the solution as soon as possible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem: I have a txt file on application server. Which has got 3 fields. First 2 are character and third is currency field. (E.G. Currency field value may be - 125.26) This text file is tab delimited. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.G.&lt;/P&gt;&lt;P&gt;0000012   12121   12.26&lt;/P&gt;&lt;P&gt;0001742   54844  125.15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you see this file on App. Server on AL11 it looks like '#' character is there instead of tab space. I want to get all these 3 fields into internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing the problem with '#'. Its neither accessible nor I can perform any string operation on it. In internal table also record is coming like this ::&lt;/P&gt;&lt;P&gt;0000012#12121#12.26&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me getting these fields seperately? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Jignesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:29:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503287#M232830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503288#M232831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jignesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. For capturing / detecting this character&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  (its nothing but a horiontal tab, &lt;/P&gt;&lt;P&gt;   shown as #)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.  use&lt;/P&gt;&lt;P&gt;  CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  (the above is nothing but TAB character)&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:31:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503288#M232831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503289#M232832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jignesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   The problem is with the code-page conversion. Try using ENCODING NON-UNICODE and see if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Also as suggested by Amit, split the text read with method horizantal_tab of class *char_utilities to get to the work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Eswar Rao  Boddeti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:31:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503289#M232832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503290#M232833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use SPLIT itab at w_delimitor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:32:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503290#M232833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503291#M232834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit.. can you put a code snippet how to use this while parsing ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:35:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503291#M232834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503292#M232835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The hash is a tab character.&lt;/P&gt;&lt;P&gt;use the CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB can be used to identify the so called # and replace it&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:36:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503292#M232835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503293#M232836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. we can use like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. suppose your whole 1st line,&lt;/P&gt;&lt;P&gt;  is in some long character variable myline,&lt;/P&gt;&lt;P&gt;  (after uploading)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. and itab is your final internal table, &lt;/P&gt;&lt;P&gt;  where  values should go,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.&lt;/P&gt;&lt;P&gt;split myline at CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB&lt;/P&gt;&lt;P&gt;into table itab.&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:38:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503293#M232836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503294#M232837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;open dataset file for input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET file IN TEXT MODE ENCODING DEFAULT FOR INPUT. &lt;/P&gt;&lt;P&gt;DO. &lt;/P&gt;&lt;P&gt;  READ DATASET file INTO line. &lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;    EXIT. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;split line at CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB into wa_line.&lt;/P&gt;&lt;P&gt;append wa_line to it_line.&lt;/P&gt;&lt;P&gt;clear it_line.&lt;/P&gt;&lt;P&gt;ENDDO. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wa_line should have three fields yo uhave mentioned and it line should be a table having the same structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503294#M232837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503295#M232838</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;The '#' represents the Tab . becasue the file is tabdelimited file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0000012#12121#12.26&lt;/P&gt;&lt;P&gt;you have to use &amp;lt;b&amp;gt;CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB&amp;lt;/b&amp;gt; (equivalent for '#' ) to replace with ' ' . use replace or split and then remove '#' in your file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:40:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503295#M232838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503296#M232839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all... Problem solved.. I learned one new thing.... Thanks again !!! You all are appreciated with points &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jignesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:44:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503296#M232839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: File Handling on Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503297#M232840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
Hi Jignesh

   Consider the below code.

Ignore l_cr part if you dont have problem with Carriage Return when you read your input file.


parameters: p_file like rlgrap-filename.

data: l_tab(1) type c value cl_abap_char_utilities=&amp;gt;horizontal_tab.
data: l_cr(1) type c value cl_abap_char_utilities=&amp;gt;cr_lf.
data: l_text(100) type c.
data: begin of itab occurs 0,
        text1(10) type c,
        text2(10) type c,
      end of itab.

  open dataset p_file in text mode for input encoding default.
  if sy-subrc ne 0.
*** error message
  else.
    do.
      read dataset p_file into l_text.
      if sy-subrc ne 0.
         exit.
      else.
         replace l_cr in l_text with space.
         clear: itab.
         split l_text at l_tab into itab-text1 itab-text2.
         append itab.
      endif.
    enddo.
  endif.


Kind Regards
Eswar


Am slow to respond, maybe next time.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Eswar Rao  Boddeti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 10:53:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-handling-on-application-server/m-p/1503297#M232840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T10:53:12Z</dc:date>
    </item>
  </channel>
</rss>

