DBA Data[Home] [Help]

APPS.PO_COMMUNICATION_PVT dependencies on PO_HEADERS_ALL

Line 30: g_vendor_id PO_HEADERS_ALL.vendor_id%type;

26: g_customer_po_line_num VARCHAR2(50);
27: g_customer_po_shipment_num VARCHAR2(50);
28: g_document_id NUMBER;
29: g_revision_num NUMBER;
30: g_vendor_id PO_HEADERS_ALL.vendor_id%type;
31: g_cover_message VARCHAR2(2001);
32: g_amendment_message VARCHAR2(2001);
33: g_test_flag VARCHAR2(1);
34: g_release_header_id PO_HEADERS_ALL.po_header_id%type;

Line 34: g_release_header_id PO_HEADERS_ALL.po_header_id%type;

30: g_vendor_id PO_HEADERS_ALL.vendor_id%type;
31: g_cover_message VARCHAR2(2001);
32: g_amendment_message VARCHAR2(2001);
33: g_test_flag VARCHAR2(1);
34: g_release_header_id PO_HEADERS_ALL.po_header_id%type;
35: g_location_id number;
36: g_address_line1 HR_LOCATIONS.ADDRESS_LINE_1%type := null;
37: g_address_line2 HR_LOCATIONS.ADDRESS_LINE_2%type := null;
38: g_address_line3 HR_LOCATIONS.ADDRESS_LINE_3%type := null;

Line 41: g_org_id PO_HEADERS_ALL.ORG_ID%type := null;

37: g_address_line2 HR_LOCATIONS.ADDRESS_LINE_2%type := null;
38: g_address_line3 HR_LOCATIONS.ADDRESS_LINE_3%type := null;
39: g_Territory_short_name FND_TERRITORIES_TL.TERRITORY_SHORT_NAME%type := null;
40: g_address_info varchar2(500) := null;
41: g_org_id PO_HEADERS_ALL.ORG_ID%type := null;
42:
43: -- Global variables to hold the Operating Unit details --
44: g_ou_name HR_ORGANIZATION_UNITS_V.NAME%type := null;
45: g_ou_address_line_1 HR_ORGANIZATION_UNITS_V.ADDRESS_LINE_1 %type := null;

Line 54: g_header_id PO_HEADERS_ALL.PO_HEADER_ID%type := null;

50: g_ou_postal_code HR_ORGANIZATION_UNITS_V.POSTAL_CODE%type := null;
51: g_ou_country HR_ORGANIZATION_UNITS_V.COUNTRY%type := null;
52: -- End of Operation Unit detail variables --
53:
54: g_header_id PO_HEADERS_ALL.PO_HEADER_ID%type := null;
55: g_quote_number PO_HEADERS_ALL.QUOTE_VENDOR_QUOTE_NUMBER%type := null;
56: g_agreement_number PO_HEADERS_ALL.SEGMENT1%type := null;
57: g_agreement_flag PO_HEADERS_ALL.GLOBAL_AGREEMENT_FLAG%type := null;
58: g_agreementLine_number PO_LINES_ALL.LINE_NUM%type := null;

Line 55: g_quote_number PO_HEADERS_ALL.QUOTE_VENDOR_QUOTE_NUMBER%type := null;

51: g_ou_country HR_ORGANIZATION_UNITS_V.COUNTRY%type := null;
52: -- End of Operation Unit detail variables --
53:
54: g_header_id PO_HEADERS_ALL.PO_HEADER_ID%type := null;
55: g_quote_number PO_HEADERS_ALL.QUOTE_VENDOR_QUOTE_NUMBER%type := null;
56: g_agreement_number PO_HEADERS_ALL.SEGMENT1%type := null;
57: g_agreement_flag PO_HEADERS_ALL.GLOBAL_AGREEMENT_FLAG%type := null;
58: g_agreementLine_number PO_LINES_ALL.LINE_NUM%type := null;
59: g_line_id PO_LINES_ALL.FROM_LINE_ID%type := null;

Line 56: g_agreement_number PO_HEADERS_ALL.SEGMENT1%type := null;

52: -- End of Operation Unit detail variables --
53:
54: g_header_id PO_HEADERS_ALL.PO_HEADER_ID%type := null;
55: g_quote_number PO_HEADERS_ALL.QUOTE_VENDOR_QUOTE_NUMBER%type := null;
56: g_agreement_number PO_HEADERS_ALL.SEGMENT1%type := null;
57: g_agreement_flag PO_HEADERS_ALL.GLOBAL_AGREEMENT_FLAG%type := null;
58: g_agreementLine_number PO_LINES_ALL.LINE_NUM%type := null;
59: g_line_id PO_LINES_ALL.FROM_LINE_ID%type := null;
60: g_arcBuyer_fname PER_ALL_PEOPLE_F.FIRST_NAME%type := null;

