<?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: file creation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537975#M245346</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;&lt;/P&gt;&lt;P&gt;For,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;saves on logical file path by giving selection parameters&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztest_2.
 
 
          DATA : it_mara TYPE STANDARD TABLE OF mara WITH HEADER LINE,
                 ftemp TYPE string.
 
          PARAMETERS : p_file TYPE rlgrap-filename DEFAULT 'C:LSMWdata'.
 
          START-OF-SELECTION.
 
            CONCATENATE p_file '.xls' INTO p_file.
 
            ftemp = p_file.
            CONDENSE ftemp NO-GAPS.
 
            SELECT * FROM mara INTO TABLE it_mara UP TO 200 ROWS.
 
            CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                filename                = ftemp
                filetype                = 'ASC'
              TABLES
                data_tab                = it_mara[]
              EXCEPTIONS
                file_write_error        = 1
                no_batch                = 2
                gui_refuse_filetransfer = 3
                invalid_type            = 4
                no_authority            = 5
                unknown_error           = 6
                header_not_allowed      = 7
                separator_not_allowed   = 8
                filesize_not_allowed    = 9
                header_too_long         = 10
                dp_error_create         = 11
                dp_error_send           = 12
                dp_error_write          = 13
                unknown_dp_error        = 14
                access_denied           = 15
                dp_out_of_memory        = 16
                disk_full               = 17
                dp_timeout              = 18
                file_not_found          = 19
                dataprovider_exception  = 20
                control_flush_error     = 21
                OTHERS                  = 22.
            IF sy-subrc &amp;lt;&amp;gt; 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
 


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Aug 2006 08:07:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-02T08:07:08Z</dc:date>
    <item>
      <title>file creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537971#M245342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to create output file based on internal table and local variables and the contents of that file should be printed on printer and saves on logical file path by giveng selection parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz guide me how to do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2006 07:07:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537971#M245342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-02T07:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: file creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537972#M245343</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;  Check the following link, this will give step by step way to create the file,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_updown.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_updown.htm&lt;/A&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>Wed, 02 Aug 2006 07:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537972#M245343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-02T07:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: file creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537973#M245344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Divya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  The output file can be created from the internal table in different formats and it can store to the specified path. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Ex: Try these function modules...&lt;/P&gt;&lt;P&gt;        1. WS_EXCEL for saving content as the excel file.&lt;/P&gt;&lt;P&gt;        2. WS_DOWNLOAD, DOWNLOAD etc.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try and get back...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2006 08:01:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537973#M245344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-02T08:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: file creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537974#M245345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For Logical Files use tcode FILE to view all Logical directories use tcode AL11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards:-&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2006 08:05:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537974#M245345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-02T08:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: file creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537975#M245346</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;&lt;/P&gt;&lt;P&gt;For,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;saves on logical file path by giving selection parameters&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztest_2.
 
 
          DATA : it_mara TYPE STANDARD TABLE OF mara WITH HEADER LINE,
                 ftemp TYPE string.
 
          PARAMETERS : p_file TYPE rlgrap-filename DEFAULT 'C:LSMWdata'.
 
          START-OF-SELECTION.
 
            CONCATENATE p_file '.xls' INTO p_file.
 
            ftemp = p_file.
            CONDENSE ftemp NO-GAPS.
 
            SELECT * FROM mara INTO TABLE it_mara UP TO 200 ROWS.
 
            CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                filename                = ftemp
                filetype                = 'ASC'
              TABLES
                data_tab                = it_mara[]
              EXCEPTIONS
                file_write_error        = 1
                no_batch                = 2
                gui_refuse_filetransfer = 3
                invalid_type            = 4
                no_authority            = 5
                unknown_error           = 6
                header_not_allowed      = 7
                separator_not_allowed   = 8
                filesize_not_allowed    = 9
                header_too_long         = 10
                dp_error_create         = 11
                dp_error_send           = 12
                dp_error_write          = 13
                unknown_dp_error        = 14
                access_denied           = 15
                dp_out_of_memory        = 16
                disk_full               = 17
                dp_timeout              = 18
                file_not_found          = 19
                dataprovider_exception  = 20
                control_flush_error     = 21
                OTHERS                  = 22.
            IF sy-subrc &amp;lt;&amp;gt; 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
 


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2006 08:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537975#M245346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-02T08:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: file creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537976#M245347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to save the file &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use FM FILE_GET_NAME to convert the logical file physical file name.&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;local pc - use gui_download&lt;/P&gt;&lt;P&gt;application server - user open dataset .. statement (search the forum for code sample)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for also printing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to call function GET_PRINT_PARAMETERS with parameters immediately = 'X' and no_dialog= 'X' .(apart from other parameters)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2006 08:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-creation/m-p/1537976#M245347</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-08-02T08:59:15Z</dc:date>
    </item>
  </channel>
</rss>

