DBA Data[Home] [Help]

APPS.PO_REQAPPROVAL_INIT1 dependencies on PO_HEADERS

Line 9: g_document_subtype PO_HEADERS_ALL.TYPE_LOOKUP_CODE%TYPE;

5: g_po_wf_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_SET_DEBUG_WORKFLOW_ON'),'N');
6: -- Read the profile option that determines whether the promise date will be defaulted with need-by date or not
7: g_default_promise_date VARCHAR2(1) := NVL(FND_PROFILE.VALUE('POS_DEFAULT_PROMISE_DATE_ACK'),'N');
8:
9: g_document_subtype PO_HEADERS_ALL.TYPE_LOOKUP_CODE%TYPE;
10:
11: --Bug#3497033
12: --g_currency_format_mask declared to pass in as the second parameter
13: --in FND_CURRENCY.GET_FORMAT_MASK

Line 493: -- 'PO' or 'PA': PO_HEADERS_ALL.po_header_id

489: -- not insert into the action history.
490: --DocumentID
491: -- This value for this parameter depends on the DocumentType:
492: -- 'REQUISITION': PO_REQUISITION_HEADERS_ALL.requisition_header_id
493: -- 'PO' or 'PA': PO_HEADERS_ALL.po_header_id
494: -- 'RELEASE': PO_RELEASES_ALL.po_release_id
495: --DocumentNumber
496: -- (Obsolete) This parameter is ignored. This procedure will derive the
497: -- document number from DocumentID and DocumentType. (Bug 3284628)

Line 506: -- 'PO' or 'PA': PO_HEADERS_ALL.type_lookup_code

502: -- 'REQUISITION', 'PO', 'PA', 'RELEASE'
503: --DocumentSubType
504: -- The value for this parameter depends on the DocumentType:
505: -- 'REQUISITION': PO_REQUISITION_HEADERS_ALL.type_lookup_code
506: -- 'PO' or 'PA': PO_HEADERS_ALL.type_lookup_code
507: -- 'RELEASE': PO_RELEASES_ALL.release_type
508: --SubmitterAction
509: -- (Unused) This parameter is not currently used.
510: --ForwardToID

Line 566: -- If 'Y' or 'N', this procedure will update the xml_flag in PO_HEADERS_ALL

562: -- value as : 'SUPPLIER' or 'REQUESTER'. Other callers will pass as NULL
563: -- value (default). The corresponding value('REQUESTER'/'SUPPLIER') is used
564: -- to set INITIATOR wf attribute in RCO wf.
565: --p_xml_flag
566: -- If 'Y' or 'N', this procedure will update the xml_flag in PO_HEADERS_ALL
567: -- or PO_RELEASES_ALL accordingly. This is used by HTML Orders. (Bug 5218538)
568: -- If null, no updates will be made.
569: -- p_source_type_code VARCHAR2 DEFAULT null
570: -- For the internal change order for requisitions the value will be INVENTORY

Line 632: l_revision_num PO_HEADERS.revision_num%TYPE; -- Bug 3215186

628: l_userkey varchar2(40);
629: l_doc_num_rel varchar2(30);
630: l_doc_display_name FND_NEW_MESSAGES.message_text%TYPE; -- Bug 3215186
631: l_release_num PO_RELEASES.release_num%TYPE; -- Bug 3215186
632: l_revision_num PO_HEADERS.revision_num%TYPE; -- Bug 3215186
633: l_ga_flag varchar2(1) := null; -- FPI GA
634:
635: /* RETROACTIVE FPI START */
636: l_seq_for_item_key varchar2(6) := null;

Line 653: l_conterms_exist_flag PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE; --

649:
650: /* RETROACTIVE FPI END */
651:
652: l_drop_ship_flag po_line_locations.drop_ship_flag%type; --
653: l_conterms_exist_flag PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE; --
654: --bug##3682458 replaced legal entity name with operating unit
655: l_operating_unit hr_all_organization_units_tl.name%TYPE; --
656:
657: l_document_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 3284628

Line 657: l_document_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 3284628

653: l_conterms_exist_flag PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE; --
654: --bug##3682458 replaced legal entity name with operating unit
655: l_operating_unit hr_all_organization_units_tl.name%TYPE; --
656:
657: l_document_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 3284628
658:
659: l_consigned_flag PO_HEADERS_ALL.CONSIGNED_CONSUMPTION_FLAG%TYPE;
660: l_autoapprove_retro varchar2(1);
661:

