Hot to put conditions in the query.(Very very urgent )

Hi BW Gurus,
Pls give me a solution for this one i have to give it today only the report pls consider this as urgent.
new BW report, following is an explanation of the report requirement  what the report would look like.
The logic of the report is to retrieve all chargebacks based on certain Selection Criteria entered by the user.
Selection Criteria are as follows:
Company Code
Posting Key - this should not be a value entered by the user
Customer
Reason Code
There should also be a selection parameter available to the user to specify the report type. The selection list should be as follows:
Top 3
Top 5
Top 10
Top 15
Top 20
Top 25
Each of the above may be viewed as a report variant. This selection parameter basically specifies the number of customers to be displayed, e.g. Top 3 means that the top 3 customers from a chargeback total perspective should be displayed.
The report should display by Customer by Reason Code the value of the Chargeback. A total for Chargebacks should be calculated per reason code, per customer and a total for the report
The report should also provide drill down capability in that the user should be given the ability to drill down by customer by reason code to display all chargeback line items that make up the total for that reason code for that customer.
Thanks in advance.

My pleasure Arun!! Actually I was on BEx screen.. so I cud see that varible entry on hand..
Yeah..you are right.I think this is more on drilling down...,
I think,
One requrement looks like demanding Reason code, Customer sequence and Other demanding Customer and Reason code sequence..
Hold on for experts comments..
Venu,
I sugget put everything in Navigational and place only 'Company' code in the rows.. and ask user to drill down in the sequence..
regards,
Hari

