<?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 Problem using open dataset in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-open-dataset/m-p/2400204#M534571</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 am trying to upload flat file data into appl server.but it is uploading some unwanted characters at the end.The code and data is given below.plz let me know the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : file type rlgrap-filename.&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;         rec(500) type c,&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;file = '/lz01/fin/in/bop_Checkrecon1.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear : itab.&lt;/P&gt;&lt;P&gt;refresh : itab.&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:\bop3.txt'&lt;/P&gt;&lt;P&gt;   FILETYPE                      = 'ASC'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HAS_FIELD_SEPARATOR           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   HEADER_LENGTH                 = 0&lt;/P&gt;&lt;P&gt;   READ_BY_LINE                  = 'X'&lt;/P&gt;&lt;UL&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;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                      = itab&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;   OTHERS                        = 17&lt;/P&gt;&lt;P&gt;          .&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;open dataset file for input in text mode encoding default.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt; loop at itab.&lt;/P&gt;&lt;P&gt;   transfer itab-rec to file.&lt;/P&gt;&lt;P&gt;   clear itab.&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt; close dataset file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The exact structure and the data present in the flat file is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0000000001000000052507       0000070000                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0000000003000000052507       0000199500                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0000000005000000052507       0000530000                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0000000007000000052507       0000005000                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0000000008000000052507       0000004000                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0001000000000000052507       0000058250                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  029005582      0001000000000000052507       0000012300                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  029005582      0001000001000000052507       0009438200                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  030404975      0001000000000000052507       0000056700                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  030404975      0001000001000000052507       0000004500                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  314018577      0001000002000000052507       0000001500                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  314018577      0001000003000000052507       0000435300                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  314018577      0001000007000000052507       0000066600                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rakesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2007 11:09:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-12T11:09:04Z</dc:date>
    <item>
      <title>Problem using open dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-open-dataset/m-p/2400204#M534571</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 am trying to upload flat file data into appl server.but it is uploading some unwanted characters at the end.The code and data is given below.plz let me know the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : file type rlgrap-filename.&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;         rec(500) type c,&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;file = '/lz01/fin/in/bop_Checkrecon1.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear : itab.&lt;/P&gt;&lt;P&gt;refresh : itab.&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:\bop3.txt'&lt;/P&gt;&lt;P&gt;   FILETYPE                      = 'ASC'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HAS_FIELD_SEPARATOR           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   HEADER_LENGTH                 = 0&lt;/P&gt;&lt;P&gt;   READ_BY_LINE                  = 'X'&lt;/P&gt;&lt;UL&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;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                      = itab&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;   OTHERS                        = 17&lt;/P&gt;&lt;P&gt;          .&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;open dataset file for input in text mode encoding default.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt; loop at itab.&lt;/P&gt;&lt;P&gt;   transfer itab-rec to file.&lt;/P&gt;&lt;P&gt;   clear itab.&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt; close dataset file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The exact structure and the data present in the flat file is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0000000001000000052507       0000070000                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0000000003000000052507       0000199500                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0000000005000000052507       0000530000                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0000000007000000052507       0000005000                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0000000008000000052507       0000004000                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  078041953      0001000000000000052507       0000058250                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  029005582      0001000000000000052507       0000012300                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  029005582      0001000001000000052507       0009438200                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  030404975      0001000000000000052507       0000056700                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  030404975      0001000001000000052507       0000004500                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  314018577      0001000002000000052507       0000001500                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  314018577      0001000003000000052507       0000435300                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  314018577      0001000007000000052507       0000066600                   R    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rakesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 11:09:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-open-dataset/m-p/2400204#M534571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T11:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using open dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-open-dataset/m-p/2400205#M534572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rakesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you display your flat file using an editor (like Notepad) then the file may look ok. However, there may be special characters at the end of every line that are not displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the following approach to analyze your flat file:&lt;/P&gt;&lt;P&gt;(1) Start Microsoft Excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(2) Open your flat file from with Excel. Be careful to choose the right &amp;lt;b&amp;gt;Codepage&amp;lt;/b&amp;gt; in the &amp;lt;i&amp;gt;Text Converter Assistent&amp;lt;/i&amp;gt;. For example, located in Switzerland I would most like choose Codepage = Windows(ANSI) or  1250 Middle European (Windows)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(3) Scroll to the end of lines and check if there are special characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 12:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-open-dataset/m-p/2400205#M534572</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-06-12T12:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using open dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-open-dataset/m-p/2400206#M534573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rakesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Forgotten to mention: do no longer use fm GUI_UPLOAD but use the static methods of class &amp;lt;b&amp;gt;CL_GUI_FRONTEND_SERVICES&amp;lt;/b&amp;gt;:&lt;/P&gt;&lt;P&gt;- GUI_UPLOAD&lt;/P&gt;&lt;P&gt;- GUI_DOWNLOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The class in &amp;lt;b&amp;gt;Unicode&amp;lt;/b&amp;gt;-compatible whereas the fm is not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 12:09:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-open-dataset/m-p/2400206#M534573</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-06-12T12:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using open dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-open-dataset/m-p/2400207#M534574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before start of selection add below lines. then i think it will work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLASS cl_abap_char_utilities DEFINITION LOAD.&lt;/P&gt;&lt;P&gt;  g_tab = cl_abap_char_utilities=&amp;gt;horizontal_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that g_tab is your internall table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also check once with cg3z&lt;/P&gt;&lt;P&gt;go to transaction cg3z there you give your file path and target path &lt;/P&gt;&lt;P&gt;put ascii mode not bin mode &lt;/P&gt;&lt;P&gt;and upload  file .&lt;/P&gt;&lt;P&gt;now you go to your application server and check the data if it is same format in which  you want , then problem is with your code .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 13:44:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-open-dataset/m-p/2400207#M534574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T13:44:43Z</dc:date>
    </item>
  </channel>
</rss>

