<?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: Reading a file form the application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901502#M936147</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 with splitting statemet ...&lt;/P&gt;&lt;P&gt;contab = '#'.&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn FOR INPUT IN binary MODE .&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      DO.&lt;/P&gt;&lt;P&gt;        CLEAR: wa_string.&lt;/P&gt;&lt;P&gt;        READ DATASET dsn INTO wa_string.&lt;/P&gt;&lt;P&gt;        IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;          EXIT.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          SPLIT wa_string AT con_tab INTO izrev_value-monat&lt;/P&gt;&lt;P&gt;                                          izrev_value-gjahr&lt;/P&gt;&lt;P&gt;                                          izrev_value-circle&lt;/P&gt;&lt;P&gt;                                          izrev_value-feed_type&lt;/P&gt;&lt;P&gt;                                          izrev_value-cos&lt;/P&gt;&lt;P&gt;                                          v_core.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;       ENDDO.&lt;/P&gt;&lt;P&gt;      CLOSE DATASET dsn.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 May 2008 07:27:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-27T07:27:48Z</dc:date>
    <item>
      <title>Reading a file form the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901497#M936142</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;i have one requirement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will upload one tab separated file into the application server&lt;/P&gt;&lt;P&gt;then tht file uploaded in the below format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6#17300094#1#05142008####4.0#0200#200#1#USBANK####                                       &lt;/P&gt;&lt;P&gt;8#17300094##05142008#01###4.0#0200#200#1#USBANK####                                      &lt;/P&gt;&lt;P&gt;4#5569630000126876#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000127205#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000127312#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000127445#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000127767#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000127817#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000127841#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000128120#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000128286#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000128328#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000128492#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000128690#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000128724#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000128765#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000129094#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000129110#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;4#5569630000129136#05132008#08128#0#0#1500000###0#0#00840################0#12319999######&lt;/P&gt;&lt;P&gt;9#17300094##05142008#01#17##4.0#0200#200#1#USBANK####                                    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i opened that file by using the statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET p_file FOR INPUT IN BINARY MODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but now wht happening is &lt;/P&gt;&lt;P&gt;when i use read statement as like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ DATASET p_file INTO t_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then line by line data is not getting into t_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now my requirement is still i want to open that file in binary mode only and i want to get the line by line into t_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i know that if open the file in text mode then when i use the read statement then i will get line by line data into t_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be rewarded for all gud posts....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 05:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901497#M936142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T05:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a file form the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901498#M936143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;use this&lt;/P&gt;&lt;P&gt; open dataset p_file for input in text mode encoding default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;      message s001(zv_errr).&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    clear wa_sourcefile.&lt;/P&gt;&lt;P&gt;    while c_one = c_one.&lt;/P&gt;&lt;P&gt;      read dataset p_file into ws_c_temp_itab.&lt;/P&gt;&lt;P&gt;      if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;        call function 'Z_RECORD_CONVERT'&lt;/P&gt;&lt;P&gt;          importing&lt;/P&gt;&lt;P&gt;            input    = ws_c_temp_itab&lt;/P&gt;&lt;P&gt;            data_tab = wa_sourcefile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        "Getting the data into i_sourcefile&lt;/P&gt;&lt;P&gt;        append wa_sourcefile to i_sourcefile.&lt;/P&gt;&lt;P&gt;        clear wa_sourcefile.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        close dataset p_file.&lt;/P&gt;&lt;P&gt;        exit.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endwhile.&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;for this &lt;/P&gt;&lt;P&gt;1. you need to use a tab separated file&lt;/P&gt;&lt;P&gt;2. and you need to upload a text file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 05:50:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901498#M936143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T05:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a file form the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901499#M936144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chari,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i too know that if i open the file in text mode i can read it line by line but i want to open it in binary mode and i need to retrive the data how can i do that....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 06:16:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901499#M936144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T06:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a file form the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901500#M936145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF lty_data,
        fld TYPE string,
       END OF lty_data.

  DATA: l_length  TYPE i,
        l_length2 TYPE i,
        ls_data   TYPE lty_data.

  OPEN DATASET v_infile FOR INPUT IN BINARY MODE. " open extract file
  IF sy-subrc &amp;lt;&amp;gt; 0.
    WRITE: / 'Error - Failed to open ',  v_infile.
  ENDIF.

  DO.
    READ DATASET v_infile INTO ls_data-fld.
    IF sy-subrc NE 0.
      EXIT.
    ELSE.
      l_length = STRLEN( ls_data-fld ).
      APPEND ls_data TO lt_data.
    ENDIF.
  ENDDO.

  LOOP AT lt_data INTO ls_data.
    CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
      EXPORTING
        text      = ls_data-fld
      IMPORTING
        length    = l_length2
      TABLES
        ftext_tab = mailbin.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 07:05:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901500#M936145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T07:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a file form the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901501#M936146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  While uploading the  tab delimited file into application server first u keep all the data in internal . then  u upload all the data to application server right..&lt;/P&gt;&lt;P&gt; while uploading the data into application sever u use transfer statement directly..&lt;/P&gt;&lt;P&gt;  before doing so u just concatenate field values suppose f1,f2,f3.. seperated by (constants:c_hextab(1) type x value '09') '09' hexadecimal value.Then the file will be uploaded as tablimited in application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do award points if find usefull.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 07:20:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901501#M936146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T07:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a file form the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901502#M936147</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 with splitting statemet ...&lt;/P&gt;&lt;P&gt;contab = '#'.&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn FOR INPUT IN binary MODE .&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      DO.&lt;/P&gt;&lt;P&gt;        CLEAR: wa_string.&lt;/P&gt;&lt;P&gt;        READ DATASET dsn INTO wa_string.&lt;/P&gt;&lt;P&gt;        IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;          EXIT.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          SPLIT wa_string AT con_tab INTO izrev_value-monat&lt;/P&gt;&lt;P&gt;                                          izrev_value-gjahr&lt;/P&gt;&lt;P&gt;                                          izrev_value-circle&lt;/P&gt;&lt;P&gt;                                          izrev_value-feed_type&lt;/P&gt;&lt;P&gt;                                          izrev_value-cos&lt;/P&gt;&lt;P&gt;                                          v_core.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;       ENDDO.&lt;/P&gt;&lt;P&gt;      CLOSE DATASET dsn.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 07:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-form-the-application-server/m-p/3901502#M936147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T07:27:48Z</dc:date>
    </item>
  </channel>
</rss>

