How export report into excel sheet automatically using SSRS 2010?

Hi,
I have created many reports using SQL Server Data Tool 2010 and at my work, we are using active batch to ran reports every month.
Now question is, my boss want me to set up reports such a way that when active batch is ran, reports should be exported into excel sheet automatically with the default values given for parameters at some specific folder location. How can I export report
into excel sheet automatically when active batch is executed?
Please help me on this. Thanks for the help in advance.
Vicky

Check this:
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename                = 'C:/test.xls'
      filetype                = 'ASC'
      write_field_separator   = 'X'
    TABLES
      data_tab                = t_output
Regards.

Similar Messages

  • How to export alv into excel sheet without using toolbar button

    hi,
    i have developed ALV using FM methord on that i have created one button when user will click on that button
    hole ALV should export in to excel as it is and that ALV is Heaving top of page contain also i want that shuld
    also copy please help me for that please send me the sample code for that
    Edited by: ankita khare on Nov 3, 2008 9:42 AM

    Check this:
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'C:/test.xls'
          filetype                = 'ASC'
          write_field_separator   = 'X'
        TABLES
          data_tab                = t_output
    Regards.

  • How to import pictures into excel sheet without using report generation

    Dear Friends
    I want to know how to import the picture or picture file into excel sheet without using report generation..
    kindly come up with any suggestions or example code
    Regards
    Karthick
    Solved!
    Go to Solution.

    Thank you Rajesh 
    i am going through that vi
    Rajesh Nair wrote:
    Please go through below link
    http://zone.ni.com/devzone/cda/epd/p/id/3638
    Eventhough one subVI is missing i think it will be usefull for you.
    Regards
    Rajesh R.Nair
    Rajesh Nair wrote:
    Please go through below link

  • Formatting problem in download report into EXCEL Sheet

    I have requirement that the Column in the report have values as 1.50,1.5,3.50,when i'm downloading the report into Excel sheet,The values are rounded and appearing as 1.5,1.5,3.5.
    Can anyone please let me know how to resolve this requirement

    hi,
    1) Excel will not take zero's after decimal(1.50) it will roundup(1.5) the values.
    2) you can do like in formula section use CAST(column_name as CHAR) and download it to excel then u will get the zero i think...i didn't tried
    or Column properties--->Data format --> Select Number--->use 1000's Seperator for 1 decimal and save the report and download it
    but it should work!
    thanks,
    saichand.v
    Edited by: saichand on Oct 27, 2009 4:11 PM
    Edited by: saichand on Oct 27, 2009 4:12 PM

  • How to report on balance sheet accounts using 0EC_PCA_3

    Hi Experts,
    How to report on balance sheet accounts using 0EC_PCA_3
    Thanks
    nagini

    Hi,
    IF you want to see the accumulated balances you need to select the period from 0 to 12.
    EX: you want to open the report up to period 6th 2009 and want see the figures including the carryforward balances from 2008.
    then in selection screen select the from period = 0  and to period =6.
    hope its helpful
    thanks,

  • ClassNotFoundException: while exporting data into excel sheet

    Hi Experts,
    While exporting data into excel sheet below error was getting even i am created jar file DC and publicpart AND j2ee
    I have to deployed the JAR files on the server:
    1. Created "External Library DC"
    2. added my JAR files into "Libraries" folder.
    3. Exposed them as Public Part.
    4. Created "J2EE Library DC"
    5. Refered "External Library DC" into J2EE Library DC.
    6. Deployed "J2EE Library DC"
    7. and lastly refered this on my Web Dynpro DC by giving Library Reference.
    but still this is the errro was getting, plz any one can help regarding this what could be the problem
    java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook -
    Loader Info -
    ClassLoader name: [ng.com/Reuse_Export_to_Excel] Parent loader name: [Frame ClassLoader] References: common:service:http;service:servlet_jsp service:ejb common:service:iiop;service:naming;service:p4;service:ts service:jmsconnector library:jsse library:servlet common:library:IAIKSecurity;library:activation;library:mail;library:tcsecssl library:ejb20 library:j2eeca library:jms library:opensql common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:webservices_lib;service:adminadapter;service:basicadmin;service:com.sap.security.core.ume.service;service:configuration;service:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notification;service:keystore;service:security;service:userstore interface:resourcecontext_api interface:webservices interface:cross interface:ejbserialization sap.com/tcwddispwda sap.com/tcwdcorecomp service:webdynpro service:sld library:tcddicddicservices library:com.sap.aii.proxy.framework library:tcgraphicsigs library:com.sap.mw.jco library:com.sap.lcr.api.cimclient library:sapxmltoolkit library:com.sap.aii.util.rb library:com.sap.util.monitor.jarm library:tcddicddicruntime library:com.sap.aii.util.xml library:com.sap.aii.util.misc library:tccmi Resources: /usr/sap//JC21/j2ee/cluster/server0/apps/ng.com/Reuse_Export_to_Excel/src.zip /usr/sap//JC21/j2ee/cluster/server0/apps/ng.com/Reuse_Export_to_Excel/webdynpro/public/lib/ng.comReuse_Export_to_Excel.jar Loading model: {parent,references,local} -
    Regards,
    Varma

    closed

  • How to Convert Report into Excel Sheet when Sending Mail.

    Dear Friends,
    i want to send mail to HOD of Product with an Excel Sheet .
    i want to send Pending Issue details to HOD in Excel Sheet attachment .
    here i have pending issue report now i need to send it in Excel Sheet attachment .
    i have table where i have manage Product ID and HOD OF PRODUCT.
    CREATE TABLE  "MAP_USER_PRODUCT_DTL"
       (     "ID" NUMBER NOT NULL ENABLE,
         "PRODUCT_ID"NUMBER,
         "USER_ID" VARCHAR2(5) NOT NULL ENABLE,
         "HOD_PROD" VARCHAR2(100)========================================Value is Y OR N IF HOD then Y else N
         CONSTRAINT "MAP_USER_PRODUCT_DTL_PK" PRIMARY KEY ("ID") ENABLE
    /i have one more table where all complete issue detail insert.
    CREATE TABLE  "CRM_ISSUE_PROBLEM"
       (     "ID" NUMBER,
         "SUBJECT" VARCHAR2(255) NOT NULL ENABLE,
         "CLIENT_ID" NUMBER,
         "ASSIGNED_TO_ID" VARCHAR2(100),
         "ASSIGNED_ON" DATE,
         "DESCRIPTION" VARCHAR2(4000),
         "PRODUCT_ID" NUMBER NOT NULL ENABLE,
         "STATUS_ID" NUMBER NOT NULL ENABLE,
          CONSTRAINT "CRM_ISSUE_PROBLEM_PK" PRIMARY KEY ("ID") ENABLE
    Here STATUS_ID is Like Pending ISsue,Open Issue and Close Issue .i want to send mail to HOD with Pending Issue Report convert into Excel Sheet and send to HOD?
    How can i do this.
    Thanks
    Edited by: Vedant on Oct 12, 2011 12:36 AM
    Edited by: Vedant on Oct 12, 2011 2:22 AM

    Hello Vedant,
    Would it suffice if you send a CSV file?
    If yes, then see following code.. run the code under APEX > Home > SQL Workshop > SQL Commands
    DECLARE
            ln_id NUMBER;
            lc_clob CLOB;
         lb_blob BLOB;
         li_in PLS_INTEGER := 1;
         li_out PLS_INTEGER := 1;
         li_lang PLS_INTEGER := 0;
         li_warning PLS_INTEGER := 0;
         lv_mail_rcpts VARCHAR2(2000) := '[email protected]';
         lv_mail_from VARCHAR2(100) := '[email protected]';     
           lv_clmn_separator VARCHAR2(1) := ',';
    BEGIN
         -- Build file content as CLOB
      -- Replace with your query
         FOR i IN (select object_id A, object_name B, object_type C, status D, temporary E, generated F, secondary G,namespace H from user_objects where rownum < 10)               
         LOOP
        IF lc_clob IS NULL THEN
          lc_clob := i.A||lv_clmn_separator||i.B||lv_clmn_separator||i.C||lv_clmn_separator||i.D||lv_clmn_separator||i.E||lv_clmn_separator||i.F||lv_clmn_separator||i.G||lv_clmn_separator||i.H;
        ELSE
          lc_clob := lc_clob||CHR(10)||i.A||lv_clmn_separator||i.B||lv_clmn_separator||i.C||lv_clmn_separator||i.D||lv_clmn_separator||i.E||lv_clmn_separator||i.F||lv_clmn_separator||i.G||lv_clmn_separator||i.H;
        END IF;
         END LOOP; 
         -- Convert CLOB to BLOB
         DBMS_LOB.CREATETEMPORARY(lb_blob,TRUE);
         DBMS_LOB.convertToBlob(lb_blob,lc_clob,DBMS_LOB.LOBMAXSIZE,li_in,li_out,DBMS_LOB.DEFAULT_CSID,li_lang,li_warning);
         -- Send mail
         ln_id:= APEX_MAIL.SEND(
           p_to        => lv_mail_rcpts,
                 p_from      => lv_mail_from,
                 p_subj      => 'Subject Goes here',
                 p_body      => 'Body goes here'
           -- add CSV file as attachment
         APEX_MAIL.ADD_ATTACHMENT
           p_mail_id   => ln_id,
           p_attachment => lb_blob,
           p_filename   => 'filename.csv',
           p_mime_type  => 'application/csv'
      -- push mail queue
      APEX_MAIL.PUSH_QUEUE;
         -- empty temporary space
         DBMS_LOB.FREETEMPORARY ( lob_loc =>  lb_blob);       
         COMMIT;
    END;Regards,
    Hari

  • I want to download a report into Excel sheet with color Heading..Is it Poss

    Hi All
    I want to download error records into Excel sheet with color Heading..Is it Possible to download into excel with Color Heading?
    here i am <b>using the 3 sheets in one</b>
    t_error-bkpf -> Sheet1
    t_error-bseg-> sheet 2
    t-error-bsec -> sheet3.
    Rgds
    Raghav

    <b>The following thread has the code which will put data into multiple sheets</b>
    Download to multiple sheets in Excel
    FOR COLOR LOGIC  JUST REFER THIS PROGRAM
    *& Report  ZNEGI17                                                     *
    REPORT  ZNEGI17  NO STANDARD PAGE HEADING.
    * this report demonstrates how to send some ABAP data to an
    * EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    * handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
    H_MAPL TYPE OLE2_OBJECT, " list of workbooks
    H_MAP TYPE OLE2_OBJECT, " workbook
    H_ZL TYPE OLE2_OBJECT, " cell
    H_F TYPE OLE2_OBJECT. " font
    TABLES: SPFLI.
    DATA H TYPE I.
    * table of flights
    DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    *& Event START-OF-SELECTION
    START-OF-SELECTION.
    * read flights
    SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
    * display header
    ULINE (61).
    WRITE: / SY-VLINE NO-GAP,
    (3) 'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
    (4) 'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
    (20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
    (20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
    (8) 'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
    ULINE /(61).
    * display flights
    LOOP AT IT_SPFLI.
    WRITE: / SY-VLINE NO-GAP,
    IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
    IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
    IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
    IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
    IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
    ENDLOOP.
    ULINE /(61).
    * tell user what is going on
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
    * PERCENTAGE = 0
    TEXT = TEXT-007
    EXCEPTIONS
    OTHERS = 1.
    * start Excel
    CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    * PERFORM ERR_HDL.
    SET PROPERTY OF H_EXCEL 'Visible' = 1.
    * CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:kis_excel.xls'
    * PERFORM ERR_HDL.
    * tell user what is going on
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
    * PERCENTAGE = 0
    TEXT = TEXT-008
    EXCEPTIONS
    OTHERS = 1.
    * get list of workbooks, initially empty
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
    PERFORM ERR_HDL.
    * add a new workbook
    CALL METHOD OF H_MAPL 'Add' = H_MAP.
    PERFORM ERR_HDL.
    * tell user what is going on
    * CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    * EXPORTING
    ** PERCENTAGE = 0
    * TEXT = TEXT-009
    * EXCEPTIONS
    * OTHERS = 1.
    * output column headings to active Excel sheet
    PERFORM FILL_CELL1 USING 1 1 1 'Flug'(001).
    PERFORM FILL_CELL1 USING 1 2 0 'Nr'(002).
    PERFORM FILL_CELL1 USING 1 3 1 'Von'(003).
    PERFORM FILL_CELL1 USING 1 4 1 'Nach'(004).
    PERFORM FILL_CELL1 USING 1 5 1 'Zeit'(005).
    LOOP AT IT_SPFLI.
    * copy flights to active EXCEL sheet
    H = SY-TABIX + 1.
    PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
    PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
    PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
    PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
    PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
    ENDLOOP.
    * changes by Kishore - start
    * CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
    CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
    PERFORM ERR_HDL.
    * add a new workbook
    CALL METHOD OF H_MAPL 'Add' = H_MAP EXPORTING #1 = 2.
    PERFORM ERR_HDL.
    * tell user what is going on
    SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
    * CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    * EXPORTING
    ** PERCENTAGE = 0
    * TEXT = TEXT-009
    * EXCEPTIONS
    * OTHERS = 1.
    * output column headings to active Excel sheet
    PERFORM FILL_CELL1 USING 1 1 1 'Flug'(001).
    PERFORM FILL_CELL1 USING 1 2 0 'Nr'(002).
    PERFORM FILL_CELL1 USING 1 3 1 'Von'(003).
    PERFORM FILL_CELL1 USING 1 4 1 'Nach'(004).
    PERFORM FILL_CELL1 USING 1 5 1 'Zeit'(005).
    LOOP AT IT_SPFLI.
    * copy flights to active EXCEL sheet
    H = SY-TABIX + 1.
    PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
    PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
    PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
    PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
    PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
    ENDLOOP.
    * changes by Kishore - end
    * disconnect from Excel
    * CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'C:SKV.XLS'.
    FREE OBJECT H_EXCEL.
    PERFORM ERR_HDL.
    * FORM FILL_CELL *
    * sets cell at coordinates i,j to value val boldtype bold *
    FORM FILL_CELL1 USING I J BOLD VAL.
    data : color(5) type x value 'H80000008'.
    CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
    PERFORM ERR_HDL.
    SET PROPERTY OF H_ZL 'Value' = VAL .
    PERFORM ERR_HDL.
    GET PROPERTY OF H_ZL 'Font' = H_F.
    PERFORM ERR_HDL.
    SET PROPERTY OF H_F 'Bold' = BOLD .
    PERFORM ERR_HDL.
    SET PROPERTY OF H_F 'ColorIndex' = 3 .
    PERFORM ERR_HDL.
    ENDFORM.
    *& Form ERR_HDL
    * outputs OLE error if any *
    * --> p1 text
    * <-- p2 text
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
    WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
    STOP.
    ENDIF.
    ENDFORM. " ERR_HDL
    *&      Form  FILL_CELL1
    *       text
    *      -->P_H  text
    *      -->P_1      text
    *      -->P_0      text
    *      -->P_IT_SPFLI_CARRID  text
    form FILL_CELL  using   I J BOLD VAL.
    CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
    PERFORM ERR_HDL.
    SET PROPERTY OF H_ZL 'Value' = VAL .
    PERFORM ERR_HDL.
    GET PROPERTY OF H_ZL 'Font' = H_F.
    PERFORM ERR_HDL.
    endform.                    " FILL_CELL1
    kishan negi

  • Error while exporting data into Excel Sheet

    Hi All,
    I have created a VO which is based on Query(Not based on EO) and the Query is as follows:
    select f.user_name ,
    f.description ,
    a.currency_code,
    a.amount_to ,
    a.amount_from
    from seacds.ar_approval_user_limits_nv a , seacds.fnd_user_nv f
    where f.user_id = a.user_id
    and a.document_type = 'CM'
    order by 2;
    Based on this VO I have created a search page which will search and returns data from the table and finally standard export button will export the data into excel sheet.
    In this am searching the data based on above 5 attributes. Without entering anything in the messageTextInput if i am clicking GO button, it is returning all the data into the table region. After this if i click on Export Button, data are getting exported into Excel Sheet. It is fine.
    But if i am searching the data by entering any value in any of the messageTextInput, it is returning data. But if i am clicking the Export Button then it is throwing the following error:
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (select f.user_name ,
    f.description ,
    a.currency_code,
    a.amount_to ,
    a.amount_from
    from seacds.ar_approval_user_limits_nv a , seacds.fnd_user_nv f
    where f.user_id = a.user_id
    and a.document_type = 'CM'
    order by 2) QRSLT WHERE (( UPPER(CURRENCY_CODE) like UPPER(:1) AND (CURRENCY_CODE like :2 OR CURRENCY_CODE like :3 OR CURRENCY_CODE like :4 OR CURRENCY_CODE like :5))) ORDER BY DESCRIPTION asc
         at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.sql.SQLException: Invalid column type
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:7895)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7572)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8183)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:8206)
    Kindly give me any idea to clear this error.
    Thanks and Regards,
    Myvizhi

    Hi Myvizhi ,
    Did you try running the query from back end that got generated in the error trace ? see if that query is returning desired
    output .
    Also would like to know if you are using oracle standard search mode i.e result based search / auto customization search ?
    --Keerthi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Export Data into Excel Sheet in UNIX

    Hi All
    How to export the table data into excel sheet in unix.
    Thanks

    Create a csv file. A csv file is just an ascii file, so it doesn't matter what OS you are on.

  • How to run a excel sheet macro using RH_START_EXCEL_WITH_DATA

    Hi All,
    I have found out one FM, RH_START_EXCEL_WITH_DATA,
    To run the excel sheet marco from the ABAP editor.
    DATA_FILENAME
    DATA_PATH_FLAG
    DATA_ENVIRONMENT
    DATA_TABLE
    MACRO_FILENAME
    MACRO_PATH_FLAG
    MACRO_ENVIRONMENT
    WAIT
    DELETE_FILE
    I found these parameters in the FM,
    which I need to pass,
    Any code sample...
    Any hint...
    Thanks,
    Kalyan Chandramouli

    hi
    good
    check with this report.
    REPORT Z_DISPLAY_IDOC_AND_DATA line-size 275.
    This tool reads an existing Idoc and dispays the contents in a       *
    spreadsheet format. The spreadsheet (MS-EXCEL) will be automatically *
    created if D_EXCEL = 'X'.                                            *
    data: idoc_control like EDIDC,
          NUMBER_OF_DATA_RECORDS like sy-dbcnt,
          NUMBER_OF_STATUS_RECORDS like sy-dbcnt,
          INT_EDIDS like edids occurs 0 with header line,
          INT_EDIDD like edidd occurs 0 with header line.
    TYPE-POOLS :  LEDID.
    data: STRUCT_TYPE TYPE  LEDID_STRUCT_TYPE ,
          IDOC_STRUCT TYPE  LEDID_T_IDOC_STRUCT,
          SEGMENTS TYPE  LEDID_T_SEGMENT,
          SEGMENT_STRUCT TYPE  LEDID_T_SEGMENT_STRUCT,
          excel_tab(2000) occurs 0 with header line.
    parameter: DOCNUM like edidc-docnum obligatory, ""Idoc Number
               sap_rel like SY-SAPRL default SY-SAPRL obligatory,
               pi_ver like EDI_VERREC-VERSION default '3' obligatory,
               d_excel as checkbox default 'X'. ""Download ?
    start-of-selection.
      perform read_idoc.
      perform process_idoc.
      if d_excel = 'X'.
        perform download_to_excel.
      endif.
    end-of-selection.
    FORM read_idoc.
      CALL FUNCTION 'IDOC_READ_COMPLETELY'
           EXPORTING
                DOCUMENT_NUMBER          = docnum
           IMPORTING
                IDOC_CONTROL             = idoc_control
                NUMBER_OF_DATA_RECORDS   = NUMBER_OF_DATA_RECORDS
                NUMBER_OF_STATUS_RECORDS = NUMBER_OF_STATUS_RECORDS
           TABLES
                INT_EDIDS                = INT_EDIDS
                INT_EDIDD                = INT_EDIDD
           EXCEPTIONS
                DOCUMENT_NOT_EXIST       = 1
                DOCUMENT_NUMBER_INVALID  = 2
                OTHERS                   = 3.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "" read_idoc
    FORM process_idoc.
      perform read_idoc_structure.
      perform display_data_records.
    ENDFORM.                    "" process_idoc
    FORM display_data_records.
      data: PE_seg_HEADER like EDI_SAPI01,
            segname like EDI_IAPI12-SEGMENTTYP,
            prev_segname like EDI_IAPI12-SEGMENTTYP value ' ',
            pt_fields2 like EDI_IAPI12 occurs 0 with header line,
            PT_FVALUES2 like EDI_IAPI14 occurs 0 with header line,
            byte_first type i,
            byte_last type i,
            field_val(50),
            tmp_str(15),
            tmp_str3(15),
            seg_repeats type i value 0,
            tmp_str2(15),
            tab_cr(1) type x value '09',
            tot_ctr type i value 0,
            ctr type i value 0,
            msg(40) type c.
      data: IDOC_STRUCT_wa TYPE  LEDID_IDOC_STRUCT.
      sort int_edidd by segnum.
      describe table int_edidd lines tot_ctr.
      loop at int_edidd.
        move int_edidd-segnam to segname.
        clear msg.
        concatenate 'Reading segment ' segname
                    into msg separated by space.
        if tot_ctr <> 0.
          ctr = ( 100 * sy-tabix ) / tot_ctr.
        endif.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
             EXPORTING
                  PERCENTAGE = ctr
                  TEXT       = msg.
        add 1 to seg_repeats.
        clear tmp_str2.
        if int_edidd-segnam <> prev_segname.
          seg_repeats = 1.
          clear: pe_seg_header, pt_fields2, pt_fvalues2.
          refresh: pt_fields2, pt_fvalues2.
          CALL FUNCTION 'SEGMENT_READ_COMPLETE'
               EXPORTING
                    PI_SEGTYP                 = segname
                    PI_RELEASE                = sap_rel
                    PI_VERSION                = pi_ver
               IMPORTING
                    PE_HEADER                 = pe_seg_header
               TABLES
                    PT_FIELDS                 = pt_fields2
                    PT_FVALUES                = pt_fvalues2
               EXCEPTIONS
                    SEGMENT_UNKNOWN           = 1
                    SEGMENT_STRUCTURE_UNKNOWN = 2
                    OTHERS                    = 3.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          prev_segname = int_edidd-segnam.
        endif.
        read table idoc_struct into idoc_struct_wa with key
                               segment_type = int_edidd-segnam.
        if sy-subrc = 0.
          IF IDOC_STRUCT_WA-SYNTAX_ATTRIB-MUSTFL = 'X'.
            TMP_STR = 'Mandatory'.                  ""Mandatory
          ELSE.
            TMP_STR = 'Optional'.                  ""Optional
          ENDIF.
          if IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-QUALIFIER = 'X'.
            tmp_str3 = 'Qualified'.
          else.
            tmp_str3 = 'Non-Qualified'.
          endif.
          shift IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX
                                     left deleting leading '0'.
          move seg_repeats to tmp_str2.
          condense: IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX, tmp_str2.
          concatenate tmp_str2 'of'  IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX
              into tmp_str2 separated by space.
          write :/ IDOC_STRUCT_wa-SEGMENT_TYPE,
               tmp_str,
               TMP_STR3,
               tmp_str2,
               IDOC_STRUCT_wa-SYNTAX_ATTRIB-HLEVEL,
               IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-plast,
               IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-DESCRP.
          if d_excel = 'X'.
            concatenate 'Segment Name' tab_cr
                        'Mand / Opt ' tab_cr
                        'Qual / non-Qual' tab_cr
                        'Seq of Max' tab_cr
                        'Level' tab_cr
                        'Owner' tab_cr
                        'Description'
                        into excel_tab.
            append excel_tab.
            concatenate IDOC_STRUCT_wa-SEGMENT_TYPE tab_cr
                  tmp_str tab_cr
                  TMP_STR3 tab_cr
                  tmp_str2 tab_cr
                  IDOC_STRUCT_wa-SYNTAX_ATTRIB-HLEVEL tab_cr
                  IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-plast tab_cr
                  IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-DESCRP
                  into excel_tab.
            append excel_tab.
            concatenate tab_cr
                        'Field Nma' tab_cr
                        'Type' tab_cr
                        'Length' tab_cr
                        'Byte From' tab_cr
                        'Byte To' tab_cr
                        'Description' tab_cr
                        'Value' tab_cr
                        'Qualifier Meaning'
                        into excel_tab.
            append excel_tab.
          endif.
        endif.
        sort pt_fields2 by field_pos.
        byte_first = 0.
        loop at pt_fields2.
          clear: field_val.
          byte_last = pt_fields2-EXTLEN.
          write int_edidd-sdata+byte_first(byte_last) to
                field_val left-justified.
          shift pt_fields2-EXTLEN left deleting leading '0'.
          shift pt_fields2-byte_first left deleting leading '0'.
          shift pt_fields2-byte_last left deleting leading '0'.
          write:/ '   ', pt_fields2-fieldname,
                  pt_fields2-datatype,
                  pt_fields2-EXTLEN,
                  pt_fields2-byte_first ,
                  pt_fields2-byte_last,
                  pt_fields2-descrp,
                  field_val.
          read table pt_fvalues2 with key fieldname = pt_fields2-fieldname
                        fldvalue_l = field_val.
          add byte_last to byte_first.
          if sy-subrc = 0.
            write : pt_fvalues2-descrp.
          else.
            clear pt_fvalues2-descrp.
          endif.
          if d_excel = 'X'.
            concatenate tab_cr pt_fields2-fieldname tab_cr
                    pt_fields2-datatype tab_cr
                    pt_fields2-EXTLEN tab_cr
                    pt_fields2-byte_first tab_cr
                    pt_fields2-byte_last tab_cr
                    pt_fields2-descrp tab_cr
                    field_val tab_cr
                    pt_fvalues2-descrp
                    into excel_tab.
            append excel_tab.
          endif.
        endloop.
      endloop.
    ENDFORM.                    "" display_data_records
    FORM read_idoc_structure.
      data: idoctype type LEDID_IDOCTYPE.
      if not idoc_control-cimtyp is initial.
        STRUCT_TYPE = 'E'. ""Extended
        idoctype = idoc_control-cimtyp.
      else.
        STRUCT_TYPE = 'B'. ""Basic
        idoctype = idoc_control-idoctp.
      endif.
      CALL FUNCTION 'IDOC_TYPE_COMPLETE_READ'
           EXPORTING
                RELEASE              = sap_rel
                STRUCT_TYPE          = STRUCT_TYPE
                IDOCTYPE             = idoctype
                VERSION              = pi_ver
          IMPORTING
               IDOC_TYPE            = idoctype
           TABLES
                IDOC_STRUCT          = idoc_struct
                SEGMENTS             = segments
                SEGMENT_STRUCT       = segment_struct
           EXCEPTIONS
                IDOCTYPE_UNKNOWN     = 1
                IDOCSTRUCT_UNKNOWN   = 2
                SEGMENT_DATA_MISSING = 3
                ILLEGAL_STRUCT_TYPE  = 4
                OTHERS               = 5.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "" read_idoc_structure
    FORM download_to_excel.
      data: name like RLGRAP-FILENAME.
      shift docnum left deleting leading '0'.
      concatenate docnum '-' idoc_control-idoctp '.xls'
                  into name.
      CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
       EXPORTING
         DATA_NAME                 = name
         DATA_TYPE                 = 'ASC'
         WAIT                      = ' '
       TABLES
         DATA_TAB                  = excel_tab
       EXCEPTIONS
         NO_BATCH                  = 1
         EXCEL_NOT_INSTALLED       = 2
         WRONG_VERSION             = 3
         INTERNAL_ERROR            = 4
         INVALID_TYPE              = 5
         CANCELLED                 = 6
         DOWNLOAD_ERROR            = 7
         OTHERS                    = 8
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "" download_to_excel
    reward point if helpful.
    thanks
    mrutyun^

  • Export Reports into Excel?

    Can a summary of responses be exported into Excel?

    You can also save the Summary Report as a PDF file. That might be better for exec mgmt.
    This post explains summary reports in more detail:
    http://forums.adobe.com/thread/884166
    Additionally you can save a detail view of a single response as a PDF. This FAQ describes how to do that:
    http://forums.adobe.com/docs/DOC-1383
    Randy

  • Download report into excel sheet

    Hi
    I have  requirement like, in report output I want a button, if I press that button it has to ask where I have to save that output list in excel sheet format.
    Plz help me out
    Thanks in advance
    Regards
    Rao

    Pls do like...
    START-OF-SELECTION.
    * Select and Process the data .
      PERFORM select_and_process_data.
    * Display Records.
      PERFORM display_result.
    * Set the pf-status and user command.
      SET PF-STATUS '110_VAL'.   " create yr button here
    AT USER-COMMAND.
    * Download result to spreadsheet.
      PERFORM download_to_spreadsheet.
    END-OF-SELECTION
    FORM download_to_spreadsheet .
      DATA:
        l_filefilter  TYPE string,
        l_filename    TYPE string,
        l_path        TYPE string,
        l_fullpath    TYPE string,
        l_user_action TYPE i.
      IF sy-ucomm = 'DLOAD'.  " Button name (Function code)
        l_filefilter = 'EXCEL Files (*.XLS)|*.XLS|Text Files (*.TXT)|*.TXT|All files (*.*)|*.*||'.
        CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
          EXPORTING
            file_filter       = l_filefilter
            default_extension = 'xls'
          IMPORTING
            filename          = l_filename
            path              = l_path
            fullpath          = l_fullpath
            user_action       = l_user_action.
        IF l_user_action = 1 OR l_user_action = 0.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              filename                = l_fullpath
              filetype                = 'ASC'
            TABLES
              data_tab                = o_file
            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 <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
        ELSEIF l_user_action = 2.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              append                  = 'X'
              filename                = l_fullpath
              filetype                = 'ASC'
              trunc_trailing_blanks   = 'X'
            TABLES
              data_tab                = o_file
            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 <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " download_to_spreadsheet
    " Note : Give the path according yr requirement.
    Regards,
    RH

  • Exporting data into excel sheet from CRM

    Hi All,
    I am facing problem while extracting data from CRM - Service Process Monitor.
    I tried to extract data(records) from executed service process monitor through
    System -> List ->Save->Local file->Spreadsheet
    I am not getting actual records list in excel sheet
    For example: Actual record - 244, But after extracting to excel sheet its showing only- 199
    why its not extracting remaining 45 records/ transactions.
    is there any setting or is there any other process of extracting ?
    How to count total records without extracting to excek sheet ?
    Please help me..
    Regards
    Praveen Khot

    Hi
    check the link below
    https://www.sdn.sap.com/irj/sdn/crm-elearning
    Reward points if helpful
    Dinaker vikas

  • Export ALV List into Excel Sheet

    Hi Friends,
    We are displaying an ALV List in report Program and we are exporting that into excel sheet using the icon "Spreadsheet(ctrlshiftF7)"provided by ALV Grid.
    But when it is displayed in Excel sheet it changes the sequence of columns (fields).
    And we observed that it displays all the CHAR fields first then the CURRENCY fields and then the DATE fields that we specified in field catalog.
    So, what should be done so that the fields are exported into Excel in the same order as specified in the field catalog of ALV List.

    Give this a look.
    REPORT ZEXCEL .
    INCLUDE ole2incl.
    DATA: application TYPE ole2_object,
    workbook TYPE ole2_object,
    sheet TYPE ole2_object,
    cells TYPE ole2_object.
    CONSTANTS: row_max TYPE i VALUE 256.
    DATA index TYPE i.
    DATA: BEGIN OF itab1 OCCURS 0, first_name(10), END OF itab1.
    DATA: BEGIN OF itab2 OCCURS 0, last_name(10), END OF itab2.
    DATA: BEGIN OF itab3 OCCURS 0, formula(50), END OF itab3.
    *START-OF-SELECTION
    START-OF-SELECTION.
    APPEND: 'Peter' TO itab1, 'Ivanov' TO itab2,
    '=Sheet1!A1 & " " & Sheet2!A1' TO itab3,
    'John' TO itab1, 'Smith' TO itab2,
    '=Sheet1!A2 & " " & Sheet2!A2' TO itab3.
    CREATE OBJECT application 'excel.application'.
    SET PROPERTY OF application 'visible' = 1.
    CALL METHOD OF application 'Workbooks' = workbook.
    CALL METHOD OF workbook 'Add'.
    Create first Excel Sheet
    CALL METHOD OF application 'Worksheets' = sheet
    EXPORTING #1 = 1.
    CALL METHOD OF sheet 'Activate'.
    SET PROPERTY OF sheet 'Name' = 'Sheet1'.
    LOOP AT itab1.
    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'Value' = itab1-first_name.
    ENDLOOP.
    Create second Excel sheet
    CALL METHOD OF application 'Worksheets' = sheet
    EXPORTING #1 = 2.
    SET PROPERTY OF sheet 'Name' = 'Sheet2'.
    CALL METHOD OF sheet 'Activate'.
    LOOP AT itab2.
    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'Value' = itab2-last_name.
    ENDLOOP.
    Create third Excel sheet
    CALL METHOD OF application 'Worksheets' = sheet
    EXPORTING #1 = 3.
    SET PROPERTY OF sheet 'Name' = 'Sheet3'.
    CALL METHOD OF sheet 'Activate'.
    LOOP AT itab3.
    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'Formula' = itab3-formula.
    SET PROPERTY OF cells 'Value' = itab3-formula.
    ENDLOOP.
    Save excel speadsheet to particular filename
    CALL METHOD OF sheet 'SaveAs'
    EXPORTING #1 = 'c:\temp\exceldoc1.xls' "filename
    #2 = 1. "fileFormat
    Closes excel window, data is lost if not saved
    SET PROPERTY OF application 'visible' = 0.

Maybe you are looking for