Discoverer Report - Not In condition

Hi,
I am somewhat new to Discoverer but pretty computer savvy. The problem I am having revolves around the inability to display employees who do not have a certain “competency” associated with their training records.
For example I will set a condition in Discoverer that states: competency_level Not In WHMIS.
What this will do is return all the competencies that not equal WHMIS, such as First Aid, CPR ect. Really what I want is for the report to display a listing of employee who do not have the associated competency.
Here is the SQL statement that is generated:
SELECT O100713.CANDIDATE_CODE, O100713.FIRST_NAME, O100713.LAST_NAME, O100610.LEVEL_CODE
FROM P2K.P2K_CP_COMPETENCE_LEVELS O100610, P2K.P2K_CP_COMPETENCE_USAGES O100611, P2K.P2K_RE_CANDIDATES O100713
WHERE ( ( O100610.ID = O100611.CCCL_ID ) AND ( O100713.ID = O100611.RCA_ID ) ) AND ( O100610.LEVEL_CODE NOT IN (( 'WHMIS-ORIENTAT' )) )
I believe that my problem is in the WHERE clause ( O100610.ID = O100611.CCCL_ID ). I believe that I need to remove this from the statement but I am unable to do so.
Any help would be greatly appreciated.
Chris

Chris,
Bit of a pain this one. The report is probably doing literally what you are asking for. What I reckon you really need is a subquery first to identify all the employees without this particular value and then use these employee numbers withing the main body of your query to restrict to who you want and bring back the associated training records.
Discoverer whilst having the ability to do sub queries, I have found to be a bit hit and miss depending on the volume of data that you are trying to pull back. Personally I'd try to build a custom view to handle such or if it's a one of then just use Toad or whatever and run the sql.
Scott