Line 659: l_consigned_flag PO_HEADERS_ALL.CONSIGNED_CONSUMPTION_FLAG%TYPE;

655: l_operating_unit hr_all_organization_units_tl.name%TYPE; --
656:
657: l_document_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 3284628
658:
659: l_consigned_flag PO_HEADERS_ALL.CONSIGNED_CONSUMPTION_FLAG%TYPE;
660: l_autoapprove_retro varchar2(1);
661:
662: l_okc_doc_type varchar2(20); --
663: l_vendor po_vendors.vendor_name%type; --Bug 4254468

Line 766: UPDATE po_headers_all

762: SET xml_flag = 'Y',
763: edi_processed_flag = 'N'
764: WHERE po_release_id = DocumentID;
765: ELSE
766: UPDATE po_headers_all
767: SET xml_flag = 'Y',
768: edi_processed_flag = 'N'
769: WHERE po_header_id = DocumentID;
770: END IF;

Line 779: update po_headers_all

775: UPDATE po_releases_all
776: SET xml_flag = 'N'
777: WHERE po_release_id = DocumentID;
778: ELSE
779: update po_headers_all
780: SET xml_flag = 'N'
781: WHERE po_header_id = DocumentID;
782: END IF;
783:

Line 981: from po_headers poh

977: poh.agent_id
978: into x_acceptance_required_flag,
979: x_acceptance_due_date,
980: x_agent_id
981: from po_headers poh
982: where poh.po_header_id = DocumentID;
983:
984: ELSE
985:

Line 992: po_headers_all poh --

988: into x_acceptance_required_flag,
989: x_acceptance_due_date,
990: x_agent_id
991: from po_releases por,
992: po_headers_all poh --
993: where por.po_release_id = DocumentID
994: and por.po_header_id = poh.po_header_id;
995:
996:

Line 1027: from po_headers_all

