Monday, 31 October 2011

PO_REQ_UPDATE_QRY

/* Formatted on 15-09-2011 10:13:09 (QP5 v5.115.810.9015) */
select SEGMENT1, ORG_ID from po_requisition_headers_all where  AUTHORIZATION_STATUS  =
      'APPROVED'
CREATE TABLE PO_REQUISITION_LINES_ALL_BKPUP
AS
   SELECT   * FROM po_requisition_lines_all
SELECT   REQS_IN_POOL_FLAG ,   ORG_ID
  FROM   po_requisition_lines_all
 WHERE   REQUISITION_HEADER_ID IN
               (SELECT   REQUISITION_HEADER_ID
                  FROM   po_requisition_headers_all
                 WHERE   AUTHORIZATION_STATUS = 'APPROVED')
                 and REQS_IN_POOL_FLAG IS NOT NULL
                
UPDATE   po_requisition_lines_all
   SET   REQS_IN_POOL_FLAG = 'Y'
 WHERE   REQUISITION_HEADER_ID IN
               (SELECT   REQUISITION_HEADER_ID
                  FROM   po_requisition_headers_all
                 WHERE   AUTHORIZATION_STATUS = 'APPROVED')
         AND REQS_IN_POOL_FLAG IS NULL
                
 

3 comments:

  1. Why we are not using PO_REQUISITION_UPDATE_PUB.update_requisition APi to update this?

    ReplyDelete
    Replies
    1. Hi
      Ankita,

      Do you have script to update REQS_IN_POOL_FLAG in PO_REQUISITION_LINES_ALL table with API PO_REQUISITION_UPDATE_PUB.update_requisition?

      Delete
    2. HI Ankita,
      this api has a bug where the approved requisitions will bechanged to In complete or In Process depending on the submit approval parameter.

      Delete