<?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: Downloading dynamically to application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996540#M1163679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Deepika.. the below code can be use used for ur purpose..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gt_error TYPE STANDARD TABLE OF tt_error,
      wa_error TYPE tt_error.

TYPES: BEGIN OF tt_file,
        data(1000),
END OF tt_file.
DATA: gt_file TYPE STANDARD TABLE OF tt_file,
      wa_file TYPE tt_file.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*Conver to pipe delimited file
  PERFORM fr_format_error_file TABLES gt_error gt_file.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM fr_format_error_file  TABLES p_final_table
                                  p_output_file.

  IF NOT gv_error LT 1.

    DATA : lf_buf TYPE string,
           lf_line TYPE string,
    co_line_feed TYPE c VALUE cl_abap_char_utilities=&amp;gt;cr_lf.

    FIELD-SYMBOLS : &amp;lt;fs_record&amp;gt; TYPE ANY,&amp;lt;fs_comp&amp;gt; TYPE ANY.
    LOOP AT p_final_table ASSIGNING &amp;lt;fs_record&amp;gt;.
      DO.
        ASSIGN COMPONENT sy-index OF STRUCTURE &amp;lt;fs_record&amp;gt; TO &amp;lt;fs_comp&amp;gt;.
        IF sy-subrc &amp;lt;&amp;gt; 0.
          EXIT.
        ENDIF.
        lf_buf = &amp;lt;fs_comp&amp;gt;.
        IF sy-index = 1.
          lf_line = lf_buf.
        ELSE.
          CONCATENATE lf_line lf_buf INTO lf_line SEPARATED BY c_sep.
        ENDIF.
        CLEAR lf_buf.
      ENDDO.
      CONCATENATE lf_line co_line_feed INTO lf_line.
      APPEND lf_line TO p_output_file.
      CLEAR lf_line.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " FR_FORMAT_ERROR_FILE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Jan 2009 16:10:02 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2009-01-05T16:10:02Z</dc:date>
    <item>
      <title>Downloading dynamically to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996535#M1163674</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 want to download table data ( Whose name i am giving at run time )  to application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is that, for downloading i will need to convert all fields to char type first and then only i can use following code to download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET P_DIR FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Write table contents to file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT ITAB INTO W_ITAB.&lt;/P&gt;&lt;P&gt;    TRANSFER W_ITAB TO P_DIR.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 15:46:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996535#M1163674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-05T15:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading dynamically to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996536#M1163675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to change into character type data or try different type of options like Legacy binary mode or legacy text mode&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 15:48:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996536#M1163675</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2009-01-05T15:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading dynamically to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996537#M1163676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;transfer the work area to a variable type string and then Transfer the String to dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it into wa.&lt;/P&gt;&lt;P&gt;string = wa .&lt;/P&gt;&lt;P&gt;Transfer wa to dataset.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Adi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 15:49:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996537#M1163676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-05T15:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading dynamically to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996538#M1163677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;correction "Transfer string to dataset".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Adi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 15:50:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996538#M1163677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-05T15:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading dynamically to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996539#M1163678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use as&lt;/P&gt;&lt;P&gt;OPEN DATASET P_DIR FOR OUTPUT IN BINARY MODE .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 15:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996539#M1163678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-05T15:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading dynamically to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996540#M1163679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Deepika.. the below code can be use used for ur purpose..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gt_error TYPE STANDARD TABLE OF tt_error,
      wa_error TYPE tt_error.

TYPES: BEGIN OF tt_file,
        data(1000),
END OF tt_file.
DATA: gt_file TYPE STANDARD TABLE OF tt_file,
      wa_file TYPE tt_file.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*Conver to pipe delimited file
  PERFORM fr_format_error_file TABLES gt_error gt_file.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM fr_format_error_file  TABLES p_final_table
                                  p_output_file.

  IF NOT gv_error LT 1.

    DATA : lf_buf TYPE string,
           lf_line TYPE string,
    co_line_feed TYPE c VALUE cl_abap_char_utilities=&amp;gt;cr_lf.

    FIELD-SYMBOLS : &amp;lt;fs_record&amp;gt; TYPE ANY,&amp;lt;fs_comp&amp;gt; TYPE ANY.
    LOOP AT p_final_table ASSIGNING &amp;lt;fs_record&amp;gt;.
      DO.
        ASSIGN COMPONENT sy-index OF STRUCTURE &amp;lt;fs_record&amp;gt; TO &amp;lt;fs_comp&amp;gt;.
        IF sy-subrc &amp;lt;&amp;gt; 0.
          EXIT.
        ENDIF.
        lf_buf = &amp;lt;fs_comp&amp;gt;.
        IF sy-index = 1.
          lf_line = lf_buf.
        ELSE.
          CONCATENATE lf_line lf_buf INTO lf_line SEPARATED BY c_sep.
        ENDIF.
        CLEAR lf_buf.
      ENDDO.
      CONCATENATE lf_line co_line_feed INTO lf_line.
      APPEND lf_line TO p_output_file.
      CLEAR lf_line.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " FR_FORMAT_ERROR_FILE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2009 16:10:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/downloading-dynamically-to-application-server/m-p/4996540#M1163679</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-01-05T16:10:02Z</dc:date>
    </item>
  </channel>
</rss>

