Saving the report in Excel format form BO

Hi Team,
Would like to know how to provide/grant an access to User to save his/her BO reports in Excel format. Save as option is not being highlited for the user for saving the data into EXcel format.
Thanks.

Hi,
Just check the preferences in the WEBI,
Just goto the option under preferences and check whether Prioritize easy data processing in Excel is enabled.
Select a priority for saving to MS Excel:
   Prioritize easy data processing in Excel 
Regards,
Ragoth.C

Similar Messages

  • Export the Report in Excel format

    Hi,
    How to export the Report in Excel format directly from the SAP to my Desktop.
    Plz. give me the process???
    Thanks

    use this,
    INCLUDE OLE2INCL.
    INCLUDE EXCEL__C.
    AND
             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
              H       TYPE I.
    AND
      PERFORM SUB_GET_DATA.
         'get data here
      PERFORM SUB_POP_DATA.
         'populate data here
    AND
      PERFORM SUB_DISP_EXCEL.
    *&      Form  SUB_DISP_EXCEL
    FORM SUB_DISP_EXCEL.
       START EXCEL
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    SET PROPERTY OF H_EXCEL  'Visible' = 1.    " for printing o/p line by line in excel sheet
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1  1 1   10  'Mat Doc Number'(001) 'R'.
      PERFORM FILL_CELL USING 1  2 1    4  'Item'(002) 'R'.
      PERFORM FILL_CELL USING 1  3 1   10  'Mat Doc Date'(003) 'R'.
      PERFORM FILL_CELL USING 1  4 1   10  'Vendor'(004) 'R'.
      PERFORM FILL_CELL USING 1  5 1   20  'Mat Doc Item amount'(005) 'R'.
      PERFORM FILL_CELL USING 1  6 1   15  'Material price'(006) 'R'.
      PERFORM FILL_CELL USING 1  7 1    4  'Currency'(007) 'R'.
      PERFORM FILL_CELL USING 1  8 1   18  'Material'(008) 'R'.
      PERFORM FILL_CELL USING 1  9 1   30  'Material Desc'(009) 'R'.
      PERFORM FILL_CELL USING 1 10 1   19  'Qty in Unit of Entry'(010) 'R'.
      PERFORM FILL_CELL USING 1 11 1   19  'Qty Received'(011) 'R'.
      PERFORM FILL_CELL USING 1 12 1    4  'Unit of Entry'(012) 'R'.
      PERFORM FILL_CELL USING 1 13 1   20  'Mat Group'(013) 'R'.
      PERFORM FILL_CELL USING 1 14 1   16  'Vendor Invoice'(016) 'C'.
      LOOP AT T_OUT INTO W_OUT.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H  1 0 10 W_OUT-MBLNR 'R'.
        PERFORM FILL_CELL USING H  2 0  4 W_OUT-ZEILE 'R'.
        PERFORM FILL_CELL USING H  3 0 10 W_OUT-BLDAT 'R'.
        PERFORM FILL_CELL USING H  4 0 10 W_OUT-LIFNR 'R'.
        PERFORM FILL_CELL USING H  5 0 20 W_OUT-DMBTR 'R'.
        PERFORM FILL_CELL USING H  6 0 15 W_OUT-NETPR 'R'.
        PERFORM FILL_CELL USING H  7 0  4 W_OUT-WAERS1 'R'.
        PERFORM FILL_CELL USING H  8 0 18 W_OUT-MATNR 'R'.
        PERFORM FILL_CELL USING H  9 0 30 W_OUT-MAKTX 'R'.
        PERFORM FILL_CELL USING H 10 0 19 W_OUT-ERFMG 'R'.
        PERFORM FILL_CELL USING H 11 0 19 W_OUT-WEMNG 'R'.
        PERFORM FILL_CELL USING H 12 0  4 W_OUT-ERFME 'R'.
        PERFORM FILL_CELL USING H 13 0 20 W_OUT-WGBEZ 'R'.
        PERFORM FILL_CELL USING H 14 0 16 W_OUT-XBLNR 'C'.
        CLEAR W_OUT.
      ENDLOOP.
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTIN    G #1 = 2.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
      PERFORM ERR_HDL USING 'Unable to create workbook'.
    add a new workbook
    CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2. "----------can remove-------THIS IS FOR STAY AT LIST
      PERFORM ERR_HDL USING 'Unable to create new workbook'..
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL USING 'Unable to free workbook'.
    ENDFORM.                    " SUB_DISP_EXCEL
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM FILL_CELL USING I J BOLD COL VAL I_HORIZON_ALIGN.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL USING 'set cell object error'.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL USING 'set value  object error'.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL USING 'set font  object error'.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL USING 'set bold  object error'..
      SET PROPERTY OF H_ZL 'ColumnWidth' = COL.
      PERFORM ERR_HDL USING 'set columnwidth object error'.
      IF NOT I_HORIZON_ALIGN IS INITIAL.
      IF I_HORIZON_ALIGN = 'L'.
      SET PROPERTY OF H_ZL 'HorizontalAlignment' = XLLEFT.
      ELSEIF I_HORIZON_ALIGN = 'R'.
      SET PROPERTY OF H_ZL 'HorizontalAlignment' = XLRIGHT.
      ELSEIF I_HORIZON_ALIGN = 'C'.
      SET PROPERTY OF H_ZL 'HorizontalAlignment' = XLCENTER.
      ENDIF.
      ENDIF.
      PERFORM ERR_HDL USING 'set Alignment object error'.
    ENDFORM.                    "FILL_CELL
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM ERR_HDL USING VAL.
      IF SY-SUBRC <> 0.
        WRITE: / VAL.
        STOP.
      ENDIF.
    ENDFORM.                    " ERR_HDL

  • Saving report in excel format

    I need to save a report directly to excel format. The user does not want to open a delimited file in excel. After a lot of trials I got excel.prt file which supposedly saves the report in excel format directly from the PRINT TO FILE option.
    But I am still getting the option to save the file as text only, not in excel.
    Required help urgently as the report is important to the client

    We run reports using utl_http and then save the output as a blob. After that, we print the blob but before hand, we do this:
    owa_util.mime_header('application/vnd.ms-excel', false);
    htp.p('content-disposition: filename='||v_rec.filename||'.xls');
    owa_util.http_header_close;
    This sets the filename correctly and forces the browser to use Excel to handle the file.

  • How to Export SSRS report into Excel format using query string

    Hello all,
    I am new to SSRS world.
    Last night i was trying to add a hyperlink  on the SSRS report (.rdl) file, by clicking which we can export the report into "Excel" format, but with no luck.
    Can anybody tell me how to form the hyperlink, so that we can export the report with its current content ( I mean the report content generated by selecting some parameter values)

    Hi Suman85,
    Based on your scenario, you want to add a link on the SSRS report file, and then click it you can export the report into “Excel” format.
    Just as kishan1901 said , you can add a textbox to your report and type in the words “Click here and export the report
    to excel” .Then right-click the textbox and select Properties. Switch to Navigation tab, click the radiobutton of ‘Jump to URL’ and type in the expression ,here is just a example:
     ="http://vyof1884200/ReportServer$youhoo?/My+Adventure+Works/Product+Sales+and+Profitability+by+Month&rs:Command=Render&rs:Format=excel"
    Then preview the report ,you will see
    Click here and export the report to excel 
    when you move the mouse to it ,the mouse will become a hand ,then left-click, it will jump out a dialog box to indicate user whether the excel file should be saved , opened or canceled. 
    I think this is what you want, if you have any further requirement, could you please describe it in more detail? We would give you some resolution or workaround.
    Regards,
    Challen Foo

  • Issue while exporting report in Excel Format

    Hello,
    I am facing problem while exporting the report in Excel Format. After analysis, I think that it could be due to two reasons, either we are using wrong versions of Jars, or we are using wrong API. Here is the code, approaches and problems we are facing. Please help.
    First approach we are using is:
    // using basic API
    import com.crystaldecisions.reports.sdk.ReportClientDocument;
    // get client document from crystal report API and open the report by specifying the report name, with path
                   ReportClientDocument reportClientDoc = new ReportClientDocument();
                   reportClientDoc.open( reportPath, 0 );
                   // give chance to extending classes to configure the report document by POJO or by sql parameter etc, just adding the parameters infromation using ParameterFieldController
                   configureReportDocument( reportClientDoc, reportMetadata, reportData, reportContext );
                   // get data source of crystal report
                   Object reportSource = reportClientDoc.getReportSource();
                   // export the data - we have also tried with MSExcel format
                   ReportExportFormat exportFormat =  ReportExportFormat.recordToMSExcel;
                   LOGGER.debug( "exportFormat[" + exportFormat + "]" );
                   ByteArrayInputStream byteArray = (ByteArrayInputStream) reportClientDoc.getPrintOutputController().export(
                             exportFormat );
    Problem Faced: Specified Excel format is not supported.
    Second Approach: We come to know that excel format is supported with new releases and with occa package.
    Then we tried with import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument; It ask to set the ReportServer. When we are trying to set the server as
                   reportClientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
    Application is unable to find 'ReportClientDocument.inprocConnectionString' property. It seems like we are using some old jars. However we have downloaded the latest released jars for eclipse 2.
    Please help for it. Issue is to export the report in excel format, which is currently working fine for PDF. If this problem is related to Jars, please suggest the path to download the latest jars. We also looking for the latest jars like rasapp and rascore etc. But these are not available with Crystal Report for Eclipse 2 release.
    Waiting for urgent help. Thanks you..
    Regards,
    Mohit

    Hi,
    Send me Environment Details .
    Here is the code  snippet for exporting report to excel format:
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@ page import="com.crystaldecisions.sdk.framework.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.managedreports.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.io.*" %>
    <%
    String username ="Administrator";
    String password ="";
    String cmsname ="localhost:6400";
    String Authen ="secEnterprise";
         //connecting to Enterprise
         IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon(username,password,cmsname,Authen);
         //get the report App Factory form the Crystal Enterprise
         IReportAppFactory appFactory = (IReportAppFactory) es.getService("","RASReportService");
         //get the infostore service form the Crystal Enterprise
         IInfoStore istore = (IInfoStore) es.getService("","InfoStore");
         //get the report by name from crystal Enterprise
         IInfoObjects iobjects = istore.query("Select * From CI_INFOOBJECTS Where SI_NAME = 'sampleramz2.rpt' and SI_INSTANCE = 0 ");
         //open the report in the report doc object.
         ReportClientDocument Doc = appFactory.openDocument((IInfoObject)iobjects.get(0), 0, Locale.ENGLISH);
         // WORKING WITH THE PRINT OUTPUT CONTROLLER
         //Use the report documents PrintOutputController to export the report to a ByteArrayInputStream
         ByteArrayInputStream byteIS = (ByteArrayInputStream)Doc.getPrintOutputController().export(ReportExportFormat.recordToMSExcel);
         // EXPORTING THE REPORT
         //Create a byte[] (same size as the exported ByteArrayInputStream)
         byte[] buf = new byte[2000 * 1024];
         int nRead = 0;
         //Set response headers to indicate pdf MIME type and inline file
         response.reset();
         response.setHeader("Content-disposition", "inline;filename=ramz");
         response.setContentType("application/xls");
         //Send the Byte Array to the Client
         while ((nRead = byteIS.read(buf)) != -1)
              response.getOutputStream().write(buf, 0, nRead);
         //Flush the output stream
         response.getOutputStream().flush();
         //Close the output stream
         response.getOutputStream().close();
    %>
    Let me know any information is needed,
    Regards,
    Rameez

  • Download alv report in excel format in Linux

    Hi All,
    I am working on SAP GUI for Java in Linux PC. I have installed
    Open Office.
    After executing an alv report there is no spreadsheet option
    to download the report in excel format .
    Also, when doing Save as Local File -> Spreadsheet ,
    the report is not downloaded in proper format.
    So, how to download the alv reports in excel format ?

    Hi Vinod ,
    Save as Local File -> Spreadsheet
    It will ask for Directory and file name with .xls format . Give proper name e.g. test.xls and save, and after saving file right click on the file and click on Open with "OpenOffice.org calc".
    It will definetly work.
    Abhijeet

  • OEM Report in excel format

    Hi All,
    Anyone know a way to get the report as excel format instead of html?
    Regards,
    Satheesh Shanmugam
    http://borndba.com

    Hi Satheesh,
    In EM 12c, BI Publisher (BIP) integration allows generating reports in Excel format (also in HTML, PDF, RTF, and PowerPoint 2007 formats).
    For information on integrating BIP with EM 12c, see:
    http://docs.oracle.com/cd/E24628_01/install.121/e24089/install_em_bip.htm#CEGBEJDJ
    Regards,
    - Loc

  • Failed to schedule report in Excel format

    We have successfully scheduled report in PDF format, however, we go the error message "Error in File D:\Business Objects\BusinessObjects Enterprise 11.5\Data\procSched\eagnmnsx2c5.reportjobserver\~tmp2ee063064fe000e.rpt: The request could not be submitted for background processing" if we select excel as schedule format.
    Anyone has any idea why it's happened?
    Thank you very much for your help.

    If you are using BOE Java SDK please refer to the following link for the code:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/JavaBusinessObjectsEnterpriseSDKSamples
    Select Scheduling option to get quick access to the code.
    Also see if you can schedule the report to excel format through CMC or not.
    Regards,
    Anuj

  • Formating issue after export crystal report to excel format

    Hi Everyone,
    I have a crystal report devloped in crystal 8.5 and i am calling this report from my .net windows application.  I have a problem when i export the report in excel format. One of the column size(which is report footer) gets increased because of which my report is not properly formated. I have reoved all the blank lines and extra space but still i am not able to reduce the column size. Any help will be appriciated.
    Thanks in advance.

    Hi,
    Please let us know the Visual Studio Version that you are using, just to inform you, VS2005 is compatible with CRXIR2 and above and VS2008 is compatible with CR2008 + SP0.
    Do the report display properly from the designer? Does the Export from the designer in xls works fine?
    Thanks,
    AG.

  • How to get report in excel format instead of pdf from oracle forms.

    Hi,
    How to get report in excel format instead of pdf from oracle forms.
    Form & Report developer 10g
    report format .rdf

    create a report using report builder.
    call the report from form using the following procedure
    DECLARE
         RO_Report_ID REPORT_OBJECT;
         Str_Report_Server_Job VARCHAR2(100);
         Str_Job_ID VARCHAR2(100);
         Str_URL VARCHAR2(100);
         PL_ID PARAMLIST ;
    BEGIN
    PL_ID := GET_PARAMETER_LIST('TEMPDATA');
         IF NOT ID_NULL(PL_ID) THEN
    DESTROY_PARAMETER_LIST(PL_ID);
         END IF;
         PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');
         RO_Report_ID := FIND_REPORT_OBJECT('RP2RRO');
         Add_Parameter(pl_id,'P_SUPCODE',TEXT_PARAMETER,:CONTROL.S_CODE);
    Add_Parameter(pl_id,'P_INVOICE_NO',TEXT_PARAMETER,:CONTROL.IN_NO);
    Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
         SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_FILENAME, 'INVOICE_REG_DETAILS.rep');
         SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_COMM_MODE, SYNCHRONOUS);
         SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_EXECUTION_MODE, BATCH);
         SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESTYPE, FILE);
         SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESFORMAT, 'SPREADSHEET');
         SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_SERVER, 'rep_dbserver_frhome1');
         Str_Report_Server_Job := RUN_REPORT_OBJECT(RO_Report_ID, PL_ID);
         Str_Job_ID := SUBSTR(Str_Report_Server_Job, LENGTH('rep_dbserver_frhome1') + 2, LENGTH(Str_Report_Server_Job));
         Str_URL      := '/reports/rwservlet/getjobid' || Str_Job_ID || '?server=rep_dbserver_frhome1';
         WEB.SHOW_DOCUMENT(Str_URL, '_SELF');
         DESTROY_PARAMETER_LIST(PL_ID);
    END;

  • How can I export the report to Excel or CSV format in Rational(Java)?

    <p>Dear all,</p><p>Now I develop CR report integrate with Web application, I use Ratioanl(RAD) to develop. And I want to export the report to Excel/CSV format, but always failed.</p><p>If I force it export CSV file in the system, when I use MS office to open this CSV file, the file content is bad.</p><p>Could any one tell me how to achieve this?</p><p> Many thanks!</p><p>Steven</p>

    <p>CR4E is bundled with RAD 7...actually to be clear it is a version of CR4E Professional. Users of RAD 7 will also get a dev/test license of CR Server as well as number of additional features to support developing applications against their BusinessObjects Enterprise or Crystal Reports Server systems. For more information regarding the RAD 7 launch you can read the press release here:</p><p><strong><a href="http://biz.yahoo.com/bw/061205/20061205005363.html?.v=1">http://biz.yahoo.com/bw/061205/20061205005363.html?.v=1</a> </strong> </p><p>I am hoping to do a webinar in January highlighting a number of the new features available with the IBM Rational Application Developer integration.</p><p>As for RAD 6 support, unfortunately the CR4E toolkit does require Eclipse 3.2 support so it will not work with RAD 6. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) <br /><br /> <strong><a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a></strong>          </p>

  • Help me to download my report in excel format.

    Here is my code below. On selection screen I am giving three inputs.
    And There are two radio buttons present on my selection screen.
    first one is for display the report.
    second button name is generate(to export the report).
    Clicking on the generate radio button will show the report.
    There should be a standard button on the toolbar called GENERATE.
    Clicking on that button will show a popup window asking to download the report either in .xls format or in .csv format.
    ==========================================================
    My report is being displayed perfectly.But not getting how to downlaod the report in excel and csv format. Would u plz guide me what should I write within the export_report function of my program so that I can download the report. Kindly guide.
    REPORT ZMYREPORT.
    TYPE-POOLS: SLIS.               
    TYPES: BEGIN OF t_afko,
           aufnr type aufnr,        
           gamng type gamng,        
           plnbez type matnr,
           END OF t_afko.
    TYPES: BEGIN OF t_mara,
           matnr TYPE matnr,
           mtart type mtart,         
           pstat type pstat_d,       
           END OF t_mara.
    TYPES: BEGIN OF t_output,
           aufnr type aufnr,              "Production order
           gamng type gamng,         "move number
           mtart type mtart,              "size/fit
           pstat type pstat_d,           "Variant
           quantity type meng8,        "Quantity
           barcode(35) type c,          "barcode
           END OF t_output.
                 INTERNAL TABLES, WORK AREAS AND VARIABLES                      
    *For work area.
    DATA:
          gwa_afko type t_afko,                          "work area for t_afko table
          gwa_mara type t_mara,                          "work area for t_mara table
          gwa_output type t_output,                      "work area for t_output table
          gwa_output1 type t_output,                     "second work area for t_output table
          gwa_fieldcat type slis_fieldcat_alv,           "work area for slis_fieldcat_alv
          gwa_top type slis_listheader,                  "work area for slis_listheader
          wa_variant type disvariant,                    "work area for variant
          wa_Variant1 type disvariant,                   "work area for variant
    *For internal tables.
    gi_afko TYPE STANDARD TABLE OF t_afko,                     
    gi_mara TYPE STANDARD TABLE OF t_mara,               
    gi_output TYPE STANDARD TABLE OF t_output,              
    gi_fieldcat TYPE STANDARD TABLE OF slis_fieldcat_alv,
    gi_top TYPE slis_t_listheader,                        
    gi_download TYPE TABLE OF t_download,
    *Variables for screen-input.
          v_aufnr like caufvd-aufnr,  "for production order
          v_txt04 like tj02t-txt04,   "for production order status
          v_plnbez like afko-plnbez.  "for article
    *For constants.
    CONSTANTS: quantity(1) type c value '1',
               lv_save(01) TYPE c VALUE 'A',
               c_csv TYPE char1 VALUE   '|'.
                           S E L E C TI O N     S C R E E N      *
    SELECTION-SCREEN:
    BEGIN OF block inputpath1 WITH FRAME TITLE TEXT-001.            
    SELECT-OPTIONS: s_aufnr for v_aufnr,                                                                               
    s_txt04 for v_txt04,                                                                               
    s_plnbez for v_plnbez.                                
    SELECTION-SCREEN: END OF block inputpath1.
    SELECTION-SCREEN:
    BEGIN OF block inputpath2 WITH FRAME TITLE TEXT-002.   
    PARAMETERS:   
    p_disp RADIOBUTTON GROUP rb DEFAULT'X',   "Button to display report           
    p_gen RADIOBUTTON GROUP rb.         "button for generate option
    SELECTION-SCREEN: END OF block inputpath2.
    SELECTION-SCREEN:
    BEGIN OF block inputpath3 WITH FRAME TITLE TEXT-003.   
    PARAMETERS:layout TYPE disvariant.                                      
    SELECTION-SCREEN: END OF block inputpath3.
                    I-N-I-T-I-A-L-I-Z-A-T-I-O-N                                   *
    INITIALIZATION.
      DATA: g_repid LIKE sy-repid,
            g_uname LIKE sy-uname.
      g_repid = sy-repid.
               AT SELECTION SCREEN                     *
    *Function module for variant.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR layout.
      wa_variant-username = g_uname.
      wa_variant-report = g_repid.
    *Display all existing variants
      DATA:  lv_exit(1) TYPE c.
    *Code for variant part.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant    = wa_variant
          i_save        = lv_save
        IMPORTING
          e_exit        = lv_exit
          es_variant    = wa_variant1
        EXCEPTIONS
          not_found     = 1
          program_error = 2
          OTHERS        = 3.
      IF sy-subrc <> 0.
        layout = wa_variant-variant.
      ELSE.
        IF lv_exit = space.
          layout = wa_variant1-variant.
        ENDIF.
      ENDIF.
                           MAIN PROGRAM                              *
    AT SELECTION-SCREEN .
    *For validating the user inputs on selection screen.
      PERFORM  validate_input.
                      START-OF-SELECTION                         *
    START-OF-SELECTION .
      SET PF-STATUS 'ZGUI1'.
      IF p_disp = 'X'.                         "If the display radio button is checked.
       perform zselection.                  "Data is fetched from tables.
      ENDIF.
                     END-OF-SELECTION                              *
    END-OF-SELECTION.
      IF p_disp = 'X'.
       PERFORM buildcat.
       PERFORM display_report.
      ELSEIF p_gen = 'X'.
        PERFORM display_report.
        PERFORM export_report.
      ENDIF.
    *&      Form  validate_input
    Checking input data validation on the display screen.           *
    form validate_input.
    *Local variables for input validation.
    DATA: lv_aufnr type aufnr,
          lv_txt04 type J_TXT04,
          lv_plnbez type matnr.
    IF s_aufnr[] is not initial.
      SELECT aufnr up to 1 rows
      FROM aufk
      INTO lv_aufnr
      WHERE aufnr IN s_aufnr.
      ENDSELECT.
      IF lv_aufnr IS INITIAL.
      MESSAGE e001(zmssg).
      ENDIF.
    ENDIF.
    IF s_txt04[] is not initial.
      SELECT txt04 up to 1 rows
      FROM TJ02T
      INTO lv_txt04
      WHERE txt04 IN s_txt04.
      ENDSELECT.
      IF lv_txt04 IS INITIAL.   "this depicts that if s_txt04 is initial.
      Message e002(zmssg).
      ENDIF.
    ENDIF.
    IF s_plnbez[] is not initial.
      SELECT plnbez up to 1 rows
      FROM afko
      INTO lv_plnbez
      WHERE plnbez IN s_plnbez.
      ENDSELECT.
      IF lv_plnbez IS INITIAL.   "this depicts that if s_plnbez is initial.
      Message e003(zmssg).
      ENDIF.
    ENDIF.
    endform.                    " validate_input
    *&      Form  zselection
          Fetches data                                           *
    form zselection .
    SELECT aufnr  "production order
           gamng  "move number
           plnbez
           FROM afko
           INTO TABLE gi_afko
           WHERE aufnr IN s_aufnr
           AND plnbez IN s_plnbez.
    SELECT matnr
           mtart        "size/fit
           pstat        "variant
           FROM mara
           INTO TABLE gi_mara
           WHERE matnr IN s_plnbez.
              Populating final data                                         *
    LOOP AT gi_afko INTO gwa_afko.
      READ TABLE gi_mara INTO gwa_mara with key matnr = gwa_afko-plnbez.
      IF sy-subrc IS INITIAL.
    *Moving t_mara and t_afko data from their work area to work area of t_output.
        MOVE   gwa_mara-mtart TO gwa_output-mtart.
        MOVE   gwa_mara-pstat TO gwa_output-pstat.
        MOVE  gwa_afko-aufnr TO gwa_output-aufnr.
        MOVE  gwa_afko-gamng TO gwa_output-gamng.
        APPEND gwa_output TO gi_output.
        ENDIF.
    ENDLOOP.
    *Populating the quantity field
      LOOP AT gi_output INTO gwa_output.
        gwa_output-quantity = '1'.
        MODIFY gi_output FROM gwa_output INDEX sy-tabix TRANSPORTING quantity.
    *Concategnating aufnr, pstat into barcode
        CONCATENATE gwa_output-aufnr gwa_output-pstat INTO gwa_output-barcode .
        MODIFY gi_output FROM gwa_output INDEX sy-tabix TRANSPORTING barcode.
      ENDLOOP.
    endform.                    " zselection
    *&      Form  buildcat
          text
    form buildcat.
      CLEAR gwa_fieldcat.
      gwa_fieldcat-fieldname = 'AUFNR'.
      gwa_fieldcat-seltext_l = 'PRODUCTION ORDER'.
      gwa_fieldcat-tabname = 'GI_OUTPUT'.
      gwa_fieldcat-emphasize = 'C201'.
      gwa_fieldcat-col_pos = 1.
      APPEND gwa_fieldcat TO gi_fieldcat.
      CLEAR gwa_fieldcat.
      gwa_fieldcat-fieldname = 'GAMNR'.
      gwa_fieldcat-seltext_l = 'MOVE NUMBER'.
      gwa_fieldcat-tabname = 'GI_OUTPUT'.
      gwa_fieldcat-emphasize = 'C201'.
      gwa_fieldcat-col_pos = 2.
      APPEND gwa_fieldcat TO gi_fieldcat.
      CLEAR gwa_fieldcat.
      gwa_fieldcat-fieldname = 'MTART'.
      gwa_fieldcat-seltext_l = 'SIZE/FIT'.
      gwa_fieldcat-tabname = 'GI_OUTPUT'.
      gwa_fieldcat-emphasize = 'C201'.
      gwa_fieldcat-col_pos = 3.
      APPEND gwa_fieldcat TO gi_fieldcat.
      CLEAR gwa_fieldcat.
      gwa_fieldcat-fieldname = 'PSTAT'.
      gwa_fieldcat-seltext_l = 'VARIANT'.
      gwa_fieldcat-tabname = 'GI_OUTPUT'.
      gwa_fieldcat-emphasize = 'C201'.
      gwa_fieldcat-col_pos = 4.
      APPEND gwa_fieldcat TO gi_fieldcat.
      CLEAR gwa_fieldcat.
      gwa_fieldcat-fieldname = 'QUANTITY'.
      gwa_fieldcat-seltext_l = 'QUANTITY'.
      gwa_fieldcat-tabname = 'GI_OUTPUT'.
      gwa_fieldcat-emphasize = 'C201'.
      gwa_fieldcat-col_pos = 5.
      APPEND gwa_fieldcat TO gi_fieldcat.
      CLEAR gwa_fieldcat.
      gwa_fieldcat-fieldname = 'BARCODE'.
      gwa_fieldcat-seltext_l = 'BARCODE'.
      gwa_fieldcat-tabname = 'GI_OUTPUT'.
      gwa_fieldcat-emphasize = 'C201'.
      gwa_fieldcat-col_pos = 6.
      APPEND gwa_fieldcat TO gi_fieldcat.
    endform.                    " buildcat
    *&      Form  top
          text
    FORM top .
    REFRESH gi_top.
    gwa_top-typ = 'H'.
    gwa_top-info = My alv report'.
    APPEND gwa_top TO gi_top.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        it_list_commentary       = gi_top
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.                "top
    *&      Form  display_report
    form display_report .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
       I_INTERFACE_CHECK                 = ' '
       I_BYPASSING_BUFFER                = ' '
       I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = g_repid
       I_CALLBACK_PF_STATUS_SET          =  'PF-STATUS'
       I_CALLBACK_USER_COMMAND           = ' '
        I_CALLBACK_TOP_OF_PAGE            = 'TOP'
       I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
       I_CALLBACK_HTML_END_OF_LIST       = ' '
       I_STRUCTURE_NAME                  =
       I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      =
       I_GRID_SETTINGS                   =
       IS_LAYOUT                         =
        IT_FIELDCAT                       = gi_fieldcat
       IT_EXCLUDING                      =
       IT_SPECIAL_GROUPS                 =
       IT_SORT                           =
       IT_FILTER                         =
       IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
        I_SAVE                            = 'A'
        IS_VARIANT                        = wa_variant1
       IT_EVENTS                         =
       IT_EVENT_EXIT                     =
       IS_PRINT                          =
       IS_REPREP_ID                      =
       I_SCREEN_START_COLUMN             = 0
       I_SCREEN_START_LINE               = 0
       I_SCREEN_END_COLUMN               = 0
       I_SCREEN_END_LINE                 = 0
       I_HTML_HEIGHT_TOP                 = 0
       I_HTML_HEIGHT_END                 = 0
       IT_ALV_GRAPHICS                   =
       IT_HYPERLINK                      =
       IT_ADD_FIELDCAT                   =
       IT_EXCEPT_QINFO                   =
       IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
       E_EXIT_CAUSED_BY_CALLER           =
       ES_EXIT_CAUSED_BY_USER            =
       TABLES
         t_outtab                          = gi_output
      EXCEPTIONS
        PROGRAM_ERROR                     = 1
        OTHERS                            = 2
    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.                    " display_report
    *&      Form  export_report
          text
    form export_report.
    endform.

    Hi Cinthia,
    Check this Link.
    How Can we genarate Excel file without GUI_DOWNLOAD
    Reward points if useful.
    Regards,
    Abhishek

  • Unable to save webi report in excel format

    Hi All,
    I have a question. I recently upgrsded my internet explorer from IE 7 to IE 8.
    Previously, i was able to save webi reports in excel format without any issues.Even after upgrading to IE version8, i was able to save webi reoprts to excel without any issues for 2 weeks.
    Suddenly I am unable to save Webi reports in excel format now.When I select the Save to my computer as Excel option the saving dialog box appears and hangs forever.
    Can someone please advise me on this??
    Please hel as it is very urgent.

    Hi All,
    Trying to replicate WEBI Excel Download issue.
    Operating system : Windows 7
    Internet Explorer : IE8 Version 8.0.7600.16385CO.
    Jre Version : 1.6_ greater than 1.8 version.
    If anybody having above specifications in your machines Please try to save a webi reports to excel format and send me the results.

  • Getting a report in excel format from oracle report builder 10gDS release2

    I want to get a report in excel format from oracle report builder 10gDS release2.
    Is there ne method by which minimum effort is required for changing already made reports .
    I have searched for it on internet :-
    http://www.oracle.com/webapps/online-help/reports/10.1.2/state/content/navId.3/navSetId._/vtTopicFile.htmlhelp_rwbuild_hs%7Crwwhthow%7Cwhatare%7Coutput%7Coutput_a_simpleexcel~htm/
    Example, given in the last of the page opened from the above url, is not working.
    Can neone plz explain the example and how to use it
    Thanks & Regards
    JD

    Ok, for the release 2 its quite straightfoward, in your calling form you would have something like this code:
    declare
         pl_id ParamList;
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    v_rep_status VARCHAR2(20);
    v_repsrv     VARCHAR2(100):= 'yourreportserver';
    v_serv varchar2(50) := 'yourservername' ;
    begin
    pl_id := Get_Parameter_List('tmpdata');
    if not id_null(pl_id) then
    Destroy_Parameter_List( pl_id );
    end if;
    pl_id := Create_Parameter_List('tmpdata');
    Add_Parameter(pl_id,'DESTYPE' ,TEXT_PARAMETER,'Screen' );
    Add_Parameter(pl_id,'PARAMFORM' ,TEXT_PARAMETER,'NO' );
    repid := FIND_REPORT_OBJECT('yourreport');     SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,RUNTIME);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER, v_repsrv);
    set_report_object_property(repid,REPORT_DESTYPE,CACHE );
    set_report_object_property(repid,REPORT_DESFORMAT,'SPREADSHEET' );
    v_rep := RUN_REPORT_OBJECT(repid,pl_id);
    v_rep := substr(v_rep,length(v_repsrv)+2,10 ) ;
    end;
    I have plenty of reports being formated to excel with this same method so it should work for you, the only diference with my previous code is this line.
    set_report_object_property(repid,REPORT_DESFORMAT,'SPREADSHEET' );
    The rest remains untouched.
    Hope it helps.

  • From forms6i i have to call report in excel format

    Hi,
    I have prepared a form in that i have called report using parameters and
    i should print this report in excel format,so pls help me with coding
    Thanks and regards

    Hi,
    You can use rep2excel utility for this. Download it from www.lv2000.com ,please find the complete link below. The software also has a code pack which demonstrates how to use it within your oracle report.
    http://www.lv2000.com/rx/rep2excel.htm
    Cheers!!

