<?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 Reports in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679885#M299692</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;for genarating the xl file wich function module we have to use.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;m.sriknath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Nov 2006 11:39:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-06T11:39:34Z</dc:date>
    <item>
      <title>Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679885#M299692</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;for genarating the xl file wich function module we have to use.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;m.sriknath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 11:39:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679885#M299692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T11:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679886#M299693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;gui_download&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 11:41:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679886#M299693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T11:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679887#M299694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WS_DOWNLOAD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 11:41:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679887#M299694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T11:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679888#M299695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srikanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out the link and sample code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Download internal table contents to EXCEL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ittoolbox.com/code/d.asp?d=3127&amp;amp;a=s" target="test_blank"&gt;http://sap.ittoolbox.com/code/d.asp?d=3127&amp;amp;a=s&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or to&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ittoolbox.com/code/d.asp?d=3126&amp;amp;a=s" target="test_blank"&gt;http://sap.ittoolbox.com/code/d.asp?d=3126&amp;amp;a=s&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or to&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ittoolbox.com/code/d.asp?d=3027&amp;amp;a=s" target="test_blank"&gt;http://sap.ittoolbox.com/code/d.asp?d=3027&amp;amp;a=s&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also check&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ittoolbox.com/code/d.asp?d=1614&amp;amp;a=s" target="test_blank"&gt;http://sap.ittoolbox.com/code/d.asp?d=1614&amp;amp;a=s&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These links were extracted from ITToolbox Sap source code exchange( &lt;A href="http://sap.ittoolbox.com/code/d.asp?whichpage=1&amp;amp;pagesize=10&amp;amp;i=10&amp;amp;a=c&amp;amp;o=&amp;amp;t=&amp;amp;q=&amp;amp;qt=" target="test_blank"&gt;http://sap.ittoolbox.com/code/d.asp?whichpage=1&amp;amp;pagesize=10&amp;amp;i=10&amp;amp;a=c&amp;amp;o=&amp;amp;t=&amp;amp;q=&amp;amp;qt=&lt;/A&gt; )&lt;/P&gt;&lt;P&gt;This pages are a free resource of code from other abappers who kindly share their knowledge to us.&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;&amp;gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Multiple excel sheets generation in a workbook&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CREATE OBJECT EXCEL 'EXCEL.SHEET'.&lt;/P&gt;&lt;P&gt;GET PROPERTY OF EXCEL 'Application' = APPLICATION.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF APPLICATION 'Visible' = 1.&lt;/P&gt;&lt;P&gt;CALL METHOD OF APPLICATION 'Workbooks' = BOOKS.&lt;/P&gt;&lt;P&gt;CALL METHOD OF BOOKS 'Add' = BOOK.&lt;/P&gt;&lt;P&gt;CALL METHOD OF BOOK 'WORKSHEETS' = SHEET.&lt;/P&gt;&lt;P&gt;CALL METHOD OF SHEET 'ADD'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill all the sheets with relavant data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;PERFORM SHEET1 TABLES ITAB1.&lt;/P&gt;&lt;P&gt;PERFORM SHEET2 TABLES ITAB2.&lt;/P&gt;&lt;P&gt;PERFORM SHEET3 TABLES ITAB3.&lt;/P&gt;&lt;P&gt;PERFORM SHEET4 TABLES ITAB4.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Quit the excel after use&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL METHOD OF EXCEL 'QUIT'.&lt;/P&gt;&lt;P&gt;FREE OBJECT: COLUMN,SHEET,BOOK,BOOKS,APPLICATION,EXCEL. "NO FLUSH.&lt;/P&gt;&lt;P&gt;CLEAR V_SHEET.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM FILL_CELL USING ROW COL VAL.&lt;/P&gt;&lt;P&gt;CALL METHOD OF SHEET 'cells' = CELL NO FLUSH&lt;/P&gt;&lt;P&gt;EXPORTING #1 = ROW #2 = COL.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF CELL 'value' = VAL.&lt;/P&gt;&lt;P&gt;FREE OBJECT CELL NO FLUSH.&lt;/P&gt;&lt;P&gt;ENDFORM. " FILL_CELL&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM SHEET1 TABLES ITAB1 STRUCTURE ITAB1.&lt;/P&gt;&lt;P&gt;V_SHEET = Sheet Name.&lt;/P&gt;&lt;P&gt;V_NO = V_NO + 1.&lt;/P&gt;&lt;P&gt;CALL METHOD OF BOOK 'worksheets' = SHEET NO FLUSH EXPORTING #1 = V_NO.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF SHEET 'Name' = V_SHEET NO FLUSH.&lt;/P&gt;&lt;P&gt;PERFORM FILL_SHEET1 TABLES ITAB1 USING V_NO V_SHEET.&lt;/P&gt;&lt;P&gt;CALL METHOD OF SHEET 'Columns' = COLUMN.&lt;/P&gt;&lt;P&gt;FREE OBJECT SHEET.&lt;/P&gt;&lt;P&gt;CALL METHOD OF COLUMN 'Autofit'.&lt;/P&gt;&lt;P&gt;FREE OBJECT COLUMN.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;Repeat above procedure for all sheets you want to add&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM FILL_SHEET1&lt;/P&gt;&lt;P&gt;TABLES ITAB1 STRUCTURE ITAB1&lt;/P&gt;&lt;P&gt;USING V_NO V_SHEET.&lt;/P&gt;&lt;P&gt;ROW = 1.&lt;/P&gt;&lt;P&gt;PERFORM FILL_CELL USING ROW 1 'Column1 Name'.&lt;/P&gt;&lt;P&gt;PERFORM FILL_CELL USING ROW 2 'Column2 Name'.&lt;/P&gt;&lt;P&gt;PERFORM FILL_CELL USING ROW 3 'Column3 Name'.&lt;/P&gt;&lt;P&gt;ROW = ROW + 1.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB1.&lt;/P&gt;&lt;P&gt;PERFORM FILL_CELL USING ROW 1 ITAB1-Column1.&lt;/P&gt;&lt;P&gt;PERFORM FILL_CELL USING ROW 2 ITAB1-Column2.&lt;/P&gt;&lt;P&gt;PERFORM FILL_CELL USING ROW 3 ITAB1-Column3.&lt;/P&gt;&lt;P&gt;ROW = ROW + 1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;Repeat above procedure for all sheets you want to add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Another FM -&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_FIELD_SEPERATOR =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_LINE_HEADER =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;i_filename =&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_APPL_KEEP = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;i_tab_sap_data =&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_TAB_CONVERTED_DATA =&lt;/P&gt;&lt;/LI&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_FAILED = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 2&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;Reward Points if this helps.&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Manish Kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 11:42:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679888#M299695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T11:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679889#M299696</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;this will be more friendly FM.&lt;/P&gt;&lt;P&gt;MS_EXCEL_OLE_STANDARD_DAT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just have to pass internal table which contain data ...&lt;/P&gt;&lt;P&gt;file path &lt;/P&gt;&lt;P&gt;internal table for headers....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output will be excel file very well formatted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 11:43:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679889#M299696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T11:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679890#M299697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FM GUI_DOWNLOAD. Suppose if your data is in ITAB_OUTPUT, then u can use that FM in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'GUI_DOWNLOAD'       &lt;/P&gt;&lt;P&gt;exporting            filename              = 'C:\test.xls'            &lt;/P&gt;&lt;P&gt;tables            data_tab              = itab_output       &lt;/P&gt;&lt;P&gt;exceptions            file_write_error      = 1            &lt;/P&gt;&lt;P&gt;others                = 22.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 11:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679890#M299697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T11:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679891#M299698</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;use the function modules  &lt;/P&gt;&lt;P&gt;MS_EXCEL_OLE_STANDARD_OLE&lt;/P&gt;&lt;P&gt; or&lt;/P&gt;&lt;P&gt;WS_EXCEL&lt;/P&gt;&lt;P&gt;hope it helps.&lt;/P&gt;&lt;P&gt;reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sipra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 11:58:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/1679891#M299698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T11:58:43Z</dc:date>
    </item>
  </channel>
</rss>

