DBA Data[Home] [Help]

APPS.PO_REQAPPROVAL_INIT1 dependencies on PO_RELEASES

Line 566: -- 'RELEASE': PO_RELEASES_ALL.po_release_id

562: --DocumentID
563: -- This value for this parameter depends on the DocumentType:
564: -- 'REQUISITION': PO_REQUISITION_HEADERS_ALL.requisition_header_id
565: -- 'PO' or 'PA': PO_HEADERS_ALL.po_header_id
566: -- 'RELEASE': PO_RELEASES_ALL.po_release_id
567: --DocumentNumber
568: -- (Obsolete) This parameter is ignored. This procedure will derive the
569: -- document number from DocumentID and DocumentType. (Bug 3284628)
570: --PreparerID

Line 579: -- 'RELEASE': PO_RELEASES_ALL.release_type

575: --DocumentSubType
576: -- The value for this parameter depends on the DocumentType:
577: -- 'REQUISITION': PO_REQUISITION_HEADERS_ALL.type_lookup_code
578: -- 'PO' or 'PA': PO_HEADERS_ALL.type_lookup_code
579: -- 'RELEASE': PO_RELEASES_ALL.release_type
580: --SubmitterAction
581: -- (Unused) This parameter is not currently used.
582: --ForwardToID
583: -- Requester (for Requisitions) or buyer (for other document types)

Line 639: -- or PO_RELEASES_ALL accordingly. This is used by HTML Orders. (Bug 5218538)

635: -- value (default). The corresponding value('REQUESTER'/'SUPPLIER') is used
636: -- to set INITIATOR wf attribute in RCO wf.
637: --p_xml_flag
638: -- If 'Y' or 'N', this procedure will update the xml_flag in PO_HEADERS_ALL
639: -- or PO_RELEASES_ALL accordingly. This is used by HTML Orders. (Bug 5218538)
640: -- If null, no updates will be made.
641: -- p_source_type_code VARCHAR2 DEFAULT null
642: -- For the internal change order for requisitions the value will be INVENTORY
643: --End of Comments

Line 702: l_release_num PO_RELEASES.release_num%TYPE; -- Bug 3215186

698: x_buyer_display_name VARCHAR2(240);
699: l_userkey VARCHAR2(40);
700: l_doc_num_rel VARCHAR2(100);
701: l_doc_display_name FND_NEW_MESSAGES.message_text%TYPE; -- Bug 3215186
702: l_release_num PO_RELEASES.release_num%TYPE; -- Bug 3215186
703: l_revision_num PO_HEADERS.revision_num%TYPE; -- Bug 3215186
704: l_ga_flag VARCHAR2(1) := NULL; -- FPI GA
705: /* RETROACTIVE FPI START */
706: l_seq_for_item_key VARCHAR2(25) := NULL; --Bug14305923

Line 839: UPDATE po_releases_all

835: PO_WF_DEBUG_PKG.insert_debug(l_itemtype,l_itemkey,x_progress);
836: END IF;
837: IF (p_xml_flag = 'Y') THEN
838: IF (DocumentTypeCode = 'RELEASE') THEN
839: UPDATE po_releases_all
840: SET xml_flag = 'Y',
841: edi_processed_flag = 'N'
842: WHERE po_release_id = DocumentID;
843: ELSE

Line 851: UPDATE po_releases_all SET xml_flag = 'N' WHERE po_release_id = DocumentID;

847: WHERE po_header_id = DocumentID;
848: END IF;
849: ELSIF (p_xml_flag = 'N') THEN
850: IF (DocumentTypeCode = 'RELEASE') THEN
851: UPDATE po_releases_all SET xml_flag = 'N' WHERE po_release_id = DocumentID;
852: ELSE
853: UPDATE po_headers_all SET xml_flag = 'N' WHERE po_header_id = DocumentID;
854: END IF;
855: END IF; -- p_xml_flag = 'Y'

Line 1147: FROM po_releases por,

1143: por.agent_id
1144: INTO x_acceptance_required_flag,
1145: x_acceptance_due_date,
1146: x_agent_id
1147: FROM po_releases por,
1148: po_headers_all poh --
1149: WHERE por.po_release_id = DocumentID
1150: AND por.po_header_id = poh.po_header_id;
1151: END IF;

Line 1241: FROM po_releases POR,

1237: INTO l_revision_num,
1238: l_release_num,
1239: l_doc_display_name,
1240: l_document_number -- Bug 3284628
1241: FROM po_releases POR,
1242: po_headers_all POH --
1243: WHERE POR.po_release_id = DocumentID
1244: AND POR.po_header_id = POH.po_header_id; -- JOIN
1245: l_doc_num_rel := l_document_number || '-' || l_release_num;