Similar Messages

  • Discoverer report not working on R12 !

    We have just migrated to R12 from 11i and some of the discoverer query is not working, but the same is working fine when we ran thru SQL Developer or TOAD.
    Is there any context (mo_global.set_policy_context) needs to be set in Discoverer report to get the data?
    Thanks

    Thanks Srini,
    There is no any specific error message, the strange thing is if I run the Discoverer report is not returning any data, but if I set the mo_global.set_policy_context ('S',111) in SQL Developer or TOAD and then run the discoverer report it return data...
    Any pointers?

  • Discoverer report not visible

    Hello,
    i logged into discoverer plus using Sysadmin user but still i couldn't see some reports whose owner is some other user. How to see all the reports available in Discoverer Plus? Using which user and responsibility should i login for that?
    Your help is greatly appreciated.
    Thanks
    --Kumar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Rod,
    Like always, thanks for your help but here a consultant has created some discoverer reports last year using the login details of our users. Now he is not here anymore and if we want to change something in the report, we have to request the user to grant access of the report to SYSADMIN or our username which is really a frustrating. I'm surprised why we don't have any super user to have access to all the reports....
    Thanks
    --KK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Discoverer report - Output from Discoverer plus is not the same as Discoverer desktop

    As a part of Upgrade project we are migrating the discoverer reports from 11i (11.5.10.2) to R12 (12.1.3) .After migrating to R12, for a custom discoverer report the output given by discoverer desktop is correct (24 rows for a scenario). But the report output from Discoverer plus does not show the credit transactions (2 rows). The output from Discoverer plus shows only 22 rows (24 - 2), which is incorrect. The query is the same in Discoverer desktop and Discoverer plus.
    Please let me know why these transactions that are appearing when the report is run from discoverer desktop are not appearing in discoverer plus. Is there any setup in discoverer plus for this?
    Regards,
    Brajesh

    Pretty hard to answer a question like this.  Best bet would be to copy the existing discoverer plus book and start removing conditions, fields, etc until those two rows from desktop show up and see if you can work it out. 

  • With one condition included my discoverer report is taking hours to run

    Hi,
    I am trying to build a discoverer report based on a view and i have defined couple of conditions as per the business requirement. Here is my view which is executing fine from database and at discoverer level.
    Now the requirement is to get the details with conditions
    1. Application_date is not equal to apply date
    2. Applied_amount>0
    parameters should be
    Application_date low and high
    The report is successfully executing when i use condition1 that is application_date<>apply date with parameters mentioned.
    But when i define second condition at report level that applied_amount>0, its taking hours to run.
    Please advise me the way to use this condition2 so that it should be executed in normal time.
    Thanks,
    Prathyusha.
    Edited by: 958913 on Oct 10, 2012 1:28 PM

    Hi Srini,hussein,
    Thanks so much.
    Yes srini that is related to my post. I have tried all the options to make that condition workout. But hard luck i could nt able to make this work out.
    Im still wondered my query is successfully getting executed in database fine and when i give any condition on applied amount its taking hours to run from discoverer desktop and i dont find it executed anytime till now.
    I am not sure about enabling this trace option as i reviewed the ID's suggested by you and seems that all needs to be done with the help of DBA. But i dont have that much time to make this workout. This is an immediate business requirement and i have never seen this problem anytime with discoverer desktop.
    Any help would be appreciated.
    Thanks,
    Prathyusha.

  • Discoverer  report does not sum up the column

    Hi All,
    I am running the discoverer report from discoverer desktop and was
    trying to use the sum function to sum the total amount of the report.
    The sum function does not work and it only display Cell
    Sum: (blank) with no actual data.
    When i checked the report details some columns are calculated based on the columns which i want to sum up.
    Any ideas please share with me
    Thanks in advance.

    b) What is the difference between sum and cell sum? Well, I certainly won't claim to be a Discoverer guru. From what little I have seen, the practical result is not any difference really between the two. SUM of a calculated row is adding up the calculation to the total. Whereas cell sum is like adding up the individual values behind the calculation you see. The distinction makes more sense when you have SUM DISTINCT and CELL SUM DISTINCT being involved. Then you will see a difference in the calculated total. But for SUM and CELL SUM itself, I have not seen any difference between the two, but I am still pretty new to Discoverer.
    e) Aggregate field from a folder. Well, this may be one where you have to play around with your own data to understand. Let me try to give you a simple example. Let's say you have a sales table with 100 rows. You have sales data for 5 cities, and each city has 20 rows of sales history. If you pick Sales Dollars Detail and City Name for your workbook and run, you will get 100 rows in your result (complete detail listing). So that is what happens with no aggregation. Now, instead of doing Sales Dollars Detail, you pick Sales Dollars Sum (the same thing as saying SUM(Sales Dollars) in an SQL statement). Run the workbook. You will now get 5 rows of data, instead of 100 rows of data. You will get one row for each city. If you look at the SQL that Discoverer generates, you will see that it has now done a GROUP BY in the SQL statement. Notice I have not said anything about DISTINCT (just trying to keep things simple).
    Now, lets say you do a workbook for City, Part Number, and Sales Dollars Sum. Run the workbook. You get a summarized result (say maybe 10 rows of summary data this time). If you look at the Discoverer SQL, the GROUP BY is now by city and part number, automatically doing that because you picked the SUM version of sales dollars.
    Now lets say you add Sales Units Detail to the workbook. Discoverer will give you a warning message that you are have both an aggregate and a non-aggregate and that you may end up with unpredictable results. Run the workbook. You will be back to 100 rows, because you specified sales units in detail.
    Most of the time I do not want to see detail rows in a workbook. So most of the time I am picking the SUM aggregate for an amount item.
    Hope this explains things a bit. Sounds like maybe you need to take the Discoverer Create Queries and Reports class. Would help you understand these things better. Good luck.
    John Dickey

  • Discoverer report accessible through Desktop but not through Viewer

    Does anyone have a hint for me about this problem: we can use a Discoverer report via Discoverer Desktop, but when we try to access the same report through Discoverer Viewer, we get an error message: the page cannot be found.

    It sounds like discoverer viewer may not be correctly configured or the permissions on the database account may not be correct. Can you run any reports through Discoverer viewer as any other user? What version of Discoverer are you running?
    Matt Topper
    TUSC, The Oracle Experts
    [email protected]

  • Discoverer Reports does not work in Multi-org Environment after R12 Upgrade

    Discoverer Reports does not work in Multi-org Environment after R12 Upgrade. Created a simple report using the below query:
    SELECT po_header_id, segment1, type_lookup_code
    FROM po_headers
    WHERE segment1 = '5000002'
    Query works perfectly fine; when i set the ORG_CONTEXT in the database using the command:
    EXEC mo_global.set_policy_context('S',129)
    But the report doesn't fetch any data when ran from an Org based responsibility. We've ensured that the MO: Operting Unit is set accurately and general Oracle reports (PLSQL Program OR XML Publisher) are working perfectly fine.
    ===========
    I followed the steps provided in Metalink Note: 732826.1 - It works for some responsibilities where the MO: Security Profile is not set; but fails for those responsibilities where the MO: Security Profile is set.
    I am looking for specific solution that works irrespective of either the MO: Operating Unit profile is set of not.
    Please suggest. Appreciate your response.
    Thanks,
    Kesava Chunduri

    Hi Hussein,
    Thanks for the quick response.
    Yes, I've gone thru both the notes specified below:
    Discoverer Workbooks Based On Organization Enabled Views Are Not Populated [ID 1293438.1]
    - Tried this option; but this option is messing up a couple of Oracle Standard Functionalities.
    - For ex: If i set this profile option; we are not able to create any receipts using Custom Responsibilities.
    I am able to create the receipt, when i remove this profile option.
    No Data Shows for Reports in Discoverer 10g with Applications Release 12 [ID 1054380.1]
    - I see that the products i am running these reports from AR/GL - already exists in these tables.
    Anything other options??
    Thanks,
    Kesava

  • How to not print a page of a report under a condition

    Hi,
    I need to build a report with a specific layoutdepending on a user paramater.
    Ex:
    If parameter value is 1, then display the layout of the first page of the report
    If parameter value is p_layout2, then display the layout of the second page of the report
    If parameter value is p_layout3, then display the layout of the third page of the report
    If parameter value is p_layout4, then display the layout of the fourth page of the report
    So I built a report, putting on page 1 the first layout, page 2 the second etc.
    I put each layout into a frame, with FormatTrigger as of: IF :paramater IS 'p_layoutx' THEN TRUE ELSE FALSE.
    The output prints only the frame needed (the one attached to the value passed by the parameter) BUT prints blank pages for all others (the 3 remaining ones).
    So, how would I do to make the report NOT to print these blank pages, having only one page printing, the one that matches the condition?
    Thank you in advance.

    I found a way to achieve my goal: Instead of creating a frame with formattrigger for each of my layouts and inserting in it all my objects (text fields and graphics), I don't create any frame, put all my objects on the desired pages and put the formattrigger conditions on these objects with vertical elasticity for all of them. When not the condition is not met, then all objects are shrinked. It is weird that the behavior is not the same with a frame (the frame with vertical elasticity should "shrink" itself; or maybe I missed something).

  • Function not returning value in Discoverer report

    Hi All,
    I am using a PL/SQL function in a Discoverer Report to return a particular date. The way I am using is that I have created a PL/SQL function and registered the same in Discoverer Administatrator.
    My problem is that when i run the report this function returns NULL for one particular unit but when i run the same on toad as
    'select max_term_dt_pkg.max_term_dt_fn('703813','OM - AWAITING_SHIPPING - 1179628') from dual'
    it returns the date as 26-May-2009
    Actually it should return a value in the report also.
    Can anyone guide me what could be the problem.
    Regards,
    Shruti

    Hi Rod,
    There are no session variables to be set. I have myself created that and it is returning values for other units also.
    Below is the function :
    CREATE OR REPLACE PACKAGE BODY APPS.max_term_dt_pkg
    AS
    FUNCTION max_term_dt_fn (p_unit_num VARCHAR2, p_order_status VARCHAR2)
    RETURN DATE
    IS
    l_contract_number VARCHAR2 (20);
    --okc_k_headers_b.contract_number%TYPE;
    l_max_term_date DATE; --okc_k_lines_b.date_terminated%TYPE;
    BEGIN
    IF p_order_status IN ('RMA on Unit', 'OKS 30 Days Notice Given')
    THEN
    l_max_term_date := NULL;
    ELSE
    SELECT contract_number
    INTO l_contract_number
    FROM (SELECT DISTINCT okhb.sts_code, okhb.date_terminated,
    okhb.contract_number,
    oklb_ib.attribute15 unit, okhb.start_date,
    okhb.end_date, okhb.creation_date
    FROM apps.okc_k_headers_b okhb,
    apps.okc_k_lines_b oklb_ib --,
    WHERE okhb.ID = oklb_ib.dnz_chr_id
    AND lse_id = 9
    AND oklb_ib.attribute15 = p_unit_num
    ORDER BY okhb.start_date DESC,
    okhb.creation_date DESC)
    --ORDER BY okhb.start_date DESC)
    WHERE ROWNUM = 1;
    SELECT date_terminated
    INTO l_max_term_date
    FROM (SELECT oklb.dnz_chr_id, oklb.ID, oklb.date_terminated,
    oklb.sts_code, mic.category_concat_segs,
    mic.category_set_name
    FROM apps.okc_k_headers_b okhb,
    apps.okc_k_lines_b oklb,
    apps.okc_k_items oki,
    --apps.mtl_system_items_b msib,
    mtl_item_categories_v mic
    WHERE oklb.dnz_chr_id = okhb.ID
    AND okhb.contract_number = l_contract_number
    AND oklb.lse_id = 1
    AND oki.cle_id = oklb.ID
    -- AND msib.inventory_item_id = oki.object1_id1
    -- AND msib.organization_id = oki.object1_id2
    --AND segment1 = 'OKS-RNTL-MAINT-WH'
    --AND oklb.sts_code = 'TERMINATED'
    AND oklb.date_terminated IS NOT NULL
    AND mic.inventory_item_id = oki.object1_id1
    --msib.inventory_item_id
    AND mic.organization_id = oki.object1_id2
    --msib.organization_id
    AND mic.category_set_name = 'Product'
    AND mic.category_concat_segs = 'OKS-Base'
    ORDER BY oklb.date_terminated DESC)
    WHERE ROWNUM = 1;
    END IF;
    RETURN l_max_term_date;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    RETURN NULL;
    WHEN OTHERS
    THEN
    RETURN NULL;
    END;
    END;
    Regards,
    Shruti

  • Lov Values are not showing for Discoverer Reports in Application

    Hi,
    I developed some discoverer reports, those reports having parameters with LOV. Those LOV values are showing in Discoverer Desktop, but after registering those reports in Oracle applications those LOV values are not showing. Pls let me know how resolve this issue.
    Regards,
    Hanimi.

    Hi,
    Also it is necessary to know how the LOVs are defined. Are they based on Application flexvalues for example? In which case it may be that you have not got your NLS language parameters set correctly when connecting from Applications.
    Rod West

  • Discoverer Report opened from Portal does not show correct data

    Hi,
    When I try to open a Discoverer report from a portal that I created, it shows stale data but when I click on "Analyze", it shows all the data correctly.
    Does anyone know what the reason could be for this?
    Thank you,
    Santoshi

    I assume you used the Discoverer Portlet Provider. A discoverer portlet is never live data. When you define the portlet you specify how often to 'refresh' the data. If you skipped this step, then you just get the data as-of when you created the portlet.
    Generally you specify the refresh time to be sometime after your usual database load completes.

  • Discoverer Report parameter based on subquery

    Hi Guys,
    I have following query which i need to convert into discoverer report
    select hpah.EMPLOYEE_NUMBER,hpah.FIRST_NAME,hpah.LAST_NAME,hpah.PERSON_NAME,
    --hpah.JOB_NAME,hpah.ASSIGNMENT_ORGANIZATION_NAME,
    hpah.ASSIGNMENT_TYPE,hpah.USER_ASSIGNMENT_STATUS,
    SUBSTR(pj.name, 1, instr(pj.name, '.', 1, 2) -1) job_code,
    SUBSTR(pj.name, instr(pj.name, '.', 1, 2) + 1) job_title,
    (select haou.ATTRIBUTE1 from hr_all_organization_units haou
    where haou.ORGANIZATION_ID = hpah.ASSIGNMENT_ORGANIZATION_ID ) Function,
    (select haou.ATTRIBUTE2 from hr_all_organization_units haou
    where haou.ORGANIZATION_ID = hpah.ASSIGNMENT_ORGANIZATION_ID ) org_desc,
    SUBSTR(hpah.ASSIGNMENT_ORGANIZATION_NAME, 1, 6) dept_code,
    SUBSTR(hpah.ASSIGNMENT_ORGANIZATION_NAME, 7, LENGTH(hpah.ASSIGNMENT_ORGANIZATION_NAME)) dept_title,
    hpah.GRADE_NAME,hpah.LOCATION_NAME,hpah.SUPERVISOR_NAME,
    hpah.PERSON_START_DATE,hpah.ORIGINAL_DATE_OF_HIRE ,
    hpah.SALARY_BASIS,hpah.BUSINESS_GROUP_ID,hpah.ASSIGNMENT_ID,
    decode( hpah.SALARY_BASIS, 'ANNUAL', ppp.proposed_salary_n,
    'HOURLY', (ppp.proposed_salary_n *2080),
    ppp.proposed_salary_n
    ) salary,
    sysdate run_date
    from
    hrfg_person_assignment_history hpah ,
    per_pay_proposals ppp,
    per_pay_bases ppb,
    per_grades pg,
    per_jobs pj
    where hpah.ASSIGNMENT_ID = ppp.ASSIGNMENT_ID
    and hpah.SALARY_BASIS = ppb.PAY_BASIS
    and hpah.BUSINESS_GROUP_ID = ppb.BUSINESS_GROUP_ID
    and hpah.GRADE_ID = pg.GRADE_ID(+)
    and hpah.JOB_ID = pj.JOB_ID (+)
    --and   hpah.EMPLOYEE_NUMBER = 100779
    and hpah.PERSON_START_DATE IN
    (SELECT MAX(hpah2.PERSON_START_DATE)
    FROM hrfg_person_assignment_history hpah2
    WHERE hpah2.EMPLOYEE_NUMBER = hpah.EMPLOYEE_NUMBER
    AND hpah2.PERSON_START_DATE <= sysdate )
    order by hpah.EMPLOYEE_NUMBER
    i need to have sysdate as parameter in my report. I want data based on the date i provide.
    how can i make this as an parameter?

    Hi Prashant,
    Subqueries are not Supported in Conditions..As of Disco Plus Rel 10.1.2.54.25
    A plausible workaround can be:
    1. Create a View with foll. Query
    create or replace view TEST_VIEW as
    select hpah.EMPLOYEE_NUMBER emp_no,hpah.FIRST_NAME,hpah.LAST_NAME,hpah.PERSON_NAME,
    --hpah.JOB_NAME,hpah.ASSIGNMENT_ORGANIZATION_NAME,
    hpah.ASSIGNMENT_TYPE,hpah.USER_ASSIGNMENT_STATUS,
    SUBSTR(pj.name, 1, instr(pj.name, '.', 1, 2) -1) job_code,
    SUBSTR(pj.name, instr(pj.name, '.', 1, 2) + 1) job_title,
    (select haou.ATTRIBUTE1 from hr_all_organization_units haou
    where haou.ORGANIZATION_ID = hpah.ASSIGNMENT_ORGANIZATION_ID ) Function,
    (select haou.ATTRIBUTE2 from hr_all_organization_units haou
    where haou.ORGANIZATION_ID = hpah.ASSIGNMENT_ORGANIZATION_ID ) org_desc,
    SUBSTR(hpah.ASSIGNMENT_ORGANIZATION_NAME, 1, 6) dept_code,
    SUBSTR(hpah.ASSIGNMENT_ORGANIZATION_NAME, 7, LENGTH(hpah.ASSIGNMENT_ORGANIZATION_NAME)) dept_title,
    hpah.GRADE_NAME,hpah.LOCATION_NAME,hpah.SUPERVISOR_NAME,
    hpah.PERSON_START_DATE,hpah.ORIGINAL_DATE_OF_HIRE ,
    hpah.SALARY_BASIS,hpah.BUSINESS_GROUP_ID,hpah.ASSIGNMENT_ID,
    decode( hpah.SALARY_BASIS, 'ANNUAL', ppp.proposed_salary_n,
    'HOURLY', (ppp.proposed_salary_n *2080),
    ppp.proposed_salary_n
    ) salary,
    sysdate run_date
    from
    hrfg_person_assignment_history hpah ,
    per_pay_proposals ppp,
    per_pay_bases ppb,
    per_grades pg,
    per_jobs pj
    where hpah.ASSIGNMENT_ID = ppp.ASSIGNMENT_ID
    and hpah.SALARY_BASIS = ppb.PAY_BASIS
    and hpah.BUSINESS_GROUP_ID = ppb.BUSINESS_GROUP_ID
    and hpah.GRADE_ID = pg.GRADE_ID(+)
    and hpah.JOB_ID = pj.JOB_ID (+)
    --and hpah.EMPLOYEE_NUMBER = 100779
    order by hpah.EMPLOYEE_NUMBER
    2. Create another table say TEST_TAB
    create table TEST_TAB (emp_no, start_dt) as
    SELECT hpah2.EMPLOYEE_NUMBER , MAX(hpah2.PERSON_START_DATE) PERSON_START_DATE
    FROM hrfg_person_assignment_history hpah2
    GROUP BY hpah2.EMPLOYEE_NUMBER
    3. Add both of them in Disco Admin and create a join between TEST_VIEW.emp_no and TEST_TAB.emp_no
    4. Bring both these Objects in a new report in Disco Plus
    5. Create a New Parameter (Base it on PERSON_START_DATE Col of TEST_TAB)
    6. Choose Option Create Condition with operator <=
    7. Checkmark "Require User to Enter a Value
    8. Execute Report
    I believe this should work. Either ways let me know if it helps or u get another workaround. (This scenario looks quite interesting)
    Thanks,
    Chinmay

  • Discoverer Report  returning ' no data  found '

    Hi  ...
    i  have an issue with one discoverer  report  .
    Discoverer report  name : EDI Price Exception Report.
    when i ran the report  in Discoverer  Desktop edition  It is returning 'No Data Found ' But  i am taken the  Query from admin edition  and tried to  ran in  PL/SQL Developer/TOAD  by setting  Org_id condition
    it's returning Data  . the Desktop Edition of Discoverer for  some specific date  Range  it's giving Data  But  from last month on wards  it's not returning any Data.
    in Discoverer Report  Desktop  it's not retuning the Data from  November to till date
    Oracle  Applications  11i
    Discoverer 4i
    Oracle Data base :9i 
    OS : Windows.
    Attached the Sql  which i used to generate the Report :
    I HAVE USED THE FOLLOWING  :-for initialize the profile options
    EXEC FND_GLOBAL.APPS_INITIALIZE (0,52163,660);
    EXEC APPS.FND_CLIENT_INFO.SET_ORG_CONTEXT(2922);
      SELECT A.CUST_PO_NUMBER,
             A.ORDER_NUMBER,
             A.ORDERED_DATE,
             A.ORDER_TYPE,
             -- C.CUSTOMER_ID,
             C.CUSTOMER_NUMBER,
             C.CUSTOMER_NAME,
             B.LINE_NUMBER,
             B.ORDERED_ITEM,
             MSI.SEGMENT1 ACCO_ITEM,                               -- GRW 20060407
             MSI.DESCRIPTION,
             -- MSI.INVENTORY_ITEM_ID,
             (SELECT MCI.CUSTOMER_ITEM_NUMBER
                FROM MTL_CUSTOMER_ITEMS MCI,
                     MTL_CUSTOMER_ITEM_XREFS MCIX,
                     MTL_SYSTEM_ITEMS_B MSIB
               --  MTL_PARAMETERS          MP
               WHERE     MCI.CUSTOMER_ID = C.CUSTOMER_ID                 --1814924
                     AND MCI.CUSTOMER_ITEM_ID = MCIX.CUSTOMER_ITEM_ID
                     AND MCIX.INVENTORY_ITEM_ID = MSIB.INVENTORY_ITEM_ID
                     AND MSIB.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID   --869899
                     AND MSIB.ORGANIZATION_ID = MTP.ORGANIZATION_ID --MP.ORGANIZATION_ID
                     AND MTP.ORGANIZATION_CODE = 'BRM'
                     AND MCI.CUSTOMER_ITEM_NUMBER = B.ORDERED_ITEM
                     AND NVL (mci.inactive_flag, 'N') <> 'Y'
                     AND NVL (mcix.inactive_flag, 'N') <> 'Y')
                CUSTOMER_ITEM,
                     XXAB_ITEM_XREFS.GET_GBC_ITEM_NUM (B.ORDERED_ITEM) GBC_ITEM_NUMBER,
             B.ORDERED_QUANTITY,
             B.PRICE_LIST,
             B.UNIT_SELLING_PRICE,
             B.UNIT_LIST_PRICE,
                   TO_NUMBER (B.ATTRIBUTE7) CUST_SENT_PRICE,
             apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
                                                B.ordered_item,
                                                B.header_id,
                                                B.line_number,
                                                B.unit_selling_price,
                                                B.attribute7,
                                                B.pricing_quantity_uom,
                                                B.attribute4)
                CUST_SENT_PRICE_CONVERTED,
             ABS ( (B.UNIT_SELLING_PRICE
                    - apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
                                                         B.ordered_item,
                                                         B.header_id,
                                                         B.line_number,
                                                         B.unit_selling_price,
                                                         B.attribute7,
                                                         B.pricing_quantity_uom,
                                                         B.attribute4)))
                DIFFERENCE,
                      MTP.ORGANIZATION_CODE,
             B.SHIP_TO_LOCATION
        FROM OE_ORDER_HEADERS_V A,
             OE_ORDER_LINES_V B,
             RA_CUSTOMERS C,
             MTL_PARAMETERS MTP,
             MTL_SYSTEM_ITEMS_B MSI
       WHERE     A.HEADER_ID = B.HEADER_ID
             AND A.SOLD_TO_ORG_ID = C.CUSTOMER_ID
             -- Added by Gati on 19-Oct-2012, tkt - INC000000118962
             AND ROUND (TO_NUMBER (apps.XXAB_CUST_SENT_PRICE_CONV_SO (
                                      C.customer_number,
                                      B.ordered_item,
                                      B.header_id,
                                      B.line_number,
                                      B.unit_selling_price,
                                      B.attribute7,
                                      B.pricing_quantity_uom,
                                      B.attribute4)),
                        2) <> B.UNIT_SELLING_PRICE
             --AND ROUND(TO_NUMBER(B.ATTRIBUTE7), 2) <> B.UNIT_SELLING_PRICE
             --AND     a.ship_from_org_id = mtp.organization_id
             AND B.SHIP_FROM_ORG_ID = MTP.ORGANIZATION_ID          -- GRW 20060413
             --AND     a.ship_from_org_id = msi.organization_id
             AND B.SHIP_FROM_ORG_ID = MSI.ORGANIZATION_ID          -- GRW 20060413
             AND B.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID       -- GRW 20060407
             AND A.ORDER_SOURCE_ID = 6
             AND A.ORG_ID = B.ORG_ID
             AND TO_CHAR (A.ordered_date, 'DD-MON-YYYY') between  '01-NOV-2013' and  '03-NOV-2013'
             and mtP.organization_code='BRM'
                      AND A.ORG_ID = (SELECT HOU.ORGANIZATION_ID
                               FROM HR_OPERATING_UNITS HOU
                              WHERE HOU.NAME = '50 ACCO Canada')
             AND B.cancelled_flag <> 'Y'
             AND B.flow_status_code <> 'CANCELLED'
             AND B.ORDERED_ITEM <> 'INVALID_ITEM'
    ORDER BY a.order_number

    Hi,
    Assuming your initialization matches your discoverer login, it is pretty weird that you get no data.
    I am not sure how you got the SQL but i suggest you trace the session to get the exact SQL ran by the discoverer.
    You may find another condition or join that limits your data.
    Also another thing that you should try is to initial the session by using all the parameters (including the security group as you have in your discoverer login):
    begin
      fnd_global.APPS_INITIALIZE(user_id =>, resp_id =>, resp_appl_id =>, security_group_id =>);
    end

  • Discoverer report with PO_RELEASES in R12

    Hi all,
    I'm migrating a Discoverer report from 11i to R12. The query of the folder uses the po_releases and this join condition "and rcv_transactions.po_release_id = po_releases.po_release_id(+)". When I run the report I get the error "invalid number" but when I tried the same query but using the po_releases_all it seems to work. Is this ok? I saw that in R12 po_releases is just a synonym, is this correct? I would appreciate your comments.
    Thanks in advance.
    Gabriela

    Thanks Hussein. Yes, I've checked the document you recomend, but the problem seems to be when I try to use po_releases, the synomy) and I don't know why it work with the _all table but not work with the synonym.                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for