<?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: Prob while saving Excel sheet in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097569#M1183044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sindu,&lt;/P&gt;&lt;P&gt;Really, your made-to-think question made me wear thinking cap.&lt;/P&gt;&lt;P&gt;Anyways, Sindu try the following code-snap, perhaps you'll get to conclusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF ole_server OCCURS 5.
INCLUDE STRUCTURE tole.
DATA: END OF ole_server.

ole_server-app = 'EXCEL.SHEET'.
APPEND ole_server.

CALL FUNCTION 'OLE_SERVER_CHECK'
IMPORTING
down_load_path = file
TABLES
ole_server_app = ole_server
EXCEPTIONS
unsupported_os = 1
unsupported_server = 2
no_ole_server_found = 3
OTHERS = 4.

IF sy-subrc is initial.
CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
EXPORTING
FILE_NAME = PATH_AND_FILE
TABLES
DATA_TAB = Tab_data
FIELDNAMES = fildnames.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover &lt;STRONG&gt;RSCRM_BAPI&lt;/STRONG&gt; provides you options to set date and time to export report to excel sheet,&lt;/P&gt;&lt;P&gt;For example, you want a program to get executed automatically and export the data in an excel sheet, this really works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks: Zahackson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Feb 2009 10:48:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-06T10:48:11Z</dc:date>
    <item>
      <title>Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097560#M1183035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai frnds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i used function Gui_download but it getting prob while saving reports saving as a Excel sheet . but it is not supporting. can anybody tell me which function module i have to use. i want save the excel sheet in background tell me .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;advance thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sindu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 09:59:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097560#M1183035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T09:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097561#M1183036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sindu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the FMs SAP_CONVERT_TO_XLS_FORMAT, ALSM_EXCEL_TO_INTERNAL_TABLE, KCD_EXCEL_DATE_CONVERT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pushpraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:02:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097561#M1183036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T10:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097562#M1183037</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 same function module.But give the File name as ' .XLS'   (FOR EXAMPLE - C:/TEMP/FIELNAME.XLS')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nithya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:04:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097562#M1183037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T10:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097563#M1183038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;GUI_DOWNLOAD&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   BIN_FILESIZE              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    FILENAME                  = 'C:\xyz.xls'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FILETYPE                  = 'ASC'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   APPEND                    = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WRITE_FIELD_SEPARATOR     = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   HEADER                    = '00'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   TRUNC_TRAILING_BLANKS     = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WRITE_LF                  = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   COL_SELECT                = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   COL_SELECT_MASK           = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DAT_MODE                  = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   CONFIRM_OVERWRITE         = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_AUTH_CHECK             = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   CODEPAGE                  = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IGNORE_CERR               = ABAP_TRUE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   REPLACEMENT               = '#'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WRITE_BOM                 = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   TRUNC_TRAILING_BLANKS_EOL = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WK1_N_FORMAT              = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WK1_N_SIZE                = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WK1_T_FORMAT              = SPACE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WK1_T_SIZE                = SPACE&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;  CHANGING&lt;/P&gt;&lt;P&gt;    DATA_TAB                  = itab&lt;/P&gt;&lt;P&gt;&lt;/P&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:06:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097563#M1183038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T10:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097564#M1183039</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;Try using the Function Module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALSM_EXCEL_TO_INTERNAL_TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do not provide any starting col no or ending col parameters&lt;/P&gt;&lt;P&gt;it shall take the complete excel file records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ravi Aswani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:07:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097564#M1183039</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T10:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097565#M1183040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Please try with the  following -&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_field_seperator    = 'X'&lt;/P&gt;&lt;P&gt;      i_tab_raw_data       = fs_truxs&lt;/P&gt;&lt;P&gt;      i_filename           = 'C:\TEMP\YH1333.XLS'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_tab_converted_data = t_mat&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      conversion_failed    = 1&lt;/P&gt;&lt;P&gt;      OTHERS               = 2.&lt;/P&gt;&lt;P&gt;  CASE sy-subrc.&lt;/P&gt;&lt;P&gt;    WHEN 0.&lt;/P&gt;&lt;P&gt;      MESSAGE 'File uploaded successfully'(001) TYPE 'S'.&lt;/P&gt;&lt;P&gt;    WHEN 1.&lt;/P&gt;&lt;P&gt;      MESSAGE 'Conversions failed'(002) TYPE 'I'.&lt;/P&gt;&lt;P&gt;    WHEN 2.&lt;/P&gt;&lt;P&gt;      MESSAGE 'Error during conversion'(003) TYPE 'I'.&lt;/P&gt;&lt;P&gt;  ENDCASE.                             " CASE SY-SUBRC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:08:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097565#M1183040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T10:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097566#M1183041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;PLease use parameters in gui_download file type is file.EXEl.&lt;/P&gt;&lt;P&gt;so u may save file in excel format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:10:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097566#M1183041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T10:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097567#M1183042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use function modules,&lt;/P&gt;&lt;P&gt;               SAP_CONVERT_TO_XLS_FORMAT  Or&lt;/P&gt;&lt;P&gt;               ALSM_EXCEL_TO_INTERNAL_TABLE.&lt;/P&gt;&lt;P&gt;It will Work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:21:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097567#M1183042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T10:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097568#M1183043</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;try it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