Maybe you are looking for

  • If I move a picture from one project to another in aperture why doesn't the jpeg change folders if all my pictures are referenced?

    I started importing all my pictures into Aperture and have been debating whether to use a managed or referenced library.  I'm leaning toward referenced, but before import everything that way, I do a couple of "test drives". In Aperture, I moved a pho

  • Getting error:Absence type 100 was not found in Customizing for

    Hi, I am using the Standard workfllow for leave application, and when i am  creating the request i am getting the bleow error: 'Absence type 100 was not found in Customizing for 21.10.2010' What could be the reason, i have configured the statndard se

  • JasperReports in Oracle 10g?

    Hi I have seen this small java sample there show how to use JasperReports. http://www.cise.ufl.edu/~otopsaka/CIS4301/ReportDemo/ReportFromJava.html Is it possibel to store a littel java program like the samle as stored procedure and run the stored pr

  • JLabel won't display image until all methods have completed

    Hi, I?m trying to deal playing cards. I can click a button to deal one card at a time but I?m trying to set it up so it runs 25 cards with a delay on each card. Otherwise, it just puts up 25 cards at the same time. I?ve been reading about threads and

  • Photo album location

    I changed the location of "My Picutres" location cause the c drive was gettting too low. I updated the registry with the current location and that works fine through explorer. I just noticed after I created a new photo album that itunes is still goin