DBA Data[Home] [Help]

APPS.PO_REQ_DOCUMENT_CHECKS_PVT SQL Statements

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

Line: 89

    INSERT INTO PO_SESSION_GT
    ( key
    )
    SELECT l_procedure_id
    FROM DUAL
    WHERE
      EXISTS (select null from po_requisition_headers h
        WHERE h.requisition_header_id = p_req_header_id(i)
        AND (h.authorization_status is NULL
             OR h.authorization_status NOT IN ('PRE-APPROVED', 'IN PROCESS'))
        AND (h.cancel_flag is null or h.cancel_flag <> 'Y')
        AND (h.closed_code is NULL or h.closed_code NOT IN ('FINALLY CLOSED')))
      AND (p_req_line_id(i) IS NULL
        OR EXISTS (SELECT null from po_requisition_lines l
        WHERE l.requisition_header_id = p_req_header_id(i)
        and l.requisition_line_id = p_req_line_id(i)
        AND (l.cancel_flag is null or l.cancel_flag <> 'Y')
        AND (l.closed_code is NULL or l.closed_code NOT IN ('FINALLY CLOSED'))
        AND nvl(l.modified_by_agent_flag, 'N') = 'N'))
    ;
Line: 147

DELETE FROM po_session_gt
WHERE key = l_procedure_id;
Line: 239

    INSERT INTO PO_SESSION_GT
    ( key
    )
    SELECT l_procedure_id
    FROM DUAL
    WHERE
      EXISTS (select null from po_requisition_headers h
        WHERE h.requisition_header_id = p_req_header_id(i)
        AND (h.authorization_status is NULL
             OR h.authorization_status NOT IN ('APPROVED'))
        AND (h.closed_code is NULL or h.closed_code IN ('OPEN', 'CLOSED')))
      AND (p_req_line_id(i) IS NULL
        OR EXISTS (SELECT null from po_requisition_lines l
        WHERE l.requisition_header_id = p_req_header_id(i)
        and l.requisition_line_id = p_req_line_id(i)
        AND (l.closed_code is NULL or l.closed_code IN ('OPEN', 'CLOSED'))))
    ;
Line: 279

DELETE FROM po_session_gt
WHERE key = l_procedure_id;
Line: 371

    INSERT INTO PO_SESSION_GT
    ( key
    )
    SELECT l_procedure_id
    FROM DUAL
    WHERE
      EXISTS (select null from po_requisition_headers h
        WHERE h.requisition_header_id = p_req_header_id(i)
        AND (h.closed_code is NULL or h.closed_code IN ('OPEN', 'CLOSED')))
      AND (p_req_line_id(i) IS NULL
        OR EXISTS (SELECT null from po_requisition_lines l
        WHERE l.requisition_header_id = p_req_header_id(i)
        AND l.requisition_line_id = p_req_line_id(i)
        AND (l.closed_code is NULL or l.closed_code IN ('OPEN', 'CLOSED'))))
    ;
Line: 409

DELETE FROM po_session_gt
WHERE key = l_procedure_id;
Line: 497

delete from po_headers_gt;
Line: 503

    INSERT
      INTO po_headers_gt
      ( AGENT_ID, TYPE_LOOKUP_CODE, LAST_UPDATE_DATE, LAST_UPDATED_BY,
        SEGMENT1, SUMMARY_FLAG, ENABLED_FLAG,
        authorization_status, closed_code,
        cancel_flag, PO_HEADER_ID)
    SELECT
      -1, TYPE_LOOKUP_CODE, LAST_UPDATE_DATE, LAST_UPDATED_BY,
      SEGMENT1, SUMMARY_FLAG, ENABLED_FLAG,
      NVL(authorization_status, 'INCOMPLETE'),  nvl(closed_code, 'OPEN'),
      NVL(cancel_flag, 'N'), l_sequence(i)
      FROM po_requisition_headers h
      WHERE h.requisition_header_id = p_req_header_id(i)
    ;
Line: 522

    UPDATE po_headers_gt gt
      SET (closed_code, cancel_flag)
      =
      (SELECT nvl(closed_code, 'OPEN'), NVL(cancel_flag, 'N')
      FROM po_requisition_lines s
      WHERE s.requisition_line_id = p_req_line_id(i))
    WHERE p_req_line_id(i) is not null and gt.po_header_id = l_sequence(i)
    ;
Line: 536

SELECT
  authorization_status, closed_code,
  cancel_flag
BULK COLLECT INTO
  x_req_status_rec.authorization_status, x_req_status_rec.closed_code,
  x_req_status_rec.cancel_flag
FROM po_headers_gt
ORDER BY PO_HEADER_ID;
Line: 645

IF INSTR(p_mode, G_CHECK_UPDATEABLE) > 0 THEN

    check_updatable (
        p_count => l_count,
        p_req_header_id => p_req_header_id,
        p_req_line_id => p_req_line_id,
        p_req_distribution_id => p_req_distribution_id,
        p_lock_flag => p_lock_flag,
        x_req_status_rec => x_req_status_rec,
        x_return_status  => x_return_status,
        x_msg_count  => x_msg_count,
        x_msg_data  => x_msg_data);
Line: 662

END IF; --END of IF INSTR(p_mode, G_CHECK_UPDATEABLE) > 0