*    I_FIELD_SEPERATOR          = 'X'
     i_line_header              = 'X'
      i_tab_raw_data             = it_raw
      i_filename                 =  'c:\temp.xls'  "file name
    TABLES
      i_tab_converted_data       = it_final[]
   EXCEPTIONS
     conversion_failed          = 1
     OTHERS                     = 2
            .
  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.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:24:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097568#M1183043</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T10:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097569#M1183044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sindu,&lt;/P&gt;&lt;P&gt;Really, your made-to-think question made me wear thinking cap.&lt;/P&gt;&lt;P&gt;Anyways, Sindu try the following code-snap, perhaps you'll get to conclusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF ole_server OCCURS 5.
INCLUDE STRUCTURE tole.
DATA: END OF ole_server.

ole_server-app = 'EXCEL.SHEET'.
APPEND ole_server.

CALL FUNCTION 'OLE_SERVER_CHECK'
IMPORTING
down_load_path = file
TABLES
ole_server_app = ole_server
EXCEPTIONS
unsupported_os = 1
unsupported_server = 2
no_ole_server_found = 3
OTHERS = 4.

IF sy-subrc is initial.
CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
EXPORTING
FILE_NAME = PATH_AND_FILE
TABLES
DATA_TAB = Tab_data
FIELDNAMES = fildnames.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover &lt;STRONG&gt;RSCRM_BAPI&lt;/STRONG&gt; provides you options to set date and time to export report to excel sheet,&lt;/P&gt;&lt;P&gt;For example, you want a program to get executed automatically and export the data in an excel sheet, this really works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks: Zahackson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:48:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097569#M1183044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T10:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097570#M1183045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is raw data can u tell  i_tab_raw_data             = it_raw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sindu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:50:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097570#M1183045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T10:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097571#M1183046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this simple code.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generated excel will be in C:  Go and see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zawi_demodownload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Types&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF g_r_mara,&lt;/P&gt;&lt;P&gt;       matnr LIKE mara-matnr,&lt;/P&gt;&lt;P&gt;       ersda LIKE mara-ersda,&lt;/P&gt;&lt;P&gt;       laeda LIKE mara-laeda,&lt;/P&gt;&lt;P&gt;       mtart LIKE mara-mtart,&lt;/P&gt;&lt;P&gt;       mbrsh LIKE mara-mbrsh,&lt;/P&gt;&lt;P&gt;       END OF g_r_mara.&lt;/P&gt;&lt;P&gt;*Data&lt;/P&gt;&lt;P&gt;DATA: g_t_mara TYPE TABLE OF g_r_mara,&lt;/P&gt;&lt;P&gt;      filename TYPE string,&lt;/P&gt;&lt;P&gt;      s TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Tables&lt;/P&gt;&lt;P&gt;TABLES: mara, sscrfields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Selection Screen&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_matnr FOR mara-matnr.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN SKIP.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN PUSHBUTTON 10(20) name USER-COMMAND ucom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;  name = 'Spread Sheet'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;  IF sscrfields-ucomm = 'UCOM'.&lt;/P&gt;&lt;P&gt;    s = 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Data retrival and populating internal table&lt;/P&gt;&lt;P&gt;  IF s = 1.&lt;/P&gt;&lt;P&gt;    SELECT matnr ersda laeda mtart mbrsh&lt;/P&gt;&lt;P&gt;      INTO  CORRESPONDING FIELDS OF TABLE g_t_mara&lt;/P&gt;&lt;P&gt;      FROM mara&lt;/P&gt;&lt;P&gt;      WHERE matnr IN s_matnr.&lt;/P&gt;&lt;P&gt;    filename = 'C:\Testing.xls'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   Downloading data from internal table to excel&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        filename              = filename&lt;/P&gt;&lt;P&gt;        filetype              = 'ASC'&lt;/P&gt;&lt;P&gt;        write_field_separator = 'X'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        data_tab              = g_t_mara.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still face problem, then problem will be in excel macro security.&lt;/P&gt;&lt;P&gt;Do following....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open MS-Excel.&lt;/P&gt;&lt;P&gt;Goto   Tools -&amp;gt; Macro -&amp;gt; Security -&amp;gt; SecurityLevel -&amp;gt; Low.&lt;/P&gt;&lt;P&gt;Also in Next tab Trusted Publishers -&amp;gt; tick both boxes. &lt;/P&gt;&lt;P&gt;Click ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now go and run your above report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 10:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097571#M1183046</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2009-02-06T10:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Prob while saving Excel sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097572#M1183047</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;[Communication to Presentation Server in Background Mode|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 11:00:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-while-saving-excel-sheet/m-p/5097572#M1183047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T11:00:37Z</dc:date>
    </item>
  </channel>
</rss>