Line 1395: FROM po_releases_all

1391: l_consigned_flag := 'N';
1392: IF DocumentTypeCode = 'RELEASE' THEN
1393: SELECT NVL(consigned_consumption_flag, 'N') -- Bug 3318625
1394: INTO l_consigned_flag
1395: FROM po_releases_all
1396: WHERE po_release_id = DocumentId;
1397: ELSIF DocumentTypeCode = 'PO' THEN
1398: SELECT NVL(consigned_consumption_flag, 'N')
1399: INTO l_consigned_flag

Line 1481: FROM po_releases por,

1477: SELECT pov.vendor_name,
1478: pvs.vendor_site_code
1479: INTO l_vendor,
1480: l_vendor_site_code
1481: FROM po_releases por,
1482: po_headers poh,
1483: po_vendors pov,
1484: po_vendor_sites_all pvs
1485: WHERE por.po_release_id = DocumentId

Line 1611: UPDATE po_releases

1607: -- set authorization_status to IN PROCESS so that the header is 'locked'
1608: -- while the workflow process is waiting for background engine to pick it up
1609: IF p_background_flag = 'Y' THEN
1610: IF DocumentTypeCode = 'RELEASE' THEN
1611: UPDATE po_releases
1612: SET AUTHORIZATION_STATUS = 'IN PROCESS',
1613: last_updated_by = fnd_global.user_id,
1614: last_update_login = fnd_global.login_id,
1615: last_update_date = sysdate

Line 1860: -- Set the Command for the button that opens the Enter PO/Releases form

1856: END IF;
1857: -------------------------------------------------------------------------------------
1858: -- Added by Eric Ma for IL PO Notification on Apr-13,2009 ,End
1859: END IF;
1860: -- Set the Command for the button that opens the Enter PO/Releases form
1861: -- Note: the Open Form command for the requisition is hard-coded in the
1862: -- Requisition approval workflow.
1863: IF l_document_type IN ('PO', 'PA') THEN
1864: --

Line 2048: ** for PO/Releases then we need to store REQUIRES REAPPROVAL as the original

2044: AND draft_id = l_draft_id;
2045: --Mod Project end
2046: /* Bug#1810322: kagarwal
2047: ** Desc: If the original authorization status is IN PROCESS or PRE-APPROVED
2048: ** for PO/Releases then we need to store REQUIRES REAPPROVAL as the original
2049: ** authorization status if the revision number is greater than 0 else
2050: ** INCOMPLETE.
2051: */
2052: IF (l_authorization_status IN ('IN PROCESS', 'PRE-APPROVED') AND l_draft_id =-1) THEN

Line 2066: FROM po_releases_all

2062: SELECT AUTHORIZATION_STATUS,
2063: NVL(REVISION_NUM,0)
2064: INTO l_authorization_status,
2065: l_po_revision
2066: FROM po_releases_all
2067: WHERE PO_RELEASE_ID = l_document_id;
2068: IF l_authorization_status IN ('IN PROCESS', 'PRE-APPROVED') THEN
2069: IF l_po_revision > 0 THEN
2070: l_authorization_status := 'REQUIRES REAPPROVAL';

Line 2503: FROM PO_RELEASES

2499: END IF;
2500: ELSIF l_doc_type = 'RELEASE' THEN
2501: SELECT NVL(authorization_status,'INCOMPLETE')
2502: INTO l_auth_stat
2503: FROM PO_RELEASES
2504: WHERE po_release_id = l_doc_id;
2505: IF l_auth_stat <> 'APPROVED' THEN
2506: SetRelAuthStat(l_doc_id, itemtype,itemkey,NULL, l_orig_auth_stat );
2507: END IF;

Line 2755: FROM PO_RELEASES

2751: WHERE po_header_id = l_doc_id;
2752: ELSIF l_doc_type = 'RELEASE' THEN
2753: SELECT NVL(authorization_status,'INCOMPLETE')
2754: INTO l_auth_stat
2755: FROM PO_RELEASES
2756: WHERE po_release_id = l_doc_id;
2757: END IF;
2758: IF l_auth_stat = 'PRE-APPROVED' THEN
2759: --

Line 3219: SELECT wf_item_key FROM po_releases WHERE po_release_id= p_header_id;

3215: FROM po_requisition_headers
3216: WHERE requisition_header_id= p_header_id;
3217: CURSOR rel_cursor(p_header_id NUMBER)
3218: IS
3219: SELECT wf_item_key FROM po_releases WHERE po_release_id= p_header_id;
3220: BEGIN
3221: x_progress := 'PO_REQAPPROVAL_INIT1.Remove_reminder_notif: 01';
3222: IF (g_po_wf_debug = 'Y') THEN
3223: /* DEBUG */

