DBA Data[Home] [Help]

APPS.PO_DOCUMENT_REVISION_GRP dependencies on PO_HEADERS

Line 143: update po_headers

139: x_doc_revision_num := x_doc_revision_num + 1;
140: x_message:= 'PO_REV_POXCH_NEW_REV';
141: --
142: if ((p_doc_type = 'PO') OR (p_doc_type = 'PA')) THEN
143: update po_headers
144: set submit_date = NULL
145: where po_header_id = p_doc_id;
146:
147: elsif ((p_doc_type = 'RELEASE')) THEN

Line 177: FROM po_headers

173: SELECT 'N'
174: INTO l_keep_summary
175: FROM dual
176: WHERE exists (SELECT 'approved document'
177: FROM po_headers
178: WHERE po_header_id = p_doc_id
179: AND NVL(approved_flag, 'N') IN ('R', 'Y'));
180: EXCEPTION
181: WHEN NO_DATA_FOUND THEN

Line 573: l_revision_num po_headers_all.revision_num%type;

569: *******************************************************************/
570:
571: FUNCTION PO_Archive_Check(p_doc_id IN NUMBER)
572: RETURN BOOLEAN IS
573: l_revision_num po_headers_all.revision_num%type;
574: l_archived_number po_headers_archive.revision_num%type;
575: l_need_to_check boolean;
576: l_progress varchar2(3);
577: begin

Line 574: l_archived_number po_headers_archive.revision_num%type;

570:
571: FUNCTION PO_Archive_Check(p_doc_id IN NUMBER)
572: RETURN BOOLEAN IS
573: l_revision_num po_headers_all.revision_num%type;
574: l_archived_number po_headers_archive.revision_num%type;
575: l_need_to_check boolean;
576: l_progress varchar2(3);
577: begin
578: l_progress := '000';

Line 581: FROM PO_HEADERS POH,

577: begin
578: l_progress := '000';
579: SELECT POH.revision_num, nvl(POHA.revision_num, -1)
580: into l_revision_num, l_archived_number
581: FROM PO_HEADERS POH,
582: PO_HEADERS_ARCHIVE POHA
583: WHERE POH.po_header_id = p_doc_id
584: AND POH.po_header_id = POHA.po_header_id (+)
585: AND POHA.latest_external_flag (+) = 'Y';

Line 582: PO_HEADERS_ARCHIVE POHA

578: l_progress := '000';
579: SELECT POH.revision_num, nvl(POHA.revision_num, -1)
580: into l_revision_num, l_archived_number
581: FROM PO_HEADERS POH,
582: PO_HEADERS_ARCHIVE POHA
583: WHERE POH.po_header_id = p_doc_id
584: AND POH.po_header_id = POHA.po_header_id (+)
585: AND POHA.latest_external_flag (+) = 'Y';
586:

Line 624: l_revision_num po_headers_all.revision_num%type;

620: *******************************************************************/
621:
622: FUNCTION Release_Archive_Check(p_doc_id IN NUMBER)
623: RETURN BOOLEAN IS
624: l_revision_num po_headers_all.revision_num%type;
625: l_archived_number po_headers_archive.revision_num%type;
626: l_need_to_check boolean;
627: l_progress varchar2(3);
628: begin

Line 625: l_archived_number po_headers_archive.revision_num%type;

621:
622: FUNCTION Release_Archive_Check(p_doc_id IN NUMBER)
623: RETURN BOOLEAN IS
624: l_revision_num po_headers_all.revision_num%type;
625: l_archived_number po_headers_archive.revision_num%type;
626: l_need_to_check boolean;
627: l_progress varchar2(3);
628: begin
629:

Line 706: by also looking at the acceptance_required_flag in the po_headers table.

702: accepted_flag can be 'N' when rejected and we should cause a document revision
703: when this change happens and these documents can be cancelled.
704: So we are now checking if the document is both Accepted and Rejected cases and
705: since normal Accetances also have 'N' we differentiate a 'Rejected' case
706: by also looking at the acceptance_required_flag in the po_headers table.
707: Doing the same for the acceptance_due_date. l_accepted_flag='X' will
708: represent lines which dont have acceptance Entered. */
709:
710: -- Bug 3388218 Start

Line 715: po_headers poh

711: Begin
712: Select pav.accepted_flag
713: into l_accepted_flag
714: from po_acceptances_v pav,
715: po_headers poh
716: where poh.po_header_id=p_doc_id
717: and poh.po_header_id=pav.po_header_id
718: and pav.revision_num= poh.revision_num
719: and poh.acceptance_required_flag='N'

Line 737: FROM PO_HEADERS POH,

733: INTO x_different
734: from sys.dual
735: where exists(
736: select null
737: FROM PO_HEADERS POH,
738: PO_HEADERS_ARCHIVE POHA
739: WHERE POH.po_header_id = p_doc_id
740: AND POH.po_header_id = POHA.po_header_id (+)
741: AND POHA.latest_external_flag (+) = 'Y'

Line 738: PO_HEADERS_ARCHIVE POHA

734: from sys.dual
735: where exists(
736: select null
737: FROM PO_HEADERS POH,
738: PO_HEADERS_ARCHIVE POHA
739: WHERE POH.po_header_id = p_doc_id
740: AND POH.po_header_id = POHA.po_header_id (+)
741: AND POHA.latest_external_flag (+) = 'Y'
742: AND (

Line 1515: by also looking at the acceptance_required_flag in the po_headers table.

1511: accepted_flag can be 'N' when rejected and we should cause a document revision
1512: when this change happens and these documents can be cancelled.
1513: So we are now checking if the document is both Accepted and Rejected cases and
1514: since normal Accetances also have 'N' we differentiate a 'Rejected' case
1515: by also looking at the acceptance_required_flag in the po_headers table.
1516: Doing the same for the acceptance_due_date. l_accepted_flag='X' will
1517: represent lines which dont have acceptance Entered.
1518: We only have 'Y' and 'N' for acceptance_required_flag in Releases.
1519: so we dont need to check the other conditions as for PO.*/

Line 1793: from po_headers_archive

1789: l_progress := '015';
1790: BEGIN
1791: select 'Y'
1792: into l_Archive_Record_Exists
1793: from po_headers_archive
1794: where po_header_id = p_doc_id and rownum = 1;
1795: EXCEPTION
1796: WHEN NO_DATA_FOUND THEN
1797: l_Archive_Record_Exists := 'N';

Line 2138: FROM po_headers_all

2134: WHERE po_release_id = p_doc_id
2135: AND p_doc_type = PO_DOCUMENT_CANCEL_PVT.c_doc_type_RELEASE
2136: UNION ALL
2137: SELECT org_id
2138: FROM po_headers_all
2139: WHERE po_header_id = p_doc_id
2140: AND p_doc_type <> PO_DOCUMENT_CANCEL_PVT.c_doc_type_RELEASE);
2141:
2142:

Line 2191: po_headers_all poh,

2187:
2188: FROM
2189: po_line_locations_archive_all poall,
2190: po_line_locations_all poll,
2191: po_headers_all poh,
2192: po_lines_all pol,
2193: po_distributions_all pod -----
2194: WHERE
2195: poll.line_location_id = pod.line_location_id -----