Similar Messages

  • Tuning the query : Very Urgent

    Hi
    We have query wich needs tuning.when we are putting REGULAR EXPRESSION query is running fine but whne we put like LIKE stmt it is taking time.Here is the query below.Please help on tuning.
    SELECT a.order_number, b.last_update_date,TO_CHAR( b.split_percent,'FM99999.009') SPLIT_PERCENTAGE,
    rs.NAME " SALES_PERSON_NAME ", rs.salesrep_number, b.effective_date,
    b.creation_date "CREATION_DATE", rt.NAME "TERRITORY_NAME",
    rt.segment1 "ERP_CODE", a.booked_date "DATE_BOOKED",
    TO_CHAR(ROUND((( (SELECT SUM (ordered_quantity * unit_selling_price)
    FROM apps.oe_order_lines_all ol
    WHERE ol.header_id = a.header_id)
    * b.split_percent
    / 100
    ) , 2),'FM99999999999999999999.009') order_total ,
    (SELECT user_name
    FROM fnd_user
    WHERE user_id = b.last_updated_by) requested_by,
    b.obsolete_date
    FROM oe_order_headers_all a,
    apps.csm_header_sales_cr_hist b,
    jtf_rs_salesreps rs,
    ra_territories rt
    WHERE 1 = 1
    AND a.header_id = b.source_header_id
    AND b.territory_id = rt.territory_id
    AND b.salesrep_id = rs.salesrep_id
    AND b.source_type = 'O'
    AND a.order_number IN (
    SELECT a.order_number
    FROM oe_order_headers_all a,
    apps.csm_header_sales_cr_hist b,
    jtf_rs_salesreps rs,
    ra_territories rt
    WHERE 1 = 1
    AND a.header_id = b.source_header_id
    AND b.territory_id = rt.territory_id
    AND b.salesrep_id = rs.salesrep_id
    AND b.source_type = 'O'
    -- AND b.obsolete_date IS NULL --ommented by andondap as per TD#9648 Changes
    AND  REGEXP_LIKE ( rs.name , '(svc)|(Muti.*Y)|(Multi.*Y)|(._MY)')  Commented by andondap as per TD#9648 Changes
    AND b.last_update_date BETWEEN TO_DATE ('2012/11/25', 'YYYY/MM/DD') AND TO_DATE ('2013/03/23', 'YYYY/MM/DD')+ 0.9999
    AND REGEXP_LIKE ( rs.name,'(.MY)|(Muti.*Y))|(Multi.*Y)|(._MY) |(mlti)')
    AND rs.name LIKE '%SVC%MULTI%' OR rs.name NOT LIKE '%DUMMY%' OR rs.name LIKE 'Svc%Multi%' OR rs.name LIKE 'Svc%MY%'
    OR rs.name LIKE 'Service%Multi%' OR rs.name LIKE '%MY_SHARE_TM' OR rs.name LIKE '%MY_SHARE_T')
    ORDER BY a.order_number, b.creation_date
    Thanks
    Hibin

    Hmmm, let's see...
    1. OP provided formatted code using {noformat}{noformat} tags.... - FAILED
    2. OP provided database version in full... - FAILED
    3. OP provided table structures and index information... - FAILED
    4. OP provided cardinality and selectivity information... - FAILED
    5. OP provided explain plans... - FAILED
    6. OP provided execution traces... - FAILED
    7. OP is a new member and can be excused for above failures... - FAILED
    8. OP has asked previous questions and followed forum etiquette by marking them as answered... - FAILED
    9. OP has respected volunteers and other questioners by not marking his question as Urgent... - FAILED
    10. OP has read the forum FAQ ({message:id=9360002}) for posting his question...  - FAILED
    11. OP has read the forum FAQ ({message:id=9360003}) for posting a tuning question... - FAILED
    It's a good job you're not a computer program, you wouldn't have even compiled.
    so, points to note:
    This is a forum of volunteers.  There's no such thing as an Urgent question here, and it's considered rude to suggest your question is urgent, as that indicates you want immediate attention from the people who are giving up their own time to help, and who have their own jobs to do.  It's also rude for the other people who are asking questions, as everyone would like an answer to their problem as soon as possible, so what makes you any more special?  An urgent issue is one where a live system is down potentially putting people's lives at risk or causing a company to lose money, or somehow damage their services.  Such issues should be logged with Oracle Support, not on the free OTN forums.
    Next, when you post your question, ensure you provide all the information that is needed for people to be able to help you.  Read the FAQ posts which point to useful threads indicating what information is required, especially for tuning requests.
    Finally, when your questions have been answered, it is common courtesy to mark them as answered (and award points if appropriate), otherwise it indicates that you have no respect for the people who are helping you.
    If you follow all the advice above, you will end up creating a good question that people will be willing to help you with.   If you don't follow the advice above, such as in this question you've posted, you will find that few experts will bother to help (or if they post it will not likely be helpful advise you receive).  The choice is yours.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to put distinct in the query

    Hi all,
    How to put distinct in the query.I checked in RPD , Distinct supported is already available. I marked the distinct check box in advance option still then i'm not getting distinct in the query.
    any idea , please help...

    In the RPD i have join between base table and view .i'm selecting 2 columns one from base table and other from view . which gives cartesian product . to avoid that i want to put distinct . I'm not using any measure . I'm taking direct columns.
    I'm getting distinct keyword if i'm accessing the report directly . but when i'm accessing it from dashboard in the back end while preparing the query it's writing distinct but the actual query which is sending to db does not have distinct.
    ==================================================
    RqList distinct
    VW_SCNR_114000074_TA_DATA.Match Identifier as c1 GB,
    VW_SCNR_114000074_TA_DATA.Tot Trans Amt as c2 GB,
    VW_SCNR_114000074_TA_DATA.Tot Trans Ct as c3 GB,
    case when VW_SCNR_114000074_TA_DATA.Alert Quality Code = '1' then 'Productive' when VW_SCNR_114000074_TA_DATA.Alert Quality Code = '2' then 'Non Productive' else 'Indeterminate' end as c4 GB,
    VW_SCNR_114000074_TA_DATA.Batch Identifier as c5 GB
    DetailFilter: Alert TA Data.Run Id > 0 and Alert Scenarios.Scenario Name = 'ScnroName' and Alert TA Data.Batch Id > 0
    OrderBy: c4 desc
    =================================================
    -------------------- Sending query to database named KYC1.1DEV-179 (id: <<16315>>):
    select T353.BATCH_ID as c1,
    case when T353.QLTY_RTG_CD = '1' then 'Productive' when T353.QLTY_RTG_CD = '2' then 'Non Productive' else 'Indeterminate' end as c2,
    T353.TOT_TRXN_CT as c3,
    T353.TOT_TRXN_AM as c4,
    T353.BREAK_ID as c5,
    T117.SCNRO_NM as c6
    from
    KDD_SCNRO T117,
    KDD_TA_DATA T130,
    KDD_TSHLD_SET T171,
    VW_SCNR_114000074_TA_DATA T353
    where ( T117.SCNRO_ID = T130.SCNRO_ID and T117.SCNRO_ID = T171.SCNRO_ID and T130.SCNRO_ID = T171.SCNRO_ID and T130.SCNRO_ID = T353.SCNRO_ID and T130.TSHLD_SET_ID = T171.TSHLD_SET_ID and T171.SCNRO_ID = T353.SCNRO_ID and T171.TSHLD_SET_ID = T353.TSHLD_SET_ID and 0 < T130.BATCH_ID and 0 < T130.RUN_ID )

  • Need help on how to put condition in the work flow

    hi friends,
    I want to check the conditions whether the customer is available in the server or not .
    If YES i want to do one process in the work flow
    or
    If NO i want to do one process in the work flow. Please help me out on this.
                    Ex:
                       KUNNR
             YES                NO
        1stProcess             2nd Process.
    Pls send me the screen shots or solution for this i searched a lot in this but I could not find...
    Thank you,
    Vikram.c

    Hi,
    you can use a CONDITION step to achieve this requirement. Try the following link, it may not exactly match your requirement but will give you a clear idea on how to proceed,
    [http://www.****************/Tutorials/Workflow/ConditionStep/Condition.htm]

  • The URL to run a Report stored in the Server-VERY URGENT

    Hi ,
    I wanna to know the url to run the report stored in 9iDS.
    e.g. in earlier version we need to use the CGI scripts to do the work e.g. http://hostname:port/srwcgi60/rwcgi.exe?report=test.rep ..somethin like this ..but in 9iDS i m not able to get the url..when i do http://hostname:port/reports/ the home page of reports come thats it ...but how to run it ...
    please its VERY URGENT..
    thanx a lot..
    Bhavna

    hello bhavana,
    how ru.
    web.show_document('http://servername:port/dev60cgi/rwcgi60.exe?report=reportname&userid=username/password@databasename&server=reportservername&destype=cache&desformat=HTML');
    put the above coding to a when-button-pressed trigger.
    it will work.
    http:\\servername:portname\dev60html\runrep.htm
    this will give u the reports home page.
    in that enter the report name and username and password.
    this also will work.
    looking forward to hear from u.
    bye. take care.
    natesh

  • Please find this query very urgent

    Query-->select value from mytable where value is not null
         union all
    select value from mytable where value is null
    Ex: table name::mytable
    In this table i have one column called 'value' and this column values shold be like this
    12
    null
    13
    null
    11
    null
    ....i executed above query the result will be like this
    12
    13
    11
    null
    null
    null
    the above query executes on the table it's effect only one column result
    but i need multiple columns to be effected same as above one only....Anyone please help me on it and give the query.

    I have a table..MyTable(value number(10))
    select * from Mytable;value
    12
    null
    13
    null
    11
    null
    This is the table i have and the records i have...... and i need output like this
    value
    12
    13
    11
    null
    null
    null ..............>ike this i need output for this i use this query i.e
    Query-->select value from mytable where value is not null
    union all
    select value from mytable where value is null
    ------------>and this query gives only one column result i need multiple results like below: i have table with 2 columns like below
    MyTable2(value1 number(10),value2 number(10))
    select * fromMyTable2value1 value2
    111 null
    null 201
    112 null
    null 200
    110 null
    this is the table i have......... and i need output like below
    value1 value2
    111 201
    112 200
    110 null
    null null
    null null
    NOTE:: If we use ORDER BY table records order must change, i don't want to change any order....please what is the query for that

  • Bex Query : Very Urgent

    HI Experts,
                      In a Bex Query , I have 2 Columns 1) Material , 2) Netprice.  Now in the query i need a third column, which shud be derived from  the existiing 2 columns,
    ex:
    Mat no                                       Price                                   
    12345                                               100   
    I need this column
    Exact Cost
                                                                         ( IF MatNo is 12345 then 25 * 100,
                                                                                    if MatNo is other than 12345 then 50 * 100) .
    I need to develop this, how to address this, I want to do this in query level. I have considered the option of writing a routine while data is populated in data target, but that doesnt help, cos later the value can be changed from 25 to 200 etc. Kindly suggest
    Regards,
    Tarak
    Edited by: TARAK on Mar 25, 2008 5:33 PM

    Dear ,
    Plz check Nag's reply in :
    https://forums.sdn.sap.com/click.jspa?searchID=10061863&messageID=3743877
    See if you can tweak that logic a little bit to suit you...
    Thanks

  • BW statistics cube and query Very Urgent!!

    Hi Everyone,
    I want to find out the query performance of all our customized infocubes in the bw system.
    But I am not able to find our infocubes in 0BWTC_C02, 0BWTC_C03 etc. even in the queries 0BWTC_C10_Q014, 0BWTC_C10_Q507 I cannot find out queries which were created for our customized i.e Zinfocubes.
    What could be the problem?
    Is some installation missing or do we have to update. How can I find out this information.
    Its really urgents can anyone please let me know.
    Thanks,
    Prashant.

    Hi,
    I requested the delta update as you have specified. But it is still in yellow and I get these messages.
    <b>Request still running
    Diagnosis
    No errors could be found. The current process has probably not finished yet.
    System response
    The ALE inbox of the SAP BW is identical to the ALE outbox of the source system
    and/or
    the maximum wait time for this request has not yet run out
    and/or
    the batch job in the source system has not yet ended.
    Current status
    The processing of the data was not finished.</b>
    <b>
    Transfer (IDocs and TRFC): Errors occurred
    Data Package 1 : arrived in BW ; Processing : Data packet not yet processed
    Processing (data packet): Errors occurred
    Data Package 1 ( 7917 Records ) : Missing messages
    Update ( 0 new / 0 changed ) : Missing messages
    Processing end : Missing messages
    </b>
    These are the messages when i press the details button in the monitor window.
    What could be the problem.
    Can anyone please help with this.
    Thanks,
    Prashant.

  • Condition in the query

    Hello Guyz,
    I have a scenario where I have to filter values of one text characteristic based on the other text characteristic.
    i.e
    I have text char whose values are either yes or no and there is a date characteristic.
    As per the requirement when the value is yes in the report date values should be reflected but when the value is no date value should be blank.
    note in the target the date values are present for both yes and no .
    Contract                Date 
    Yes                      01/10/2009
    No                         #
    Regards,
    Ravi

    Hi Ravi,
    I have two options
    1) Add a new date field in the source itself and map it with date and char . And write a field routine to say if it is yes then date or else blank. This is straight forward and easy but requires a ful load once again . If possible this is easy.
    2) This is at report level and it is lenghty and i  think it is possible but you will get date in key figure instead of in another characteristic but has some pre requireties.
    a) You should have those two charactertistcs in report display.
    b) The date output will be a key figure not a characterisitc and cant be only kept after charcterisitcs in report.
    How to achieve this
    1) Create a formula variable FV1 and use replacement path of characteristic . Then create a formula F1 which uses this formula variable. Then in the formula if this formula variable is 'YES' then 1 or else it is 0.
    2) Create another formula varaible FV2 and use replacement path of date.  Then create another formula F2 and use if F1 = 1 then FV2 .
    This will display date if characteristic is yes but in key figure.
    I am sure you can implement 2 point but only point i am doubtful is whether FV1 will return yes or not.
    But please give a try.
    The problem is complex because based on one characteristic to get another one is dificult at report level because we can limited flexibilty at query only restricted key figure ( selection ) and calculated key figure (formula) which uses onyl key figures and returns another key figure but not characteristic.
    Hope you got the second option.
    Thanks
    Vamsi

  • Problem in putting condition at the time of mapping

    Hi Experts
    Please help me in doing this mapping
    I have a sender field as BBY_TYP and the target field as Discount type  and the condition is
    if value of BBY_TYP is "%" than the target field (Discount type) should be mapped with a value named "Transc% off"
    and
    If the value of BBY_Type is "P" or "R" than the target field (Discount type) should be mapped with the value "Trans$ off".
    Please tell me how can i achieve this easiest way out ?
    Points will surely be rewarded.
    Thanks

    HI,
    I think the easiest way to achieve this is either with If Else or with fixValues
    In  you will have two columns one for Source Values and another for target values
    BBY_TYP ---> fixValues ---> target field
    Enter as below
    Transc% off
    P  -
    Trans$ off
    R -
      Trans$ off
    If as per my understanding you will be getting the value "Transc" at runtime then you could do this as below
    BBY_TYP --- Equals (%) Constant ---> If true -->Concat (field with value Transc and % off) ---> else --->
    BBY_TYP --- Equals (P OR R) Constant --->If true -->Concat (field with value as Trans$ off)
    Thanks
    Swarup
    Edited by: Swarup Sawant on Feb 14, 2008 6:45 AM

  • Conditions in the query

    Hi friends,
    Need a help from you to build a query from query designer. Here is my scenario, I have a date1,date2 and date3 objects. I need check whether date1 is in between date2 and date3 or not in query level.
    Your help is really apreaciated.
    -BK

    Create a formula and you will see several operators. As said earlier, you can use boolean operators or also If Else statement can be used to pass the desired values.
    Regards
    Pankaj

  • Oracle 9i Application Server+Oracle 8i EE+ Forms on the web Very urgent

    Hi,
    I have correctly install Oracle 9i Application Server and Oracle 8i Entreprise Edition on Windows 2000. What are the following steps to follow in order to run a form on the web. example: test.fmx?
    Thanks in advance.
    null

    If your web server is working and the forms server is running type:
    http://ip addr:port/dev60html/runform.htm
    You need to put the ip address or name of your server in and the port number apache is running on (leave blank if this is 80).
    This gives you the Oracle Forms start screen.
    cheers
    tony

  • Problem in transporting the objects(very urgent)

    hello Experts,
    I have saved my tables , domains,data elements and programs in local object.Now i want to tranport into production server,For that i have to save this objects in some request.How to do that.Please give me the solution .
    Thanks in advance
    regards,
    Ashok.

    hi,
    Please follow below steps to handle the same:
      1. Go to Transaction: SE10.
      2. Create a new workbench request by using key F6.
      3. Double on the newly created request
      4. Add a new entry: R3TR,TABU,<table> for Program Id, Object Type and Object Name Respectively.
      <table> being the table name for which the contents are to be transported.
      5. Click on Function icon next to table name.
      6. Click the contents from the icons in next screen.
      7. Select entire table.
      8. In next screen we can select required entries to be transported.
      9. Come back and save.
    10. Now release the request and transport to the required server.
    Rgds
    Anver

  • Idoc query(very urgent)

    Hi Folks,
    i want to insert a record into the EDIDD table ,please let me know if i need to modify the sequence numbering which is kept by the fields  SEGNUM and PSGNUM for the records whcih are beneath the new insert record.
    regards,
    Nagaraj

    Hello
    Yes, fields SEGNUM is a secuential number.
    The other one im not sure but try to assign the same value for both fields.
    Gabriel

  • Screen query (very urgent)

    Hi,
    I have a requirement to hide the selection screen inside of that program in which the selection screen is defined. It is to be done instead of calling or submitting this program into any other program. Even if we use the At Selection-screen output then only we can hide the parameters or select-options but the screen remains. my requirement is to hide the entire screen? is it possible? Please reply

    I don't think it is possible hide the standard selection screen.
    But you can achieve this by declaring user defined selection screen.
    ex:
    selection-screen: begin of screen 100.
    selection-screen: end of screen 100.
    The above screen will be displayed only if it is called in the program using the statement
    call selection-screen 100.
    If it is not called then it will not be displayed.

Maybe you are looking for

  • General issues during Installation

    Hi Experts, What are issues generally we are facing during installation of data sources  and loading of data in to DSO or Cube.(with real time example). and how that can be solved? Regards Tapashi saha

  • Costing with Standard and Moving Average Price

    Hello All, I understand that SAP recommends Std Price for Semi Finished /Finished goods and MAP for trading goods and raw materials. How does costing takeplace when it includes both the materials - semi finished and trading goods. Is it possible at a

  • ITunes keep rejecting my credit card. What do I do?

    I have re-entered my credit card info about 30x and it keeps saying my card isn't valid, but it works everywhere else. HELP PLEASE!

  • Batch rename bridge cs5

    when i try to batch rename in bridge cs5, I click the rename button and it just goesn gray. It will not rename. what is the problem?

  • Problem: E_ADEPT_DOCUMENT_OPEN_ERROR

    Hi, I just spent over $100.00 on books and instead of getting what I paid for, I only recieve this message "Error getting license. License Server Communication Problem: E_ADEPT_DOCUMENT_OPEN_ERROR" It appears that there is no support from Adobe for A