Regarding Conditions in query

Hi
I have created a condition to display Top 10 company codes based on a formula in my development system.Tested it and its fine.Transported it to Quality and it displayed me 10 Company Codes.But in Production ,it displayed me only 6 company codes.The data in Production and Quality are same then why arent they displaying me the top10 company codes.
Regards
Bharath

Bharat,
Is the data completely loaded in the Cube?
Try validating the results between Quality & Production using a simple query without conditions.
See if the query is showing data in production for all company codes if there are no conditions.
Hope it helps!
amol

Similar Messages

  • How to Use MAX condition using Query Report

    Hi SAP Abap Expert,
    Can we use the MAX condition in Query Report (SQ01/SQ02) ?
    I have created one sample query using table VBRP and VBRK then i need to use max condition to get the MAX record in VBELN.
    Please Help ???

    Hi Ashishsingh,
    According to your description, you want to know how to use MAX function in SQL Server Analysis Services MDX Query, right? In this case, please refer to the link below which describe the syntax and sample of MDX function.
    http://technet.microsoft.com/en-us/library/ms145601.aspx
    http://www.mdxpert.com/Functions/MDXFunction.aspx?f=64
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • What is the use of Condition is Query Designer  ??

    What is the use of Condition in Query Designer  ??
    How to use condition in   Query Designer  ??

    Hi,
    Conditions in a query can be defined for both characteristic combinations and key figures.
    Characteristic combinations can be used using the ranking list functionality (e.g Top N or Last N customers with highest sales).
    Key figures can be assigned the value limit conditions ( for e.g. display only rows in the query for which the key figure > 10 ).
    For your specific requirements in which you need to display only a limited set based on the key figures, then you can go for conditions.
    The conditions can be allowed to work on all the drill down characteristics independently, single characteristics or combination as well based on your requirement.
    While execution the report, you can activate or deactivate the condition anytime by right clicking on the data cells.
    Regards,
    VA

  • Regarding Conditions not reflecting in Herarchy query

    Hi Gurus,
    I have a scenario where i have created query on a multiprovider. In the query designer i have selected infoobjects like <b>region code, Director</b> ... and in columns i have selected <b>mileage,</b> .....i have also selected in the Rows as <b>Expand as Hierarchy</b>.
    The query is working fine. But the Conditions i have specified for mileage < 0 or anyother condition reflects only for region level. But it is not reflecting for Director level and subsequent lower level like manager..... In the condition i have selected for all characteristics.
    Kindly guide me to reslove the issues.
    Regards,
    Mano

    Mano,
    Depending on the characteristics you have in your report you will need to change the Conditions to look at the mixture of individual characteristics rather than All characteristics in the drill down independently.
    Open up the conditions dialogue box and make the relevant section in the "Evaluate the conditions displayed below for:"
    Regards
    Gill

  • Query regarding condition type value calculation in VA05

    Dear Gurus,
    We had maintained one condition type Z*** where we had declared the condition type as follows:
    Condition class - Prices
    Calculation type - Quantity
    Plus/Minus - A (positive).
    We had maintained the condition table as :
    Price = 200 USD per 10 EA
    Lower limit = uppler limit = 0.
    When we are calculating the price in the sales document, the system is taking the price of 10 units as 200 USD correctly.
    But in VA05 screen, the confirmed net value for 10 units is shown as 10*200 = 2000 USD which is wrong.
    Can anybody throw a light on how the confirmed net value for VA05 screen is calculated.
    regards,
    Krishna

    If it is representing the value of the condition type, then it is a new field customised by your technical team. Standard VA05 doesnot represent the value of any condition type. So please check with your developer, may be there is a problem in their program.

  • CAN WE HAVE IF CONDITION IN QUERY GENERATOR

    Hi friends,
    am, trying to make use of if condition to obtain a set of values in query generator.  Its possible to retrieve the required result set using query analyser but not in query generator.  am trying to execute the following query
    if exists (select owor.u_reactor from owor,oitt where oitt.code=owor.itemcode and owor.u_reactor = 1 and owor.itemcode = '100-100')
    begin
                    select itt1.u_reactor1 from oitt,itt1 where itt1.father = oitt.code and itt1.father = '100-100'
    end
    else
    if exists (select owor.u_reactor from owor,oitt where oitt.code=owor.itemcode and owor.u_reactor = 2 and owor.itemcode = '100-100')
    begin
         select itt1.u_reac_23 from oitt,itt1 where itt1.father = oitt.code and itt1.father = '100-100'
    end
    else
    if exists (select owor.u_reactor from owor,oitt where oitt.code=owor.itemcode and owor.u_reactor = 3 and owor.itemcode = '100-100')
    begin
         select itt1.u_reactor4 from oitt,itt1 where itt1.father = oitt.code and itt1.father = '100-100'
    end
    if it is not possible to write such query in query generator  can someone help me with a workaround solution.
    Thank u
    Vaitheeswaran

    Hi,
    I dont think Nested IF Statements are allowed in PLD. The reason that u get the result in Query analyser and not in Query Generator is that SAP supports Transact SQL and many SQL Server 2000 functions are not supported.
    However there is a work around in Print Layout Designer for using IF condition by having Linked Objects. Kindly see some tutorials regarding Linked fields available on SDN site and think of some other way of implementing this nested IF query.
    Regards
    Rizwan Hafeez
    Team Lead
    SAP Addon Development Section
    Abacus Consulting - Pakistan

  • Regarding the select query

    Hi Experts,
    I have a select query as follows:
    select field1 field2  from db1 into table it1.
    Now suppose the it1-field1 contains values a,b and c.
    Now I want to select fields a,b and c from another db table db2.
    Instead of hard coding like this:
    select a b c from db2 into table it2.....
    How can I do this?
    Points will be awarded.
    Regards,
    Soumya.

    Hi Soumya ,
    Pleas use FOR ALL ENTRIES syntax , in this way you can select the records from db2 which are available or selected in db1.
    Like Header And Item table.
    You select records frm header table . then for corres ponding header records you select from detail table db2 .....
    Condition is the field containg a,b,c  is key field in both tables ...
    Reward points if it helps you .
    Regards
    Amber S

  • Regarding "select into" query and "no data found" exception

    So i have included the following into my procedure:
    select div_cd into c_div_cd
                   from division_tab d, emp_tab y
                   where d.div_name=y.div_text and y.emp_code=d.emp_code;
    and also an exception
    exception
    when no data found
    -- print something
    The above select query results into "no data found" and the control passes directly to the exception and prints something.
    How do I do the following?
    select div_cd into c_div_cd
                   from division_tab d, emp_tab y
                   where d.div_name=y.div_text and y.emp_code=d.emp_code;
    if c_div_cd is null then
    --enter this employee into some other table without raising an exception
    No need to write a code for an answer. Please just guide me with something I can incorporate or do.

    use explicit cursors
    DECLARE
    c_div_cd division_tab.div_cd%type;
    cursor c_div is
    select div_cd
    from division_tab d, emp_tab y
    where d.div_name=y.div_text and y.emp_code=d.emp_code;
    BEGIN
    open c_div;
    fetch c_div into c_div_cd;
    --You can either use c_div%NOTFOUND or c_div_cd is null in the below if condition to check the data
    -- Note if your select query returns multiple records then you have to do mutiple fetches for getting all records, so in that case your FETCH
    -- should be inside the LOOP statement
    if c_div_cd is null then
    --enter this employee into some other table without raising an exception
    end if;
    close c_div;
    EXCEPTION
    IF c_div%ISOPEN then
    close c_div;
    END IF;
    END;
    Regards
    JJ

  • How to put this condition in Query

    Dear experts,
    I have a scenario where in the calculation should be dynamic between key figures in query
    For example i have a
    Target Cost and Actualcost1, Actualcost2, Actualcost3
    i need to findout the variance between the Target and Actual
    but the catch is that i need to findout the variance with the latest actual cost
    1. )  Target cost = 100
    Actual cost1=10, Acutal cost2=0, actual cost3=0
    then the formula should be Actual cost1-target cost
    2. )But if
    Target cost  =100
    Actual cost1=10, Actual cost2=5, Actual cost3=0
    then the formula should be Actual cost2- Target cost
    3. Target cost =100
    Actual cost1=10, Actual cost2 = 5, Actual cost3= 15
    then the formula should be Actual Cost3-Target cost
    How to achieve this
    Thanks and regards
    Neel

    Hi Neel,
    Do you have indicator saying that a particular actual cost is the latest? If you have any indicator thsi would make the job easy. Else you need to create new formulas to derive the logic.
    Else you can proceed with the belwo logic.
    1.target cost
    2. Actual Costs 1 - Hide
    3. Actual Costs 2 - Hide
    4. Actual Costs 3 - Hide
    5. New formula whcih evaluates the latest.
    Write the condition
    If Actual costs3 = 0 and actual cost2 = 0 then actual cost1.
    else if actual cost2= 0 then actual cost1
    else if actual cost1 NE 0 and actual cost2 NE 0 then Actual cost3.
    Then hide the above new formula.
    And in a new formula you can find the diff between the Target cost and the latest cost derived in teh above new formula.
    If the conditions is too big in the above new formula, you can split across two three new formulas and derive the logic.
    Just make some changes to the above logic if it is not 100%.
    I believe this logic will work.

  • Conditions in Query

    Hi all,
    For the top 1 to 10 customers  i created a condition of Sales TopN and 10. I now need to display the top 10 to 20 customers in another query. How can I do this?
    Cheers~

    Hi,
    Two conditions in the same query have the logic AND, so you could try the logic:
    Condition1 Top 20       +    Condition2 Bottom 10
    But I'm afraid the precondition is that you have to add a filter to the query to make sure that only 20 customers will appear in the result set (actually, then Bottom 10 itself will work). Any way, just have a trial. And also refer to:
    http://help.sap.com/saphelp_tm60/helpdata/en/43/2695d2fd2f0d23e10000000a1553f7/frameset.htm
    Hope it can give some help.
    Regards,
    Qing

  • How to conditionally write  query ?

    i have one use case -
    on the basis of enter value i need to execute query .
    for example
    select * from employees em where em. empId=? and em.firstname=? and em.jobid=?
    select * from employees em where em. empId=? and em.firstname=?
    i need to the write one query which is internally used this both condition and return the records
    select * from employees em where
    if(em.jobid==null)
    select * from employees em where em. empId=? and em.firstname=?
    else
    select * from employees em where em. empId=? and em.firstname=? and em.jobid=?
    how could i write this problem in sql ?

    Note the name of this forum is "SQL Developer *(Not for general SQL/PLSQL questions)*" - so only for issues with the SQL Developer tool. Please post these questions under the dedicated SQL And PL/SQL forum.
    Regards,
    K.

  • Regarding Condition Index

    Hi All,
    With regards to condition index I have made the required tick in the condition type now when I am going into the master data with regards to creating condition records selecting the condition index tab by giving the input as the condition type, the system says that there are no records found, eventhough I have created the sales order  in the system, the access sequence consists of line item and sales order please advise if any other configuration needs to be done for condition index and how do I check if the configuration is complete.
    Kind Regards
    Atul

    Hi Condition indes only Specifies whether the system updates one or more condition indices when maintaining condition records. It depends whether you had created the combination of condition recored to determin if you can find the existing one, please be sure you had created the condition record via vk11.

  • Checkbox Value in where condition of query

    Hi,
    I have a check box which shows values based on the LOV's . If i check on the checkbox the values that are selected on the check box must be used in the where condition to update the table.
    Please suggest me how to take the check box values.
    Am using the below methos to update but its not happening
    Declare
    old_cohort_name varchar2(500);           
    new_cohort_name varchar2(500);
    l_cohort_id apex_application_global.vc_arr2;
    begin
    l_cohort_id := apex_util.string_to_table(:P64_CASCADE_COHORT_NAMES);
    select cohort_name into old_cohort_name from study_cohort
    where cohort_id = :p64_cohort_id;
    select :P64_COHORT_NAME into new_cohort_name from dual;
    if old_cohort_name <> new_cohort_name then
    update study_cohort
    set      
    cohort_name = new_cohort_name
    where cohort_id = :p64_cohort_id and
    cohort_id = l_cohort_id; // here is the variable i am using when checkbox is checked
    End if;
    End;
    Please suggest me how to modify the code
    Tx
    Sudhri

    Hi Sudhri,
    where cohort_id = :p64_cohort_id and
    cohort_id = l_cohort_id; // here is the variable i am using when checkbox is checked If this is the code you are actually using, then the condition would only be met if l_cohort_id = :p64_cohort_id because you are using an AND condition over the same column in the where clause, so it will only return rows when both values are the same. Then, I think that it seems not to be working for you because :p64_cohort_id and l_cohort_id have different values, and no row is getting updated then. If the values you are selecting in your checkboxes are several ids of rows to update, besides the one with id :p64_cohort_id, then maybe the condition you need is something like this:
    WHERE cohort_id = :p64_cohort_id OR instr(l_cohort_id, cohort_id) != 0;Hope that helps.
    Regards,
    Sergio

  • Regarding Condition record in CRM using field MATKL (Material Group)

    Hi All
    Currently we are working in SAP CRM 5.2 and it has been connected with backend ECC 6.0.
    This scenario is about Pricing which has been maintained in ECC and inturn flows to CRM with few filters in place.
    There are few customized Condition Tables in ECC with combination of Sales org./ material group for which discount has been maintained.  A proper condition record is also available for this Condition table and it has been assigned to a access sequence and inturn assigned to a condition type.
    All these procedures, condition types, access sequence has flown from ECC to CRM.  And all the condition tables are active in IMG (Basic Functions / Pricing / Define Settings for Pricing / Create Condition Tables)
    When i check in
    (SAP menu / Master Data / Prices and Conditions / SAPCND/GCM - Maintain Conditions )
    Application - CRM,
    Maintenance group - PRODDISCOU,
    Maintenance context - GCM
    Here for the above mentioned combination when i select the Key Combination (Condition Table) and enter the customized table number (Sales org. / Material Group) iam getting a dump which says the following.
    Error analysis
    Short text of error message:
    Implementation of Method ATTRIBUTE_CONVERSION for BAdI /SAPCND/ROLLNAME for filter MATKL is missing
    Program............. "/SAPCND/CL_MNT_COND_MAINT_UI==CP"
    Screen.............. "/SAPCND/SAPLCOND_MAINTAIN 0100"
    Screen line......... 8
    Information on where terminated
    Termination occurred in the ABAP Program "/SAPCND/CL_MNT_COND_MAINT_UI==CP" -
    in "ON_FCODE_SELECT".
    The main program was "/SAPCND/GENERAL_COND_MAINT ".
    In the source code you have the termination point in line 622
    of the (Include) program "/SAPCND/CL_MNT_COND_MAINT_UI==CM005".
    Please let me know the solution, Request you to do the needful aSAP.
    Regards
    *Ramesh*

    Hi Ramesh,
    Have you checked the following note?
    Note 441083 - Transferring conditions for material group MATKL to CRM
    Kind regards,
    Johan Wigert

  • How to use many conditions in query

    Hi all,
    i have a situation,must prepare a report to find availability of it devices.they are given the specific ip of devices.
    my query
    SELECT 
     Resultdate, [SERVICE]  ,[SERVICE TYPE] ,[IP]
    , DailyAvailability
      FROM [Orion].[dbo].[DepartmentNodesNew] t1
    left join (   select round(1-(sum([DownTimeMin])/(1440*count(*))),4)*100  as DailyAvailability,
      count(*) as Node,   c2.ResultDate  ,[Departament]  ,[IPAdress]
       from  [Orion].[dbo].[OrionEventsNodeDownTime] as c2 group by  [Departament] ,[IPAdress] , c2.ResultDate) t2
       on t1.IP=t2.IPAdress 
       where t2.DailyAvailability is not null and t1.SERVICE='SAP CRM' and t2.ResultDate='2014-12-10'
        order by ResultDate
    now how can i calculate the daily availability of sap crm which have 2 servers and they are in cluster,when one is down service is ok.when both of them are down service is off. how can i calculate by writing conditions.
     case when  ([SERVICE]='SAP CRM' AND [SERVICE TYPE]= 'DB Server' and [DownTimeMin] =0) then DBAvailability 100
      else  then DBAvailability select round(1-(sum([DownTimeMin])/(1440*count(*))),4)*100 ???

    SELECT Resultdate
    ,[SERVICE]
    ,[SERVICE TYPE]
    ,[IP]
    ,DailyAvailability
    INTO #TempTable
    FROM [Orion].[dbo].[DepartmentNodesNew] t1
    LEFT JOIN (
    SELECT round(1 - (sum([DownTimeMin]) / (1440 * count(*))), 4) * 100 AS DailyAvailability
    ,count(*) AS Node
    ,c2.ResultDate
    ,[Departament]
    ,[IPAdress]
    FROM [Orion].[dbo].[OrionEventsNodeDownTime] AS c2
    GROUP BY [Departament]
    ,[IPAdress]
    ,c2.ResultDate
    ) t2 ON t1.IP = t2.IPAdress
    WHERE t2.DailyAvailability IS NOT NULL
    AND t1.SERVICE = 'SAP CRM'
    AND t2.ResultDate = '2014-12-10'
    ORDER BY ResultDate
    SELECT Resultdate
    ,[SERVICE]
    ,[SERVICE TYPE]
    ,[IP]
    ,DailyAvailability
    ,CASE
    WHEN (
    [SERVICE] = 'SAP CRM'
    AND [SERVICE TYPE] = 'DB Server'
    AND [DownTimeMin] = 0
    THEN 100
    ELSE round(1 - (sum([DownTimeMin]) / (1440 * count(*))), 4) * 100
    END AS 'DBAvailability'
    FROM #TempTable
    -Vaibhav Chaudhari

Maybe you are looking for

  • Display files/directories of a remote system (RIO) on a host machine (PC)

    Hello, Please assume that we are discussing software built on the standard "Labview FPGA Control on Compact RIO" sample project. The host is a standard PC running LV14 Fall edition, the remote system is an sbRIO-9636 having an SD card and a USB HDD a

  • Videos in Presenter

    I have 5 swf video clips inserted into our Breeze Presenter PPT. They are each around 30-39 megs. Is that why I can't seem to publish? Ruth

  • Sqlserver date insert question

    Hi All I use SQLServer 2005 I use JDBC to insert values into database. My date is like this... Release Date is:10/25/2006 SQL: insert into releases(appid, releasedate) values(?, to_date(?,'MM/dd/yyyy')) I can get this to work in oracle. However in SQ

  • Do I need an update trigger in this scenario

    Hi there, I have A 2 tables in a recursive relationship EMPLOYEE and MANAGES An employee can be manged by another employee(MANAGER). MANAGES is a table that contains the start_date an employee is being managed by and the end_date it ended and vice ve

  • Trying to use old iPod as backup volume but it isn't recognized.

    Hello. I am trying to use a 20GB iPod (generation 1) as the backup volume for Time Machine. I assume that I can designate which parts of my system for Time Machine to backup, such that the size of the iPod in relation to the size of my hard drive wou