Pending noitifications query

Hi there,
scenario: employee submits absences request through self service and manager receives notification. We would like to send a reminder to manager to approve the notifiation afer a certain period.
We have this query to fetch the notifications waiting for approval.
But there are few absences (HRSSA) transactions that are not picked up by this query and the reason is for those transactions there is no record in hr_api_transactions. but the notifications exist in wf_item_activity_statuses and managers can see the notifications on their home pages.
Can someone look at this query and explain why some absences have row in hr_api_transactions and some does not have. Please note that the absence type etc are all same other than employees.
select distinct wias.assigned_user,fu.email_address,trunc(sysdate) today
from hr_api_transactions hat
,hr_api_transaction_steps hats
     ,wf_item_activity_statuses wias
     ,fnd_user fu
where hat.transaction_id = hats.transaction_id
and hat.status = 'Y'
and wias.item_type = hats.item_type
and wias.item_key = hats.item_key
and wias.end_date is null
and wias.activity_status = 'NOTIFIED'
and wias.due_date is not null
and wias.assigned_user = fu.user_name
and mod((trunc(sysdate)-trunc(wias.begin_date)),3) = 0
ORDER BY email_address
Appreciate your time!
Many Thanks

I think you probably want to look at wf_notifications as that's the table that actually holds what notifications have been sent.
I haven't spent ages on this SQL so it's probably got holes but perhaps it might look something like this:
  SELECT   wfn.notification_id
          ,nvl(wfn.more_info_role, wfn.recipient_role) wf_role
          ,nvl(wfr2.display_name, wfr.display_name) wf_name
          ,nvl(wfr2.email_address, wfr.email_address) wf_email
          ,wfn.begin_date notif_sent_datetime
  FROM     wf_notifications wfn
          ,wf_roles wfr
          ,wf_roles wfr2
          ,wf_item_activity_statuses wfas
          ,hr_api_transaction_steps hats
  WHERE    wfn.status = 'OPEN'
  AND      wfn.recipient_role = wfr.name
  AND      wfn.more_info_role = wfr2.name(+)
  AND      wfn.item_key = hats.item_key
  AND      wfn.notification_id = wfas.notification_id
  AND      wfn.item_key = wfas.item_key
  AND      wfas.item_type = hats.item_type
  AND      wfas.due_date IS NOT NULL
  AND      wfas.end_date IS NULL;

