7 Replies Latest reply on Aug 3, 2016 12:53 PM by Mat Tyndall-Oracle

    Purge program in purchasing

    3021894

      Hello,

       

      there are few purchase requisitions which did not purge after running purge program in purchasing superuser resp., will you please tell me reason? why?

       

      regards,

      vivek shokeen

        • 1. Re: Purge program in purchasing
          Jagadekara

          Hi,

           

          Which program you ran and for which parameter values you given?

          • 2. Re: Purge program in purchasing
            3021894

            I have given the parameter 205 and program i ran was PRC: Purge System Saved Requisition and those PO are of 2005 (year)

            • 3. Re: Purge program in purchasing
              Jagadekara

              Ok.

               

              In R 12.1.3 we don't have such program.

               

              If possible just check the query for that program.

              • 4. Re: Purge program in purchasing
                3021894

                This exists in 11i

                 

                program name is :  Purge System Saved Requisition

                • 5. Re: Purge program in purchasing
                  3021894

                  how to check the query ...it is non pl/sql procedure..i think it is standard

                  • 6. Re: Purge program in purchasing
                    Jagadekara

                    Ok.

                     

                    What is the Execution Method?

                    • 7. Re: Purge program in purchasing
                      Mat Tyndall-Oracle

                      The package PO_AP_PURGE_PVT  has the main code that inserts reqs for delete into a list.

                       

                      See Select below for criteria

                       

                       

                        25 /* $Header: /podev/po/12.0/patch/115/sql/RCS/POXVPUDB.pls,v 120.10 2013/02/10 12:22:29 vegajula ship $ */

                      ...............................................

                      1646  -- SQL What: Generate a list of requisitions that are eligible for purging

                        1647  -- SQL Why: This is the initial list of reqs to be purged. Later on the

                        1648  -- records in this list will be removed if the records are no

                        1649  -- longer eligible for purging after additional rules are applied

                        1650

                      1651  INSERT INTO po_purge_req_list

                        1652 ( requisition_header_id,

                        1653 purge_name,

                        1654 double_check_flag

                        1655 )

                        1656  SELECT  PRH.requisition_header_id,

                        1657 p_purge_name,

                        1658  'Y'

                        1659  FROM  po_requisition_headers PRH

                        1660  WHERE  PRH.last_update_date <= p_last_activity_date

                        1661  AND  (PRH.closed_code = 'FINALLY CLOSED'

                        1662  OR PRH.authorization_status = 'CANCELLED')

                        1663  AND   NOT EXISTS

                        1664 (SELECT NULL

                        1665  FROM  po_requisition_lines PRL

                        1666  WHERE  PRL.requisition_header_id = PRH.requisition_header_id

                        1667  AND  NVL(PRL.modified_by_agent_flag, 'N') = 'N'

                        1668  AND  (PRL.last_update_date > p_last_activity_date

                        1669  OR

                        1670 PRL.line_location_id IS NOT NULL

                        1671  OR

                        1672 PRL.source_type_code = 'INVENTORY'

                        1673  OR

                        1674  EXISTS (

                        1675  SELECT  NULL

                        1676  FROM  po_price_differentials PPD

                        1677  WHERE  PPD.entity_type = 'REQ LINE'

                        1678  AND  PPD.entity_id = PRL.requisition_line_id

                        1679  AND  PPD.last_update_date >

                        1680 p_last_activity_date)

                        1681  OR

                        1682  EXISTS (

                        1683  SELECT  NULL

                        1684  FROM  po_req_distributions PRD

                        1685  WHERE  PRD.requisition_line_id =

                        1686 PRL.requisition_line_id

                        1687  AND  PRD.last_update_date >

                        1688 p_last_activity_date)));