Line 3947: FROM po_releases

3943: l_po_header_id := l_document_id;
3944: elsif (l_document_type = 'RELEASE') THEN
3945: SELECT po_header_id
3946: INTO l_po_header_id
3947: FROM po_releases
3948: WHERE po_release_id = l_document_id;
3949: ELSE
3950: NULL;
3951: END IF;

Line 4252: FROM PO_RELEASES

4248: ELSIF l_doc_type = 'RELEASE' THEN
4249: x_progress := '004';
4250: SELECT NVL(authorization_status,'INCOMPLETE')
4251: INTO l_auth_stat
4252: FROM PO_RELEASES
4253: WHERE po_release_id = l_doc_id;
4254: END IF;
4255: IF l_auth_stat = 'APPROVED' THEN
4256: resultout := wf_engine.eng_completed || ':' || 'Y' ;

Line 4920: UPDATE po_releases_all

4916:
4917: -- added for bug 9072034 (to update revision number for releases.)
4918: ELSIF l_doc_type in ('RELEASE') THEN
4919:
4920: UPDATE po_releases_all
4921: SET comm_rev_num = l_po_revision_num_curr
4922: WHERE po_release_id = l_po_header_id;
4923:
4924: END IF;

Line 5108: UPDATE po_releases

5104: ** If normal processing then at this point the status is NOT 'IN PROCESS'
5105: ** or 'PRE-APPROVED', therefore we should update the status to IN PROCESS.
5106: */
5107: IF note = 'UPGRADE_TO_R11' THEN
5108: UPDATE po_releases
5109: SET WF_ITEM_TYPE = itemtype,
5110: WF_ITEM_KEY = itemkey,
5111: last_updated_by = fnd_global.user_id,
5112: last_update_login = fnd_global.login_id,

Line 5116: UPDATE po_releases

5112: last_update_login = fnd_global.login_id,
5113: last_update_date = sysdate
5114: WHERE po_release_id = l_Release_header_id;
5115: ELSE
5116: UPDATE po_releases
5117: SET AUTHORIZATION_STATUS = p_auth_status,
5118: WF_ITEM_TYPE = itemtype,
5119: WF_ITEM_KEY = itemkey,
5120: last_updated_by = fnd_global.user_id,

Line 5193: UPDATE po_releases

5189: pragma AUTONOMOUS_TRANSACTION;
5190: x_progress VARCHAR2(3):= '000';
5191: BEGIN
5192: x_progress := '001';
5193: UPDATE po_releases
5194: SET WF_ITEM_TYPE = itemtype,
5195: WF_ITEM_KEY = itemkey,
5196: last_updated_by = fnd_global.user_id,
5197: last_update_login = fnd_global.login_id,

Line 5258: SELECT org_id FROM po_releases_all WHERE po_release_id = document_id;

5254: IS
5255: SELECT org_id FROM po_headers_all WHERE po_header_id = document_id;
5256: CURSOR get_release_orgid
5257: IS
5258: SELECT org_id FROM po_releases_all WHERE po_release_id = document_id;
5259:
5260: x_progress VARCHAR2(3):= '000';
5261: BEGIN
5262: x_progress := '001';

Line 5442: FROM PO_RELEASES

5438: SELECT NVL(authorization_status,'INCOMPLETE'),
5439: revision_num
5440: INTO l_auth_stat,
5441: l_revision_num
5442: FROM PO_RELEASES
5443: WHERE po_release_id = p_doc_id;
5444: END IF;
5445: x_progress := '005';
5446: /* Check if this document had been submitted to workflow at some point

Line 7014: po_releases rl,

7010: || '-'
7011: || rl.RELEASE_NUM
7012: INTO l_doc_string
7013: FROM po_headers hd,
7014: po_releases rl,
7015: po_lookup_codes ty,
7016: po_lookup_codes st
7017: WHERE rl.po_release_id = l_document_id
7018: AND rl.po_header_id = hd.po_header_id

Line 7423: Thus, we shall query acceptance_required_flag from po_headers/po_releases view.

7419: /*
7420: 1. Bug#2742276: To find out if acceptance is required, older version used to check workflow
7421: attribute ACCEPTANCE_REQUIRED.
7422: This may not be correct since acceptance_requried_flag may be updated in the DB.
7423: Thus, we shall query acceptance_required_flag from po_headers/po_releases view.
7424: */
7425: x_progress := '001';
7426: l_document_type := wf_engine.GetItemAttrText (itemtype => itemtype, itemkey => itemkey, aname => 'DOCUMENT_TYPE');
7427: l_document_id := wf_engine.GetItemAttrNumber (itemtype => itemtype, itemkey => itemkey, aname => 'DOCUMENT_ID');

