<?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: abap in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421440#M202261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have to get data from the application server to your ABAP program use OPEN DATASET,READ DATASET,CLOSE DATASET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to get the data from the application server to the PC then execute the transaction CG3Y.Put the application server file address in the source file and the PC file address in the destination file.Press the button'DOWNLOAD'.The data will be transferred  from the Application server to the PC file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Jun 2006 04:22:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-15T04:22:46Z</dc:date>
    <item>
      <title>abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421436#M202257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how we get data from application server?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2006 17:10:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421436#M202257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-14T17:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421437#M202258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try pressing F1 before asking basic questions.&lt;/P&gt;&lt;P&gt;Didn't you read the "Rules of Engagement"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2006 17:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421437#M202258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-14T17:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421438#M202259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use OPEN DATASET,CLOSE DATASET AND READ DATASET/TRANSFER DATASET Statements for posting or reading the data from application server&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2006 17:20:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421438#M202259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-14T17:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421439#M202260</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;You can refer to below thread,you will find your solution here.&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1774256"&gt;&lt;/A&gt;&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;For App Server:&lt;/P&gt;&lt;P&gt;OPEN DATASET p_file FOR INPUT&lt;/P&gt;&lt;P&gt;IN TEXT MODE&lt;/P&gt;&lt;P&gt;ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ DATASET p_file INTO w_filedata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET l_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Pres Server:&lt;/P&gt;&lt;P&gt;Use FM GUI_DOWNLOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if helpful and kindly close the thread if query is resolved&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 04:04:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421439#M202260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-15T04:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421440#M202261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have to get data from the application server to your ABAP program use OPEN DATASET,READ DATASET,CLOSE DATASET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to get the data from the application server to the PC then execute the transaction CG3Y.Put the application server file address in the source file and the PC file address in the destination file.Press the button'DOWNLOAD'.The data will be transferred  from the Application server to the PC file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 04:22:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421440#M202261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-15T04:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421441#M202262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siva,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
  con_str(50) TYPE C VALUE '/usr/temp/sample.dat',
  rec_len(80) TYPE C.
 OPEN DATASET con_str
      FOR INPUT IN TEXT MODE ENCODING DEFAULT.
  IF sy-subrc &amp;lt;&amp;gt; 0.
   EXIT.
 ELSE.
   READ DATASET con_str INTO rec_len. 
   WHILE sy-subrc &amp;lt;&amp;gt; 0.
      WRITE / rec_len.
      READ DATASET con_str INTO rec_len.
   ENDWHILE.
 ENDIF.
