Execution date in a query

Hello all,
Is there any way to use sy-datum or something like that to store execution date of a query?
Thanks in advance
Carmen

Hi Carmen,
could you please clarify what do you want to achieve?
- Do you want to store somewhere when a particular query has been executed?
- Do you want to execute a query with a filter on SY-DATUM?
As a first input, on the global properties on a query, you have the query keydate, which is by default SY-DATUM
hope that helps
Olivier.

Similar Messages

  • Last Execution Date of a Query

    Hi Exparts
    Can any one tell me, how to see the execution of the BI Queries ? My problem is I want to check that when did my end user
    has last seen the report,This statstics will give me an insight on  BI reports usability. Top mangement is interested in this type of statstics
    Thanks
    Shivani

    Hi,
    Use  the standard SAP query USER STATS(Z0TCT_MC01_Q003) built on Multiprovider:0TCT_MC01.
    Here you will get a seperate record/row for each and every navigation of report i.e drilldown/remove drill down...etc,also for execution of report as a record/row in the out put.
    Hope this helps.
    thanks,
    rahul

  • Execution date in Excel export from a query

    Dear all,
    I am wondering if it is possible to have the query execution date in an exported excel.
    Case: When working in a query it should be possible to export the query to excel. However I am missing the execution date of the query and the last successful data load (which is visible in the webquery).
    Anyone has an idea how to achieve that?
    Thank you in advance,
    Andreas

    Hey Guys,
    Just wanted to point out that I know how to do this with a webapplication but I would need that within an excel export from an ordinary web query.
    Could someone help out here?
    Thanks in advance,
    Andreas

  • Transfer Data from a Query to DSO

    Hello,
    I have an APD to transfer data from a query to a 'Direct update DSO'. The execution of this APD times out since the volume of query data is very high.
    Is there an alternate way of transfering data from a query to DSO?
    Please suggest.
    Thanks!

    One way would be to extract the data from the existing cube using a function module that would mimic the query level filters and restrictions. That data can be populated into the new cube.
    I wud suggest u take the data from a non-aggregated layer (say a DSO below the cube).
    Also, check for the possibility of running the APD in multiple runs by using some kind of selection that would sum up to give u the whole data required.
    Can u confirm if ur query itself is getting timed out?
    -PA1

  • Execution time of sql query differing a lot between two computer

    hi
    execution time of a query in my computer and more than 30 different computer is less than one second but on one of our
    customers' computers, execution time is more than ten minute. databases and data and queries are same. i re-install sql but problem remains. my sql is ms sql 2008 r2.
    any one has idea for this problem?

    Hi mahdi,
    Obviously, we can't get enough information to help you troubleshoot this issue. So, please elaborate your issue with more detail so that the community members can help you in more effecient manner.
    In addition, here is a good article regarding checklist for analyzing Slow-Running queries. Please see:
    http://technet.microsoft.com/en-us/library/ms177500(v=sql.105).aspx
    And SQL Server Profiler and Performance Monitor are good tools to troubleshoot performance issue, please see:
    Correlating SQL Server Profiler with Performance Monitor:
    https://www.simple-talk.com/sql/database-administration/correlating-sql-server-profiler-with-performance-monitor/
    Regards,
    Elvis Long
    TechNet Community Support

  • Master data values in Query

    Hello,
    i want to restrict division by certain value in a query. i cannot see one of such values in the restriction window in the available list of values.
    i checked master records for division and it has this value. the infoprovider may not have this value.
    in the 0division infoobject the settings in the business explorer tab are:
    Query Def. Filter Value Selection: M Values in master data table.
    Query Execution Filter Val. Selectn:M Values in master data table.
    Why can't i see the value in the query for restriction?
    thanks

    Hi Aby,
    <i>Have you tried clicking on the "display other values" button right before the find text box in the restriction window (the one with the small yellow arrow)? If not, then click on tht button and put in some restriction rule to cut down on the number of entries displayed. This should display the value you desire.</i>
    In addtion to that uncheck 'only values from InfoProvider'
    regards

  • Need a Query to Get Execution time of each query in Proc if its running

    I am looking for query which give total execution time of individual query running currently ?
    we have queries but it will give cumulative time from the start date,
    for example - if stored proc has 10 queries , if each query taking 10 seconds it should show me 10 secoond if its running, not from when stored proc execution started , if you have any query please let me know
    only for running queries ,

    Is this the logic you're after?
    DECLARE @timeStamp DATETIME2 = CURRENT_TIMESTAMP, @lapTimeStamp DATETIME2, @x INT = 0
    SET @lapTimeStamp = CURRENT_TIMESTAMP
    WHILE @x < 10000
    BEGIN
    SET @x = @x + 1
    END
    PRINT CAST(DATEDIFF(MS,@TIMESTAMP,CURRENT_TIMESTAMP) AS VARCHAR) + ' milliseconds have elapsed since the begining of the proc. ' + CAST(DATEDIFF(MS,@lapTimeStamp,CURRENT_TIMESTAMP) AS VARCHAR) + ' have elapsed since the last batch'
    SET @lapTimeStamp = CURRENT_TIMESTAMP
    SET @x = 0
    WHILE @x < 10000
    BEGIN
    SET @x = @x + 1
    END
    PRINT CAST(DATEDIFF(MS,@TIMESTAMP,CURRENT_TIMESTAMP) AS VARCHAR) + ' milliseconds have elapsed since the begining of the proc. ' + CAST(DATEDIFF(MS,@lapTimeStamp,CURRENT_TIMESTAMP) AS VARCHAR) + ' have elapsed since the last batch'
    SET @lapTimeStamp = CURRENT_TIMESTAMP
    SET @x = 0
    WHILE @x < 10000
    BEGIN
    SET @x = @x + 1
    END
    PRINT CAST(DATEDIFF(MS,@TIMESTAMP,CURRENT_TIMESTAMP) AS VARCHAR) + ' milliseconds have elapsed since the begining of the proc. ' + CAST(DATEDIFF(MS,@lapTimeStamp,CURRENT_TIMESTAMP) AS VARCHAR) + ' have elapsed since the last batch'

  • Unable to access the data from Data Management Gateway: Query timeout expired

    Hi,
    Since 2-3 days the data refresh is failing on our PowerBI site. I checked below:
    1. The gateway is in running status.
    2. Data source is also in ready status and test connection worked fine too.
    3. Below is the error in System Health -
    Failed to refresh the data source. An internal service error has occurred. Retry the operation at a later time. If the problem persists, contact Microsoft support for further assistance.        
    Error code: 4025
    4. Below is the error in Event Viewer.
    Unable to access the data from Data Management Gateway: Query timeout expired. Please check 1) whether the data source is available 2) whether the gateway on-premises service is running using Windows Event Logs.
    5. This is the correlational id for latest refresh failure
    is
    f9030dd8-af4c-4225-8674-50ce85a770d0
    6.
    Refresh History error is –
    Errors in the high-level relational engine. The following exception occurred while the managed IDataReader interface was being used: The operation has timed out. Errors in the high-level relational engine. The following exception occurred while the
    managed IDataReader interface was being used: Query timeout expired. 
    Any idea what could have went wrong suddenly, everything was working fine from last 1 month.
    Thanks,
    Richa

    Never mind, figured out there was a lock on SQL table which caused all the problems. Once I released the lock it PowerPivot refresh started working fine.
    Thanks.

  • Can we use session variables in BI publisher's Data Model SQL Query?

    Hi Experts,
    We need to implement Data level security in BI Publisher 11g.
    In OBIEE we do so by using session variables, so just wanted to ask if we can use the same session variables in BI Publisher as well
    ie can we include the where clause in the Data Models SQL Query like
    Where ORG_ID = @{biServer.variables['NQ_SESSION.INV_ORG']}
    Let me know your views on this.
    PS: We are implementing EBS r12 security in BI Publisher.
    Thanks

    Read this -> OBIEE 11g: Error: "[nQSError: 23006] The session variable, NQ_SESSION.LAN_INT, has no value definition." when Creating a SQL Query using the session variable NQ_SESSION.LAN_INT in BI Publisher [ID 1511676.1]
    Follow the ER - BUG:13607750 - NEED TO BE ABLE TO SET A SESSION VARIABLE IN OBIEE AND USE IT IN BI PUBLISHER
    HTH,
    SVS

  • Effect of RLS policy (VPD) on execution plan of a query

    Hi
    I have been working on tuning of few queries. A RLS policy is defined on most of the tables which appends an extra where condition (something like AREA_CODE=1). I am not able to understand the effect of this extra where clause on the execution plan of the query. In the execution plan there is no mention of the clause added by VPD. In 10046 trace it does show the policy function being executed but nothing after that.
    Can someone shed some light on the issue that has VPD any effect on the execution plan of the query ? Also would it matter whether the column on which VPD is applied, was indexed or non-indexed ?
    Regards,
    Amardeep Sidhu

    Amardeep Sidhu wrote:
    I have been working on tuning of few queries. A RLS policy is defined on most of the tables which appends an extra where condition (something like AREA_CODE=1). I am not able to understand the effect of this extra where clause on the execution plan of the query. In the execution plan there is no mention of the clause added by VPD. In 10046 trace it does show the policy function being executed but nothing after that.
    VPD is supposed to be invisible - which is why you get minimal information about security predicates in the standard trace file. However, if you reference a table with a security preidcate in your query, the table is effectively replaced by an inline view of the form: "select * from original_table where {security_predicate}", and the result is then optimised. So the effects of the security predicate is just the same as you writing the predicate into the query.
    Apart from your use of v$sql_plan to show the change in plan and the new predicates, you can see the effects of the predicates by setting event 10730 with 10046. In current versions of Oracle this causes the substitute view being printed in the trace file.
    Bear in mind that security predicates can be very complex - including subqueries - so the effect isn't just that of including the selectivity of "another simple predicate".
    Can someone shed some light on the issue that has VPD any effect on the execution plan of the query ? Also would it matter whether the column on which VPD is applied, was indexed or non-indexed ?
    Think of the effect of changing the SQL by hand - and how you would need to optimise the resultant query. Sometimes you do need to modify your indexing to help the security predicates, sometimes it won't make enough difference to matter.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • SAP MII 14.0 SP5 Patch 11 - Error has occurred while processing data stream Dynamic Query role is not assigned to the Data Server

    Hello All,
    We are using a two tier architecture.
    Our Corp server calls the refinery server.
    Our CORP MII server uses user id abc_user to connect to the refinery data server.
    The user id abc_user has the SAP_xMII_Dynamic_Query role.
    The data server also has the checkbox for allow dynamic query enabled.
    But we are still getting the following error
    Error has occurred while processing data stream
    Dynamic Query role is not assigned to the Data Server; Use query template
    Once we add the SAP_xMII_Dynamic_Query role to the data server everything works fine. Is this feature by design ?
    Thanks,
    Kiran

    Thanks Anushree !!
    I thought that just adding the role to the user and enabling the dynamic query checkbox on the data server should work.
    But we even needed to add the role to the data server.
    Thanks,
    Kiran

  • No data from BW-Query in BO-tools

    Hello all
    On a newly installed BO XI 3.1 with the SAP integration kit I cannot get data from my existing BW queries.
    For example, if I start Xcelsius and add my BW-system as connection I can get the structure of the query (headings) but no data is displayed, neither in the connection's preview tab nor in the web preview.
    The same happens if I create a QaaWS on this BW-query - I see the query headings, but not the actual data.
    The query shows data if I open it directly in my web browser and it's a really simple one: no variables, no extras, only a few columns and rows.
    I use SAP BW 7.01 SP6, XI 3.1 12.3.3 and XCelsius 2008 5.3.4
    In SAP BW my user has SAP_ALL as well as BOE Admin & Content producer roles.
    I'm relatively new to BO products so I have no idea where to start looking for the cause. Please help!
    BR
    Kanan

    Hi
    After I found the document "Using Xcelsius 2008 with SAP NetWeaver BW" (http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10ad2489-8956-2d10-f8ab-ed4cce2766da?quicklink=index&overridelayout=true) and followed the steps it works.
    It seems as if the error was not in the system but in front of it - a typical case of RTFM, although the manuals are not always easy to find.
    sorry & thanks.
    BR
    Kanan

  • Key date for a query

    Dear All,
    I have created a customer exit variable on key date of a query.
    With this input variable i am first asking user to input one particular date say he enters 31.12.2010 then i am trying to add 1 more day to it and making it 01.01.2011.
    I have put a break point in the code but it does not stop the processing there.. report executes directly taking the first user input.
    I want to add 1 more day to the user entered date and this modifiied date should be the input date for key date field.
    Below is my code.
      WHEN 'ZCAL_DAY_EXT'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
          WHERE VNAM = 'ZCAL_DAY_EXT'.
            CLEAR L_S_RANGE.
          ENDLOOP.
          DATA: v_temp like sy-datum.
          v_temp = loc_var_range-low.
          v_temp = v_temp + 1.
          L_S_RANGE-LOW = v_temp.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
    Do let me know where am i going wrong? Or is it we cannot use customer exit with Key date.
    Thanks & Regards,
    Anup
    Edited by: Anup Chaudhari on Aug 2, 2011 7:16 AM

    Hi Anup,
    Basically I_STEP = 1 is used for populating the default value which will be shown on selection screen and I_STEP = 2 is the step in which you does the processing on variable values which are entered on selection screen.
    I am surprised that your internal table is empty, actually it is supposed to contain all the variable values which are entered in I_STEP = 1.
    Can you try to add some more variables along with the current variable and check whether their value is coming in the internal table or not?
    Finally what you can try is get the user input date in one variable and then create another customer exit variable in which you will calculate the new value and use this variable in Key date, the problem might be that we are trying to modify the same variable, actually it should not be the problem but I have no clue what is happening and you can just try this alternative.
    Regards,
    Durgesh.

  • Oracle Forms - How can I create a Data Block with query

    Dear friends I have a question, I couldn't do this..
    I have a sql query, I want to show the datas of the query.. How can I do this. ?
    Data Block Wizard wants a table, view or stored procedure, but I have a query, how can I create a data block with my query.. I m waiting your helps..? Please...
    Semih

    Hi,
    You have two options
    1. create a view and base the block on the view
    2. create a block with a query Data Source Type of 'FROM clause query'
    Hope this helps
    Neil

  • "Source not found" Error creating URL Data control with query parameters

    Hi,
    I have a restful service for which i want to create a URL data control. I am able to create the URL data control successfully when i am not passing any parameters in the Source field. But if i am specifying the parameters in the source field like this Department=##ParamName##, something weird is happening. After giving the param string in the Source field, it asks for default param value to test the url. It tests the url successfully. After that i select XML as the data format in which i am mentioning the xsd like this . "file:///C:/..../something.xsd" . And this is when i am getting the error. "Invalid Connection. The source is not found". I am giving exactly same path for xsd which i gave while creating URL data control without query parameters. Infact i was able to create the URL data control with query parameters successfully till afternoon. after that it started giving me this error all of a sudden. Infact as soon as i was able to create a URL data contol with query parameter successfully, i took a backup of the application before moving further. But even that backup is not working now.
    As far as i understand, i dont think there will be any change in xsd if query params are passed to a web service. Please correct me if i am wrong.
    Just dont know what could be the issue. Please help
    Thanks

    Hi,
    xsd is used for the URL service to know what the returned data structure is so it can create the ADF DC metadata
    Frank

Maybe you are looking for