Query key Date Variable not working

Hi Folks -
     I am coming across an issue with which some of you might be able to help me. I have a time dependent master data object which I've marked as a datatarget and have created a report on it. I wanted to give the user an option of specifying the key date and hence have created a variable in the query properties for the key date. This variable is of the type SINGLE VALUE, MANDATORY, USER ENTRY and CAN BE CHANGED DURING QUERY NAVIGATION.
     Now my issue is that even though I enter a specific key date, the query is not pulling the records according to the key date. But instead if I use the option of specifying a particular date (instead of a variable in query properties), the query is running fine!!! Can someone please let me know why this is happening? Why is the query working fine when I mention a single constant value but not when I use a variable? Thanks for your help in advance.

hi
This clearly shows your variable is not working fine
So in RSRT transaction debug using your variable
See in every step whether the variable is working properly
Assign points if useful
Thanks
N Ganesh

Similar Messages

  • Date Variable not working on Query

    I have a query that is working just fine and returns the correct values. The problem is that no matter what dates I put in, it always returns all records, not the ones from the variable. Can anyone take a look and see what it is I am doing wrong, or why is it that the date variable has no meaning when I run this.
    Here is the query I am using:
    SELECT     '00001' AS 'Co', T0.CardName AS 'Customer', T0.CardCode AS 'Customer #', T0.Address2 AS 'Ship To Address', T3.City AS 'Ship To City', T3.State, T3.ZipCode, T3.Country, T0.DocNum AS 'Invoice Number', SUM(T1.LineTotal * (100 - T0.DiscPrcnt) / 100) + CASE WHEN SUM(T1.VATSum) <> 0 THEN SUM(T1.VATSum) ELSE 0 END AS 'Invoiced amount', SUM(T1.LineTotal * (100 - T0.DiscPrcnt) / 100) AS 'Sale', CASE WHEN (T1.TAXCODE LIKE ('%EX')) THEN SUM(T1.LineTotal * (100 - T0.DiscPrcnt) / 100) ELSE 0 END AS 'Exempt Sales', CASE WHEN (T1.TAXCODE NOT LIKE ('%EX') AND T1.VatPrcnt = 0) THEN SUM(T1.LineTotal * (100 - T0.DiscPrcnt) / 100) ELSE 0 END AS 'Not Taxed', CASE WHEN SUM(T1.VATSum) <> 0 THEN SUM(T1.LineTotal * (100 - T0.DiscPrcnt) / 100) ELSE 0 END AS 'Tax Base', CASE WHEN SUM(T1.VATSum)
    <> 0 THEN SUM(T1.VATSum) ELSE 0 END AS 'Tax', T1.VatPrcnt AS 'Rate', T1.TaxCode AS 'Tax Rate/Area', T2.Name AS 'Tax Area Description', T0.DocDate AS 'GL Date', T0.TaxDate AS 'Document Date',T3.AdresType
    FROM OINV T0
    Inner Join INV1 T1 on T0.DocEntry = T1.DocEntry
    Inner Join OSTC T2 on T1.TaxCode = T2.Code
    Left Outer Join CRD1 T3 on T0.CardCode = T3.CardCode and T0.ShipToCode = T3.address
    Where    (T3.AdresType <> 'b') OR  (T0.ShipToCode = ' ') AND (T0.DocDate >= '[%01]' or isnull('[%01]','')='')
    and (T0.DocDate <= '[%02]'  or isnull('[%02]','')='')
    Group By T0.DocNum, T0.CardCode, T0.CardName, T0.Address2, T1.TaxCode, T0.DocDate, T0.TaxDate, T2.Name, T3.ZipCode, T3.City, T3.State, T3.Country, T1.VATPrcnt, T3.AdresType
    Order By T1.TaxCode, T0.CardName, T3.AdresType
    For Browse

    Hi,
    Try:
    SELECT '00001' AS 'Co',
    T0.CardName AS 'Customer',
    T0.CardCode AS 'Customer #',
    T0.Address2 AS 'Ship To Address',
    T3.City AS 'Ship To City',
    T3.State, T3.ZipCode,
    T3.Country, T0.DocNum AS 'Invoice Number',
    SUM(T1.LineTotal * (100 - T0.DiscPrcnt) / 100) + CASE WHEN SUM(T1.VATSum)!= 0 THEN SUM(T1.VATSum) ELSE 0 END AS 'Invoiced amount',
    SUM(T1.LineTotal * (100 - T0.DiscPrcnt) / 100) AS 'Sale',
    CASE WHEN (T1.TAXCODE LIKE ('%EX')) THEN SUM(T1.LineTotal * (100 - T0.DiscPrcnt) / 100) ELSE 0 END AS 'Exempt Sales',
    CASE WHEN (T1.TAXCODE NOT LIKE ('%EX') AND T1.VatPrcnt = 0) THEN SUM(T1.LineTotal * (100 - T0.DiscPrcnt) / 100) ELSE 0 END AS 'Not Taxed',
    CASE WHEN SUM(T1.VATSum) !=0 THEN SUM(T1.LineTotal * (100 - T0.DiscPrcnt) / 100) ELSE 0 END AS 'Tax Base',
    CASE WHEN SUM(T1.VATSum) !=0 THEN SUM(T1.VATSum) ELSE 0 END AS 'Tax',
    T1.VatPrcnt AS 'Rate',
    T1.TaxCode AS 'Tax Rate/Area',
    T2.Name AS 'Tax Area Description',
    T0.DocDate AS 'GL Date',
    T0.TaxDate AS 'Document Date',
    T3.AdresType
    FROM OINV T0
    Inner Join INV1 T1 on T0.DocEntry = T1.DocEntry
    Inner Join OSTC T2 on T1.TaxCode = T2.Code
    Left Join CRD1 T3 on T0.CardCode = T3.CardCode and T0.ShipToCode = T3.address
    Where ((T3.AdresType != 'b') OR (T0.ShipToCode = ' ')) AND (T0.DocDate >= '[%01\]' or isnull('[%01\]','')='')
    and (T0.DocDate <= '[%02\]' or isnull('[%02\]','')='')
    Group By T0.DocNum, T0.CardCode, T0.CardName, T0.Address2, T1.TaxCode, T0.DocDate, T0.TaxDate, T2.Name, T3.ZipCode, T3.City, T3.State, T3.Country, T1.VATPrcnt, T3.AdresType
    Order By T1.TaxCode, T0.CardName, T3.AdresType
    For Browse
    Thanks,
    Gordon

  • Key date variable only works for i_step = 1?

    Hi, I'm working with the query designer. I need to change the key date of a query before and after the user input.
    Using the debugging on transaction rsrt I found out that key date of the query only works for i_step = 1.
    With i_step = 2 I never get this variable.
    After the popup I can only change the date manually.
    I couldn't find any documentation about this specific subject.
    Can anyone confirm/ help?
    Thanks,
    Cristina

    you can go thru the Article at [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d09d4588-3832-2c10-e185-f778d9dbea85?quicklink=index&overridelayout=true]
    with I_STEP = 1
    the enhancement call takes place before varaible entry. so this can be used to populate variables with default values
    with I_STEP = 2
    called after the processing of the variable pop-up.

  • Can we create range variable for Query Key Date

    Hello Gurus,
    Can we create a range variable for Query Key Date ? when I tried to give a range of values for Query Key Date, I am unable to find Range Values option. I found only Single Values.
    so, Please let me know if we can use Range variables for Query Key Date ??
    Thanks in advance,
    Regards,
    Aarthi

    Hi Aarthi,
    This is relevant for the time dependant master data that is being pulled in thw query. Like if you are using a nav attr in the query and this nav attr is time dependant, then which record (from the char master data) is to be pulled into the report, depends upon the key date that you specify.
    The default key date value is the date on which the query is executed, that is <Today>.
    Hope this helps...

  • APD query key date with variable for time dependent MD display attributes

    Hello,
    In a APD I use a query as a source with a query key date that is filled with a customer exit variable.
    When I run the query as a user, the time dependent MD display attributes look fine. However, when I use the query in an APD, I get no values for the time dependent display attributes.
    Any suggestions?
    Thanks

    Hi,
    Try to run query using RSCRM_BAPI Tcode, this you can also schedule in background
    Thanks
    Reddy

  • SAP BW Hiearchy Key Date Variables - Web Intelligence

    Hi,
    I have couple of issues / scenarios which are not working as expected. First, as I understand that hiearchy variables are supported by WebI.
    Scenario 1
    I have created a hiearchy key date variable within the report and made it optional. I run the report an no key date appears. It should appear. If I then make the hiearchy key date to mandatory I get a database error. Looks like there is a problem with hierarchy key date variables?
    Scenario 2.
    I change the hierarchy key date so it uses the key date of the query (so no longer a variable).
    As an example,I have employee "Employee X" assigned to "team A." This team moves from the Desktop team to the IT team on the 01.04.2011.
    IT
       A - 01.04.2011 -> 31.12.9999
    Desktop
       A - 01.01.2011 -> 31.03.2011
    I have a hiearchy variable so I can select a team as requied (using the object 0ORGUNIT) If I run the report using the key date 01.04.2011 the WebI report displays the current hierarchy nodes i.e.
    IT
       A
    and the data shows correctly,
    If I now re-run the report using the key date 01.03.2011 in the selection screen in the WebI report the following is still shown
    IT
       A
    If I select team A - no data is displayed. So it looks like via the use of the "Use query key date" for the hierarchy key date works but not in selection screen which is a problem.
    Is this a bug or am I doing something wrong?
    Thanks

    Hi,
    I have now got scenario 2 working - well I didnt do anything apart from run it InfoView and it is fine. But for some reason does not work in WebI Rich client - I will have a look into this furrher but am happy that it works in infoview. Sceanrio 1 is no working still I have run it in InfoView and get the error "A database error occured. The database error text is: Failed to execute MDX query. Reason: Specify a value for variable Hierarchy Key Date. (WIS 10901)" This hiearchy key date is th variable which I have created and assigend to the hiearchy so that a "hierarchy date" can be selected.
    +Scenario 1+
    +I have created a hiearchy key date variable within the report and made it optional. I run the report an no key date appears. It should appear. If I then make the hiearchy key date to mandatory I get a database error. Looks like there is a problem with hierarchy key date variables?+
    Any help is appreciated.
    Thanks.
    Edited by: Leo on Apr 25, 2011 4:20 PM

  • Text Variable not working correctly

    In CS3 I could create a TEMPLATE (.indt) with the "creation date" text variable in it and when I opened it it would have the CURRENT DATE (the date the new file was generated from the template) . In CS4 it opens with the date the TEMPLATE was MADE and not the current date (the day the new file was generated). I need the template to open with the current date (the day the template was opened). I tried using the "modification date" variable which works the FIRST time but if I open it the next day the date changes. I need the date to remain the same as the creation date. Does this make sense? Why did Adobe change the behavior of this? Please help.
    -John Streeter

    Hi Rakesh,
    Just curious what is the purpose of creating a hidden column as suggested? Anyway, I have created it but nothing changes.
    Allow me to clarify my situation again.
    I have three columns:
    1. Actual This Year
    Type: Selection
    2. Actual Last Year
    Type: Selection
    3. % of Actual This Year / Actual Last Year
    Type: Formula
    Definition: (Actual This Year) %A (Actual Last Year)
    All columns use &0T_FYEAR& as text replacement variable. As such, all title would have year text.
    The first two columns have been restricted with Fiscal Year variable, 0P_FYEAR.
    1. Actual This Year
    0P_FYEAR
    2. Actual Last Year
    0P_FYEAR - 1
    Upon executing the query, I got the first two columns displaying their titles right, but the third column does not.
    For example, let's assume I entered 2008 for 0P_FYEAR variable, the columns would display the following titles:
    1. 2008
    2. 2007
    3. &0T_FYEAR&
    I need the third column to display current fiscal year i.e. 2008 but it does not.
    Appreciate your help!

  • Appended Key figure is not working in Delta reverse record

    Dear All,
    I have enhanced 2LIS_11_VASCL datasource, to pull value from condition record, called Surchage.
    I have set reversal indicator for this field in my datasource. I have written code in CMOD to get this value from KONV table of that sales order.
    Now when value  is changed, delta record for this, automatically creates reversal record, but it shows new value of surcharge as negative, because that code is pulling value which currently exists in table.
    For example for order 350089 , if surchage is $ 100 .  User changes it to $200
    Then I get following record.
    Reversal Record  - $200 (This should be instead -$100 , i.e. previous value)
    New Record - $100.
    Because of this my new value is not getting updated in table.
    I can't use overwrite mode in ODS because some other technical reason.
    How can I solve this problem?
    appended Key figure is not working in Delta reverse record

    LIS have before-after delta. So ODS should be in Overwrite mode. If that is not possible.. try sorting the records in Start Routine such way that the - 100 $ is above the - 200 $ records in Data Package.
    but this is risky as it will affect other key figures for which things maybe fine. I guess you need take Data Package records in an internal table. And then sort this internal table. then you can read the internal table in update routine of this key figure.
    OR (If you are on BI 7.0) you introduce an InfoSource in between DS and DSO with Overwrite mode for this Key Figure.

  • (Substitution Variables) not working in "SQL Developer" Environment !!!!!!!

    this photo illustrate how that (Substitution Variables) not working in "SQL Developer" Environment :-
    http://www.imagehosting.com/show.php/1555180_ddddd.PNG.html
    any solve for this problem ?????!!!!!!!!!!

    There is a dedicated forum for SQL Developer related questions
    SQL Developer
    I should admit however, that query you have provided ( with substitution variables) works like a charme in my environment (SQL Developer 1.1.0.23 build 23.64)
    Best regards
    Maxim

  • Payload variables not working

    Hi all,
    I've been trying to use Profile Manager to specify user e-mail accounts on Mac devices (eg, MacBooks) but I've been encountering a couple of problems. I've tried searching around and didn't find any answers.
    First of all I'm running the latest Mountain Lion Sever. All clients have up-to-date Mountain Lion too.
    Problem 1: Payload variables not working
    I'd like to automatically setup Gmails on the MacBooks. Now the users' email addresses are already set to their gmail accounts. So all I have to be able to do is use the %email% payload variable as the username when I go set up the (IMAP) mail accounts in the Profile Manager. However, when I download the profile to the device, it does not convert the payload variable; ie, it tries to log into gmail with the username '%email%'. Other payload variables do not work either.
    Oddly enough, the payload variables work as they should with iOS devices...
    Problem 2: Profiles stuck on 'Sending'
    After enrolling the devices, it seems a hit and miss whether the MacBook downloads the correct profiles from the server... Is there a way to force on the MacBook to update/refresh its profiles? Also, when I update profiles within Profile Manager, the changes are pushed to iOS devices fine but not to MacBooks. Those tasks are all stuck on Sending... Logging in, restarting etc. sometimes helps but not always... Is there a reason why?
    Thanks in advance.
    P.S. Sorry I posted in the wrong forum first...

    Same problem here. Some profiles are being sent, some are stuck on the server. I have no idea why this difference.
    Any luck solving the issue?

  • Payload variables not working & Profiles stuck on 'Sending'

    Hi all,
    I've been trying to use Profile Manager to specify user e-mail accounts on Mac devices (eg, MacBooks) but I've been encountering a couple of problems. I've tried searching around and didn't find any answers.
    First of all I'm running the latest Mountain Lion Sever. All clients have up-to-date Mountain Lion too.
    Problem 1: Payload variables not working
    I'd like to automatically setup Gmails on the MacBooks. Now the users' email addresses are already set to their gmail accounts. So all I have to be able to do is use the %email% payload variable as the username when I go set up the (IMAP) mail accounts in the Profile Manager. However, when I download the profile to the device, it does not convert the payload variable; ie, it tries to log into gmail with the username '%email%'. Other payload variables do not work either.
    Oddly enough, the payload variables work as they should with iOS devices...
    Problem 2: Profiles stuck on 'Sending'
    After enrolling the devices, it seems a hit and miss whether the MacBook downloads the correct profiles from the server... Is there a way to force on the MacBook to update/refresh its profiles? Also, when I update profiles within Profile Manager, the changes are pushed to iOS devices fine but not to MacBooks. Those tasks are all stuck on Sending... Logging in, restarting etc. sometimes helps but not always... Is there a reason why?
    Thanks in advance.

    Same problem here. Some profiles are being sent, some are stuck on the server. I have no idea why this difference.
    Any luck solving the issue?

  • How to fix my iPhone keys that will not work

    When I am using my iphone keyboard, the upper row Q thru P will not work. That is in verticle mode, when laid horizontally, the R will not work.
    On the number keys, the 4 will not work. The comma key also does not work. 
    I was told that a software restore could cure this.  Also, I tried to load the new version 7 software, hoping this might help.  But the Accept option would not work when accepting the TERMS from Apple.  It seems that only works in verticle so that whole row/area does not work.

    RESET DEVICE
    Hold down the Sleep/Wake button and the home button together until the apple logo appears (ignore the ON/OFF slider) then let both buttons go and wait for device to restart (no data will be lost).

  • Webi report on OLAP Bex query -  Cost element Hierarchy not working Drill down

    Hello,
    We have a BO report on Bex query, Not on universe, we have a Hierarchy for Cost Element Group, and we are expecting the Drill down functionality for that in BO report, but it does not.
    Webi report on OLAP Bex query -  Cost element Hierarchy not working Drill down
    Any pointers how to do it please
    Thanks
    Krishna

    Hi,
    WebI reports on BEx source don't use same Drill feature as other sources, it's replaced by expland/collapse of hierarchy nodes (documented in WebI user guide in § "24.1 Drill defined"). This means you have to create query which selects all hierarchy sub-tree you plan on exploring later in report, otherwise if no data is available under a node there will be no '+/-' sign to visit this part of tree.
    You could try first to select "All members" from hierarchy in QueryPanel and see if behavior in report suits your needs. Then you should restrict hierarchy member selection to what's really needed to avoid performance issues.
    Regards,
    Loic

  • Satellite C850D-115 / Win7 - the special funktion key mode ist not working

    Hi,
    the special funktion key mode ist not working, although I tried everything in Bios and softare " Toshiba Hardware setup utility".
    I still need to press "FN + " to use the special function keys, while enabled bios mode!
    The special function mode was never working, I have no more ideas. You...?

    As far as I know its no matter what system you are using. The special function key mode should work with Win 7 and Win 8.
    Here an Toshiba documentation.
    [How to change the Function Keys Mode|http://aps2.toshiba-tro.de/kb0/HTD2503B90001R01.htm]
    You bought this notebook without an preinstalled system. Right?
    And you installed an clean Win 7 on this Satellite C850D-115?
    Please ensure that all available drivers for C850D PSC9UE are installed. This includes the VAP (value added package), Hardware Setup, and others
    There is also new BIOS update v6.50-WIN
    Be sure your BIOS is up to date!

  • My 6, 7, y, u, h, j, n, m key's are not working on my hp pavilion g6 PLEASE HELP!!!

    my 6, 7, y, u, h, j, n, m key's are not working. they used to work but even then i had to hold down one of those unresponsive keys to get the others to work now i can't use them at all!! i have to use the on screen keyboard which is really annoying but is the only way i can use my laptop
    i have a hp pavilion g6 4GB  i3 core 64 bit windows . i think the warrenty has expired as it is a refurbished laptop

    Hello momomhammed:
    I think you forgot to type in HP g6 1239as because I could not find HP g6 123sa. This is the only steps they give for your lat top. http://h10025.www1.hp.com/ewfrf/wc/document?docnam​e=c01458194&tmp_task=solveCategory&cc=uk&dlc=en&lc​... I would do the reset direction first then do the update drives for it. To see if that fixes the issue. If it doesn't then yout computer needs repairing. frrw.

Maybe you are looking for

  • Master_detail for more than one record at a time

    Hi, How can i display master_detail records for more than one records at a time, for example, i have two tables A and B , A has username and role and B has username and profile. here i wanted to display 10 users at a time on my 6i form with username,

  • How do I search contacts by a field other than name (e.g. category)?

    I recently switched from Blackberry to iPhone 4, and I use my iPhone 4 primarily for business. I have a PC and use Outlook as my contacts application. I regularly populate my Outlook contact records with various notes, and I regularly categorize my c

  • Import a jpeg sequence on 2's

    I had my first try at Stop Motion over the weekend. After finishing the shoot (a test really), I tried to import the sequence into AE? I've seen a few things about the sequences automatically coming in at 30fps? How do you import the footage on 2's a

  • Greyed Out TV Episodes on My iPhone

    Hello, I use the latest version of iTunes on my Windows 7 PC to sync with my iPhone 4S, which is running iOS 7.0.2. Ever since I updated to iOS 7, whenever I connect my iPhone to the computer, it will show that there are 4 new items in "TV Shows" und

  • CheckBox in customized cell renderer - Urgent

    i need to customize the cell renderer for a table for one of the columns. One of the column is Boolean type and i want it the way it comes in a default cell renderer. if i mention the renderer for the column as "checkbox" - it gives me the checkbox "