CLOSE DATASET con_str.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regs,&lt;/P&gt;&lt;P&gt;Venkat Ramanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 04:32:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421441#M202262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-15T04:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421442#M202263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;GOOD&lt;/P&gt;&lt;P&gt;GO THROUGH THIS LINK WHICH WILL GIVE YOU THE BRIEF IDEA ABOUT THE APPLICATION SERVER&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/basis/" target="test_blank"&gt;http://www.sapgenie.com/basis/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;MRUTYUN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 04:43:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421442#M202263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-15T04:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421443#M202264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiva Reddy,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Method 1&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;Use key words OPEN ,READ,TRANSFER key words in the report and press F1 .Read the doucumentation .&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Method 2&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;Working with Files on the Application Server .&lt;/P&gt;&lt;P&gt;Have a look at this path .&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46b/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46b/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that u will go through like that.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Thanks,&lt;/P&gt;&lt;P&gt;Venkat.O&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 05:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421443#M202264</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2006-06-15T05:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421444#M202265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET &amp;lt;file name&amp;gt; FOR {OUTPUT/INPUT/APPENDING}&lt;/P&gt;&lt;P&gt;IN {TEXT/BINARY} MODE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;chk this program..&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;DATA: i_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET i_file FOR INPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE e999(za) WITH 'Error opening file' i_file.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Reads each line of file individually&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;READ DATASET i_file INTO wa_datatab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Perform processing here&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;..... &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Downloading files to SAP(Application Server) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Download internal table to Application server file(Unix)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: e_file like rlgrap-filename value '/usr/sap/tmp/file.txt'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset e_file for output in text mode.&lt;/P&gt;&lt;P&gt;lOOP AT it_datatab......&lt;/P&gt;&lt;P&gt;transfer it_datatab to e_file.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;close dataset e_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Sumana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 05:58:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421444#M202265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-15T05:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421445#M202266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;following code might help u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To read data from a file on the application server, use the READ DATASET statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ DATASET &amp;lt;dsn&amp;gt; INTO &amp;lt;f&amp;gt; [LENGTH &amp;lt;len&amp;gt;].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement reads data from the file &amp;lt;dsn&amp;gt; into the variable &amp;lt;f&amp;gt;. In order to determine into which variable you should read data from a file, you need to know the structure of the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can specify the transfer mode in the OPEN DATASET statement. If you have not already opened the file for reading, the system tries to open it either in binary mode, or using the additions from the last OPEN DATASET statement. However, it is good practice only to open files using the OPEN DATASET statement. For further information about the OPEN DATASET statement and the naming conventions for files, refer to Opening a File.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the system was able to read data successfully, SY-SUBRC is set to 0. When the end of the file is reached, SY-SUBRC is set to 4. If the file could not be opened, SY-SUBRC is set to 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are working in binary mode, you can use the LENGTH addition to find out the length of the data transferred to &amp;lt;f&amp;gt;. The system sets the value of the variable &amp;lt;len&amp;gt; to this length. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA FNAME(60) VALUE 'myfile'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: TEXT1(12) VALUE 'abcdefghijkl',&lt;/P&gt;&lt;P&gt;      TEXT2(5),&lt;/P&gt;&lt;P&gt;      LENG TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET FNAME FOR OUTPUT IN BINARY MODE.&lt;/P&gt;&lt;P&gt;TRANSFER TEXT1 TO FNAME.&lt;/P&gt;&lt;P&gt;CLOSE DATASET FNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET FNAME FOR INPUT IN BINARY MODE.&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;  READ DATASET FNAME INTO TEXT2 LENGTH LENG.&lt;/P&gt;&lt;P&gt;  WRITE: / SY-SUBRC, TEXT2, LENG.&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;ENDDO.&lt;/P&gt;&lt;P&gt;CLOSE DATASET FNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0 abcde 5&lt;/P&gt;&lt;P&gt;0 fghij 5&lt;/P&gt;&lt;P&gt;4 kl### 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example fills the file "myfile" with 12 bytes from the field TEXT1. It is then read into the field TEXT2 in 5-byte portions. Note here that the system fills up the last three bytes of TEXT2 with zeros after the end of the file has been reached. The number of bytes transferred is contained in the field LENG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are working in text mode, you can use the LENGTH addition to find out the length of the current line in the file. The system sets the value of the variable &amp;lt;len&amp;gt; to the length of the line. The system calculates this by counting the number of bytes between the current position and the next end of line marker in the 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;DATA FNAME(60) VALUE 'myfile'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: TEXT1(4) VALUE '1234    ',&lt;/P&gt;&lt;P&gt;      TEXT2(8) VALUE '12345678',&lt;/P&gt;&lt;P&gt;      TEXT3(2),&lt;/P&gt;&lt;P&gt;      LENG TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;   TRANSFER: TEXT1 TO FNAME,&lt;/P&gt;&lt;P&gt;             TEXT2 TO FNAME.&lt;/P&gt;&lt;P&gt;CLOSE DATASET FNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET FNAME FOR INPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;   DO 2 TIMES.&lt;/P&gt;&lt;P&gt;      READ DATASET FNAME INTO TEXT3 LENGTH LENG.&lt;/P&gt;&lt;P&gt;      WRITE: / TEXT3, LENG.&lt;/P&gt;&lt;P&gt;   ENDDO.&lt;/P&gt;&lt;P&gt;CLOSE DATASET FNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output appears as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example writes the strings TEXT1 and TEXT2 to the file "myfile" in text mode. They are then read into the string TEXT3 (length 2). The amount of memory occupied by the lines is read into the field LENG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 07:01:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421445#M202266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-15T07:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421446#M202267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Siva Reddy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the following Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTRAINING_FILE_DOWNLOAD_APPL  message-id ZTRAING          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PROGRAM     : ZTRAINING_FILE_DOWNLOAD                                *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TITLE       : Download customer details                              *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;AUTHOR      : Kavitha Hari                                           *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                   Modification Log                                  *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Author                :                                              *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Date of change        :                                              *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Functional Spec #     :                                              *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Correction Request #  :                                              *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description of Change :                                              *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                    T A B L E S&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : KNA1.                         " Customer Master&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             types&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**-- types for data to be downloaded&lt;/P&gt;&lt;P&gt;types: begin of tp_kna1,&lt;/P&gt;&lt;P&gt;        KUNNR type kna1-kunnr,   " customer number&lt;/P&gt;&lt;P&gt;        LAND1 type kna1-land1,   " Country Key&lt;/P&gt;&lt;P&gt;        NAME1 type kna1-name1,   " customer name&lt;/P&gt;&lt;P&gt;        ORT01 type kna1-ort01,   " city&lt;/P&gt;&lt;P&gt;        PSTLZ type kna1-pstlz,   " postal code&lt;/P&gt;&lt;P&gt;        REGIO type kna1-regio,   " region&lt;/P&gt;&lt;P&gt;      end of tp_kna1.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             I n t e r n a l    T a b l e s&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**-- Internal table for data to be downloaded&lt;/P&gt;&lt;P&gt;data: it_kna1 type standard table of tp_kna1 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             S E L E C T I O N  S C R E E N&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Download File&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.&lt;/P&gt;&lt;P&gt;select-options: s_kunnr for kna1-kunnr.&lt;/P&gt;&lt;P&gt;PARAMETERS  :&lt;/P&gt;&lt;P&gt;               P_AFILE LIKE RLGRAP-FILENAME&lt;/P&gt;&lt;P&gt;                         DEFAULT 'customer.txt'.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;start of selection&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;perform get_data.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;end of selection&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not it_kna1[] is initial.&lt;/P&gt;&lt;P&gt;  perform DOWNLOAD_APP_FILE.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  download_app_file&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      download data to the application server file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM DOWNLOAD_APP_FILE.&lt;/P&gt;&lt;P&gt;  DATA: L_MSG(100).                    " error message&lt;/P&gt;&lt;P&gt;  OPEN DATASET P_AFILE FOR OUTPUT IN TEXT MODE ENCODING default.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    LOOP AT it_kna1.&lt;/P&gt;&lt;P&gt;      TRANSFER it_kna1 TO P_AFILE.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;    CLOSE DATASET P_AFILE.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                               " download_app_file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  get_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     get data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_data .&lt;/P&gt;&lt;P&gt;  select kunnr&lt;/P&gt;&lt;P&gt;         land1&lt;/P&gt;&lt;P&gt;         name1&lt;/P&gt;&lt;P&gt;         ort01&lt;/P&gt;&lt;P&gt;         pstlz&lt;/P&gt;&lt;P&gt;         regio&lt;/P&gt;&lt;P&gt;    into table it_kna1&lt;/P&gt;&lt;P&gt;    from kna1&lt;/P&gt;&lt;P&gt;    where kunnr in s_kunnr.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " get_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thansk &amp;amp; regards&lt;/P&gt;&lt;P&gt;Sreenivasulu P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 06:10:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/1421446#M202267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T06:10:12Z</dc:date>
    </item>
  </channel>
</rss>