Similar Messages

  • Returned records different in query to workbook

    We are using Bex Analyser version 7.
    I have a pending invoices query embedded in a workbook. If I refresh the query within the workbook, I get 3 fewer records than if I run the same query on its own.
    When I identified the 3 invoices concerned I could see that they have a zero key figure values. I haven't suppressed zero records in the query but they appear to be suppressed in the workbook.
    Has anybody got any suggestions for amending my workbook so that I get all the records?
    Many thanks,
    Positive Parrot

    Hi,
    Can you check in this way.
    Right click on a particular record in workbook-> properties> calculation---> calculate single value as.
    Thanks,
    Ashok

  • ORA-31061: XDB error

    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE     11.2.0.2.0     Production
    TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Productionnot sure what I am doing wrong here. (I don't use xml often so I'm sure it is something obvious)
    ok created the following table and sequence
    CREATE TABLE saved_queries
       seq_cd           NUMBER,
       user_id          VARCHAR2 (50 BYTE) NOT NULL,
       query_name       VARCHAR2 (200 BYTE) NOT NULL,
       create_dt        DATE NOT NULL,
       last_update_dt   DATE NOT NULL,
       query_info       SYS.XMLTYPE NOT NULL
    ALTER TABLE saved_queries ADD (
      CONSTRAINT SAVED_QUERIES_PK
      PRIMARY KEY (SEQ_CD));
      ALTER TABLE saved_queries ADD (
      CONSTRAINT SAVED_QUERIES_UQ unique  (user_id , query_name ));
    CREATE SEQUENCE saved_queries_seq
       START WITH 1
       INCREMENT BY 1
       NOCACHE
       NOCYCLE;however when I try my insert
    INSERT INTO saved_queries (seq_cd,
                               user_id,
                               query_name,
                               create_dt,
                               last_update_dt,
                               query_info)
         VALUES (
                   saved_queries_seq.nextval,
                   'Bdellinger',
                   'My First Query',
                   SYSDATE,
                   SYSDATE,
                   sys.xmltype.
                    createxml (
                      '<query>
        <DropDownListAssignedTo>Bryan Dellinger</DropDownListAssignedTo>
       < DropDownListTaskStatus>In-Progress</DropDownListTaskStatus>
        < DropDownListTaskStatus>Pending</DropDownListTaskStatus>
    </query>'));I receive
    ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    In line 3 of orastream:
    LPX-00231: invalid character 32 (' ') found in a Name or Nmtokenthanks for your help
    let me know if you need any more info.

    Could it be the space after the '<' in this part:
    < DropDownListTaskStatus>In-Progress</DropDownListTaskStatus>
        < DropDownListTaskStatus>Pending</DropDownListTaskStatus>?

  • Change publication status

    I need change publication status from "PENDING" to "PAUSED" for wait long load ETL process.
    After ETL Load is end, change publication status from "PAUSED" to "PENDING".
    // Query
    String sql = String.Format("query://{0}select * from CI_INFOOBJECTS WHERE SI_KIND='Publication'AND SI_SCHEDULE_STATUS=9 AND SI_NEXTRUNTIME>'{1}/{2}/{3}/00/00/00' AND SI_NEXTRUNTIME<'{4}/{5}/{6}/00/00/00' AND SI_Name IN ({7}) ORDER BY SI_ENDTIME DESC{8}",
    '{', now.AddDays(-1).Year, now.AddDays(-1).Month, now.AddDays(-1).Day, now.AddDays(2).Year, now.AddDays(2).Month, now.AddDays(2).Day, Rep_Names, '}');
    ResponseHolder rh = bipService.Get(sql, oGetOptions);
                if (rh.InfoObjects.InfoObject == null || rh.InfoObjects.InfoObject.Length == 0)
                    Console.WriteLine("No waiting/paused publications");
                else
                {                //rh.InfoObjects.InfoObject[0].
                    foreach (InfoObject io in rh.InfoObjects.InfoObject)
                        Publication p = (Publication)io;                                    
                        if (Is_Ok == 1)
                            p.SchedulingInfo.Status = ScheduleStatusEnum.PENDING;  //  RUNNING = 0, COMPLETE = 1, FAILURE = 2, PAUSED = 3, PENDING = 4
                        else
                            p.SchedulingInfo.Status = ScheduleStatusEnum.PAUSED;  //  RUNNING = 0, COMPLETE = 1, FAILURE = 2, PAUSED = 3, PENDING = 4
                         //   p.SchedulingInfo.Outcome = ScheduleOutcomeEnum.FAIL_SCHEDULE;  //  RUNNING = 0, COMPLETE = 1, FAILURE = 2, PAUSED = 3, PENDING = 4
                    bipService.Update(rh.InfoObjects); // COMMIT DATA TO CMS
    but publication status NOT change!
    How to change publication status ?

    There is another way you could do this without using the SDK to change the status.  Instead, you could use a File event.  File events do not look at the contents or timestamp of a file - they look at whether the file is present after it has been absent for at least one cycle of the Event Server.
    Here's how it would work:
    1.  In the CMC, create a file event that looks for a file in a specific folder (best to use a UNC path...)
    2.  In the process that runs the ETL, do the following:
         a.  As one of the first steps in the process, delete the file specified in the event.
         b.  As one of the last steps after the ETL is finished, create a blank file with the file name specified in the event.
    3.  Configure the schedule for the publication to wait on the event created in step 1 to trigger.
    This is the way a lot of my clients configure schedules that need to wait for the completion of an ETL process.
    -Dell

  • Need Query to find Pending Quantity for Receipts

    Hi all,
    Can any one please help me in finding the pending quantity for a particular Receipt.
    ex. If a receipt has
    transaction_type Quantity
    Receive 15
    Accept 5
    Deliver 5
    then my accepted quantity should be (Receive-Deliver) = 10
    I have written a query
    SELECT RSH.RECEIPT_NUM RECEIPT_NUM, RSH.CREATION_DATE CREATION_DATE, RT.TRANSACTION_TYPE TRANSACTION_TYPE, NVL(RT.QUANTITY, 0) QUANTITY,rt.destination_type_code destination_type_code,
                   RT.UNIT_OF_MEASURE UNIT_OF_MEASURE, RSL.ITEM_DESCRIPTION ITEM_DESCRIPTION, NVL(RT.PO_UNIT_PRICE, 0) PO_UNIT_PRICE,
                   RT.CURRENCY_CODE CURRENCY_CODE, NVL(RT.CURRENCY_CONVERSION_RATE,0) RATE, RSL.SHIPMENT_LINE_ID SHIPMENT_LINE_ID,
                   NVL(RT.QUANTITY * RT.PO_UNIT_PRICE * RT.CURRENCY_CONVERSION_RATE ,0) VALUE               
         FROM RCV_TRANSACTIONS RT, RCV_SHIPMENT_HEADERS RSH, RCV_SHIPMENT_LINES RSL, PO_VENDORS POV, PO_VENDOR_SITES POVS,
              ORG_ORGANIZATION_DEFINITIONS ORG, HR_LOCATIONS_ALL_TL HRL, PO_LOOKUP_CODES PLC,
              RCV_SUPPLY RS
         WHERE RSH.SHIPMENT_HEADER_ID = RT.SHIPMENT_HEADER_ID
              AND RSH.SHIPMENT_HEADER_ID = RSL.SHIPMENT_HEADER_ID
              AND RSH.RECEIPT_NUM IS NOT NULL
              AND POV.VENDOR_ID (+) = RSH.VENDOR_ID
              AND POVS.VENDOR_SITE_ID (+) = RSH.VENDOR_SITE_ID
              AND HRL.LOCATION_ID (+) = RSH.SHIP_TO_LOCATION_ID AND HRL.LANGUAGE(+) = USERENV('LANG')
              AND ORG.ORGANIZATION_ID (+) = RSH.ORGANIZATION_ID AND RSH.RECEIPT_SOURCE_CODE = PLC.LOOKUP_CODE
              AND PLC.LOOKUP_TYPE = 'SHIPMENT SOURCE TYPE'
              AND RS.RCV_TRANSACTION_ID = RT.TRANSACTION_ID
              AND RT.SHIPMENT_LINE_ID = RSL.SHIPMENT_LINE_ID
              AND RT.TRANSACTION_TYPE IN ('RECEIVE','TRANSFER')
         ORDER BY 1
    I want want the pending quantity...
    Please help

    You can get the quantities in po line locations, then you can find the balance quantity to be received.
    you can get the following from po line locations.
    quantity
    quantity_received
    quantiy_accepted
    quantity_rejected
    quantity_billed
    quantity_cancelled
    --Prasanth                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Need sql query to get OIM request pending approval details for one user

    HI OIM Guru,
    It would be great help if someone can provide me sql query by which i can find out how many requests are pending for approval for one user ?

    1. Below query will give you status of all the request.
    SELECT REQ.REQUEST_ID , REQ.REQUEST_STATUS FROM REQUEST REQ
    2. You can have following status
    Obtaining Operation Approval
    Obtaining Template Approval
    Operation Approval Approved
    Operation Approval Rejected
    Post Operation Processing Initiated
    Request Approval Rejected
    Request Closed
    Request Completed
    Request Created
    Request Failed
    Request Withdrawn
    Template Approval Rejected
    3. Now prepare the query from above sapmle, the requset status string should not contains foloowing values.
    Rejected
    Failed
    Closed
    Withdrawn
    Completed
    The builded query will give you the desired result for 11g
    for 10 G
    Get the OST_STATUS from Req table, and do you logic above stated
    -Kuldeep
    Edited by: Kuldeep on May 22, 2012 1:04 AM

  • Inventory inward pending query report problem

    Dear Sir,
                      we are using sap b1 2005 version     7.40.253
                 i am opening query manager icon and choose theinventory inward pending report then click ok button the error will be display
    1) [Microsoft][sql native client][sql server]conversion failed when converting the nvarchar value '31/05/2014' to data type int. 'Queries'(OUQR) 
    and i use the query like this:
    select distinct t0.docnum as 'Inventory Transfer Number', t0.filler as 'From Warehouse', t0.u_towhcode as 'To Warehouse',T0.DocDate from owtr t0 inner join wtr1 t1 on t0.docentry = t1.docentry inner join owhs t2 on t1.whscode = t2.whscode where t2.u_whty = 'IT' and t0.docnum not in(select distinct z0.u_bd from owtr z0 inner join owhs z1 on z0.filler = z1.whscode where z1.u_whty = 'IT' and isnull(z0.u_bd,0) != 0)

    Thanks for ur valuble support.....
    Thats query also working fine sir.....
    but the user told the drawback is lot of times repeated the doc number for every item.so pls combine  single document no and display total quantity  need not display item description ......
    i want display these colums only:
    1.inventory transfer no
    2.from where house
    3.To where house
    4.Posting date
    so can you please tell  another query sir .........................

  • Query to generate a report for incoming pending payments as per Item Group!

    Dear All,
    I need a Query to generate a report for incoming pending payments through Item Group.
    Please provide me the same.
    Thanks in advance..........................
    Edited by: Param Deshwal on Nov 22, 2011 7:11 AM

    Hi
         try this
    SELECT T0.[DocNum] as 'Invoice Number', T0.[DocDate] as 'Invoice Date', T0.[CardName], T0.[DocTotal] as 'Invoice Amount', T0.[PaidToDate] as 'Paid Amount',(T0.[DocTotal]-T0.[PaidToDate]) as 'Pending Amount',T3.[ItmsGrpnam] FROM OINV T0 Inner join inv1 t1 on t0.docentry=t1.docentry inner join oitm t2 on t2.itemcode=t1.itemcode inner join oitb t3 on t3.[ItmsGrpcod]=t2.[ItmsGrpcod] where T3.[ItmsGrpnam]=[%0] 
    Regards,
    sudhir B.
    Edited by: B.sudhir on Nov 22, 2011 7:28 AM

  • Query to find pending concurrent requests

    Hi All,
    Please provide query to find pending concurrent requests?
    Thanks & Regards
    Tharun

    Hi,
    Check this
    select COUNT (distinct cwr.request_id) Peding_Requests FROM apps.fnd_concurrent_worker_requests cwr, apps.fnd_concurrent_queues_tl cq, apps.fnd_user fu WHERE (cwr.phase_code = 'P' OR cwr.phase_code = 'R') AND cwr.hold_flag != 'Y' AND cwr.requested_start_date <= SYSDATE AND cwr.concurrent_queue_id = cq.concurrent_queue_id AND cwr.queue_application_id = cq.application_id and cq.LANGUAGE='US'
    AND cwr.requested_by = fu.user_id and cq.user_concurrent_queue_name
    in ( select unique user_concurrent_queue_name from apps.fnd_concurrent_queues_tl);
    http://4uappsdba.wordpress.com/2011/11/19/sql-to-find-pending-concurrent-requests/
    Regards
    Sri

  • Pending Incoming Payments Query

    I'm new in this Forum.
    My problem is to get the same information from "Banking -> Incoming Payments -> Incoming Payments (Documents for Payment)" in a query.
    I tried to know these tables through "Debug Information" but in these case I couldn't obtain them.
    Does anyone know which tables I need to retrieve these information from?
    Any reply will be welcome. Thanks a lot.

    Hi Josep,
    I think the table you are after is RCT2. The table structure for Incoming Payments is as follows:
    ORCT - Incoming Payment (header)
    RCT1 - Checks
    RCT2 - Invoices
    RCT3 - Credit Vouchers
    RCT4 - Account List
    RCT5 - Receipt VAT adjustment
    RCT6 - Withholding Tax
    RCT7 - Document Tax Amount
    If you have access to the SDK then this includes the database schema amongst the help files (in later versions of the SDK this can accessed through the SDK Help Center).
    Hope this helps,
    Owen

  • Submitt query button issue still pending  please give sulotion

    hi
    im facing problem submit query button . im working in as 10g r2. Every thing is working fine but when i click on submit query button of parameter form. it gives error and and page cant find. its reason that it takes localhost name in url and localhost(asserver.dht.com) is not recognized on internet. To resolve this issue i designed my own parameter form in html and in post method i use my domain name( www.ddgi.com) which is registered on internet. please give me solution so that i can use default parameter form. where from it picks machine name so that i can change it accoding to my domain name.
    My localhost name is asserver.dht.com
    my registered domain on internet is www.ddgi.com

    Hi,
    I'm facing almost the same problem. I'm working in AS 10G r2 as well. Our application is working with port:7779 and when I point on submit query button it refers to http://server_name/reports/rwservlet? but without :port option. When I run the same report on the server it works just fine but can't run on another station. I've already google it but can't find any suitable information.
    Thanks in advance!

  • Query tuning help required:

    I have a query which is taking long time. Is there any way I can improve the query to shorten its time of execution.
    I have given below the details of it.
    SQL> set pagesize 1000;
    SQL> set linesize 170;
    SQL> alter session set events '10046 trace name context forever, level 8';
    Session altered.
    Elapsed: 00:00:00.25
    SQL> SELECT   pa.regn_no,
      2             (SELECT mst.status_desc
      3                FROM m_status mst
      4               WHERE mst.trans_id = 'PA01'
      5                 AND mst.status_code = pa.regn_status) AS regn_status,
      6             (SELECT pp.NAME
      7                FROM people_profile pp
      8               WHERE pp.pp_id = pa.ident_no) AS NAME, pa.ident_no,
      9             TO_CHAR (pa.approval_date, 'dd/mm/yyyy') AS approval_date,
    10             TO_CHAR (pa.de_reg_date, 'dd/mm/yyyy') AS de_regist_date,
    11             TO_CHAR (pa.cert_reg_exp_date, 'dd/mm/yyyy') AS cert_expiry_date,
    12             pa.gender, pa.fax_no,
    13             (SELECT nationality_desc
    14                FROM people_profile pp, m_nationality
    15               WHERE pp.pp_id = pa.ident_no
    16                 AND pp.nationality = nationality_code) AS nationality,
    17             (SELECT pp.email_add
    18                FROM people_profile pp
    19               WHERE pp.pp_id = pa.ident_no) AS email_add,
    20             (SELECT pp.mobile_no
    21                FROM people_profile pp
    22               WHERE pp.pp_id = pa.ident_no) AS mobile_no,
    23             TO_CHAR ((SELECT pp.birth_date
    24                      FROM people_profile pp
    25                     WHERE pp.pp_id = pa.ident_no),
    26                   'dd/mm/yyyy'
    27                  ) AS birth_date,
    28             REPLACE (sf_get_address_people (pa.ident_no, '2', 'C'),
    29                   '<br>',
    30                   CHR (10)
    31                  ) AS address,
    32             sf_get_pa_firm_info (pa.ident_no) AS firm_profile,
    33             sf_get_pa_firm_partner (pa.ident_no) AS firm_partner,
    34             sf_get_pa_pmp_code (pa.ident_no) AS pmp_code, ppv.pae_name,
    35             ppv.pmp_code AS pmp_code_1, ppv.cycle_no, ppv.seq_no,
    36             DECODE (ppv.visit_type,
    37                  'I', 'INITIAL',
    38                  'R', 'REVISIT',
    39                  ''
    40                 ) AS visit_type,
    41             TO_CHAR (ppv.initial_ltr_date, 'dd/mm/yyyy') AS initial_ltr_date,
    42             TO_CHAR (ppv.sec_ltr_date, 'dd/mm/yyyy') AS sec_ltr_date,
    43             TO_CHAR (ppv.review_from, 'dd/mm/yyyy') AS review_from,
    44             TO_CHAR (ppv.review_to, 'dd/mm/yyyy') AS review_to,
    45             TO_CHAR (ppv.finding_date, 'dd/mm/yyyy') AS finding_date,
    46             TO_CHAR (ppv.finding_due_date, 'dd/mm/yyyy') AS finding_due_date,
    47             TO_CHAR (ppv.finding_reply_date,
    48                   'dd/mm/yyyy'
    49                  ) AS finding_reply_date,
    50             ppv.pmsc,
    51             TO_CHAR (ppv.clarif_ltr_date, 'dd/mm/yyyy') AS clarif_ltr_date,
    52             ppv.paoc_date,
    53             TO_CHAR (ppv.final_paoc_date, 'dd/mm/yyyy') AS final_paoc_date,
    54             (SELECT result_desc
    55                FROM m_pmp_result ms
    56               WHERE result_id = ppv.pmp_status) AS pmp_status,
    57             TO_CHAR (ppv.suspension_end_date,
    58                   'dd/mm/yyyy'
    59                  ) AS suspension_end_date,
    60             TO_CHAR (ppv.final_ltr_date, 'dd/mm/yyyy') AS final_ltr_date,
    61             ppv.findings_summary,
    62             TO_CHAR (ppv.invoice_date, 'dd/mm/yyyy') AS invoice_date,
    63             ppv.amount_billed,
    64             TO_CHAR (ppv.payment_date, 'dd/mm/yyyy') AS payment_date,
    65             DECODE (ppv.pay_icpas,
    66                  'Y', 'YES',
    67                  'N', 'NO',
    68                  'V', 'NA',
    69                  ''
    70                 ) AS pay_icpas,
    71             ppv.updated_date, ppv.updated_by, ppv.remarks,
    72             DECODE ((SELECT ppr.review_status
    73                     FROM pa_pmp_reviews ppr
    74                    WHERE ppr.regn_no = ppv.regn_no
    75                      AND ppr.cycle_no = ppv.cycle_no),
    76                  'P', 'In Progress',
    77                  'C', 'Closed',
    78                  ''
    79                 ) AS review_status,
    80             pcl.complaint_no,
    81             DECODE (pcl.complaint_status,
    82                  'P', 'Pending',
    83                  'C', 'Closed',
    84                  ''
    85                 ) AS complaint_status,
    86             pcl.remarks AS remarks_1,
    87             DECODE (pcl.complaint_outcome,
    88                  'C', 'Cancelled',
    89                  'R', 'Restriction of Practice',
    90                  'P', 'Penalty (Fine) - Disciplinary',
    91                  'E', 'Censure - Disciplinary',
    92                  'S', 'Suspended - Disciplinary',
    93                  ''
    94                 ) AS complaint_outcome,
    95             TO_CHAR (pcl.complaint_date, 'dd/mm/yyyy') AS complaint_date,
    96             pcl.complainant_nric, pcl.complainant_name, pcl.complaint_details,
    97             TO_CHAR (pcl.effective_date, 'dd/mm/yyyy') AS effective_date,
    98             TO_CHAR (pcl.effective_date_to,
    99                   'dd/mm/yyyy') AS effective_date_to,
    100             sf_get_pa_exam_info (pa.regn_no, 'L') AS local_exam_detail,
    101             sf_get_pa_exam_info (pa.regn_no, 'F') AS foreign_exam_detail,
    102             sf_get_pa_exempt_info (pa.regn_no) AS exempt_detail
    103           FROM pa_profile pa, pa_pmp_visits ppv, pa_complaint pcl
    104          WHERE pa.regn_no = ppv.regn_no(+) AND pa.regn_no = pcl.regn_no(+)
    105       ORDER BY pa.regn_no DESC;
    1163 rows selected.
    Elapsed: 00:02:08.87
    Execution Plan
    Plan hash value: 2912197266
    | Id  | Operation                    | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                  |  1109 |   330K|    17  (12)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID | M_STATUS         |     1 |    23 |     2   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN           | PK_M_STATUS      |     1 |       |     1   (0)| 00:00:01 |
    |   3 |  TABLE ACCESS BY INDEX ROWID | PEOPLE_PROFILE   |     1 |    25 |     3   (0)| 00:00:01 |
    |*  4 |   INDEX UNIQUE SCAN          | SYS_C00103408    |     1 |       |     2   (0)| 00:00:01 |
    |   5 |  NESTED LOOPS                |                  |     1 |    26 |     4   (0)| 00:00:01 |
    |   6 |   TABLE ACCESS BY INDEX ROWID| PEOPLE_PROFILE   |     1 |    12 |     3   (0)| 00:00:01 |
    |*  7 |    INDEX UNIQUE SCAN         | SYS_C00103408    |     1 |       |     2   (0)| 00:00:01 |
    |*  8 |   INDEX RANGE SCAN           | PK_M_NATIONALITY |     1 |    14 |     1   (0)| 00:00:01 |
    |   9 |  TABLE ACCESS BY INDEX ROWID | PEOPLE_PROFILE   |     1 |    20 |     3   (0)| 00:00:01 |
    |* 10 |   INDEX UNIQUE SCAN          | SYS_C00103408    |     1 |       |     2   (0)| 00:00:01 |
    |  11 |  TABLE ACCESS BY INDEX ROWID | PEOPLE_PROFILE   |     1 |    11 |     3   (0)| 00:00:01 |
    |* 12 |   INDEX UNIQUE SCAN          | SYS_C00103408    |     1 |       |     2   (0)| 00:00:01 |
    |  13 |  TABLE ACCESS BY INDEX ROWID | PEOPLE_PROFILE   |     1 |    10 |     3   (0)| 00:00:01 |
    |* 14 |   INDEX UNIQUE SCAN          | SYS_C00103408    |     1 |       |     2   (0)| 00:00:01 |
    |  15 |  TABLE ACCESS BY INDEX ROWID | M_PMP_RESULT     |     1 |    37 |     1   (0)| 00:00:01 |
    |* 16 |   INDEX UNIQUE SCAN          | XPK_M_PMP_RESULT |     1 |       |     0   (0)| 00:00:01 |
    |  17 |  TABLE ACCESS BY INDEX ROWID | PA_PMP_REVIEWS   |     1 |     8 |     1   (0)| 00:00:01 |
    |* 18 |   INDEX UNIQUE SCAN          | SYS_C00103321    |     1 |       |     0   (0)| 00:00:01 |
    |  19 |  SORT ORDER BY               |                  |  1109 |   330K|    17  (12)| 00:00:01 |
    |* 20 |   HASH JOIN RIGHT OUTER      |                  |  1109 |   330K|    16   (7)| 00:00:01 |
    |  21 |    TABLE ACCESS FULL         | PA_COMPLAINT     |   146 | 20294 |     3   (0)| 00:00:01 |
    |* 22 |    HASH JOIN RIGHT OUTER     |                  |  1109 |   179K|    13   (8)| 00:00:01 |
    |  23 |     TABLE ACCESS FULL        | PA_PMP_VISITS    |    90 | 11340 |     3   (0)| 00:00:01 |
    |  24 |     TABLE ACCESS FULL        | PA_PROFILE       |  1109 | 44360 |     9   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("MST"."TRANS_ID"='PA01' AND "MST"."STATUS_CODE"=:B1)
           filter("MST"."STATUS_CODE"=:B1)
       4 - access("PP"."PP_ID"=:B1)
       7 - access("PP"."PP_ID"=:B1)
       8 - access("PP"."NATIONALITY"="NATIONALITY_CODE")
      10 - access("PP"."PP_ID"=:B1)
      12 - access("PP"."PP_ID"=:B1)
      14 - access("PP"."PP_ID"=:B1)
      16 - access("RESULT_ID"=:B1)
      18 - access("PPR"."REGN_NO"=:B1 AND "PPR"."CYCLE_NO"=:B2)
      20 - access("PA"."REGN_NO"="PCL"."REGN_NO"(+))
      22 - access("PA"."REGN_NO"="PPV"."REGN_NO"(+))
    Statistics
          17577  recursive calls
              0  db block gets
        8703644  consistent gets
           6138  physical reads
              0  redo size
         424453  bytes sent via SQL*Net to client
           3641  bytes received via SQL*Net from client
             13  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
           1163  rows processed
    NAME                                 TYPE        VALUE
    user_dump_dest                       string      /opt/app/oracle/diag/rdbms/ebi
                                                     zfile/EBIZFILE/trace
    SQL> show parameter optimizer
    NAME                                 TYPE        VALUE
    optimizer_capture_sql_plan_baselines boolean     FALSE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      11.2.0.1
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    optimizer_use_invisible_indexes      boolean     FALSE
    optimizer_use_pending_statistics     boolean     FALSE
    optimizer_use_sql_plan_baselines     boolean     TRUE
    SQL> show parameter db_file_multi
    NAME                                 TYPE        VALUE
    db_file_multiblock_read_count        integer     128
    SQL> show parameter db_block_size
    NAME                                 TYPE        VALUE
    db_block_size                        integer     8192
    SQL> show parameter cursor_sharing
    NAME                                 TYPE        VALUE
    cursor_sharing                       string      EXACT
    SQL>
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL>
    SQL> select
      2  sname, pname, pval1, pval2
      3  from
      4  sys.aux_stats$;
    SNAME                PNAME                     PVAL1 PVAL2
    SYSSTATS_INFO        STATUS                          COMPLETED
    SYSSTATS_INFO        DSTART                          11-20-2009 09:46
    SYSSTATS_INFO        DSTOP                           11-20-2009 09:46
    SYSSTATS_INFO        FLAGS                         1
    SYSSTATS_MAIN        CPUSPEEDNW           1676.76768
    SYSSTATS_MAIN        IOSEEKTIM                    10
    SYSSTATS_MAIN        IOTFRSPEED                 4096
    SYSSTATS_MAIN        SREADTIM
    SYSSTATS_MAIN        MREADTIM
    SYSSTATS_MAIN        CPUSPEED
    SYSSTATS_MAIN        MBRC
    SYSSTATS_MAIN        MAXTHR
    SYSSTATS_MAIN        SLAVETHR

    Hi,
    obviously the problem you are having is described by the following lines of your execution plan
    SORT ORDER BY | | 1109 | 330K| 17 (12)| 00:00:01 |
    |* 20 | HASH JOIN RIGHT OUTER | | 1109 | 330K| 16 (7)| 00:00:01 |
    | 21 | TABLE ACCESS FULL | PA_COMPLAINT | 146 | 20294 | 3 (0)| 00:00:01 |
    |* 22 | HASH JOIN RIGHT OUTER | | 1109 | 179K| 13 (8)| 00:00:01 |
    | 23 | TABLE ACCESS FULL | PA_PMP_VISITS | 90 | 11340 | 3 (0)| 00:00:01 |
    | 24 | TABLE ACCESS FULL | PA_PROFILE | 1109 | 44360 | 9
    You don't have a "real" "WHERE" condition in the query that could lead the Oracle CBO to consider using an index.
    This leads to a full scan of PA_PMP_VISITS and PA_PROFILE and subsequently -in order to process the join condition between these two tables-
    to this "HASH JOIN RIGHT OUTER". You cannot avoid this, with the current WHERE condition ...
    Following thoughts :
    1) Try narrowing down your result set by specifying a "real" WHERE Condition on one of the two tables, specifying an indexed column
    2) If this cannot be done, try using query parallelism (parallel hint). This will give you acceptable SQL-execution times.
    3) If this is not possible, there would be a third approach : You could consider the definition of an index on "pa.regn" and use a hint on your query in order to use it. Due to your order condition there is a possibility that CBO is going to use it, especially if you specify WHERE ROWNUM < ...
    Regards,
    Michalis

  • Query PLD

    Hi All
    Iam designing a PLD for Query Report
    *In the PLD iam designing the Report  for Open Purchase Order Status Report Query run fine but the problem came under designing the Document.My Query as above.
    My Client have requirement not repeat the PO No, PO Date,Due Date and Vendor Name that's row level record not repeated.(Under that row level record repeat (For Eg : Item Code,Item Description,Order Qty,PO Amount etc)  But it is possible from me in Query PLD.
    SELECT
    T1.DocNum,T1.CardName as "Vendor Name",t0.[Itemcode],t0.[dscription],T0.[Project] as "Project Name",
    T1.[DocDate] as "PO Date",
    T0.[ShipDate] as "Due Date",
    Sum(T0.[Quantity]) as "Order Qty",
    Sum(T0.[LineTotal]) as "PO Amount",
    Sum(T0.[OpenQty]) as "Pending Qty", 
    Sum(((T0.[OpenQty]) * (T0.[Price]))) as "Pending Amount"
    FROM
    [dbo].[POR1]  T0 INNER JOIN [dbo].[OPOR] T1 ON T0.DocEntry = T1.DocEntry left join OPDN T2 ON T2.DocEntry = T0.TrgetEntry
    WHERE
    T1.[DocDate]  >=[%0] and T1.[DocDate]  <= [%1]  and t1.[Docstatus] = 'O' and t0.[linestatus] = 'O'
    Group By
    t0.[Itemcode],t0.[dscription],T1.[CardName], T1.[DocNum], T1.[DocDate], T0.[ShipDate],
    T0.[Project], T2.[DocDate]
    order by
    T1.DocDate
    Regards
    Amol

    Hi Amol,
    Note: All SELECT statement fields will be Stored and Display in Repetetive Area1. and
    Parameter Fields are in Repetetive Area0 so you can Try to Copy & Paste the Field_ID's to Repetetive Area Header (or) Repetetive Area Footer.
    for example.
    Try this,
    ->> Open the QPLD and Goto Field index Window, then
    ->> Select the Repetetive Area Header & Repetetive Area Footer increase the Height on Properties Window.
    ->> Create the Formula fields in Repetetive Area Header & Repetetive Area Footer.
    ->> Which Field you want to print in header or footer. Drag the Field ID(in Repetetive Area) Copy & Paste to Formula Field.
    ->> Select the Repetetive Area 1 on Field Index Window.
    ->> Goto the Print Layout Designer on Tool bar.
    ->> Click Repetetive Area. -> Sort...
    ->> Open the Sort Widnow and Select the Requrie fields by sort.
    ELSE Try this,
    ->> Click the Repetetive Area Footer 1.
    ->> then, Right Click in Repetetive Area Footer 1.
    ->> Choose the GROUP -> 1. then,
    ->> Create the Formula Fields in Repetetive Area Footer 1 and copy paste field ID's from Repetetive Area 1.
    ->> Select the Repetetive Area 1 on Field Index Window.
    ->> Goto the Print Layout Designer on Tool bar.
    ->> Click Repetetive Area. -> Sort...
    ->> Open the Sort Widnow and Select the Requrie fields by sort.
    Ex.
    ->> Select Field Name, Sort by, Order, Summary, New Page.
    ->Select Field Name (Sort by) -> DocNo or CardCode,
    Sort Type - Alpha.
    Order -> Descending (or) Ascending.
    Summary -> Select the Tick Mark.
    New Page -> UnCheck the Tick Mark because if you need the second page Print of GROUP BY.
    You can select the Tick Mark in New Page.
    SAVE IT and see the Print Preview. it will be get exact Print. .
    Check the below thread, You will be get some idea or solution.
    Re: Two Repetitive areas in one PLD
    Regards,
    Madhan.

  • Report to view pending Purchase Order for Release

    Hi,
    Is there any sap standard report through which we can view pending Purchase Order for Release.
    Regards,

    Hi,
    you can use transaction ME28, this can give information of pending purchase order for release on release level.
    but this transaction is used for releasing the collective release for purchase order. this is not an report.
    if you want transaction for reporting purpose only, you need to create a report or query on EKKO table. based on release indicator.
    vikas,

  • Pending quantity report for a manufacuting firm

    Hi Guys,
    I need a report to know the daily pending quantity report for a manufacturing company..
    I have tried a query and to some extent its working fine.. i need some more changes in the query.
    The report should be look lie below,
    ITEMCODE,ITEMNAME,ORDERED QUANTITY,ORDERED VALUE,SALES QTY(DELIVERED QTY),SALES VALUE,PENDING QTY,PENDING VALUE ,SHORTFALL(IF THE INSTOCK QTY IS LESS THAN PENDING QTY).
    Here there are using 5 different price lists.
    and the above report has to be classifed seperately for each price list seperately and also in the given period if there is a item which has not been ordered then it also be needs to list in the report with eventhoug it dont have any values .
    Could anybody pls modify the below query.
    SELECT T1.ItemCode, Max(T1.[Dscription]) As 'Item Description' ,t3.price as 'Unit Price/PC',Sum(T1.[OrderedQty]) as 'Ordered Qty' ,(Sum(T1.[OrderedQty]) * t3.price ) as 'Ordered Value' , Sum(T1.[Quantity]) as 'Del Qty',(Sum(T1.[Quantity]) * t3.price) as 'Sales Value',(Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) as 'Pending Qty',((Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) * t3.price) as 'Pending Value',T2.OnHand, (T2.OnHand - (Sum(T1.[Quantity]) - Sum(T1.[OrderedQty]))) as 'SHORT'
    FROM ODLN T0 
    INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ITEMCODE = T2.ITEMCODE
    inner join itm1 t3 on t1.itemcode = t3.itemcode
    inner join opln t4 on t3.pricelist = t4.listnum
    WHERE T0.[DocDate] >=[%0] AND  T0.[DocDate] <=[%1] and t4.listname = '[%2]'
    Group By T1.ItemCode,T2.OnHand,t4.listname,t3.price

    Try this query
    SELECT T1.ItemCode, Max(T1.[Dscription]) As 'Item Description' ,t3.price as 'Unit Price/PC',Sum(T1.[OrderedQty]) as 'Ordered Qty' ,(Sum(T1.[OrderedQty]) * t3.price ) as 'Ordered Value' , Sum(T1.[Quantity]) as 'Del Qty',(Sum(T1.[Quantity]) * t3.price) as 'Sales Value',(Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) as 'Pending Qty',((Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) * t3.price) as 'Pending Value',T2.OnHand, (T2.OnHand - (Sum(T1.[Quantity]) - Sum(T1.[OrderedQty]))) as 'SHORT'
    FROM ODLN T0 
    INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ITEMCODE = T2.ITEMCODE
    left join itm1 t3 on t1.itemcode = t3.itemcode
    left join opln t4 on t3.pricelist = t4.listnum
    WHERE T0.[DocDate] >='[%0]' AND  T0.[DocDate] <='[%1]' and t4.listname = '[%2]'
    Group By T1.ItemCode,T2.OnHand,t4.listname,t3.price
    union all
    select B.ItemCode, B.ItemName,D.Price,SUM(C.OnOrder), 0,0,0,0,0,SUM(C.OnHand),SUM(C.OnHand)-SUM(C.OnOrder)
    from OITM B
    INNER JOIN OITW C ON B.ItemCode = C.ItemCode
    INNER JOIN ITM1 D ON C.ItemCode=D.ItemCode
    WHERE B.ItemCode NOT IN (SELECT T1.ItemCode FROM ODLN T0 
    INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ITEMCODE = T2.ITEMCODE
    left join itm1 t3 on t1.itemcode = t3.itemcode
    left join opln t4 on t3.pricelist = t4.listnum
    WHERE T0.[DocDate] >='[%0]' AND  T0.[DocDate] <='[%1]' and t4.listname = '[%2]' )
    GROUP BY B.ItemCode, B.ItemName, D.Price
    Regards,
    Bala
    Edited by: Balakumar Viswanathan on Nov 15, 2010 4:23 PM

