DBA Data[Home] [Help]

APPS.PO_REQAPPROVAL_FINDAPPRV1 SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 70

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 106

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 141

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 280

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 334

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 385

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 393

        /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 451

        /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 465

                  /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 472

                    /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 492

                     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 503

         /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 647

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 684

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 725

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 760

     SELECT full_name
     INTO   l_disp_name
     FROM   PER_ALL_PEOPLE_F    -- 
     WHERE  person_id = l_id
     AND    trunc(sysdate) BETWEEN effective_start_date
                               AND effective_end_date;
Line: 778

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 817

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 858

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 895

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 943

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 979

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1026

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1064

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1114

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1153

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1201

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1245

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1267

        /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1283

            /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1300

            /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1311

         /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1345

        /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1370

    Select ORIG_SYSTEM_ID
    from WF_USERS
    where name = username;
Line: 1398

SELECT HR.PERSON_ID
FROM   FND_USER FND, PO_WORKFORCE_CURRENT_X HR     --
WHERE  FND.USER_NAME = username
AND    FND.EMPLOYEE_ID = HR.PERSON_ID
AND    ROWNUM = 1;
Line: 1467

    Select default_approval_path_id into l_approval_path_id
    FROM   po_document_types podt
    WHERE  podt.document_type_code = l_document_type_code
    AND    podt.document_subtype = l_document_subtype;
Line: 1481

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1513

  SELECT FORWARDING_MODE_CODE into l_forward_mode
  from po_document_types
   where  document_subtype   = l_document_subtype
   and    document_type_code = l_document_type_code;
Line: 1538

  SELECT  NVL(use_positions_flag, 'N') into l_use_positions_flag
  from financials_system_parameters;
Line: 1581

** check to select the supervisor if the  assignment type E.
** Also modified the SQLs slightly to ensure that no more inline
** SQLs to improve performance.
** Also added CWK assignment type
*/

CURSOR c1 (p_empid NUMBER, p_business_group_id NUMBER) IS
SELECT pafe.supervisor_id
FROM   Per_All_Assignments_f pafe,  -- 
       Per_All_People_f ppfs,       -- 
       Per_All_Assignments_f pafs,  -- 
       Per_Person_Types ppts
WHERE  pafe.business_group_id = p_business_group_id
       AND pafe.person_id = p_empid
       AND Trunc(SYSDATE) BETWEEN pafe.Effective_Start_Date
                              AND pafe.Effective_End_Date
       AND pafe.Primary_Flag = 'Y'
       AND pafe.Assignment_Type IN ('E','C')
       AND ppfs.Person_Id = pafe.Supervisor_Id
       AND Trunc(SYSDATE) BETWEEN ppfs.Effective_Start_Date
                              AND ppfs.Effective_End_Date
       AND pafs.Person_Id = ppfs.Person_Id
       AND Trunc(SYSDATE) BETWEEN pafs.Effective_Start_Date
                              AND pafs.Effective_End_Date
       AND pafs.Primary_Flag = 'Y'
       AND pafs.Assignment_Type IN ('E','C')
       AND ppts.Person_Type_Id = ppfs.Person_Type_Id
       AND ppts.System_Person_Type IN ('EMP','EMP_APL','CWK');   --
Line: 1612

** check to select the supervisor if the assignment type E.
** Also modified the SQLs slightly to ensure that no more inline
** SQLs to improve performance.
** Also added CWK assignment type
*/

CURSOR C2 ( p_empid NUMBER ) IS
SELECT Pafe.supervisor_id
FROM   Per_All_Assignments_f pafe,  -- 
       Per_All_People_f ppfs,       -- 
       Per_All_Assignments_f pafs,  -- 
       Per_Person_Types ppts
WHERE  pafe.person_id = p_empid
       AND Trunc(SYSDATE) BETWEEN pafe.Effective_Start_Date
                              AND pafe.Effective_End_Date
       AND pafe.Primary_Flag = 'Y'
       AND pafe.Assignment_Type IN ('E','C')
       AND ppfs.Person_Id = pafe.Supervisor_Id
       AND Trunc(SYSDATE) BETWEEN ppfs.Effective_Start_Date
                              AND ppfs.Effective_End_Date
       AND Pafs.Person_Id = ppfs.Person_Id
       AND Trunc(SYSDATE) BETWEEN pafs.Effective_Start_Date
                              AND pafs.Effective_End_Date
       AND pafs.Primary_Flag = 'Y'
       AND pafs.Assignment_Type IN ('E','C')
       AND ppts.Person_Type_Id = ppfs.Person_Type_Id
       AND ppts.System_Person_Type IN ('EMP','EMP_APL','CWK');   --
Line: 1664

 SELECT business_group_id
 INTO   l_business_group_id
 FROM   FINANCIALS_SYSTEM_PARAMETERS;
Line: 1683

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 1854

  SELECT /*+ LEADING(POEH) */POEH.superior_id, poeh.superior_level, HREC.full_name
  FROM   PO_EMPLOYEES_CURRENT_X HREC,   -- 
         PO_EMPLOYEE_HIERARCHIES POEH
  WHERE  POEH.position_structure_id = p_approval_path_id
  AND    POEH.employee_id = p_empid
  AND    HREC.employee_id = POEH.superior_id
  AND    POEH.superior_level > 0
  UNION ALL
  SELECT /*+ LEADING(POEH) */ poeh.superior_id, poeh.superior_level, cwk.full_name
  FROM   PO_WORKFORCE_CURRENT_X cwk,  -- 
         po_employee_hierarchies poeh
  WHERE  poeh.position_structure_id = p_approval_path_id
  AND    poeh.employee_id = p_empid
  AND    cwk.person_id = poeh.superior_id
  AND    poeh.superior_level > 0
  AND    nvl(fnd_profile.value('HR_TREAT_CWK_AS_EMP'),'N') = 'Y'
  ORDER BY superior_level, full_name;
Line: 1907

     /* DEBUG */  PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
Line: 2065

	select NVL(can_preparer_approve_flag,'N')
	from po_document_types
	where document_type_code = p_document_type_code
	and   document_subtype = p_document_subtype;