Line 57: g_agreement_flag PO_HEADERS_ALL.GLOBAL_AGREEMENT_FLAG%type := null;

53:
54: g_header_id PO_HEADERS_ALL.PO_HEADER_ID%type := null;
55: g_quote_number PO_HEADERS_ALL.QUOTE_VENDOR_QUOTE_NUMBER%type := null;
56: g_agreement_number PO_HEADERS_ALL.SEGMENT1%type := null;
57: g_agreement_flag PO_HEADERS_ALL.GLOBAL_AGREEMENT_FLAG%type := null;
58: g_agreementLine_number PO_LINES_ALL.LINE_NUM%type := null;
59: g_line_id PO_LINES_ALL.FROM_LINE_ID%type := null;
60: g_arcBuyer_fname PER_ALL_PEOPLE_F.FIRST_NAME%type := null;
61: g_arcBuyer_lname PER_ALL_PEOPLE_F.LAST_NAME%type := null;

Line 64: g_header_id1 PO_HEADERS_ALL.PO_HEADER_ID%type := null;

60: g_arcBuyer_fname PER_ALL_PEOPLE_F.FIRST_NAME%type := null;
61: g_arcBuyer_lname PER_ALL_PEOPLE_F.LAST_NAME%type := null;
62: g_arcBuyer_title PER_ALL_PEOPLE_F.TITLE%type := null;
63: g_arcAgent_id PO_HEADERS_ARCHIVE_ALL.AGENT_ID%type := null;
64: g_header_id1 PO_HEADERS_ALL.PO_HEADER_ID%type := null;
65: g_release_id PO_RELEASES_ALL.PO_RELEASE_ID%type := null;
66: g_timezone VARCHAR2(255) := NULL;
67: g_vendor_address_line_2 PO_VENDOR_SITES.ADDRESS_LINE2%type := null;
68: g_vendor_address_line_3 PO_VENDOR_SITES.ADDRESS_LINE3%type := null;

Line 71: g_vendor_site_id PO_HEADERS_ALL.vendor_site_id%type := null;

67: g_vendor_address_line_2 PO_VENDOR_SITES.ADDRESS_LINE2%type := null;
68: g_vendor_address_line_3 PO_VENDOR_SITES.ADDRESS_LINE3%type := null;
69: g_vendor_country FND_TERRITORIES_TL.TERRITORY_SHORT_NAME%type := null;
70: g_vendor_city_state_zipInfo varchar2(500) := null;
71: g_vendor_site_id PO_HEADERS_ALL.vendor_site_id%type := null;
72: g_job_id PO_LINES_ALL.JOB_ID%type := null;
73: g_job_name PER_JOBS_VL.name%type := null;
74: g_phone HR_LOCATIONS.TELEPHONE_NUMBER_1%type := null;
75: --Bug 4504228 START

Line 84: g_currency_code PO_HEADERS_ALL.CURRENCY_CODE%type := null;

80: g_buyer_fax HR_LOCATIONS.TELEPHONE_NUMBER_2%type := null; --Bug5671523 Adding g_buyer_fax
81: g_fax HR_LOCATIONS.TELEPHONE_NUMBER_2%type := null;
82: g_location_name HR_LOCATIONS.LOCATION_CODE%type := null;
83: g_documentType PO_DOCUMENT_TYPES_TL.TYPE_NAME%type;
84: g_currency_code PO_HEADERS_ALL.CURRENCY_CODE%type := null;
85: g_current_currency_code PO_HEADERS_ALL.CURRENCY_CODE%type := null;
86: g_format_mask varchar2(100) := null;
87: g_buyer_org HR_ALL_ORGANIZATION_UNITS.NAME%type := NULL;
88: g_address_line4 HZ_LOCATIONS.ADDRESS4%TYPE := NULL; -- bug: 3463617

Line 85: g_current_currency_code PO_HEADERS_ALL.CURRENCY_CODE%type := null;

81: g_fax HR_LOCATIONS.TELEPHONE_NUMBER_2%type := null;
82: g_location_name HR_LOCATIONS.LOCATION_CODE%type := null;
83: g_documentType PO_DOCUMENT_TYPES_TL.TYPE_NAME%type;
84: g_currency_code PO_HEADERS_ALL.CURRENCY_CODE%type := null;
85: g_current_currency_code PO_HEADERS_ALL.CURRENCY_CODE%type := null;
86: g_format_mask varchar2(100) := null;
87: g_buyer_org HR_ALL_ORGANIZATION_UNITS.NAME%type := NULL;
88: g_address_line4 HZ_LOCATIONS.ADDRESS4%TYPE := NULL; -- bug: 3463617
89: g_vendor_address_line_4 HZ_LOCATIONS.ADDRESS4%TYPE := NULL; -- bug: 3463617

