<?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: CHECK THIS PROGRAM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259771#M489729</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is the Solution, The Internal table should have only charecter fields if the Unicode checkbox is clicked, the below Program will run if the Unicode checkbox is unchecked. you can uncheck in the program Attributes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZOPENDATASET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TMARA LIKE MARA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR&lt;/P&gt;&lt;P&gt;UP TO 20 ROWS&lt;/P&gt;&lt;P&gt;FROM MARA&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE TMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'C:\SAMPLE.TXT' FOR OUTPUT IN TEXT MODE ENCODING&lt;/P&gt;&lt;P&gt;DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT TMARA.&lt;/P&gt;&lt;P&gt;TRANSFER TMARA-MATNR TO 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR TMARA[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'C:\SAMPLE.TXT' FOR INPUT IN TEXT MODE ENCODING&lt;/P&gt;&lt;P&gt;DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DO&lt;/P&gt;&lt;P&gt;READ DATASET 'C:\SAMPLE.TXT' INTO TMARA-MATNR.&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;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; TMARA-MATNR.&lt;/P&gt;&lt;P&gt;ENDDO.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2007 13:18:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-16T13:18:55Z</dc:date>
    <item>
      <title>CHECK THIS PROGRAM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259766#M489724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HAI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I HAVE WRITHEN ONE PROGRAM FOR WRITE DATA IN APPLICATION SERVER USING OPEN DATASET AND ONCE'S AGAIN I AM READING FROM APPLICATION SERVER. BUT IT IS NOT WORKING .PLEASE CORRECT IT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZOPENDATASET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TMARA LIKE MARA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR&lt;/P&gt;&lt;P&gt;       UP TO 20 ROWS&lt;/P&gt;&lt;P&gt;       FROM MARA&lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE TMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       OPEN DATASET 'C:\SAMPLE.TXT' FOR OUTPUT IN TEXT MODE ENCODING&lt;/P&gt;&lt;P&gt;                                                             DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       LOOP AT TMARA.&lt;/P&gt;&lt;P&gt;       TRANSFER TMARA-MATNR TO 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;       ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       CLOSE DATASET 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       CLEAR TMARA[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       OPEN DATASET 'C:\SAMPLE.TXT' FOR INPUT IN TEXT MODE ENCODING&lt;/P&gt;&lt;P&gt;                                                            DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       LOOP AT TMARA.&lt;/P&gt;&lt;P&gt;       READ DATASET 'C:\SAMPLE.TXT' INTO TMARA-MATNR.&lt;/P&gt;&lt;P&gt;       WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; TMARA-MATNR.&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;       CLOSE DATASET 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANK YOU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASHOK KUMAR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 12:48:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259766#M489724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T12:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: CHECK THIS PROGRAM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259767#M489725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You are not at all READING the data from DATASET&lt;/P&gt;&lt;P&gt;REPORT ZOPENDATASET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TMARA LIKE MARA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR&lt;/P&gt;&lt;P&gt;UP TO 20 ROWS&lt;/P&gt;&lt;P&gt;FROM MARA&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE TMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'C:\SAMPLE.TXT' FOR OUTPUT IN TEXT MODE ENCODING&lt;/P&gt;&lt;P&gt;DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT TMARA.&lt;/P&gt;&lt;P&gt;TRANSFER TMARA-MATNR TO 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR TMARA[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'C:\SAMPLE.TXT' FOR INPUT IN TEXT MODE ENCODING&lt;/P&gt;&lt;P&gt;DEFAULT.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET 'C:\SAMPLE.TXT'  INTO TMARA.&lt;/P&gt;&lt;P&gt;APPEND TMARA.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT TMARA.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; TMARA-MATNR.&lt;/P&gt;&lt;P&gt;ENDLOOP.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEE NOW. IT WORKS NOW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 13:00:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259767#M489725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T13:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: CHECK THIS PROGRAM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259768#M489726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why are you writing it, then reading what you wrote?  Why not just loop at the internal table and write from it?&lt;/P&gt;&lt;P&gt;Also, why, are you using the open dataset?  Why not just use the gui_download funtion module?  You can try the below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZOPENDATASET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TMARA LIKE MARA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR&lt;/P&gt;&lt;P&gt;UP TO 20 ROWS&lt;/P&gt;&lt;P&gt;FROM MARA&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE TMARA.&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                        = 'C:\SAMPLE.TXT' &lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab                        = tmara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR TMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT TMARA.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; TMARA-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 13:04:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259768#M489726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T13:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: CHECK THIS PROGRAM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259769#M489727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HAI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       IS IT POSSIBLE ONLY FOR CHARACTER BECAUSE I GOT SHORT DUMP.&lt;/P&gt;&lt;P&gt;HOW CAN I WRITE INTEGER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASHOK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 13:12:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259769#M489727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T13:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: CHECK THIS PROGRAM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259770#M489728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZOPENDATASET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TMARA LIKE MARA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR&lt;/P&gt;&lt;P&gt;UP TO 20 ROWS&lt;/P&gt;&lt;P&gt;FROM MARA&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE TMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'C:\SAMPLE.TXT' FOR OUTPUT IN TEXT MODE ENCODING&lt;/P&gt;&lt;P&gt;DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT TMARA.&lt;/P&gt;&lt;P&gt;TRANSFER TMARA-MATNR TO 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR TMARA.&lt;/P&gt;&lt;P&gt;Refresh TMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'C:\SAMPLE.TXT' FOR INPUT IN TEXT MODE ENCODING&lt;/P&gt;&lt;P&gt;DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;While sy-subrc = 0.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; TMARA-MATNR.&lt;/P&gt;&lt;P&gt;READ DATASET 'C:\SAMPLE.TXT' INTO TMARA-MATNR.&lt;/P&gt;&lt;P&gt;ENDwhile.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 13:16:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259770#M489728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T13:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: CHECK THIS PROGRAM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259771#M489729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is the Solution, The Internal table should have only charecter fields if the Unicode checkbox is clicked, the below Program will run if the Unicode checkbox is unchecked. you can uncheck in the program Attributes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZOPENDATASET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TMARA LIKE MARA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR&lt;/P&gt;&lt;P&gt;UP TO 20 ROWS&lt;/P&gt;&lt;P&gt;FROM MARA&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE TMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'C:\SAMPLE.TXT' FOR OUTPUT IN TEXT MODE ENCODING&lt;/P&gt;&lt;P&gt;DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT TMARA.&lt;/P&gt;&lt;P&gt;TRANSFER TMARA-MATNR TO 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR TMARA[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'C:\SAMPLE.TXT' FOR INPUT IN TEXT MODE ENCODING&lt;/P&gt;&lt;P&gt;DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DO&lt;/P&gt;&lt;P&gt;READ DATASET 'C:\SAMPLE.TXT' INTO TMARA-MATNR.&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;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; TMARA-MATNR.&lt;/P&gt;&lt;P&gt;ENDDO.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET 'C:\SAMPLE.TXT'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 13:18:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259771#M489729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T13:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: CHECK THIS PROGRAM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259772#M489730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what are you trying to do ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have called open data set,  and that means u are trying to do something with a file in application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then you are passing path 'C:\SAMPLE.TXT' ... this is a path in presentation server, right ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what are you trying to acheive... ? if u really want to write something to application server... give a path over there... (use AL11 to see application server files )..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else, if from 'C:\SAMPLE.TXT' ..use gui_upload&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 13:19:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259772#M489730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T13:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: CHECK THIS PROGRAM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259773#M489731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears to me that you are using the OPEN DATASET, TRANSFER / READ DATASET and CLOSE DATASET statements to read and write data from and to your PC (Presentation Layer). This is not possible. The above statements are used to read and write data from and to the Application Layer (you can view the file structure using transaction AL11). To read a file from the PC (Presentation Layer) you use function module GUI_UPLOAD and to write data to the PC (Presentation Layer) you use function module GUI_DOWNLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to do one of the two things:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Use a valid file path from the application server (See transaction AL11) and replace 'C:\SAMPLE.TXT'  with this path (the rest of your program will remain the same).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Use GUI_UPLOAD (to read data from 'C:\SAMPLE.TXT' ) and GUI_DOWNLOAD (to write data to 'C:\SAMPLE.TXT') instead of the OPEN DATASET, TRANSFER / READ DATASET and CLOSE DATASET statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 13:25:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259773#M489731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T13:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: CHECK THIS PROGRAM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259774#M489732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi try this one it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form SUB_GET_FILEPATH&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; p1 text &lt;/P&gt;&lt;P&gt;&amp;lt;-- p2 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM SUB_GET_FILEPATH .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GFILE = 'D:\SAP_INT\INBOUND\INBOX'. "Path&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " SUB_GET_FILEPATH&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form SUB_GET_FILE&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; p1 text &lt;/P&gt;&lt;P&gt;&amp;lt;-- p2 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM SUB_GET_FILE .&lt;/P&gt;&lt;P&gt;DATA: P_FDIR(200) TYPE C.&lt;/P&gt;&lt;P&gt;DATA: IT_FILEDIR1 TYPE STANDARD TABLE OF TY_FILEDIR WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P_FDIR = GFILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RZL_READ_DIR_LOCAL'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;NAME = P_FDIR&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;FILE_TBL = IT_FILEDIR.&lt;/P&gt;&lt;P&gt;REFRESH : IT_FILEDIR1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_FILEDIR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF IT_FILEDIR-NAME(4) = 'ZINC' OR IT_FILEDIR-NAME(4) = 'zinc'.&lt;/P&gt;&lt;P&gt;MOVE IT_FILEDIR-NAME TO IT_FILEDIR1-NAME.&lt;/P&gt;&lt;P&gt;APPEND IT_FILEDIR1.&lt;/P&gt;&lt;P&gt;ENDIF.&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;IF IT_FILEDIR1[] IS INITIAL.&lt;/P&gt;&lt;P&gt;STOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_FILEDIR1.&lt;/P&gt;&lt;P&gt;REFRESH: I_TAB.&lt;/P&gt;&lt;P&gt;CLEAR: I_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAME = IT_FILEDIR1-NAME.&lt;/P&gt;&lt;P&gt;CONCATENATE: GFILE '\' NAME INTO G_FILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET G_FILE FOR INPUT IN TEXT MODE&lt;/P&gt;&lt;P&gt;ENCODING DEFAULT&lt;/P&gt;&lt;P&gt;IGNORING CONVERSION ERRORS.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;CONCATENATE 'FILENAME : ' G_FILE INTO I_MSG1.&lt;/P&gt;&lt;P&gt;APPEND I_MSG1.&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET G_FILE INTO RECORD.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;SPLIT RECORD AT ',' INTO I_TAB-BUKRS I_TAB-EBELN&lt;/P&gt;&lt;P&gt;I_TAB-BLDAT I_TAB-XBLNR I_TAB-LIFNR I_TAB-AMOUNT&lt;/P&gt;&lt;P&gt;I_TAB-CURR I_TAB-BUSAREA&lt;/P&gt;&lt;P&gt;I_TAB-BKTXT I_TAB-DMBTR I_TAB-MENGE I_TAB-SRNO.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING I_TAB TO I_TAB1.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;APPEND I_TAB1.&lt;/P&gt;&lt;P&gt;CLEAR: I_TAB, I_TAB1.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLOSE DATASET G_FILE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 06:24:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-this-program/m-p/2259774#M489732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T06:24:17Z</dc:date>
    </item>
  </channel>
</rss>