Maybe you are looking for

  • Image size and output restrictions

    Do I understand it correctly, that it isn't possible to even open larger files than 1600x1600 in this app and the only local output possibility is a low quality jpeg? it's not mentioned in the description or tech data (why? ) just in some of the revi

  • My RAM is not working correctly

    Ok so I know that I need to upgrade from 1GB of RAM to 2. But it used to run just fine with one.MY main thing I do is Run traktor DJ studio with it. I used to be able to run Traktor and surf the web at the same time. I went to activity monitor and lo

  • How can I fix my front camera

    Guys I need your help I can't use my camera when I reverse it in front of me but when I reverse it again it would work what should I do can you really pls help me I only use my camera twice and now I can't use it anymore.  Pls answer............

  • Access Outlook Shared/Delegated contacts in Word 2010's Quick Access Toolbar (QAT)

    Hello Nerds, Is there any way to access Outlook Shared/Delegated contacts in Word 2010's Quick Access Toolbar (QAT). I am able to see shared/delegated contacts in Outlook by clicking "Open Shared Contacts" but Word's 2010 QAT does not have any option

  • Musicapp, speaker and volume control won't work since updated to iOS 7.1

    Since I updated my iPhone 4 to iOS 7.1 my iPhone works faster than iOS 7. But some apps like musicapp, youtube have no volume control and the speakers won't work. When somebody call me the iPhone rings normally. I tried turn off bluetooth because I t