Line 109: g_legal_entity_org_id PO_HEADERS_ALL.ORG_ID%type := null;

105: g_legal_entity_town_or_city HR_LOCATIONS.TOWN_OR_CITY%type := null;
106: g_legal_entity_state HR_LOCATIONS.REGION_1%type := null;
107: g_legal_entity_postal_code HR_LOCATIONS.POSTAL_CODE%type := null;
108: g_legal_entity_country FND_TERRITORIES_TL.TERRITORY_SHORT_NAME%type := null;
109: g_legal_entity_org_id PO_HEADERS_ALL.ORG_ID%type := null;
110:
111: -- End of Legal Entity details ----
112:
113: g_dist_shipto_count number := NULL ; -- Variable which holds count of distinct shipment ship to ids

Line 117: g_with_terms po_headers_all.conterms_exist_flag%type;

113: g_dist_shipto_count number := NULL ; -- Variable which holds count of distinct shipment ship to ids
114: g_line_org_amount number := NULL;
115:
116: /*Bug#35833910 the variable determines whether the po has Terms and Conditions */
117: g_with_terms po_headers_all.conterms_exist_flag%type;
118:
119: -- Use proper debug logging
120: g_debug_stmt CONSTANT BOOLEAN := PO_DEBUG.is_debug_stmt_on;
121: g_debug_unexp CONSTANT BOOLEAN := PO_DEBUG.is_debug_unexp_on;

Line 192: l_with_terms PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE;

188: l_revision_num number;
189: l_request_id number;
190: l_authorization_status varchar2(25);
191: x_progress varchar2(100);
192: l_with_terms PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE;
193: l_set_lang boolean;
194: l_draft_id number; -- CLM
195: --
196: l_language_code fnd_languages.language_code%type;

Line 569: l_terms_flag po_headers_all.CONTERMS_EXIST_FLAG%type;

565:
566: l_language_code fnd_languages.language_code%type;
567: l_document_id number;
568: l_revision_num number;
569: l_terms_flag po_headers_all.CONTERMS_EXIST_FLAG%type;
570: l_document_subtype po_headers_all.type_lookup_code%TYPE;
571: l_document_type po_headers_all.type_lookup_code%TYPE;
572: l_count number;
573: l_filename fnd_lobs.file_name%type;

Line 570: l_document_subtype po_headers_all.type_lookup_code%TYPE;

566: l_language_code fnd_languages.language_code%type;
567: l_document_id number;
568: l_revision_num number;
569: l_terms_flag po_headers_all.CONTERMS_EXIST_FLAG%type;
570: l_document_subtype po_headers_all.type_lookup_code%TYPE;
571: l_document_type po_headers_all.type_lookup_code%TYPE;
572: l_count number;
573: l_filename fnd_lobs.file_name%type;
574: l_orgid number;

Line 571: l_document_type po_headers_all.type_lookup_code%TYPE;

567: l_document_id number;
568: l_revision_num number;
569: l_terms_flag po_headers_all.CONTERMS_EXIST_FLAG%type;
570: l_document_subtype po_headers_all.type_lookup_code%TYPE;
571: l_document_type po_headers_all.type_lookup_code%TYPE;
572: l_count number;
573: l_filename fnd_lobs.file_name%type;
574: l_orgid number;
575: x_progress varchar2(100);

Line 576: l_with_terms PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE;

572: l_count number;
573: l_filename fnd_lobs.file_name%type;
574: l_orgid number;
575: x_progress varchar2(100);
576: l_with_terms PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE;
577: l_terms varchar2(10);
578:
579: Begin
580: x_progress := 'PO_COMMUNICATION_PVT.PO_PDF_EXISTS';

Line 729: l_document_id PO_HEADERS_ALL.po_header_id%TYPE;

725: --l_legal_name hr_all_organization_units.name%TYPE;
726: --bug##3682458 replaced legal entity name with operating unit
727: l_operating_unit hr_all_organization_units.name%TYPE;
728:
729: l_document_id PO_HEADERS_ALL.po_header_id%TYPE;
730: l_docNumber PO_HEADERS_ALL.SEGMENT1%TYPE;
731: l_doc_num_rel varchar2(30);
732: l_release_num PO_RELEASES.release_num%TYPE; -- Bug 3215186;
733: l_ga_flag varchar2(1) := null; -- Bug # 3290385

Line 730: l_docNumber PO_HEADERS_ALL.SEGMENT1%TYPE;