Line 7437: FROM po_releases_all --bug 4764963

7433: WHERE po_header_Id = l_document_id;
7434: ELSE
7435: SELECT acceptance_required_flag
7436: INTO l_acceptance_flag
7437: FROM po_releases_all --bug 4764963
7438: WHERE po_release_Id = l_document_id;
7439: END IF;
7440: /* BINDING FPJ START*/
7441: IF NVL(l_acceptance_flag,'N') <> 'N' THEN

Line 7462: FROM po_releases_all

7458: AND revision_num = l_revision_num;
7459: ELSE
7460: SELECT revision_num
7461: INTO l_revision_num
7462: FROM po_releases_all
7463: WHERE po_release_id = l_document_id;
7464: SELECT COUNT(*)
7465: INTO l_responded_shipments
7466: FROM PO_ACCEPTANCES

Line 7530: FROM po_releases por,

7526: por.revision_num --RDP
7527: INTO x_vendor,
7528: x_po_header_id,
7529: x_revision_num
7530: FROM po_releases por,
7531: po_headers_all poh, --
7532: po_vendors pov
7533: WHERE por.po_release_id = x_document_id
7534: AND por.po_header_id = poh.po_header_id

Line 7667: FROM po_releases por,

7663: SELECT pov.vendor_name,
7664: por.revision_num
7665: INTO x_vendor,
7666: l_revision_num
7667: FROM po_releases por,
7668: po_headers_all poh, --
7669: po_vendors pov
7670: WHERE por.po_release_id = x_document_id
7671: AND por.po_header_id = poh.po_header_id

Line 7823: FROM po_releases

7819: agent_id
7820: INTO x_Po_Header_Id,
7821: x_revision_num,
7822: x_employee_id
7823: FROM po_releases
7824: WHERE po_release_id = x_document_id;
7825: END IF;
7826: -- Bug 2850566 RBAIRRAJ
7827: -- Calling the Acceptances row handler to insert into the PO_ACCEPTANCES table

Line 7858: --Update the last update date when po_headers_all/po_releases_all tables are updated.

7854: p_accepted_flag => x_Accepted_Flag, p_note => x_acceptance_note, p_accepting_party => l_accepting_party );
7855: -- End of Bug 2850566 RBAIRRAJ
7856: -- Reset the Acceptance required Flag
7857: --Bug 6847039 - Start
7858: --Update the last update date when po_headers_all/po_releases_all tables are updated.
7859: IF x_po_release_id IS NOT NULL THEN
7860: UPDATE po_releases
7861: SET acceptance_required_flag = 'N',
7862: LAST_UPDATE_DATE = SYSDATE,

Line 7860: UPDATE po_releases

7856: -- Reset the Acceptance required Flag
7857: --Bug 6847039 - Start
7858: --Update the last update date when po_headers_all/po_releases_all tables are updated.
7859: IF x_po_release_id IS NOT NULL THEN
7860: UPDATE po_releases
7861: SET acceptance_required_flag = 'N',
7862: LAST_UPDATE_DATE = SYSDATE,
7863: acceptance_due_date = ''
7864: WHERE po_release_id = x_po_release_id;

Line 8797: -- from Cancel as the Cancel code also updates the po_headers_all/po_releases_all tables

8793:
8794: --
8795: -- Made the procedure non-autonomous
8796: -- There was deadlock error occurring when the communication was invoked
8797: -- from Cancel as the Cancel code also updates the po_headers_all/po_releases_all tables
8798: -- and the Commit/Rollback will not happen when the communication is invoked.
8799: PROCEDURE update_print_count( p_doc_id NUMBER,
8800: p_doc_type VARCHAR2 )
8801: IS

Line 8805: UPDATE po_releases_all pr

8801: IS
8802:
8803: BEGIN
8804: IF (p_doc_type = 'RELEASE') THEN
8805: UPDATE po_releases_all pr
8806: SET pr.printed_date = sysdate,
8807: pr.print_count = NVL(pr.print_count,0) + 1
8808: WHERE pr.po_release_id = p_doc_id ;
8809: ELSIF (p_doc_type IN ('PO','PA')) THEN

Line 9086: UPDATE po_releases_all

9082:
9083: -- added for bug 9072034 (to update revision number for releases.)
9084: ELSIF l_doc_type in ('RELEASE') THEN
9085:
9086: UPDATE po_releases_all
9087: SET comm_rev_num = l_po_revision_num_curr
9088: WHERE po_release_id = l_po_header_id;
9089:
9090: END IF;