1023: IF DocumentTypeCode = 'PA' THEN
1024:
1025: select global_agreement_flag
1026: into l_ga_flag
1027: from po_headers_all
1028: where po_header_id = DocumentID;
1029:
1030: PO_WF_UTIL_PKG.SetItemAttrText ( itemtype => l_itemtype,
1031: itemkey => l_itemkey,

Line 1052: from po_headers

1048: into l_revision_num,
1049: l_doc_display_name,
1050: l_conterms_exist_flag, --
1051: l_document_number -- Bug 3284628
1052: from po_headers
1053: where po_header_id = DocumentID;
1054:
1055: l_doc_num_rel := l_document_number;
1056:

Line 1088: po_headers_all POH --

1084: l_release_num,
1085: l_doc_display_name,
1086: l_document_number -- Bug 3284628
1087: from po_releases POR,
1088: po_headers_all POH --
1089: where POR.po_release_id = DocumentID
1090: and POR.po_header_id = POH.po_header_id; -- JOIN
1091:
1092: l_doc_num_rel := l_document_number || '-' || l_release_num;

Line 1327: from po_headers_all

1323: where po_release_id = DocumentId;
1324: ELSIF DocumentTypeCode = 'PO' THEN
1325: select NVL(consigned_consumption_flag, 'N')
1326: into l_consigned_flag
1327: from po_headers_all
1328: where po_header_id = DocumentId;
1329: END IF;
1330:
1331: EXCEPTION

Line 1404: from po_vendors pov,po_headers poh,po_vendor_sites_all pvs

1400: select pov.vendor_name,
1401: pvs.vendor_site_code
1402: into l_vendor,
1403: l_vendor_site_code
1404: from po_vendors pov,po_headers poh,po_vendor_sites_all pvs
1405: where pov.vendor_id = poh.vendor_id
1406: and poh.po_header_id = DocumentId
1407: and poh.vendor_site_id = pvs.vendor_site_id;
1408: else

Line 1413: from po_releases por,po_headers poh,

1409: select pov.vendor_name,
1410: pvs.vendor_site_code
1411: into l_vendor,
1412: l_vendor_site_code
1413: from po_releases por,po_headers poh,
1414: po_vendors pov,po_vendor_sites_all pvs
1415: where por.po_release_id = DocumentId
1416: and por.po_header_id = poh.po_header_id
1417: and poh.vendor_id = pov.vendor_id

Line 1646: update po_headers

1642: last_update_login = fnd_global.login_id,
1643: last_update_date = sysdate
1644: where po_release_id = DocumentID;
1645: ELSE --PO or PA
1646: update po_headers
1647: set AUTHORIZATION_STATUS = 'IN PROCESS',
1648: last_updated_by = fnd_global.user_id,
1649: last_update_login = fnd_global.login_id,
1650: last_update_date = sysdate

Line 1735: l_style_id po_headers_all.style_id%TYPE;

1731: l_can_modify_flag VARCHAR2(1);
1732:
1733: l_view_po_url varchar2(1000); -- HTML Orders R12
1734: l_edit_po_url varchar2(1000); -- HTML Orders R12
1735: l_style_id po_headers_all.style_id%TYPE;
1736: l_ga_flag po_headers_all.global_agreement_flag%TYPE;
1737:
1738: /* Bug 7535468
1739: Increasing the length of x_progress from 200 to 1200 */

Line 1736: l_ga_flag po_headers_all.global_agreement_flag%TYPE;

1732:
1733: l_view_po_url varchar2(1000); -- HTML Orders R12
1734: l_edit_po_url varchar2(1000); -- HTML Orders R12
1735: l_style_id po_headers_all.style_id%TYPE;
1736: l_ga_flag po_headers_all.global_agreement_flag%TYPE;
1737:
1738: /* Bug 7535468
1739: Increasing the length of x_progress from 200 to 1200 */
1740: x_progress varchar2(1200);

Line 2031: -- SQL What : Get the style id fromm po_headers

2027: ELSIF nvl(l_ga_flag,'N') = 'Y' OR
2028: l_doc_subtype = 'STANDARD' THEN
2029:
2030: Begin
2031: -- SQL What : Get the style id fromm po_headers
2032: -- SQL Why : To derive the style type
2033: SELECT style_id
2034: INTO l_style_id
2035: FROM po_headers_all

Line 2035: FROM po_headers_all

2031: -- SQL What : Get the style id fromm po_headers
2032: -- SQL Why : To derive the style type
2033: SELECT style_id
2034: INTO l_style_id
2035: FROM po_headers_all
2036: WHERE po_header_id = l_document_id;
2037: Exception
2038: When Others Then
2039: l_style_id := null;

Line 2265: from po_headers_all

2261: ELSIF l_document_type IN ('PO','PA') THEN
2262:
2263: select AUTHORIZATION_STATUS, NVL(REVISION_NUM,0)
2264: into l_authorization_status, l_po_revision
2265: from po_headers_all
2266: where PO_HEADER_ID = l_document_id;
2267:
2268: /* Bug#1810322: kagarwal
2269: ** Desc: If the original authorization status is IN PROCESS or PRE-APPROVED

Line 2828: from PO_HEADERS

2824:
2825: ELSIF l_doc_type IN ('PO', 'PA') THEN
2826:
2827: select NVL(authorization_status,'INCOMPLETE') into l_auth_stat
2828: from PO_HEADERS
2829: where po_header_id = l_doc_id;
2830:
2831: IF l_auth_stat <> 'APPROVED' THEN
2832: SetPOAuthStat(l_doc_id, itemtype,itemkey,NULL, l_orig_auth_stat );

Line 3147: from PO_HEADERS

3143:
3144: ELSIF l_doc_type IN ('PO', 'PA') THEN
3145:
3146: select NVL(authorization_status,'INCOMPLETE') into l_auth_stat
3147: from PO_HEADERS
3148: where po_header_id = l_doc_id;
3149:
3150: ELSIF l_doc_type = 'RELEASE' THEN
3151:

Line 3678: from po_headers

3674: l_preparer_user_name varchar2(100);
3675:
3676: cursor po_cursor(p_header_id number) is
3677: select wf_item_key
3678: from po_headers
3679: where po_header_id= p_header_id;
3680:
3681: cursor req_cursor(p_header_id number) is
3682: select wf_item_key

Line 4142: l_acceptance_flag PO_HEADERS_ALL.acceptance_required_flag%TYPE;

4138: l_doc_string varchar2(200);
4139: l_preparer_user_name varchar2(100);
4140:
4141: -- BINDING FPJ
4142: l_acceptance_flag PO_HEADERS_ALL.acceptance_required_flag%TYPE;
4143:
4144: BEGIN
4145: x_progress := 'PO_REQAPPROVAL_INIT1.Send_WS_FYI_Notif_Yes_No: 01';
4146: IF (g_po_wf_debug = 'Y') THEN

Line 4179: FROM po_headers_all

4175: IF ((l_document_type <> 'RELEASE') AND
4176: l_document_subtype IN ('STANDARD','BLANKET','CONTRACT')) THEN
4177: SELECT acceptance_required_flag
4178: INTO l_acceptance_flag
4179: FROM po_headers_all
4180: WHERE po_header_Id = l_document_id;
4181:
4182: IF l_acceptance_flag = 'S' THEN
4183: PO_REQAPPROVAL_INIT1.locate_notifier(l_document_id, l_document_type, 'Y', l_notifier, l_notifier_resp);

Line 4690: from po_headers poh, po_vendor_sites pvs

4686: --EMAILPO FPH--
4687: --also retrieve language to set the adhocuser language to supplier site preferred language
4688: select poh.vendor_site_id, pvs.vendor_site_code, pvs.language
4689: into l_vendor_site_id, l_vendor_site_code, l_vendor_site_lang
4690: from po_headers poh, po_vendor_sites pvs
4691: where pvs.vendor_site_id = poh.vendor_site_id
4692: and poh.po_header_id = l_po_header_id;
4693:
4694: /* Bug 2989951

Line 5022: from PO_HEADERS

5018:
5019: x_progress := '003';
5020:
5021: select NVL(authorization_status,'INCOMPLETE') into l_auth_stat
5022: from PO_HEADERS
5023: where po_header_id = l_doc_id;
5024:
5025: ELSIF l_doc_type = 'RELEASE' THEN
5026:

Line 5954: update po_headers set

5950: ** or 'PRE-APPROVED', therefore we should update the status to IN PROCESS.
5951: */
5952: IF note = 'UPGRADE_TO_R11' THEN
5953:
5954: update po_headers set
5955: WF_ITEM_TYPE = itemtype,
5956: WF_ITEM_KEY = itemkey,
5957: last_updated_by = fnd_global.user_id,
5958: last_update_login = fnd_global.login_id,

Line 5964: update po_headers set

5960: where po_header_id = l_po_header_id;
5961:
5962: ELSE
5963:
5964: update po_headers set
5965: AUTHORIZATION_STATUS = p_auth_status,
5966: WF_ITEM_TYPE = itemtype,
5967: WF_ITEM_KEY = itemkey,
5968: last_updated_by = fnd_global.user_id,

Line 6074: update po_headers set

6070: BEGIN
6071:
6072: x_progress := '001';
6073:
6074: update po_headers set
6075: WF_ITEM_TYPE = itemtype,
6076: WF_ITEM_KEY = itemkey,
6077: last_updated_by = fnd_global.user_id,
6078: last_update_login = fnd_global.login_id,

Line 6175: from po_headers_all

6171: where requisition_header_id = document_id;
6172:
6173: cursor get_po_orgid is
6174: select org_id
6175: from po_headers_all
6176: where po_header_id = document_id;
6177:
6178: cursor get_release_orgid is
6179: select org_id

Line 6343: from PO_HEADERS

6339: x_progress := '003';
6340:
6341: select NVL(authorization_status,'INCOMPLETE'),revision_num
6342: into l_auth_stat, l_revision_num
6343: from PO_HEADERS
6344: where po_header_id = p_doc_id;
6345:
6346: ELSIF p_doc_type = 'RELEASE' THEN
6347:

Line 6636: l_document_subtype po_headers.type_lookup_code%TYPE;

6632:
6633: /*Bug 6692126 start */
6634: l_document_id number;
6635: l_withterms varchar2(1);
6636: l_document_subtype po_headers.type_lookup_code%TYPE;
6637: /*Bug 6692126 end */
6638:
6639: BEGIN
6640:

Line 6827: l_document_subtype po_headers.type_lookup_code%TYPE;

6823: l_printer VARCHAR2(30);
6824: /*Bug 6692126 start */
6825: l_document_id number;
6826: l_withterms varchar2(1);
6827: l_document_subtype po_headers.type_lookup_code%TYPE;
6828: /*Bug 6692126 end */
6829:
6830: x_progress varchar2(200);
6831:

Line 7707: from po_headers hd,

7703: select st.DISPLAYED_FIELD || ' ' ||
7704: ty.DISPLAYED_FIELD || ' ' ||
7705: hd.SEGMENT1
7706: into l_doc_string
7707: from po_headers hd,
7708: po_lookup_codes ty,
7709: po_lookup_codes st
7710: where hd.po_header_id = l_document_id
7711: and ty.lookup_type = 'DOCUMENT TYPE'

Line 7734: from po_headers hd,

7730: ty.DISPLAYED_FIELD || ' ' ||
7731: hd.SEGMENT1 || '-' ||
7732: rl.RELEASE_NUM
7733: into l_doc_string
7734: from po_headers hd,
7735: po_releases rl,
7736: po_lookup_codes ty,
7737: po_lookup_codes st
7738: where rl.po_release_id = l_document_id

Line 8124: l_document_id PO_HEADERS_ALL.po_header_id%TYPE; --

8120: l_doc_num varchar2(30);
8121: l_sys_error_msg varchar2(2000) :='';
8122: l_release_num_dash varchar2(30);
8123: l_release_num number; --1942901
8124: l_document_id PO_HEADERS_ALL.po_header_id%TYPE; --
8125:
8126: /* Bug# 2655410: kagarwal
8127: ** Desc: We will get the document type display value from
8128: ** po document types.

Line 8319: l_acceptance_flag po_headers_all.acceptance_required_flag%TYPE;

8315: actid in number,
8316: funcmode in varchar2,
8317: result out NOCOPY varchar2 )
8318: is
8319: l_acceptance_flag po_headers_all.acceptance_required_flag%TYPE;
8320: x_progress varchar2(3) := '000';
8321: l_document_id number;
8322: l_document_type po_document_types.document_type_code%type;
8323: l_document_subtype po_document_types.document_subtype%type;

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

8329: /*
8330: 1. Bug#2742276: To find out if acceptance is required, older version used to check workflow
8331: attribute ACCEPTANCE_REQUIRED.
8332: This may not be correct since acceptance_requried_flag may be updated in the DB.
8333: Thus, we shall query acceptance_required_flag from po_headers/po_releases view.
8334:
8335: */
8336: x_progress := '001';
8337:

Line 8353: from po_headers_all --bug 4764963

8349:
8350: if(l_document_type <> 'RELEASE') then
8351: select acceptance_required_flag
8352: into l_acceptance_flag
8353: from po_headers_all --bug 4764963
8354: where po_header_Id = l_document_id;
8355: else
8356: select acceptance_required_flag
8357: into l_acceptance_flag

Line 8376: from po_headers_all

8372:
8373: if(l_document_type <> 'RELEASE') then
8374: select revision_num
8375: into l_revision_num
8376: from po_headers_all
8377: where po_header_id = l_document_id;
8378:
8379: select count(*)
8380: into l_responded_shipments

Line 8425: x_po_header_id po_headers_all.po_header_id%TYPE;

8421: x_org_id number;
8422: x_user_id number;
8423: x_document_id number;
8424: x_document_type_code varchar2(30);
8425: x_po_header_id po_headers_all.po_header_id%TYPE;
8426: x_vendor po_vendors.vendor_name%TYPE; /* Bug 7172641 Changing the size as equal to the column size of vendor_name in po_vendors table */
8427: x_supp_user_name varchar2(100);
8428: x_supplier_displayname varchar2(100);
8429: x_revision_num number; -- RDP

Line 8463: from po_vendors pov,po_headers poh

8459:
8460: if x_document_type_code <> 'RELEASE' then
8461: select pov.vendor_name,poh.revision_num
8462: into x_vendor,x_revision_num -- RDP
8463: from po_vendors pov,po_headers poh
8464: where pov.vendor_id = poh.vendor_id
8465: and poh.po_header_id=x_document_id;
8466: else
8467: select pov.vendor_name, poh.po_header_id, por.revision_num --RDP

Line 8470: po_headers_all poh, --

8466: else
8467: select pov.vendor_name, poh.po_header_id, por.revision_num --RDP
8468: into x_vendor,x_po_header_id,x_revision_num
8469: from po_releases por,
8470: po_headers_all poh, --
8471: po_vendors pov
8472: where por.po_release_id = x_document_id
8473: and por.po_header_id = poh.po_header_id
8474: and poh.vendor_id = pov.vendor_id;

Line 8637: from po_vendors pov,po_headers poh

8633: poh.revision_num
8634: into
8635: x_vendor,
8636: l_revision_num
8637: from po_vendors pov,po_headers poh
8638: where pov.vendor_id = poh.vendor_id
8639: and poh.po_header_id=x_document_id;
8640:
8641: x_progress := '002';

Line 8657: po_headers_all poh, --

8653: into
8654: x_vendor,
8655: l_revision_num
8656: from po_releases por,
8657: po_headers_all poh, --
8658: po_vendors pov
8659: where por.po_release_id = x_document_id
8660: and por.po_header_id = poh.po_header_id
8661: and poh.vendor_id = pov.vendor_id;

Line 8811: l_acc_po_header_id PO_HEADERS_ALL.po_header_id%TYPE;

8807: l_rowid ROWID;
8808: l_Last_Update_Login PO_ACCEPTANCES.last_update_login%TYPE;
8809: l_Last_Update_Date PO_ACCEPTANCES.last_update_date%TYPE;
8810: l_Last_Updated_By PO_ACCEPTANCES.last_updated_by%TYPE;
8811: l_acc_po_header_id PO_HEADERS_ALL.po_header_id%TYPE;
8812: l_acceptance_id PO_ACCEPTANCES.acceptance_id%TYPE;
8813: -- End of Bug 2850566
8814: l_rspndr_usr_name fnd_user.user_name%TYPE := '';
8815: l_accepting_party varchar2(1);

Line 8854: from po_headers

8850: x_Po_Header_Id := x_document_id;
8851:
8852: select revision_num,agent_id
8853: into x_revision_num,x_employee_id
8854: from po_headers
8855: where po_header_id = x_document_id;
8856: else
8857: x_Po_Release_Id := x_document_id;
8858:

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

8911:
8912:
8913: -- Reset the Acceptance required Flag
8914: --Bug 6847039 - Start
8915: --Update the last update date when po_headers_all/po_releases_all tables are updated.
8916: if x_po_release_id is not null then
8917: update po_releases
8918: set acceptance_required_flag = 'N',
8919: LAST_UPDATE_DATE = SYSDATE,

Line 8923: update po_headers

8919: LAST_UPDATE_DATE = SYSDATE,
8920: acceptance_due_date = ''
8921: where po_release_id = x_po_release_id;
8922: else
8923: update po_headers
8924: set acceptance_required_flag = 'N',
8925: LAST_UPDATE_DATE = SYSDATE,
8926: acceptance_due_date = ''
8927: where po_header_id = x_po_header_id;

Line 9181: l_document_id po_headers_all.po_header_id%type;

9177: itemkey in varchar2,
9178: actid in number,
9179: funcmode in varchar2,
9180: resultout out NOCOPY varchar2 ) is
9181: l_document_id po_headers_all.po_header_id%type;
9182: l_vendor_id po_headers_all.vendor_id%type;
9183: l_vendor_site_id po_headers_all.vendor_site_id%type;
9184: l_progress varchar2(300);
9185: l_update_releases varchar2(1) := 'Y';

