<?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: Function module to call MSEXCEL macro in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557108#M855947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is resolved now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Nov 2008 15:16:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-12T15:16:08Z</dc:date>
    <item>
      <title>Function module to call MSEXCEL macro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557104#M855943</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;I have a requirement where i download the excel file say X and then through msexcel macros select certain fields of excel X and copy to excel file Y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to run this macro thorugh some sap function module/ program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any standard function module / program which can do this functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2008 10:12:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557104#M855943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-15T10:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to call MSEXCEL macro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557105#M855944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i had a sample program check this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample program &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zmm_basic_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report to View Detail Of Material Master BASIC DATA. &lt;/P&gt;&lt;P&gt;Start Date 07.05.2007 &lt;/P&gt;&lt;P&gt;Request No.-GR3K931783 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: mara,marc,makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gi_mara LIKE mara OCCURS 1 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;gi_marc LIKE marc OCCURS 1 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;gi_makt LIKE makt OCCURS 1 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF gi_download OCCURS 1,&lt;/P&gt;&lt;P&gt;matnr LIKE mara-matnr,"material no&lt;/P&gt;&lt;P&gt;maktx LIKE makt-maktx,"material description&lt;/P&gt;&lt;P&gt;matkl LIKE mara-matkl,"material group&lt;/P&gt;&lt;P&gt;werks LIKE marc-werks,"plant&lt;/P&gt;&lt;P&gt;ekgrp LIKE marc-ekgrp,"purchasing group&lt;/P&gt;&lt;P&gt;spart LIKE mara-spart,"division&lt;/P&gt;&lt;P&gt;meins LIKE mara-meins,"base uit of measure&lt;/P&gt;&lt;P&gt;bismt LIKE mara-bismt,"old material no.&lt;/P&gt;&lt;P&gt;prdha LIKE mara-prdha,"product hierarchy&lt;/P&gt;&lt;P&gt;brgew LIKE mara-brgew,"gross weight&lt;/P&gt;&lt;P&gt;ntgew LIKE mara-ntgew,"net weight&lt;/P&gt;&lt;P&gt;gewei LIKE mara-gewei,"weight unit&lt;/P&gt;&lt;P&gt;volum LIKE mara-volum,"volume&lt;/P&gt;&lt;P&gt;voleh LIKE mara-voleh,"volume unit&lt;/P&gt;&lt;P&gt;zeinr LIKE mara-zeinr,"document no.&lt;/P&gt;&lt;P&gt;zeiar LIKE mara-zeiar,"document type&lt;/P&gt;&lt;P&gt;zeivr LIKE mara-zeivr,"document version&lt;/P&gt;&lt;P&gt;zeifo LIKE mara-zeifo,"page format of document&lt;/P&gt;&lt;P&gt;blanz LIKE mara-blanz,"number of sheets&lt;/P&gt;&lt;P&gt;spras LIKE makt-spras,"language key&lt;/P&gt;&lt;P&gt;END OF gi_download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF gi_fieldnames OCCURS 1,&lt;/P&gt;&lt;P&gt;mandt(50),&lt;/P&gt;&lt;P&gt;END OF gi_fieldnames.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*file path and file name data declaration.&lt;/P&gt;&lt;P&gt;DATA: stripped_name LIKE rlgrap-filename,&lt;/P&gt;&lt;P&gt;file_path LIKE rlgrap-filename.&lt;/P&gt;&lt;P&gt;DATA: inpath LIKE ltran-path01,&lt;/P&gt;&lt;P&gt;file LIKE ltran-file01,&lt;/P&gt;&lt;P&gt;outpath LIKE ltran-path02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field Symbols ************ &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;mara&amp;gt; LIKE gi_mara.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;marc&amp;gt; LIKE gi_marc.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;makt&amp;gt; LIKE gi_makt.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;download&amp;gt; LIKE gi_download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: SKIP.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_werks FOR marc-werks.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_ekgrp FOR marc-ekgrp.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_matnr FOR mara-matnr.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_matkl FOR mara-matkl.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_spart FOR mara-spart.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: SKIP.&lt;/P&gt;&lt;P&gt;PARAMETER fnm TYPE rlgrap-filename OBLIGATORY.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: SKIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR fnm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;static = 'X'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;file_name = fnm&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;mask_too_long = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;*For fetching the baisc data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************************************&lt;/P&gt;&lt;P&gt;*Getting the general data based on material no,division and material&lt;/P&gt;&lt;P&gt;*group.&lt;/P&gt;&lt;P&gt;*******************************************************************&lt;/P&gt;&lt;P&gt;SELECT * FROM mara INTO TABLE gi_mara&lt;/P&gt;&lt;P&gt;WHERE matnr IN s_matnr&lt;/P&gt;&lt;P&gt;AND spart IN s_spart&lt;/P&gt;&lt;P&gt;AND matkl IN s_matkl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************************************&lt;/P&gt;&lt;P&gt;*Getting the plant data based on material no,plant and purchasing&lt;/P&gt;&lt;P&gt;*group.&lt;/P&gt;&lt;P&gt;*******************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT gi_mara[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT * FROM marc INTO TABLE gi_marc&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN gi_mara&lt;/P&gt;&lt;P&gt;WHERE matnr EQ gi_mara-matnr&lt;/P&gt;&lt;P&gt;AND werks IN s_werks&lt;/P&gt;&lt;P&gt;AND ekgrp IN s_ekgrp.&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;*Getting the material description based on material no&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 NOT gi_mara[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT * FROM makt INTO TABLE gi_makt&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN gi_mara&lt;/P&gt;&lt;P&gt;WHERE matnr = gi_mara-matnr.&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;Fetching all data into single internal table ******** &lt;/P&gt;&lt;P&gt;SORT gi_mara BY matnr.&lt;/P&gt;&lt;P&gt;SORT gi_makt BY matnr.&lt;/P&gt;&lt;P&gt;SORT gi_marc BY matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;Transfering the data into gi_download&lt;/STRONG&gt;*******&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF s_werks] IS INITIAL and s_ekgrp[ IS INITIAL.&lt;/P&gt;&lt;P&gt;LOOP AT gi_mara ASSIGNING &amp;lt;mara&amp;gt;.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING &amp;lt;mara&amp;gt; TO gi_download.&lt;/P&gt;&lt;P&gt;READ TABLE gi_marc ASSIGNING &amp;lt;marc&amp;gt;&lt;/P&gt;&lt;P&gt;WITH KEY matnr = &amp;lt;mara&amp;gt;-matnr&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;marc&amp;gt;-werks TO gi_download-werks.&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;marc&amp;gt;-ekgrp TO gi_download-ekgrp.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE gi_makt ASSIGNING &amp;lt;makt&amp;gt;&lt;/P&gt;&lt;P&gt;WITH KEY matnr = &amp;lt;mara&amp;gt;-matnr&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;makt&amp;gt;-maktx TO gi_download-maktx.&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;makt&amp;gt;-spras TO gi_download-spras.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;APPEND gi_download.&lt;/P&gt;&lt;P&gt;CLEAR gi_download.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;LOOP AT gi_marc ASSIGNING &amp;lt;marc&amp;gt;.&lt;/P&gt;&lt;P&gt;READ TABLE gi_mara ASSIGNING &amp;lt;mara&amp;gt;&lt;/P&gt;&lt;P&gt;WITH KEY matnr = &amp;lt;marc&amp;gt;-matnr&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING &amp;lt;mara&amp;gt; TO gi_download.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE gi_makt ASSIGNING &amp;lt;makt&amp;gt;&lt;/P&gt;&lt;P&gt;WITH KEY matnr = &amp;lt;marc&amp;gt;-matnr&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;makt&amp;gt;-maktx TO gi_download-maktx.&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;makt&amp;gt;-spras TO gi_download-spras.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;marc&amp;gt;-werks TO gi_download-werks.&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;marc&amp;gt;-ekgrp TO gi_download-ekgrp.&lt;/P&gt;&lt;P&gt;APPEND gi_download.&lt;/P&gt;&lt;P&gt;CLEAR gi_download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;IF gi_download[] IS INITIAL.&lt;/P&gt;&lt;P&gt;MESSAGE i001(sa) WITH 'Data not found'.&lt;/P&gt;&lt;P&gt;LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******&lt;STRONG&gt;Downloading the basic data&lt;/STRONG&gt;********&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Material no'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Material description'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Material group'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Plant'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Purchasing group'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Division'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Base uit of measure'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Old material no.'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Product hierarchy'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Gross weight'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Net weight'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Weight unit'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Volume'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Volume unit'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Document no.'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Document type'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Document version'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Page format of document'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Number of sheets'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames.&lt;/P&gt;&lt;P&gt;gi_fieldnames-mandt = 'Language key'.&lt;/P&gt;&lt;P&gt;APPEND gi_fieldnames.&lt;/P&gt;&lt;P&gt;CLEAR gi_fieldnames. CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;full_name = fnm&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;stripped_name = stripped_name&lt;/P&gt;&lt;P&gt;file_path = file_path&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;x_error = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc 0. &lt;/P&gt;&lt;P&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno &lt;/P&gt;&lt;P&gt;WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;CLEAR fnm.&lt;/P&gt;&lt;P&gt;CONCATENATE file_path stripped_name INTO fnm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: inpath,file,stripped_name,file_path,outpath.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;filename = fnm&lt;/P&gt;&lt;P&gt;filetype = 'DAT'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = gi_download&lt;/P&gt;&lt;P&gt;fieldnames = gi_fieldnames&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;file_open_error = 1&lt;/P&gt;&lt;P&gt;file_write_error = 2&lt;/P&gt;&lt;P&gt;invalid_filesize = 3&lt;/P&gt;&lt;P&gt;invalid_type = 4&lt;/P&gt;&lt;P&gt;no_batch = 5&lt;/P&gt;&lt;P&gt;unknown_error = 6&lt;/P&gt;&lt;P&gt;invalid_table_width = 7&lt;/P&gt;&lt;P&gt;gui_refuse_filetransfer = 8&lt;/P&gt;&lt;P&gt;customer_error = 9&lt;/P&gt;&lt;P&gt;OTHERS = 10.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;MESSAGE i003(sa) WITH 'File downloaded successfuly' fnm.&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;Check the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm" target="test_blank"&gt;http://sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2008 10:59:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557105#M855944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-15T10:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to call MSEXCEL macro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557106#M855945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i want is there any sap standard program / standard function module&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 08:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557106#M855945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T08:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to call MSEXCEL macro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557107#M855946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi can u use this ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RRM_MSEXCEL_OUTBOUND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 08:28:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557107#M855946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T08:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to call MSEXCEL macro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557108#M855947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is resolved now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2008 15:16:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-call-msexcel-macro/m-p/3557108#M855947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-12T15:16:08Z</dc:date>
    </item>
  </channel>
</rss>