726: --bug##3682458 replaced legal entity name with operating unit
727: l_operating_unit hr_all_organization_units.name%TYPE;
728:
729: l_document_id PO_HEADERS_ALL.po_header_id%TYPE;
730: l_docNumber PO_HEADERS_ALL.SEGMENT1%TYPE;
731: l_doc_num_rel varchar2(30);
732: l_release_num PO_RELEASES.release_num%TYPE; -- Bug 3215186;
733: l_ga_flag varchar2(1) := null; -- Bug # 3290385
734: l_doc_display_name FND_NEW_MESSAGES.message_text%TYPE; -- Bug 3215186

Line 849: from po_headers_all

845: l_document_id := p_document_id;
846: end if;
847:
848: select segment1, global_agreement_flag into l_docNumber, l_ga_flag
849: from po_headers_all
850: where po_header_id = l_document_id;
851:
852: wf_engine.SetItemAttrText (itemtype => l_itemtype,
853: itemkey => l_itemkey,

Line 1162: po_headers_all ph

1158:
1159: SELECT pv.language
1160: INTO l_supp_lang
1161: FROM po_vendor_sites_all pv,
1162: po_headers_all ph
1163: WHERE ph.po_header_id = l_header_id
1164: AND ph.vendor_site_id = pv.vendor_site_id;
1165:
1166: EXCEPTION

Line 1332: l_conterm_exists PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE;

1328: l_document_subtype po_headers.type_lookup_code%TYPE;
1329: l_document_type po_headers.type_lookup_code%TYPE;
1330: l_revision_num number;
1331: l_request_id number;
1332: l_conterm_exists PO_HEADERS_ALL.CONTERMS_EXIST_FLAG%TYPE;
1333: l_authorization_status varchar2(25);
1334: l_progress varchar2(200);
1335: --l_old_request_id number; --Bug 7299381
1336: l_withterms varchar2(1);

Line 1371: (ad.pk1_value = to_char((select vendor_id from po_headers_all

1367: fnd_attachment_functions af,
1368: fnd_lobs fl
1369: where ((ad.pk1_value = to_char(l_po_header_id) and ad.entity_name = 'PO_HEADERS')
1370: OR
1371: (ad.pk1_value = to_char((select vendor_id from po_headers_all
1372: where po_header_id = l_po_header_id)) and ad.entity_name = 'PO_VENDORS')
1373: OR
1374: (ad.pk1_value in (select to_char(po_line_id) from po_lines_all
1375: where po_header_id = l_po_header_id

Line 1425: from po_headers_all pha, po_releases_all pra

1421: OR
1422: (ad.pk1_value = to_char(l_po_release_id) and ad.entity_name = 'PO_RELEASES')
1423: OR
1424: (ad.pk1_value = to_char((select pha.vendor_id
1425: from po_headers_all pha, po_releases_all pra
1426: where pra.po_release_id = l_po_release_id
1427: and pha.po_header_id = pra.po_header_id
1428: )) and ad.entity_name = 'PO_VENDORS')
1429: OR

Line 1639: from po_headers_all pha, po_releases_all pra

1635: OR
1636: (ad.pk1_value = to_char(l_document_id) and ad.entity_name = 'PO_RELEASES')
1637: OR
1638: (ad.pk1_value = (select pha.vendor_id
1639: from po_headers_all pha, po_releases_all pra
1640: where pra.po_release_id = l_document_id
1641: and pha.po_header_id = pra.po_header_id
1642: ) and ad.entity_name = 'PO_VENDORS')
1643: OR

Line 1697: (ad.pk1_value = to_char((select vendor_id from po_headers_all

1693: fnd_attachment_functions af,
1694: fnd_lobs fl
1695: where ((ad.pk1_value = to_char(l_document_id) and ad.entity_name = 'PO_HEADERS')
1696: OR
1697: (ad.pk1_value = to_char((select vendor_id from po_headers_all
1698: where po_header_id = l_document_id)) and ad.entity_name = 'PO_VENDORS')
1699: OR
1700: (ad.pk1_value in (select to_char(po_line_id) from po_lines_all
1701: where po_header_id = l_document_id

Line 1993: FROM po_vendor_sites_all pv, po_headers_all ph

1989: END IF;
1990:
1991: BEGIN
1992: SELECT pv.language into l_supp_lang
1993: FROM po_vendor_sites_all pv, po_headers_all ph
1994: WHERE
1995: ph.po_header_id = l_header_id and ph.vendor_site_id = pv.vendor_site_id;
1996: EXCEPTION
1997: WHEN NO_DATA_FOUND THEN

Line 2636: l_conterm_exists_flag po_headers_all.CONTERMS_EXIST_FLAG%type;

2632: p_email_address in varchar2,
2633: p_request_id out nocopy number)
2634: IS
2635:
2636: l_conterm_exists_flag po_headers_all.CONTERMS_EXIST_FLAG%type;
2637: l_supp_lang fnd_languages.nls_language%type;
2638: l_territory fnd_languages.nls_territory%type;
2639: l_revision_num number;
2640: l_set_lang boolean;

Line 2710: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph

2706: l_progress := '010';
2707: begin
2708: if p_document_type in ('STANDARD', 'BLANKET', 'CONTRACT') then
2709: l_entity_name := 'PO_HEAD';
2710: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph
2711: where po_header_id = p_document_id and ph.vendor_site_id = pvs.vendor_site_id ;
2712: else
2713: l_entity_name := 'PO_REL';
2714: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph, po_releases_all pr

Line 2714: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph, po_releases_all pr

2710: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph
2711: where po_header_id = p_document_id and ph.vendor_site_id = pvs.vendor_site_id ;
2712: else
2713: l_entity_name := 'PO_REL';
2714: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph, po_releases_all pr
2715: where ph.po_header_id = pr.po_header_id and pr.po_release_id = p_document_id and
2716: ph.vendor_site_id = pvs.vendor_site_id ;
2717: end if;
2718: IF g_debug_stmt THEN

Line 2740: select NVL(conterms_exist_flag, 'N') into l_conterm_exists_flag from po_headers_all

2736: end if;
2737:
2738: l_buyer_language_code := userenv('LANG');
2739: begin
2740: select NVL(conterms_exist_flag, 'N') into l_conterm_exists_flag from po_headers_all
2741: where
2742: po_header_id = p_document_id and revision_num = p_revision_number;
2743:
2744: exception

Line 3110: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph

3106: end if;
3107:
3108: l_progress := '200';
3109: if p_document_type in ('STANDARD', 'BLANKET', 'CONTRACT') then
3110: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph
3111: where po_header_id = p_document_id and ph.vendor_site_id = pvs.vendor_site_id ;
3112: else
3113: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph, po_releases_all pr
3114: where ph.po_header_id = pr.po_header_id and pr.po_release_id = p_document_id and

Line 3113: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph, po_releases_all pr

3109: if p_document_type in ('STANDARD', 'BLANKET', 'CONTRACT') then
3110: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph
3111: where po_header_id = p_document_id and ph.vendor_site_id = pvs.vendor_site_id ;
3112: else
3113: select pvs.language into l_supp_lang from po_vendor_sites pvs , po_headers_all ph, po_releases_all pr
3114: where ph.po_header_id = pr.po_header_id and pr.po_release_id = p_document_id and
3115: ph.vendor_site_id = pvs.vendor_site_id ;
3116: end if;
3117:

Line 3267: l_org_id po_headers_all.org_id%type;

3263:
3264: --
3265: l_file_name fnd_lobs.file_name%type;
3266: l_file_content_type fnd_lobs.file_content_type%type;
3267: l_org_id po_headers_all.org_id%type;
3268: l_api_name CONSTANT VARCHAR2(25) := 'Store_Blob';
3269: l_progress VARCHAR2(3);
3270:
3271: Begin

Line 3299: SELECT org_id INTO l_org_id FROM po_headers_all WHERE po_header_id = p_document_id;

3295: END IF;
3296:
3297: --Start of code changes for the bug 12799972
3298: IF (l_org_id IS null) THEN
3299: SELECT org_id INTO l_org_id FROM po_headers_all WHERE po_header_id = p_document_id;
3300: po_moac_utils_pvt.SET_POLICY_CONTEXT('S', l_org_id );
3301: END IF;
3302: -- End of code changes for the bug 12799972
3303:

Line 3868: from po_vendor_sites_all pvs, po_headers_all ph, fnd_languages fl

3864: Begin
3865:
3866: if l_document_type in ('PO', 'PA') then
3867: select fl.language_code into l_language
3868: from po_vendor_sites_all pvs, po_headers_all ph, fnd_languages fl
3869: where ph.vendor_site_id = pvs.vendor_site_id
3870: and ph.po_header_id = l_document_id
3871: and pvs.language = fl.nls_language;
3872: elsif l_document_type = 'RELEASE' then

Line 3874: from po_vendor_sites_all pvs , po_headers_all ph,

3870: and ph.po_header_id = l_document_id
3871: and pvs.language = fl.nls_language;
3872: elsif l_document_type = 'RELEASE' then
3873: select fl.language_code into l_language
3874: from po_vendor_sites_all pvs , po_headers_all ph,
3875: po_releases_all pr, fnd_languages fl
3876: where ph.po_header_id = pr.po_header_id
3877: and pr.po_release_id = l_document_id
3878: and ph.vendor_site_id = pvs.vendor_site_id

Line 4056: l_itemkey PO_HEADERS_ALL.wf_item_key%TYPE;

4052: l_language fnd_languages.language_code%type;
4053: l_withTerms varchar2(1);
4054:
4055: l_itemtype po_document_types.wf_approval_itemtype%type;
4056: l_itemkey PO_HEADERS_ALL.wf_item_key%TYPE;
4057: l_message FND_NEW_MESSAGES.message_text%TYPE;
4058:
4059: l_okc_doc_length number; -- Bug 4173198
4060:

Line 4235: l_document_id po_headers_all.po_header_id%type;

4231: content_type in varchar2,
4232: document in out nocopy blob,
4233: document_type in out nocopy varchar2) IS
4234: l_filename fnd_lobs.file_name%type;
4235: l_document_id po_headers_all.po_header_id%type;
4236: l_document_number po_headers_all.segment1%type;
4237: l_document_type po_headers_all.type_lookup_code%TYPE;
4238: l_org_id po_headers_all.org_id%type;
4239: l_revision_number po_headers_all.revision_num%type;

Line 4236: l_document_number po_headers_all.segment1%type;

4232: document in out nocopy blob,
4233: document_type in out nocopy varchar2) IS
4234: l_filename fnd_lobs.file_name%type;
4235: l_document_id po_headers_all.po_header_id%type;
4236: l_document_number po_headers_all.segment1%type;
4237: l_document_type po_headers_all.type_lookup_code%TYPE;
4238: l_org_id po_headers_all.org_id%type;
4239: l_revision_number po_headers_all.revision_num%type;
4240: l_language fnd_languages.language_code%type;

Line 4237: l_document_type po_headers_all.type_lookup_code%TYPE;

4233: document_type in out nocopy varchar2) IS
4234: l_filename fnd_lobs.file_name%type;
4235: l_document_id po_headers_all.po_header_id%type;
4236: l_document_number po_headers_all.segment1%type;
4237: l_document_type po_headers_all.type_lookup_code%TYPE;
4238: l_org_id po_headers_all.org_id%type;
4239: l_revision_number po_headers_all.revision_num%type;
4240: l_language fnd_languages.language_code%type;
4241: l_entity_name fnd_attached_documents.entity_name%type;

Line 4238: l_org_id po_headers_all.org_id%type;

4234: l_filename fnd_lobs.file_name%type;
4235: l_document_id po_headers_all.po_header_id%type;
4236: l_document_number po_headers_all.segment1%type;
4237: l_document_type po_headers_all.type_lookup_code%TYPE;
4238: l_org_id po_headers_all.org_id%type;
4239: l_revision_number po_headers_all.revision_num%type;
4240: l_language fnd_languages.language_code%type;
4241: l_entity_name fnd_attached_documents.entity_name%type;
4242: l_itemtype wf_items.item_type%type;

Line 4239: l_revision_number po_headers_all.revision_num%type;

4235: l_document_id po_headers_all.po_header_id%type;
4236: l_document_number po_headers_all.segment1%type;
4237: l_document_type po_headers_all.type_lookup_code%TYPE;
4238: l_org_id po_headers_all.org_id%type;
4239: l_revision_number po_headers_all.revision_num%type;
4240: l_language fnd_languages.language_code%type;
4241: l_entity_name fnd_attached_documents.entity_name%type;
4242: l_itemtype wf_items.item_type%type;
4243: l_itemkey wf_items.item_key%type;

Line 4574: from po_headers_all pha,po_releases_all pra

4570: fnd_attachment_functions af,
4571: fnd_lobs fl
4572: where (
4573: (ad.pk1_value=to_char((select pha.vendor_id
4574: from po_headers_all pha,po_releases_all pra
4575: where pra.po_release_id=p_document_id
4576: and pha.po_header_id=pra.po_header_id
4577: )) and ad.entity_name='PO_VENDORS'))
4578: and d.document_id = ad.document_id

Line 4686: (ad.pk1_value=to_char((select vendor_id from po_headers_all

4682: fnd_doc_category_usages dcu,
4683: fnd_attachment_functions af,
4684: fnd_lobs fl
4685: where (
4686: (ad.pk1_value=to_char((select vendor_id from po_headers_all
4687: where po_header_id=p_document_id)) and ad.entity_name='PO_VENDORS'))
4688:
4689: and d.document_id = ad.document_id
4690: and dcu.category_id = d.category_id

Line 4860: l_vendor_id PO_HEADERS_ALL.vendor_id%type;

4856: l_line_Attachments clob;
4857: l_shipmentAttachmentQuery varchar2(1200); --Bug5213932 increase length
4858: l_disAttachments clob;
4859: l_time varchar2(50);
4860: l_vendor_id PO_HEADERS_ALL.vendor_id%type;
4861: l_release_header_id PO_HEADERS_ALL.po_header_id%type;
4862: l_supp_org PO_VENDORS.VENDOR_NAME%type;
4863: l_po_number PO_HEADERS.SEGMENT1%type;
4864: l_message varchar2(2001);

Line 4861: l_release_header_id PO_HEADERS_ALL.po_header_id%type;

4857: l_shipmentAttachmentQuery varchar2(1200); --Bug5213932 increase length
4858: l_disAttachments clob;
4859: l_time varchar2(50);
4860: l_vendor_id PO_HEADERS_ALL.vendor_id%type;
4861: l_release_header_id PO_HEADERS_ALL.po_header_id%type;
4862: l_supp_org PO_VENDORS.VENDOR_NAME%type;
4863: l_po_number PO_HEADERS.SEGMENT1%type;
4864: l_message varchar2(2001);
4865: l_ammendment_message varchar2(2001);

Line 4948: SELECT org_id INTO l_org_id FROM po_headers_all WHERE po_header_id = p_document_id;

4944: l_org_id := po_moac_utils_pvt.get_current_org_id;
4945:
4946: IF(l_org_id IS null) Then
4947:
4948: SELECT org_id INTO l_org_id FROM po_headers_all WHERE po_header_id = p_document_id;
4949: po_moac_utils_pvt.SET_POLICY_CONTEXT('S', l_org_id );
4950:
4951: END IF;
4952: --Bug 9391634 org_id was not set because of which fetching data from PO_DOCUMENT_TYPES_TL give error

Line 4984: FROM hr_all_organization_units hle, po_vendors vn, po_headers_all ph

4980:
4981: /*Bug5983107 Commenting out the below sql and writing the new sql below without reference to hr_all_organization_units*/
4982: /* SELECT hle.name, vn.vendor_name, ph.segment1, ph.change_summary, ph.vendor_id, ph.currency_code
4983: INTO po_communication_pvt.g_buyer_org, l_supp_org, l_po_number, l_change_summary, l_vendor_id, g_current_currency_code
4984: FROM hr_all_organization_units hle, po_vendors vn, po_headers_all ph
4985: WHERE to_char(hle.organization_id) = (select org_information2 from hr_organization_information where
4986: org_information_context = 'Operating Unit Information' and organization_id = ph.org_id) AND vn.vendor_id = ph.vendor_id
4987: AND ph.po_header_id = p_document_id AND ph.revision_num = p_revision_num; */
4988:

Line 4991: FROM po_vendors vn, po_headers_all ph

4987: AND ph.po_header_id = p_document_id AND ph.revision_num = p_revision_num; */
4988:
4989: SELECT vn.vendor_name, ph.segment1, ph.change_summary, ph.vendor_id, ph.currency_code
4990: INTO l_supp_org, l_po_number, l_change_summary, l_vendor_id, g_current_currency_code
4991: FROM po_vendors vn, po_headers_all ph
4992: WHERE vn.vendor_id = ph.vendor_id
4993: AND ph.po_header_id = p_document_id AND ph.revision_num = p_revision_num;
4994:
4995:

Line 5022: select org_id into l_org_id from po_headers_all where po_header_id = p_document_id ;

5018: END IF;
5019:
5020: /*Bug5983107 Use the below API to get the legal entity name */
5021: BEGIN
5022: select org_id into l_org_id from po_headers_all where po_header_id = p_document_id ;
5023: l_legal_entity_id := PO_CORE_S.get_default_legal_entity_id(l_org_id);
5024:
5025: XLE_UTILITIES_GRP.Get_LegalEntity_Info(
5026: x_return_status,

Line 5056: FROM po_vendors vn, po_headers_all ph

5052: -- select the header id into g_release_header_id global variable for a given release id.
5053: SELECT po_header_id INTO PO_COMMUNICATION_PVT.g_release_header_id FROM po_releases_all WHERE po_release_id = p_document_id;
5054:
5055: SELECT ph.vendor_id, ph.currency_code INTO l_vendor_id, g_current_currency_code
5056: FROM po_vendors vn, po_headers_all ph
5057: WHERE vn.vendor_id = ph.vendor_id
5058: AND ph.po_header_id = PO_COMMUNICATION_PVT.g_release_header_id ;
5059:
5060: IF p_which_tables = 'MAIN' THEN

Line 5803: l_price_modifier_query3 := 'CURSOR (SELECT pha.segment1 ponum FROM po_headers_all pha '

5799: || 'AND pax1.parent_adjustment_id is null order by pax1.pricing_group_sequence) AS PRICE_MODIFIERS';
5800: l_price_modifier_query2 := 'CURSOR (SELECT pax2.* FROM PO_PRICE_ADJUSTMENTS_XML pax2 '
5801: || 'WHERE pax2.po_header_id = plx.from_header_id AND pax2.po_line_id = plx.from_line_id '
5802: || 'AND pax2.parent_adjustment_id is null order by pax2.pricing_group_sequence) AS ADD_PRICE_MODIFIERS';
5803: l_price_modifier_query3 := 'CURSOR (SELECT pha.segment1 ponum FROM po_headers_all pha '
5804: || 'WHERE pha.po_header_id = plx.from_header_id) AS ADD_PRICE_PONUM';
5805: --
5806:
5807: l_xml_query := 'SELECT phx.*, PO_COMMUNICATION_PVT.getIsComplexWorkPO() is_complex_work_po, PO_COMMUNICATION_PVT.getDocumentType() document_type,

Line 7234: po_headers_all ph

7230: Select ph.QUOTE_VENDOR_QUOTE_NUMBER, ph.SEGMENT1, ph.GLOBAL_AGREEMENT_FLAG into
7231: PO_COMMUNICATION_PVT.g_quote_number, PO_COMMUNICATION_PVT.g_agreement_number,
7232: PO_COMMUNICATION_PVT.g_agreement_flag
7233: FROM
7234: po_headers_all ph
7235: WHERE
7236: ph.PO_HEADER_ID = p_header_id;
7237:
7238:

Line 7486: from po_headers_all

7482: document and signature */
7483:
7484: select acceptance_required_flag
7485: into l_acceptance_req_flag
7486: from po_headers_all
7487: where po_header_id= p_header_id;
7488:
7489: IF (nvl(l_acceptance_req_flag,'N') <> 'S') THEN
7490: l_signed := TRUE;

Line 7578: FROM po_headers_all ph

7574: -- Query for getting the PO number i.e segment1.
7575: IF p_document_type in ('PO', 'PA') THEN
7576: IF (p_draft_id = -1 or p_is_conf_doc = 'Y') THEN --CLM
7577: SELECT ph.segment1 into l_po_number
7578: FROM po_headers_all ph
7579: WHERE po_header_id = p_document_id ;
7580: ELSE --CLM
7581: SELECT modification_number into l_po_number
7582: FROM po_drafts

Line 7589: FROM po_headers_all ph, po_releases_all pr

7585: ELSE
7586: /* Begin Edit By Akyanama Bug # 13342437*/
7587: SELECT ph.segment1, release_num into l_po_number, l_release_num
7588: /* End Edit By Akyanama Bug # 13342437*/
7589: FROM po_headers_all ph, po_releases_all pr
7590: WHERE ph.po_header_id = pr.po_header_id and pr.po_release_id = p_document_id ;
7591: END IF;
7592:
7593: EXCEPTION

Line 8100: -- FROM po_headers_all poh

8096: SELECT NVL(poh.pending_signature_flag, 'N')
8097: , hou.name
8098: INTO x_pendingSignatureFlag
8099: , PO_COMMUNICATION_PVT.g_ou_name
8100: -- FROM po_headers_all poh
8101: FROM po_headers_merge_v poh
8102: , hr_all_organization_units hou
8103: WHERE poh.po_header_id = p_documentID
8104: AND poh.draft_id = p_draftId --CLM

Line 8161: l_style_id PO_HEADERS_ALL.style_id%TYPE;

8157:
8158: d_progress NUMBER;
8159: d_module VARCHAR2(70) := 'po.plsql.PO_COMMUNICATION_PVT.setIsComplexWorkPO';
8160: l_is_complex BOOLEAN;
8161: l_style_id PO_HEADERS_ALL.style_id%TYPE;
8162:
8163:
8164: BEGIN
8165:

Line 8277: x_item_type po_headers_all.wf_item_type%TYPE;

8273: p_document_type VARCHAR2,
8274: p_profile_option VARCHAR2) RETURN VARCHAR2
8275: IS
8276:
8277: x_item_type po_headers_all.wf_item_type%TYPE;
8278: x_item_key po_headers_all.wf_item_key%TYPE;
8279: l_profile_value fnd_profile_option_values.profile_option_value%TYPE;
8280: l_progress VARCHAR2(10);
8281:

Line 8278: x_item_key po_headers_all.wf_item_key%TYPE;

8274: p_profile_option VARCHAR2) RETURN VARCHAR2
8275: IS
8276:
8277: x_item_type po_headers_all.wf_item_type%TYPE;
8278: x_item_key po_headers_all.wf_item_key%TYPE;
8279: l_profile_value fnd_profile_option_values.profile_option_value%TYPE;
8280: l_progress VARCHAR2(10);
8281:
8282: l_preparer_user_id NUMBER;

Line 8309: FROM po_headers_all

8305:
8306: ELSE
8307: SELECT wf_item_type, wf_item_key
8308: INTO x_item_type, x_item_key
8309: FROM po_headers_all
8310: WHERE po_header_id = p_document_id;
8311:
8312: l_progress := '002';
8313: