Download Query execution to a File - APD

Hi,
I would like to download to a file the execution of a Query. I thought in APD, but I am facing an issue.
The layout of the query is the following (and as I expect to be in the flat file):
                               KF 1          KF 1          KF 1          KF 2          KF 2          KF 2
               Calendar day          01/02/2011     02/02/2011     03/02/2011     01/02/2011     02/02/2011     03/02/2011
Customer group          Material                                   
A1               000000000030193470     10          12          14          16          18          20
A1               000000000030193473     12          15          18          21          24          27
But the layout of the file is:
Customer group     Material          Calendar day     KF 1     KF 2
A1          000000000030193470     01/02/2011     10     12
A1          000000000030193470     02/02/2011     12     15
A1          000000000030193470     03/02/2011     14     18
A1          000000000030193473     01/02/2011     16     21
A1          000000000030193473     02/02/2011     18     24
A1          000000000030193473     03/02/2011     20     27
My query has in Row 2 Characteristics and in Columns 2 KF and one characteristic. Is there any problem?
Regards, Federico

Hi Fredrico ,
APD will not be very helpful in your case as it cannot change query output format .However if you want  it in mentioned format you can use function module RRW3_GET_QUERY_VIEW_DATA which will provide you  t_cell_data (columns ) and  t_axis_data (rows) that can be further changed into your desired format and can be written into a flat file .
For this you need to write a Report program in se38 and need to execute this function module .Later on you can convert your output as per your requirement and can write it to text file (either in your desktop or application server ).
This will be very efficient if your query have structures etc and also efficient in terms of memory .
If your requirement is for passing query output to non SAP system then it is very helpful.
Let me know If you want to go for this .I can help in writing program .
Regards,
Jaya

Similar Messages

  • To download the query output to falt file

    Hi all,
    i have a query which i know will give more than 65k records as the output for a selection.
    i cannot run this query in excel due to its limitation.
    if i run on web i cannot download this as downloading is happening to excel file only.
    The customer ideally wants to download the query result to a text file(csv,tab-delimited etc) which inturn it will upload to MS-Access.
    How do i achieve this?
    SAP has given response use try using these options:
    1.open interfaces to receive the output of a query via the MDX language.
    2.open hub tool as it is designed for big amounts of data.(i suppose this is not possible as i want to download query output not the data target contents)
    how do i achieve my scenario with option 1?
    Are there any alternatives??
    Any useful help will be rewarded.
    Regards,
    Dhanya.

    hi vivek,
    thnks for the useful reply.
    i have some problem with my ID,hence loggin in through my coleague's ID.
    i will assign u points as i get logged in.
    I did as u said by downloading it to unconverted format.
    the file got download to a text file.where the output has
    1.header rows(10 lines almost)
    2.the values r coming in single quotes e,g:
    '144000023073      'TAAS SETTLEMENT CONV 738 '19333000   '30.09.2006          '0.000
    how can i remove all this?
    Regards,
    Dhanya
    I

  • Analyzer Query Execution vs. APD Query Execution

    hi gurus,
    i have a problem with an execution of a query in BI 7.0. the query is based on a DSO.
    if i execute the query in bex analyzer, i get the result within 30 seconds.
    but if i execute the query in an APD, it will take several hours to complete the job.
    i checked the RSRT to view the query execution plan - here it is:
    SELECT "O1"."COMP_CODE" AS "K____240" ,"O1"."RECONTRACT" AS "K____301" ,"O1"."FISCVARNT" AS "K____181"
    ,"O1"."/BIC/ZIMIMNPER" AS "K____535" ,"O1"."BUSENTITY" AS "K____237" ,"O1"."/BIC/ZIMIMGEBL" AS "K____1098"
    , COUNT( * )  AS "Z____131" , SUM (  "O1"."/BIC/ZIMIK_113"  )  AS "Z____1886" ,
    SUM (  "O1"."/BIC/ZIMIK_183"  )  AS "Z____1908" , SUM (  "O1"."/BIC/ZIMIK_201"  )  AS "Z____1998"
    FROM "/BIC/AZIMODSSM00" "O1"
    WHERE
    ( ( ( ( "O1"."/BIC/ZIMIMNPER" = '2010009'
    ) ) AND  ( ( "O1"."/BIC/ZIMIMZBR" IN ( 'BEQ' ,'REFX3' ,'REFX4' ,'REFX6') ) ) ) )
    GROUP BY "O1"."COMP_CODE" ,"O1"."RECONTRACT" ,"O1"."FISCVARNT" ,
    "O1"."/BIC/ZIMIMNPER" ,"O1"."BUSENTITY" ,"O1"."/BIC/ZIMIMGEBL"
    but when i check the SQL statement for the APD in SM51, i found this statement:
    SELECT   "S0000"."SID" ,"P0000"."COMP_CODE" ,"P0000"."BUSENTITY"
    FROM   "/BI0/PBUSENTITY" "P0000" JOIN "/BI0/SBUSENTITY" "S0000" ON  "P0000" . "BUSENTITY" = "S0000" . "BUSENTITY" AND "P0000" . "COMP_CODE" = "S0000" . "COMP_CODE"
    WHERE   "P0000"."OBJVERS" = 'A' AND "S0000"."SID" IN ( SELECT "S"."SID" FROM "/BIC/AZIMODSSM00" "O" JOIN
      "/BI0/SBUSENTITY" "S" ON  "O" . "BUSENTITY" = "S" . "BUSENTITY" AND "O" . "COMP_CODE" = "S" .
      "COMP_CODE" )
    ORDER BY
      "COMP_CODE" ASC , "BUSENTITY" ASC#
    could you help me understanding the difference and the cause for it?
    i think, there are some validitycheckings executed for masterdata!? is it possible to disable these steps?
    here some more information:
    in the query, i'm using two compound characteristics and an constant selection for a restricted keyfigure. the characteristics all have access type for result values: posted values.
    regards,
    philipp

    Hello,
    Check this note:
    Note 751577 - APD-FAQ: Data source query
    This note helps with the following problems:
    Question 1: Query execution terminates or takes too long. What can I do?
    Question 2: The data in the analysis process does not correspond with the data in the Business Explorer. What is the cause of this?
    Question 3: When you execute the analysis process, the system issues error message B1 888: "For the ISO code &1 there is no unique SAP currency code for ALE". What does this mean?
    Question 4: When you execute the analysis process, the system issues error message RSAN_WB 010 (CX_RSAN_SVC_CHECK_ANALYSIS_N=>NODE_FIELDNAME_NOT_UNQIUE). What does this mean?
    Regards,
    Jorge Diogo

  • Extract data from Query to a Flat File - scheduling in the background

    Hi All,
    We need to extract data from a query to a flat file periodically, but each time 10 separate executions based on 10 profit centers, to get the separate files.
    So, we have PC1, PC2, ... PC10 Profit centeres.
    We have Query1, with profit center variable.
    We have created 10 variants for Query1 so that we can execute for 10 profit centers.
    Now, we have used RSCRM_BAPI to execute the Query1 and write to a flat file. Now we are having a problem in getting this feature used to execute the query automatically for 10 different varaints.
    Thanks in advance,
    _ Shashi

    Shashi,
       You can try using Information Broadcasting or Reporting Agent. You can schedule this in Information Broadcasting.
    check this link for Information Broadcasting... <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/a5/359840dfa5a160e10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/a5/359840dfa5a160e10000000a1550b0/content.htm</a>
    Nagesh Ganisetti.

  • SSRS Error : Query execution failed for dataset 'dataSet'. (rsErrorExecutingCommand) Semantic query execution failed. Invalid object name 'RPT.*********'. (rsSemanticQueryEngineError)

    I am new to SSRS and I am trying to migrate reports from 2008 to 2012. As I have so many reports to migrate, I simply got the back up of ReportServer,
    ReportServerTempDB, and Encryption Key and restored them to test environment. I made necessary configuration from RS configuration tool. I am able to see the reports now when I browse //hostname/reports. But when I open any particular report I am getting some
    error.
    · An error has occurred during report processing.
    (rsProcessingAborted)
    Query execution       failed for dataset 'dataSet'.
          (rsErrorExecutingCommand
    Semantic query        execution failed. Invalid object name
           'RPT. ******'. (rsSemanticQueryEngineError)
    ****** - I am assuming this is a custom data class.
    Does anyone have insight on this? or any better way that I can migrate the reports to new server with less efforts.
    I don’t have the reports solution file to deploy the reports, so I have followed backup and restore process.

    Hi Kishore237,
    According to your description, you migrated some reports from Reporting Services (SSRS) 2008 to 2012. Now you get error when accessing the reports on SSRS 2012. Right?
    In this scenario, did you modify the report data source in database after migration? You can try to open the report in Report Builder or Report designer and check the report dataset. If you can preview the report in Report builder or Report designer,
    please try to redeploy the report to Report Server. If it is still not working, please try to restore the database from backup. And for migrating reports, please follow the "Content-Only Migration" in the link below:
    http://msdn.microsoft.com/en-us/library/ms143724(v=sql.110).aspx
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to save query result on the file server as excel file?

    Hi everyone,
    I need to save the the query result on the file server as excel file.
    Do you have any idees how can I do it?
    Regards
    Erwin

    i dont think you can save as excel file but you can save it as CSV use APD or RSCRM BAPI for this

  • An error has occurred during report processing. (rsProcessingAborted) Query execution failed for dataset 'dsPriority'. (rsErrorExecutingCommand)

    click report error:
    log file:
    processing!ReportServer_0-2!104c!04/27/2015-19:15:21:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
     Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing.
     ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'dsPriority'.
     ---> Microsoft.AnalysisServices.AdomdClient.AdomdErrorResponseException: Query (26, 25) The ALLMEMBERS function expects a hierarchy expression for the  argument. A member expression was used.
       at Microsoft.AnalysisServices.AdomdClient.AdomdDataReader..ctor(XmlReader xmlReader, CommandBehavior commandBehavior, AdomdConnection connection)
       at Microsoft.AnalysisServices.AdomdClient.AdomdCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.AnalysisServices.AdomdClient.AdomdCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.ReportingServices.DataExtensions.AdoMdCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunDataSetQuery()
       --- End of inner exception stack trace ---
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunDataSetQuery()
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.Process()
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeParameterDataSet.Process()
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.ProcessConcurrent(Object threadSet)
       --- End of inner exception stack trace ---
    open http://localhost:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx?op=ProcessWarehouse click Invoke:
    System.Web.Services.Protocols.SoapException: TF221029: Reporting for Team Foundation Server does not have any warehouse jobs defined. Use the Team Foundation Administration Console to rebuild the reporting. : 2015-04-27T19:30:29:782 ---> System.InvalidOperationException:
    TF221029: Reporting for Team Foundation Server does not have any warehouse jobs defined. Use the Team Foundation Administration Console to rebuild the reporting. at Microsoft.TeamFoundation.Warehouse.WarehouseAdmin.QueueJobs(String collectionName, String jobName)
    at Microsoft.TeamFoundation.Warehouse.WarehouseControlWebService.ProcessWarehouse(String collectionName, String jobName) --- End of inner exception stack trace --- at Microsoft.TeamFoundation.Warehouse.WarehouseControlWebService.ProcessWarehouse(String collectionName,
    String jobName)

    Hi shelman,
    I'd like to know whether you configured TFS reporting service properly, and if you can get the report normally before. From the error message, you might has wrong data source or the parameters of the dataset 'dsPriority'. You can check whether the data source
    for your report is available, try to use windows authentication. Or check the parameters of dataset 'dsPriority' make sure the query works when you execute it manually.
    To process the TFS data warehouse and analysis services cube, I'd like to know which operation you selected before clicking Invoke button. Please follow the instructions on this
    page to process TFS data warehouse and analysis service cube manually. You can also refer the James's last reply in this
    thread or this
    blog to check if the solutions work for you.
    Another option is run TFS best practice analyzer to check if there any configure issues on your TFS server machine. And check event logs to see if there any useful information, elaborate more details about your scenario including reproduce steps if the problem
    persists.
    Best regards,

  • Query execution failed for data set

    Hi,
    We are using SQL 2005 server for generating reports.When we ran the reports it taking so much time after some time it shows this error:---
     ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set  ---> System.Data.SqlClient.SqlException: A severe error occurred on the current command.  The results, if any, should be discarded.
    Can you help me out.
    Thanks,
       --Amit

    My team is also facing similar problem. The RS trace logs report:
    w3wp!processing!13!9/26/2007-15:31:23:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'msdb'., ;
     Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'msdb'. ---> System.Data.SqlClient.SqlException: A severe error occurred on the current command.  The results, if any, should be discarded.
    Operation cancelled by user.
    In our system, Report Server and Database are on different machines. Report Server access database using a service account who has stored proc execute permissions on database.
    Problem comes only if the query execution time exceeds 5 mins. Otherwise the report gets generated successfully.
    I suspected this to be some timeout issue. But I have checked that all timeout settings in rs config files are as default.
    Any pointers?
    Thanks
    puns
    [email protected]

  • Oracle View that stores the Query execution time

    Hi Gurus
    i m using Oracle 10G in Unix. I wudiold like to know which Data dictionary view stores the execution of a query. If it is not stored then hw to find the query execution time other than (Set timing on) command. What is the use of elapsed time and what is the difference between execution time and elapsed time? How to calculate the execution time of a query.
    THanks
    Ram

    If you have a specific query you're going to run in SQL*Plus, just do
    a 'set timing on' before you execute the query.
    If you've got application SQL coming in from all over the place, you can
    identify specific SQL in V$SQL/ and look at ELAPSED_TIME/EXECUTIONS
    to get an average elapsed time.
    If you've got an application running SQL, and you need to know the
    specific timing of a specific execution (as opposed to an average),
    you can use DBMS_SUPPORT to set trace in the session that your
    application is running in, and then use TkProf to process the resulting
    trace file.

  • WebGui: Download Query-output to excel

    Hi everyone,
    We are using ITS 6.20 patch-level 10 (level 16 will follow this week) in combination with R/3 4.70 Ext. 1.0 and we experience some system behavior that is not really user-friendly.
    When calling a query (tx sq01) within WEBGui you've got the possibility to get the output as an ALV-List. Within the list you've got a button to download it to a local file as a spreadsheet. But when doing so the user has to confirm several screens for 'technical reasons'.
    Does anyone know a way (or a workaround) to avoid this 'technical screens'?
    Moreover the downloaded file should be a real XLS-File but it is a tab-separated text-file. Does anyone know how to get the same XLS-ready file within WEBGUI as you can get it in SAPGUI?
    Thank you for your help.
    Regards,
    Vinzenz

    Hi Vinzenz,
    I regret that the SAP GUI for HTML is not capable of exporting a XLS-file.
    Best regards,
    Henning.

  • Identifying query execution time

    Hello,
    I would like to know how can I figure out the actual query execution time in Oracle.
    Regards

    Oracle Documentation is your best friend.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2113.htm#i1417057
    ELAPSED_TIME --> Elapsed time (in microseconds) used by this cursor for parsing, executing, and fetching
    Asif Momen
    http://momendba.blogspot.com

  • Unwanted query execution before adding Find page restrictions

    Hello,
    When the JHS (10.1.2.1.27) application I made is started, the whole table content is queried without restrictions BEFORE the Find page has loaded.
    Because it's a fair amount of data, I get out of memory messages.
    I have used 2 specific settings that are related to this:
    1) Property "Use Table Range?" has been turned off
    2) Query Bind Parameters are used
    Looking in the log files I noticed the following:
    13:24:00 DEBUG (JhsActionServlet) -Request URI: /PppHseSisQuery/FindPppVLastBhy.do
    13:24:00 DEBUG (JhsActionServlet) -Request Character Encoding: ISO-8859-1
    13:24:04 DEBUG (JhsDataAction) -Executing action /FindPppVLastBhy
    13:24:04 DEBUG (JhsDataAction) -Created searchBean map and stored on session
    13:24:04 DEBUG (JhsDataAction) -Created new searchBean for PppVLastBhyUIModel and added to quick search bean map
    13:24:04 DEBUG (JhsDataAction) -Stored searchBean for PppVLastBhyUIModel on request
    13:24:04 DEBUG (JhsDataAction) -ViewObject PppVLastBhyView: value of bind param 0 set to null
    13:24:04 DEBUG (JhsDataAction) -ViewObject PppVLastBhyView: value of bind param 1 set to null
    13:24:04 DEBUG (JhsDataAction) -ViewObject PppVLastBhyView: value of bind param 2 set to null
    13:24:04 DEBUG (JhsDataAction) -ViewObject PppVLastBhyView: value of bind param 3 set to null
    13:24:04 DEBUG (JhsDataAction) -ViewObject PppVLastBhyView: value of bind param 4 set to null
    13:24:04 DEBUG (JhsDataAction) -ViewObject PppVLastBhyView: value of bind param 5 set to null
    13:24:04 DEBUG (JhsDataAction) -ViewObject PppVLastBhyView: value of bind param 6 set to null
    13:24:04 DEBUG (JhsDataAction) -ViewObject PppVLastBhyView: executing query, bind parameter values have changed
    It seems that the bind parameters get initialized in some kind of way at startup.
    This is detected as a change in value apparently, after which the query execution is triggered.
    So far so good. The problem is that my main query restriction is not related to any of the query bind parameters.
    Because the Find page has not been loaded yet, this mandatory restriction has not been added to the searchBean yet and will therefore not be added to the view object's where clause.
    The result is that all table records will be queried.
    My question: Is there any way to prevent the query to be executed before the Find page has loaded?

    Have you tried setting the group checkbox "Auto Query?" to unchecked? This should prevent the query from executing before the find page is loaded.
    Steven Davelaar,
    JHeadstart Team.

  • Vendor Code 1317 Query execution was interrupted MySQL

    An Error was encountered performing the requested operation:
    Query execution was interrupted
    Vendor Code 1317
    Is this a network issue?
    A database issue?
    This is intermittent, for a period I can query tables then I try a new query or click on a different table, and the error appears.
    Anyone else experience this?
    Version 2.1.1.64.45
    Java Platform 1.6.0_11

    Hi Guys,
    I couldn't initially replicate.
    But when I downloaded the driver version you are using (mysql-connector-java-5.1.13-bin.jar) it happened straight away.
    Example: select * from information_schema.tables
    second execution > Query execution was interruptedI have no issues (with my limited testing) using the documented JDBC driver (mysql-connector-java-5.0.4-bin.jar)
    http://downloads.mysql.com/archives/mysql-connector-java-5.0/mysql-connector-java-5.0.4.zip
    We don't upgrade/test/support the latest version of each JDBC driver, only when we see a benefit.
    This goes for JTDS for SQL Server and Sybase and the other third party JDBC drivers.
    Appreciate that this is not easy to find or obvious.
    Heres the list of JDBC versions.
    http://download.oracle.com/docs/cd/E15846_01/doc.21/e15222/intro.htm#CHDIEGDD
    Hope this helps.
    Dermot
    SQL Developer Team.

  • In-Memory Query execution mode rendering results but "both" as execution mode do not.

    Hi,
    I am facing this strange issue of fetching some rows based on my view criteria.
    I delete some rows and make them as inactive. Then I search for those rows by using filter as "inactive" rows. I get the result as expected. But then, if I enter any other filed apart from inactive condition, I do not get that record even when that record is present in the list.
    I looked out for the query execution mode for my VC based on which my rows are fetched. I found that if I keep the Query execution mode as "In-Memory" I am able to get the result but if I give the query execution mode as "Both", I do not get results even though the other factors are still same for it.
    Due to model settings, I can't use "In-Memory" as the query execution mode.
    I get the results properly after I commit my changes to DB,however.
    How can I proceed here?

    Hi,
    apparently the JDeveloper version you use does not work with "Both", which I suspect to be a bug. If you are on a latest version of JDeveloper 11g R1, JDeveloper 11g R2 or on JDeveloper 12c, please file a bug if you have access to customer support. If you are not yet on a latest version of JDeveloper, please try a newer version of your JDeveloper release.
    Frank

  • AMFPHP and AS3FLEXDB - how to disable 'busy indicator' during query execution ?

    I'm doing some experiments with Flex and SQL with use of as3flexdb and AMFPHP.
    I've written some application which is pushing some data to SQL base...
    problem is, that durring query execution, there is some 'busy indicator' on the screen
    - some circle, and word 'loading'.
    Have you any idea how to disable this ?
    Everything what I'm doing is based on this tutorial below, but there is no idea in it how to
    disable the indicator.
    http://ghalex.com/blog/tag/as3flexdb
    I'm not sure if this indicator comes from as3flexdb libraries or AMFPHP itself ?
    Has anyone of you had such problem before ??
    Thanks for all ideas
    Rymas,

    Unfortunatelly my cheers was to early
    I've successfully decompiled the library swc file, found Query.as class and corrected things mentioned in this
    post : http://itutorials.ro/viewtopic.php?f=9&t=22&p=59&hilit=loading#p59
    ... but I cannot compile the library.fla back to swf ... it's generating some errors
    Could anyone help me with that, maybe you've got more expirience with decompiling and compiling.
    Orginal .swc file is here : http://www.rymasek.iq.pl/swc/as3flexdb_1.3.0.swc
    Thanks for help !!

Maybe you are looking for

  • Crash and crash again

    Right after I trashed my render files--with fcp 6.02 open--fcp crashed and now whenever I try and open it, it crashes right at "Preparing video for display". I imagine trashing render files while fcp is open is not de rigeuer, but I've done it before

  • Error in mru internal routine ORA-20001  Error in MRU

    Hi, In my APEX application, tabular form is used. Add row and Submit buttons are all present. When a user enter all the details and click Add row or Submit, the values are stored in the DB. But once in a while, when the user clicks the Submit button,

  • BAPI Error for BAPI_PO_Create1

    hi all, i am supposed to create PO s for all the invoices in a Ztable.so i chose BAPI_po_create1.I am passing all the values but it throws some exception tht it was intercepted by some superior class. it says FAILURE Exception. Please help. Thanks a

  • Planned Cost in PS which are maintained in HR

    Hi, In project systems, For calculating the Planned Cost I require Employee Gross Salary which is maintained in 0008 Infotype, in Employee master data (PA30) How to get the Gross amount to PS for Planned Cost Can any one help me by providing integrat

  • Dynamic Array Reply

    I am trying to cast the Vector object into String object because at the comment line Statement, I received an error " java.lang.ClassCastExecption" and please tell me another thing that how can I iterate through the array records when the array is in