Line 9182: l_vendor_id po_headers_all.vendor_id%type;

9178: actid in number,
9179: funcmode in varchar2,
9180: resultout out NOCOPY varchar2 ) is
9181: l_document_id po_headers_all.po_header_id%type;
9182: l_vendor_id po_headers_all.vendor_id%type;
9183: l_vendor_site_id po_headers_all.vendor_site_id%type;
9184: l_progress varchar2(300);
9185: l_update_releases varchar2(1) := 'Y';
9186: l_return_status varchar2(1) ;

Line 9183: l_vendor_site_id po_headers_all.vendor_site_id%type;

9179: funcmode in varchar2,
9180: resultout out NOCOPY varchar2 ) is
9181: l_document_id po_headers_all.po_header_id%type;
9182: l_vendor_id po_headers_all.vendor_id%type;
9183: l_vendor_site_id po_headers_all.vendor_site_id%type;
9184: l_progress varchar2(300);
9185: l_update_releases varchar2(1) := 'Y';
9186: l_return_status varchar2(1) ;
9187: l_communicate_update varchar2(30); -- Bug 3574895. Length same as that on the form field PO_APPROVE.COMMUNICATE_UPDATES

Line 9205: from po_headers poh

9201: itemkey => itemkey,
9202: aname => 'DOCUMENT_ID');
9203: select poh.vendor_id, poh.vendor_site_id
9204: into l_vendor_id, l_vendor_site_id
9205: from po_headers poh
9206: where poh.po_header_id = l_document_id;
9207:
9208: -- Retrieved the default structure for
9209: -- Purchasing from the view mtl_default_sets_view.

Line 9379: l_document_id PO_HEADERS_ALL.po_header_id%TYPE;

9375: resultout OUT NOCOPY VARCHAR2)
9376: IS
9377:
9378: l_retro_change VARCHAR2(1);
9379: l_document_id PO_HEADERS_ALL.po_header_id%TYPE;
9380: l_document_type PO_DOCUMENT_TYPES.document_type_code%TYPE;
9381: l_progress VARCHAR2(2000);
9382: l_update_releases VARCHAR2(1) := 'Y';
9383: l_return_status VARCHAR2(1) ;

Line 9702: l_doc_type PO_HEADERS_ALL.TYPE_LOOKUP_CODE%type;

9698: p_func_mode in varchar2,
9699: x_result_out out NOCOPY varchar2 ) is
9700: l_progress varchar2(200);
9701: l_doc_id number;
9702: l_doc_type PO_HEADERS_ALL.TYPE_LOOKUP_CODE%type;
9703: l_cat_admin_user_name FND_USER.USER_NAME%type;
9704: BEGIN
9705: l_progress := '100';
9706: IF (g_po_wf_debug = 'Y') THEN

Line 9754: -- cleared from po_headers_all later. So first capture the item attribute

9750: -- initiator, then set the item attribute CATALOG_ADMIN_USER_NAME so that
9751: -- the catalog admin can be notified later in the workflow process.
9752: -- The reason why we are setting the attribute here instead of checking later
9753: -- in the wf process is because, the lock_owner_role/lock_owner_id will be
9754: -- cleared from po_headers_all later. So first capture the item attribute
9755: -- use it later in the workflow to decide whether a notification has to be
9756: -- sent. See Node "SHOULD_NOTIFY_CAT_ADMIN" function in the PO Approval and
9757: -- PO Approval Top Process(Also see function should_notify_cat_admin() in
9758: -- this file).

