Need o/p of diff queries in a single excel in diff sheets

Hi all,
I have to automate some process.
I have some queires. Each query o/p shud be kep in a each sheet of a single excel.
I have arnd 15 sheets in a single excel
and 15 queries.
I am running the query copying it and again pasting the same in the excel.
This taking 1 hr most of the times and feeling hectic as I doing this frequently.
Queries are fixed .
Could anyone tell me to automate it such that after running that all the o/p should be directed to respective excel sheets.
Thanks in advance,

user627667 wrote:
Hi all,
I have to automate some process.
I have some queires. Each query o/p shud be kep in a each sheet of a single excel.
I have arnd 15 sheets in a single excel
and 15 queries.
I am running the query copying it and again pasting the same in the excel.
This taking 1 hr most of the times and feeling hectic as I doing this frequently.
Queries are fixed .
Could anyone tell me to automate it such that after running that all the o/p should be directed to respective excel sheets.
Thanks in advance,You can write some PL/SQL to output the data in Office XML format:
http://support.microsoft.com/kb/288215
http://blogs.msdn.com/brian_jones/archive/2005/06/27/433152.aspx
This supports multiple sheets.
Easy way to find out what XML is required for certain Excel features is to create a basic workbook with your requirements and save it as XML format and then view that in wordpad.
The structure is fairly simple to follow so you should be able to do what you require. It also caters for all excel information you would have on a spreadsheet including formatting and dynamic calculations.
;)

