<?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 sample code for downloading in application server. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324971#M510874</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;please give me sample code for downloading the file in application server using open data set .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points sure.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jun 2007 13:04:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-06T13:04:45Z</dc:date>
    <item>
      <title>sample code for downloading in application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324971#M510874</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;please give me sample code for downloading the file in application server using open data set .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points sure.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 13:04:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324971#M510874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T13:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: sample code for downloading in application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324972#M510875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example of writing a file to the application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report zrich_0001.

parameters: d1 type localfile default '/usr/sap/TST/SYS/Test.txt'.

data: begin of itab occurs 0,
      field1(20) type c,
      field2(20) type c,
      field3(20) type c,
      end of itab.
data: str type string.

constants: con_tab type x value '09'.

* if you have a newer version, then you can use this instead.
*constants:
*    con_tab  type c value cl_abap_char_utilities=&amp;gt;HORIZONTAL_TAB.

start-of-selection.

itab-field1 = 'ABC'.
itab-field2 = 'DEF'.
itab-field3 = 'GHI'.
append itab.

itab-field1 = '123'.
itab-field2 = '456'.
itab-field3 = '789'.
append itab.

  open dataset d1 for output in text mode.
  loop at itab.
    concatenate itab-field1 itab-field2 itab-field2 into str
                  separated by con_tab.
    transfer str to d1.
  endloop.
  close dataset d1.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 13:07:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324972#M510875</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-06-06T13:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: sample code for downloading in application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324973#M510876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_downloadsap.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_downloadsap.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 13:07:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324973#M510876</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2007-06-06T13:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: sample code for downloading in application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324974#M510877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prabhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link.&lt;/P&gt;&lt;P&gt;&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="3306201"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aneesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 13:08:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324974#M510877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T13:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: sample code for downloading in application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324975#M510878</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;Here is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSANTESTAPP  NO STANDARD PAGE HEADING&lt;/P&gt;&lt;P&gt;                        LINE-SIZE 255&lt;/P&gt;&lt;P&gt;                        LINE-COUNT 65&lt;/P&gt;&lt;P&gt;                        MESSAGE-ID 00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.&lt;/P&gt;&lt;P&gt;PARAMETERS : P_FILE  LIKE RLGRAP-FILENAME OBLIGATORY DEFAULT&lt;/P&gt;&lt;P&gt;                                'c:\'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;      str1(6000) type c,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: dsn(50) type c value&lt;/P&gt;&lt;P&gt;'/celestica/interface/corp/in/work/735.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_FILENAME_GET'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              DEF_FILENAME     = P_FILE&lt;/P&gt;&lt;P&gt;              MASK             = ',&lt;STRONG&gt;.&lt;/STRONG&gt;,&lt;STRONG&gt;.&lt;/STRONG&gt;.'&lt;/P&gt;&lt;P&gt;              MODE             = 'O'&lt;/P&gt;&lt;P&gt;              TITLE            = TEXT-033&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;              FILENAME         = P_FILE&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              INV_WINSYS       = 1&lt;/P&gt;&lt;P&gt;              NO_BATCH         = 2&lt;/P&gt;&lt;P&gt;              SELECTION_CANCEL = 3&lt;/P&gt;&lt;P&gt;              SELECTION_ERROR  = 4&lt;/P&gt;&lt;P&gt;              OTHERS           = 5.&lt;/P&gt;&lt;P&gt;    CASE SY-SUBRC.&lt;/P&gt;&lt;P&gt;      WHEN 1.&lt;/P&gt;&lt;P&gt;        MESSAGE E001 WITH TEXT-073.&lt;/P&gt;&lt;P&gt;        STOP.&lt;/P&gt;&lt;P&gt;      WHEN 2.&lt;/P&gt;&lt;P&gt;        MESSAGE E001 WITH TEXT-074.&lt;/P&gt;&lt;P&gt;        STOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDCASE.&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CODEPAGE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   FILENAME                      = p_file&lt;/P&gt;&lt;P&gt;   FILETYPE                      = 'ASC'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADLEN                       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LINE_EXIT                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TRUNCLEN                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USER_FORM                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USER_PROG                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DAT_D_FORMAT                  = ' '&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;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    data_tab                      = itab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONVERSION_ERROR              = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_OPEN_ERROR               = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_READ_ERROR               = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INVALID_TYPE                  = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_BATCH                      = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNKNOWN_ERROR                 = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INVALID_TABLE_WIDTH           = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  GUI_REFUSE_FILETRANSFER       = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CUSTOMER_ERROR                = 9&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                        = 10&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; OPEN DATASET dsn FOR output in TEXT MODE .&lt;/P&gt;&lt;P&gt;    CHECK SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;   loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     TRANSFER itab-str1 TO dsn.&lt;/P&gt;&lt;P&gt;   endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   close dataset dsn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if it is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sangeetha.a&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 13:08:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324975#M510878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T13:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: sample code for downloading in application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324976#M510879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;try the Transaction&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CG3Y&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;to download the file on application server to Local system&lt;/P&gt;&lt;P&gt;without writing the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&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, 06 Jun 2007 13:09:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324976#M510879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T13:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: sample code for downloading in application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324977#M510880</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;    u follow this syntax for down loading data into application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;  FOR CREATING FILE OVER APPLICATION SERVER.&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;    &amp;lt;b&amp;gt;open dataset &amp;lt;name of dataset&amp;gt; for output.&lt;/P&gt;&lt;P&gt;    loop at &amp;lt;internal table&amp;gt; from &amp;lt;n&amp;gt; to &amp;lt;n&amp;gt;.&lt;/P&gt;&lt;P&gt;           transfer &amp;lt;internal table&amp;gt; to &amp;lt;name of dataset&amp;gt;.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;    close dataset &amp;lt;name of dataset&amp;gt;.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;READING DATA FROM APPLICATION SERVER.&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;b&amp;gt;open dataset &amp;lt;name of dataset&amp;gt; for input.&lt;/P&gt;&lt;P&gt;    do.&lt;/P&gt;&lt;P&gt;    read dataset &amp;lt;file name&amp;gt; into &amp;lt;internal table&amp;gt;.&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;    &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;here u provide logic as per  u r requirement.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;   close dataset &amp;lt;name of dataset&amp;gt;&amp;lt;/b&amp;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;sudheer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 13:16:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-downloading-in-application-server/m-p/2324977#M510880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T13:16:43Z</dc:date>
    </item>
  </channel>
</rss>