Line 9779: l_lock_owner_role PO_HEADERS_ALL.lock_owner_role%type;

9775: p_doc_id in number,
9776: p_doc_type in varchar2) is
9777: l_progress varchar2(255);
9778: l_user_name FND_USER.USER_NAME%type;
9779: l_lock_owner_role PO_HEADERS_ALL.lock_owner_role%type;
9780: l_lock_owner_user_id PO_HEADERS_ALL.lock_owner_user_id%type;
9781: BEGIN
9782: l_progress := 'PO_REQAPPROVAL_INIT1.set_catalog_admin_user_name: 100' ||
9783: 'Document Id='|| to_char(p_doc_id) ||

Line 9780: l_lock_owner_user_id PO_HEADERS_ALL.lock_owner_user_id%type;

9776: p_doc_type in varchar2) is
9777: l_progress varchar2(255);
9778: l_user_name FND_USER.USER_NAME%type;
9779: l_lock_owner_role PO_HEADERS_ALL.lock_owner_role%type;
9780: l_lock_owner_user_id PO_HEADERS_ALL.lock_owner_user_id%type;
9781: BEGIN
9782: l_progress := 'PO_REQAPPROVAL_INIT1.set_catalog_admin_user_name: 100' ||
9783: 'Document Id='|| to_char(p_doc_id) ||
9784: 'Document Type='|| p_doc_type;

Line 9799: from po_headers_all

9795: IF p_doc_type = 'PA' THEN
9796: -- Get the locking user role and user id information
9797: select lock_owner_user_id, lock_owner_role
9798: into l_lock_owner_user_id, l_lock_owner_role
9799: from po_headers_all
9800: where po_header_id = p_doc_id;
9801:
9802: l_progress := 'PO_REQAPPROVAL_INIT1.set_catalog_admin_user_name: 140' ||
9803: 'l_lock_owner_user_id ='|| to_char(l_lock_owner_user_id) ||

Line 10044: UPDATE po_headers_all ph

10040: WHERE pr.po_release_id = p_doc_id ;
10041:
10042: ELSIF (p_doc_type in ('PO','PA')) THEN
10043:
10044: UPDATE po_headers_all ph
10045: SET ph.printed_date = sysdate, ph.print_count = nvl(ph.print_count,0) + 1
10046: WHERE ph.po_header_id = p_doc_id ;
10047: END IF;
10048: COMMIT;