Similar Messages

  • Downloading different internal table data in a single excel with diff tabs.

    Hi gurs,
    I have 4 internal tables  with me i can able to display in 4 different excel sheets using   CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
    But my requirement is i want to download 4 internal table in single excel sheets with different tabs. please send the code if u have.
    Thanks and regards.

    Hi,
    If you want to display the content of 4 internal table in different sheets of same workbook then go through below code,
    DATA : EXCEL         TYPE OLE2_OBJECT,
           WORKBOOKS     TYPE OLE2_OBJECT,
           WORKBOOK      TYPE OLE2_OBJECT,
           CELLS         TYPE OLE2_OBJECT,
           SHEET         TYPE OLE2_OBJECT,
           FONT          TYPE OLE2_OBJECT,
           H_COM1        TYPE OLE2_OBJECT,
           F             TYPE RLGRAP-FILENAME,
           FILEP         TYPE DRAW-FILEP,
           G_FILE_DEST   TYPE STRING,
           G_FILE_TEMP   TYPE STRING,
           G_SYSUBRC     TYPE SY-SUBRC,
           G_FILE_SRC    TYPE DRAW-FILEP.
    START THE EXCEL APPLICATION
      CREATE OBJECT excel 'EXCEL.APPLICATION'.
      CALL METHOD OF excel 'WORKBOOKS' = workbooks.
      SET PROPERTY OF excel  'VISIBLE' = 0.
      CALL METHOD OF workbooks 'OPEN' EXPORTING
                #1 = filep.
    For Sheet1
      CALL METHOD OF excel 'Worksheets' = sheet
       EXPORTING #1 = 1.
      CALL METHOD OF sheet 'Activate'.
      FREE  OBJECT sheet.
      CALL METHOD OF excel 'CELLS' = cells
          EXPORTING #1 = 1
                    #2 = 15.
      SET PROPERTY OF cells 'VALUE' = <value>
    CALL METHOD OF cells 'FONT' = font.
    SET PROPERTY OF font 'SIZE' = '20'.
      FREE OBJECT cells.
    For Sheet2
      CALL METHOD OF excel 'Worksheets' = sheet
       EXPORTING #1 = 2.
      CALL METHOD OF sheet 'Activate'.
      FREE  OBJECT sheet.
      CALL METHOD OF excel 'CELLS' = cells
          EXPORTING #1 = 1
                    #2 = 6.
      SET PROPERTY OF cells 'VALUE' = 'XYZ'.
      CALL METHOD OF cells 'FONT' = font.
      SET PROPERTY OF font 'SIZE' = '20'.
      GET PROPERTY OF excel 'ACTIVESHEET' = sheet.
      CALL METHOD OF sheet 'SAVEAS' EXPORTING
                      #1 = <destination file path where you want to store>
                      #2 = 1.
      CALL METHOD OF workbooks 'CLOSE'.
      CALL METHOD OF excel 'QUIT'.
      FREE OBJECT excel.
    Thanks!
    Brunda
    'Reward if useful'.

  • Need to find out the queries which did not executed in 2014

    Hi All,
    I need to find out the queries which start from YY  and did not executed in 2014, earlier we used to find out by looking into the technical content cube 0TCT_C02 but now its giving dump as number of queries increases. I tried to find out using table RSZCOMPDIR but not able to trace it exactly. Please suggest some alternative solution to find out the queries which did not execute in 2014 so that we can delete it.
    Thanks,
    Asim.

    Hi,
    RSDDSTAT_OLAP : This is the table which contains query execution details
    CALDAY field in that table gives you query execution date
    OBJNAM gives the query name
    As you said RSZCOMPDIR gives list of all queries. doing a lookup between these tables will identify the queris which are not executed in particular period.
    -Sriram

  • Diff b/w select single * .... and select....up to 1 row

    Hi Abapers,
    What is the diff b/w Select single * from.... and select * ...up to 1 row.
    Thanks in advance.
    Subbu.

    Select SINGLE...
    SINGLE
    The result of the selection should be a single entry. If it is not possible to identify a unique entry, the system uses the first line of the selection. If you use the FOR UPDATE addition, the selected entry is protected against parallel updates from other transactions until the next database commit (see LUW and database lock mechanism). If the database system identifies a deadlock, a runtime error occurs.
    ... UP TO n ROWS
    Effect
    The set of results is restricted to a maximum of nrows.
    Example
    To output a list of the 3 business customers with the greatest discount:
    DATA WA_SCUSTOM TYPE SCUSTOM.
    SELECT * FROM SCUSTOM INTO WA_SCUSTOM UP TO 3 ROWS
             WHERE CUSTTYPE = 'B'
             ORDER BY DISCOUNT DESCENDING.
      WRITE: / WA_SCUSTOM-ID, WA_SCUSTOM-NAME, WA_SCUSTOM-DISCOUNT.
    ENDSELECT.
    Notes
    If you use an UP TO n ROWS addition in an ORDER-BY clause , the lines read are sorted into the correct order. The first n lines are then displayed. The system may need to read more than n lines from the database to be able to do this.
    If n = 0, all selected lines are displayed.
    n < 0 results in a runtime error.
    <b>Knowing when to use SELECT SINGLE or SELECT ... UP TO 1 ROWS</b>
    A lot of people use the SELECT SINGLE statement to check for the existence of a value in a database. Other people prefer to use the 'UP TO 1 ROWS' variant of the SELECT statement.
    <b>So what's the difference between using 'SELECT SINGLE' statement as against a 'SELECT .... UP TO 1 ROWS' statement ?</b>
    If you're considering the statements
    SELECT SINGLE field INTO w_field FROM table.
    and
    SELECT field INTO w_field FROM table UP TO 1 ROWS. ENDSELECT.
    then looking at the result, not much apart from the extra ENDSELECT statement. Look at the run time and memory usage and they may be worlds apart.
    Why is this ?? The answer is simple.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Get the difference ??
    If not, here is a good example, credit for this example goes to Richard Harper, a friend of mine on sapfans.com :
    Create a Ztable called ZDifference with 2 fields in it, MANDT of type MANDT and POSNR of type POSNR. Make sure both of these are keys. Also create a table maintenance dialog for it (SE11->Utilities->Table Maintenance Generator). Fill the table with ten rows 000001-000010.
    Then run the program shown below:
    Report Z_Difference
           Message-id 38
           Line-Size  80
           Line-Count 0
           No Standard Page Heading.
    Start-Of-Selection.
      Data: w_Single type Posnr,
            t_Rows   type standard table of Posnr
                     initial size 0
                     with header line.
      Select single Posnr
        from zDifference
        into w_Single.
      Select Posnr
        into table t_Rows
        from zDifference
       up to 1 rows
       order by Posnr descending.
       Write :/ 'Select single:', w_Single.
       Skip 1.
       Write :/ 'Up to 1 rows :'.
       Loop at t_Rows.
            Write t_Rows.
       EndLoop.
    You should see the output:
    Select single: 000001
    Up to 1 rows : 000010
    The first 'SELECT' statement selected the first record in the database according to any selection criterion in the 'WHERE' clause. This is what a 'SELECT SINGLE' does. The second 'SELECT' has asked the database to reverse the order of the records before returning the first row of the result.
    In order to be able to do this the database has read the entire table, sort it and then return the first record. If there was no ORDER BY clause then the results would have been identical (ie both '000001') but the second select if given a big enough table to look at would be far slower.
    Note that this causes a problem in the Extended Program Check if the full key is not specified in a 'SELECT SINGLE'. Replacing the 'SELECT SINGLE' by an "UP TO 1 ROWS" will give the same exact results without any warning but the program will run slower and consume more memory. This is a good example of a warning that we should ignore... considering you are sure of what you are doing !!
    Message was edited by:
            Judith Jessie Selvi

  • Including multiple XSU queries in a single XML document

    Can anyone set me on the right path to using Oracle's DOM parser to include the XML reulsts of multiple XSU queries into a single document? I can successfully return the queries with "Document doc = xquery1.getXMLDOM();" but cannot figure out how to add all of the children of these Documents to a master XMLDocument object.
    Thanks very much,
    Cristian

    Hi,
    Batching is not supported for custom document. You need to enqueue your message one by one into B2B. If you want to batch them together, you will need to write a script to concat them together after the messages have been translated into native EANCOM format.
    Eng

  • Executing Multiple Select Queries in a Single attempt

    HI,
    I executed two select queries in a single statement execute. It is executing without any error. Hence there must be two resultset objects within that single statement.
    What the problem is that I m able to fetch the first resultset and its data, But I execute stmt.getMoreResults() to move to the next resultset, it returns false, which means there is no more results. I want to know what is the problem ?? (Record exist in the database for both queries)
    And How can I rertieve both the resultsets. ??
    Plz help me asap.
    For ur convenience I m posting the Java code also which I m trying.
    sql.delete(0, sql.length());
    sql.append("select FIRST_NAME , MIDDLE_NAME , LAST_NAME from USER_MASTER where USER_ID=4;");
    sql.append("select producttransaction_id, product_type from product_transaction where transaction_id=102 order by product_type desc");
    Statement stmt = con.createStatement();
    stmt.execute(sql.toString());
    int resultsetcount =1;
    ArrayList arrlist = new ArrayList();
    rs = stmt.getResultSet();
    if(rs !=null)
    if(rs.next())
    .........// logic here working properly
    //Now when I move to next resultset using the below statement
    //it returns false indicating that there r no more results.
    // Why this is so ?????
    boolean moreresultsets = stmt.getMoreResults();
    System.out.println("MoreResultsets::"+moreresultsets);
    if(moreresultsets)
    rs = stmt.getResultSet();          
    if(rs!=null)
    while(rs.next())
    //...Logic.......
         rs.close();
    Thanks

    I've never seen this used the way you are using it. In my experience the only way to do this would be to execute a single SQL statement that returns multiple result sets - you are trying to append two SQL statements.
    You could define an in-line procedure wrapping your two select statements, or you could define a stored procedure to do the same thing. Then (either way) use CallableStatement to execute the call to the procedure.

  • Layout issue in export multiple queries to single excel

    Hi ,
    While exporting more than one queries on web template to single excel (with help of  HowToWebPrinting document ), i am facing layout problems.
    EX. if my web template has 4 queries  in below format
    A B
    C D
    where A,B,C,D are different queries
    on web printing to single excel, i get all queries in excel but they are in form
    A
    B
    C
    D
    i.e with distorted layout. Is there a way out to have the exported EXCEL in same layout as that of my report
    Any ideas would be appreciated in this regard.
    Best Regards
    Deepali

    Thanks Deepak for your suggestion on trying to enhance
    Z_PRINT_SERVICE class.
    But in my system, i have z_print_help_service & not z_print_service. Is it something that is missing.
    To add to it, i have one more issue.
    I have a strange scenario.
    In some webtemplates, when i do export , my all data is coming.
    In some alternate columns are coming on export in one row
    & other row its fine, while on web report all columns are existing .
    Has anybody faced missing data on export .
    Unless this problem gets resolved, we can't be sure of what is being produced & won't be able to implement. Below are lines i am using
    in each template.
    <param name="HELP_SERVICE" value="Z_PRINT_HELP_SERVICE_ALL_DP"/>
             <param name="HELP_SERVICE_CLASS" value="ZCL_RSR_XLS_HELP_WINDOW_PRINT"/>

  • How to Insert two queries in a single workbook in BI 7 ?

    Hi,
               I am trying to insert two queries in a single workbook. The queries are of Accounts Receivable.I have inserted one query in a workbook , but am not able to proceed to inserting the second query. In BEx analyzer, in design mode , using analysis grid , i tried inserting the second query but when saving and running, i am getting message " Variables are present, change their values " . should i maintain same variables for two queries ? i am stuck up. please explain me as how can this be done.
    Roja.

    Hi,
    If you get the message "Variables are present, change their values" ,it means that the query which you inserted having variables.
    You just click the "Change Variables" icon in the Analysis Toolbox,which will invoke the variable screen.
    Set the values in the variable screen and click OK.
    Now you will be able to see the data in the grids based on the values selected in the variable screen.
    Both queries data will be displayed in the workbook.
    Let me know in case of any clarifications!
    Rgds,
    Murali

  • Can we show 2 queries in a single query ?

    Hi experts,
    We require an output of a bex query.
    But the output is coming in two different queries.
    Is it possible to show two queries in a single query ?
    Regards,
    Nishuv.

    Hi Praveen,
    We are using bex 3.x. I opened a workbook. in the view toolbar->Toolbars->Control Toolbox.
    I clicked on this. A tool box came in the right side of the sheet.
    The options which we got here are:
    Exit Design mode
    Properties
    View code
    Check box
    Text box
    Command button
    Option button
    List box
    Combo box
    Toogle button spin button
    Scrool bar
    Label
    Image
    More controls
    Tool bar options.
    Here i am not able to see the Analysis grid.
    Is there anything more to be done to get this ?
    Regards,
    Nishuv.

  • Hello, I would like to create and print a contact sheet in Photoshop elements 13. I have managed to do that but I need desperately to be able to place a title on the contact sheet. Also, each photograph has as name and I need these names to show up on the

    Hello, I would like to create and print a contact sheet in Photoshop elements 13. I have managed to do that but I need desperately to be able to place a title on the contact sheet. Also, each photograph has as name and I need these names to show up on the contact sheet when I print them out. If this is not possible I will just return my product. I have an old old version of Photoshop that will do just that but with this new elements I cannot find it.

    markc
    What computer operating system is your Premiere Elements 13/13.1 running on?
    Assuming Windows 7, 8, or 8.1 64 bit, open the Elements Organizer 13/13.1 and select your media
    for the Contact Sheet.
    Go to File Menu/Print and set up the Print Dialog for Contact Sheet.
    If you used Edit Menu/Add Caption beforehand, I can see how you can get
    Date
    Caption
    Filename
    under the Print dialog's "4" and even a page number if you have more than 1 page. But, I am not seeing
    where you are going to get a title for each of the contact sheets.
    Any questions or need clarification, please do not hesitate to ask.
    You can get into the Elements Organizer 13/13.1 from the Welcome Screen or by clicking on the Organizer Tab
    at the bottom of the Expert workspace in the Premiere Elements 13/13.1 Editor.
    Please let us know if we have targeted your quesiton..
    Thank you.
    ATR

  • Need to download the ALV blocked output in to excel sheet

    I have a requirement where there is a need to download the Alv block output to excel sheet. when i click on excel button which is on output only header block data is coming in excel sheet.but i need both header block and item block data into excel.

    Hi,
    create a pushbutton on the toolbar,
    whenever user clicks the pushbutton,
    call the fm gui_download for 2 times
    for the first time,
    append = ' ',
    and for second time.
    append = 'X'.
    check this thread.
    Re: How to download multiple ALV Container data on a screen to a single Excel?
    Regards.
    R K.

  • Need a query to merge output in a single row?

    Hi All,
    I need a query to merge output in a single row.
    Query :
    Select dname from dept.
    Actual output is :
    Dname
    EDP
    ACCOUNT
    GR
    Desired Output is:
    Dname
    EDP ACCOUNT GR
    Please provide me the solution
    Thanks
    Amit

    select max(sys_connect_by_path (t.name,' '))  from  ( select id,
                            name,
                            group_id,
                            row_number() over (partition by group_id order by id) rn
                       from ( select 1 id, 'test'  name, 1 group_id from dual
                              union
                              select 2 id, 'test1' name, 1 group_id from dual
                              union
                              select 3 id, 'test2' name, 1 group_id from dual
                              union
                              select 4 id, 'test3' name, 1 group_id from dual)  ) t
    start with t.rn = 1 and id = 1
    connect by t.rn = prior t.rn + 1
    group by t.group_id

  • Integrate 2 BI queries in the single dashboard/excel

    Hi,
    How can I integrate 2 BI queries in a single xcelsius dashboard using the query as web service?
    Thanks in advance,
    shreesh.

    Hi,
    You have two options for that.
    1. Use workbook, insert the two queries in sheet 2 and sheet 3, and use excel formula or VB script to combine them together in sheet 1. Save the workbook and let your user execute that.
    2. Use Application Process Designer. Select the two queries as source and use abap code etc. to consolidate them. Then export to csv file or write to database.
    Regards,
    Frank

  • Hello, I would like to create and print a contact sheet in Photoshop Premier Elements 13. I have managed to do that but I need desperately to be able to place a title on the contact sheet. Also, each photograph has as name and I need these names to show u

    Hello, I would like to create and print a contact sheet in Photoshop Premier Elements 13. I have managed to do that but I need desperately to be able to place a title on the contact sheet. Also, each photograph has as name and I need these names to show up on the contact sheet when I print them out. If this is not possible I will just return my product. I have an old old version of Photoshop that will do just that but with this new Premiere Elements I cannot find it.

    markc
    What computer operating system is your Premiere Elements 13/13.1 running on?
    Assuming Windows 7, 8, or 8.1 64 bit, open the Elements Organizer 13/13.1 and select your media
    for the Contact Sheet.
    Go to File Menu/Print and set up the Print Dialog for Contact Sheet.
    If you used Edit Menu/Add Caption beforehand, I can see how you can get
    Date
    Caption
    Filename
    under the Print dialog's "4" and even a page number if you have more than 1 page. But, I am not seeing
    where you are going to get a title for each of the contact sheets.
    Any questions or need clarification, please do not hesitate to ask.
    You can get into the Elements Organizer 13/13.1 from the Welcome Screen or by clicking on the Organizer Tab
    at the bottom of the Expert workspace in the Premiere Elements 13/13.1 Editor.
    Please let us know if we have targeted your quesiton..
    Thank you.
    ATR

  • Need of having more transport groups in a single transport domain

    need of having more transport groups in a single transport domain

    Hello,
      Transport domain is all systems managed using one domain controller.
    Transport group is systems sharing the common transport directory.
    There is no rule concerning the transport groups, some landscapes have their DEV and QAS systems sharing the same tansport dir and production having its own transport directory. Which means this landscape will have 2 groups.
    This is just to keep your production system isolated.
    regards,
    Awaiz
    rewards pts if helpfull.

Maybe you are looking for

  • Get Current Datetime in an XSL

    How do I add a current Datetime to an XSL document? The following sample works in XALAN but not ORAXSL. date:new() returns nothing!? <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:date="http

  • Wi-Fi not working on MSI GT60

    Hello All, For last two weeks, wi-fi has not been working on my windows 8 machine. Wi-Fi switch is a software based switch on my machine. It is ON when I start the machine. But it does not list any wi-fi networks (I know the existence of the networks

  • How to use Set type datasources ?

    Hi, Our team has recently implemented CRM for one of our clients and now are integrating BW with CRM. Thus are developing corresponding objects in BW. In CRM, the team has created many set types and made those BW relevant as a result system created d

  • Unicode hex input problem

    I have a MBP running Yosemite.  My partner has a MBAir running OSX 10.8.5 (M-Lion?) He needs to use some medieval characters in his writing as a grad student in ENglish. On both machines, we installed the Unicde Hex Input source and selected it. On m

  • Aperture colour management vs Printer colour management

    I am quite new to both Aperture & Mac, having moved over from PC and generally Adobe software.  I shoot RAW mainly, on a Nikon 200 and use a Epson R1800 printer.  I have used a Spyder 3 to calibrate my screen and I am happy with the on screen images.