<?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: Problem in Dloading O/P in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-dloading-o-p/m-p/5836901#M1317362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand well what you say, you just don't use the correct technology : if your report displays a classic output (I understand it's a "list" based on WRITE abap statement?), you can't juste use OLE (call method of) to convert and save the list to an excel file. You must use CL_GUI_FRONTEND_SERVICES=&amp;gt;GUI_DOWNLOAD method, passing an internal table with comma separated values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Jun 2009 16:03:18 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2009-06-20T16:03:18Z</dc:date>
    <item>
      <title>Problem in Dloading O/P</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-dloading-o-p/m-p/5836900#M1317361</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 am trying to save a Classical report output as a excel file using CALL METHOD. wat i want is to give functionality to the user so he can select his own path to save the excel file. I was successful till that. but after it is saved, i am unable to open it. But if i copy and save the same excel i am able to open and see the output in excel. Can any one tell wat might be wrong?? &lt;/P&gt;&lt;P&gt;I would hav copied the code but its too big to post it in the thread. &lt;/P&gt;&lt;P&gt;Also please tell me wat Call methods to be applied to download and save the O/P as excel. &lt;/P&gt;&lt;P&gt;I am using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: NAME TYPE STRING,&lt;/P&gt;&lt;P&gt;        PATH TYPE STRING,&lt;/P&gt;&lt;P&gt;        FULLPATH TYPE STRING,&lt;/P&gt;&lt;P&gt;        EXT TYPE STRING,&lt;/P&gt;&lt;P&gt;        FILTER TYPE STRING,&lt;/P&gt;&lt;P&gt;        SIZE TYPE I,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       GUIOBJ TYPE REF TO CL_GUI_FRONTEND_SERVICES,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        UACT TYPE I&lt;/P&gt;&lt;P&gt;        SHEET TYPE OLE2_OBJECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONDENSE V_FILE NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  EXT = 'xls'.&lt;/P&gt;&lt;P&gt;  CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_SAVE_DIALOG&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      DEFAULT_EXTENSION = EXT&lt;/P&gt;&lt;P&gt;      DEFAULT_FILE_NAME = NAME&lt;/P&gt;&lt;P&gt;      FILE_FILTER       = FILTER&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      FILENAME          = NAME&lt;/P&gt;&lt;P&gt;      PATH              = PATH&lt;/P&gt;&lt;P&gt;      FULLPATH          = FULLPATH&lt;/P&gt;&lt;P&gt;      USER_ACTION       = UACT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  V_FILE = FULLPATH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;DIRECTORY_EXIST&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      DIRECTORY            = V_FILE&lt;/P&gt;&lt;P&gt;    RECEIVING&lt;/P&gt;&lt;P&gt;      RESULT               = W_RESULT&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      CNTL_ERROR           = 1&lt;/P&gt;&lt;P&gt;      ERROR_NO_GUI         = 2&lt;/P&gt;&lt;P&gt;      WRONG_PARAMETER      = 3&lt;/P&gt;&lt;P&gt;      NOT_SUPPORTED_BY_GUI = 4&lt;/P&gt;&lt;P&gt;      OTHERS               = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;    CONCATENATE 'Excel Saved at' V_FILE 'successfully' INTO MSG SEPARATED BY SPACE.&lt;/P&gt;&lt;P&gt;    MESSAGE MSG TYPE 'I'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Save excel speadsheet to particular filename&lt;/P&gt;&lt;P&gt;  CALL METHOD OF SHEET 'SaveAs'&lt;/P&gt;&lt;P&gt;                  EXPORTING&lt;/P&gt;&lt;P&gt;                            #1 = V_FILE     "filename&lt;/P&gt;&lt;P&gt;                            #2 = 1.                          "fileFormat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Save Excel document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; CALL METHOD OF SHEET 'SAVE'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Quits out of Excel document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD OF SHEET 'QUIT'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Closes visible Excel window, data is lost if not saved&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SET PROPERTY OF APPLICATION 'visible' = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2009 13:07:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-dloading-o-p/m-p/5836900#M1317361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-20T13:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Dloading O/P</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-dloading-o-p/m-p/5836901#M1317362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand well what you say, you just don't use the correct technology : if your report displays a classic output (I understand it's a "list" based on WRITE abap statement?), you can't juste use OLE (call method of) to convert and save the list to an excel file. You must use CL_GUI_FRONTEND_SERVICES=&amp;gt;GUI_DOWNLOAD method, passing an internal table with comma separated values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2009 16:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-dloading-o-p/m-p/5836901#M1317362</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-06-20T16:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Dloading O/P</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-dloading-o-p/m-p/5836902#M1317363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;directly use GUI_DOWNLOAD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2009 19:29:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-dloading-o-p/m-p/5836902#M1317363</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-20T19:29:51Z</dc:date>
    </item>
  </channel>
</rss>

