DBA Data[Home] [Help]

APPS.PO_EMAIL_GENERATE dependencies on PO_HEADERS

Line 23: | VARCHAR2(240) to po_headers_all.note_to_vendor%TYPE.

19: | Added an IF conditional to display the item revision number
20: | when it is present
21: | - PO UTF8 Project - tpoon - 09/06/2002
22: | Changed the type of l_header_note_to_vendor from
23: | VARCHAR2(240) to po_headers_all.note_to_vendor%TYPE.
24: |
25: | - PO TIMEPHASED - davidng - 09/09/2002
26: | Project 1. Added start_date and end_date to cursor shipment_blanket_cursor
27: | to display effective dates at the Blanket Agreement price breaks.

Line 99: x_subtype po_headers.type_lookup_code%TYPE;

95:
96: l_extension NUMBER := 0;
97: l_extension_total NUMBER := 0;
98: l_blanket_total_amount NUMBER := 0;
99: x_subtype po_headers.type_lookup_code%TYPE;
100: l_datatype_count NUMBER := 0;
101:
102: l_vendor_quote_num po_lines_print.VENDOR_QUOTE_NUM%TYPE;
103: l_po_quote_num po_lines_print.PO_QUOTE_NUM%TYPE;

Line 104: l_po_header_id po_headers.po_header_id%TYPE;

100: l_datatype_count NUMBER := 0;
101:
102: l_vendor_quote_num po_lines_print.VENDOR_QUOTE_NUM%TYPE;
103: l_po_quote_num po_lines_print.PO_QUOTE_NUM%TYPE;
104: l_po_header_id po_headers.po_header_id%TYPE;
105: l_src_ga_flag po_lines_print.SRC_GA_FLAG%TYPE; -- GA FPI
106:
107: l_org_id NUMBER;
108: x_orgid NUMBER;

Line 141: l_global_flag po_headers_all.global_agreement_flag%type;

137: l_po_line_only varchar2(2) := 'Y';
138: x_display_type varchar2(60);
139:
140: --
141: l_global_flag po_headers_all.global_agreement_flag%type;
142:
143: -- PO_WF_NOTIF_HEADER_NOTE
144: l_header_text FND_DOCUMENTS_LONG_TEXT.LONG_TEXT%TYPE;
145:

Line 155: -- This holds data from either po_headers.note_to_vendor or

151: -- variable to hold html string for attachments
152: l_attachments_text varchar2(32000) := '';
153:
154: /** Fix for PO UTF8 Project **/
155: -- This holds data from either po_headers.note_to_vendor or
156: -- po_releases.note_to_vendor:
157: l_header_note_to_vendor po_headers_all.note_to_vendor%TYPE;
158: -- l_header_note_to_vendor varchar2(240);
159:

Line 157: l_header_note_to_vendor po_headers_all.note_to_vendor%TYPE;

153:
154: /** Fix for PO UTF8 Project **/
155: -- This holds data from either po_headers.note_to_vendor or
156: -- po_releases.note_to_vendor:
157: l_header_note_to_vendor po_headers_all.note_to_vendor%TYPE;
158: -- l_header_note_to_vendor varchar2(240);
159:
160: x_pb_count number;
161:

Line 361: po_headers_all poh, -- --po_headers poh,

357: null,
358: null
359: --
360: FROM po_lines pol,
361: po_headers_all poh, -- --po_headers poh,
362: mtl_system_items_kfv msi,
363: mtl_units_of_measure_vl umvl,
364: financials_system_params_all fsp -- --financials_system_parameters fsp
365: where POL.PO_HEADER_ID = v_document_id

Line 448: from po_headers_all

444: -- show warning message to the supplier
445: if(l_document_type in ('PO', 'PA')) then
446: select authorization_status
447: into l_document_status
448: from po_headers_all
449: where po_header_id = l_document_id;
450:
451: elsif (l_document_type = 'RELEASE') then
452: /* Bug 2791859 po_releases_all should be used instead of po_releases */

Line 458: from po_headers_all

454: where po_release_id = l_document_id;
455:
456: select authorization_status
457: into l_document_status
458: from po_headers_all
459: where po_header_id = l_po_header_id;
460: end if;
461:
462: if(l_document_status is null or

Line 482: from po_headers

478:
479: IF (l_document_type = 'PA') THEN
480: select type_lookup_code
481: into x_subtype
482: from po_headers
483: where po_header_id = l_document_id;
484: END IF;
485:
486: IF (l_document_type = 'PA') and (x_subtype = 'CONTRACT') THEN

Line 589: from po_headers

585: IF (l_document_type = 'PO') THEN
586:
587: select org_id, note_to_vendor ,currency_code
588: into l_org_id, l_header_note_to_vendor , l_currency_code
589: from po_headers
590: where po_header_id = to_number(l_document_id);
591: open shipment_cursor(l_document_id);
592:
593:

Line 603: from po_headers

599: from po_releases
600: where po_release_id = to_number(l_document_id);
601:
602: select currency_code into l_currency_code
603: from po_headers
604: where po_header_id = l_po_header_id;
605:
606: open shipment_release_cursor(l_document_id);
607:

Line 612: from po_headers

608: ELSIF (l_document_type = 'PA') THEN
609:
610: select org_id, note_to_vendor ,currency_code, blanket_total_amount
611: into l_org_id, l_header_note_to_vendor ,l_currency_code, l_blanket_total_amount
612: from po_headers
613: where po_header_id = to_number(l_document_id);
614:
615: if x_pb_count <> 0 then
616: open shipment_blanket_cursor(l_document_id);

Line 640: open attachments_cursor('PO_HEADERS', l_document_id);

636: */
637:
638: -- Getting the header level text information and displaying it if it exists
639: if (l_document_type in ('PO', 'PA')) then
640: open attachments_cursor('PO_HEADERS', l_document_id);
641: elsif (l_document_type = 'RELEASE') then
642: open attachments_cursor('PO_RELEASES', l_document_id);
643: else
644: null;

Line 703: open attachments_cursor('PO_HEADERS', l_po_header_id);

699: if (l_document_type = 'RELEASE') THEN
700: select po_header_id into l_po_header_id from po_releases
701: where po_release_id = l_document_id;
702:
703: open attachments_cursor('PO_HEADERS', l_po_header_id);
704:
705: loop
706:
707: fetch attachments_cursor into l_datatype_id, l_media_id;

Line 1071: from po_headers_all where po_header_id = l_line_loc.from_header_id;

1067: l_line_loc.from_line_id is NOT NULL)
1068: then
1069: begin
1070: select nvl(global_agreement_flag, 'N') into l_global_flag
1071: from po_headers_all where po_header_id = l_line_loc.from_header_id;
1072: exception
1073: when NO_DATA_FOUND then
1074: l_global_flag := 'N';
1075: end;

Line 1080: open attachments_from_ga_cursor('PO_HEADERS', l_line_loc.from_header_id);

1076:
1077: if l_global_flag = 'Y' then
1078: --
1079: --Use attachments_from_ga_cursor instead of attachments_cursor
1080: open attachments_from_ga_cursor('PO_HEADERS', l_line_loc.from_header_id);
1081: loop
1082:
1083: fetch attachments_from_ga_cursor into l_datatype_id, l_media_id;
1084: exit when attachments_from_ga_cursor%NOTFOUND;

Line 1777: from po_headers

1773:
1774: IF (l_document_type = 'PO') THEN
1775: select org_id, note_to_vendor,currency_code
1776: into l_org_id, l_header_note_to_vendor ,l_currency_code
1777: from po_headers
1778: where po_header_id = to_number(l_document_id);
1779: open shipment_cursor(l_document_id);
1780: ELSIF (l_document_type = 'RELEASE') THEN
1781: select org_id, note_to_vendor

Line 1788: from po_headers

1784: open shipment_release_cursor(l_document_id);
1785: ELSIF (l_document_type = 'PA') THEN
1786: select org_id, note_to_vendor,currency_code
1787: into l_org_id, l_header_note_to_vendor ,l_currency_code
1788: from po_headers
1789: where po_header_id = to_number(l_document_id);
1790: open shipment_blanket_cursor(l_document_id);
1791: END IF;
1792:

Line 1797: open attachments_cursor('PO_HEADERS', l_document_id);

1793: -- l_currency_code := PO_CORE_S2.get_base_currency;
1794:
1795: -- Getting the header level text information and displaying it if it exists
1796: if (l_document_type = 'PO') then
1797: open attachments_cursor('PO_HEADERS', l_document_id);
1798: elsif (l_document_type = 'RELEASE') then
1799: open attachments_cursor('PO_RELEASES', l_document_id);
1800: else
1801: null;

Line 1857: open attachments_cursor('PO_HEADERS', l_po_header_id);

1853:
1854: select po_header_id into l_po_header_id from po_releases
1855: where po_release_id = l_document_id;
1856:
1857: open attachments_cursor('PO_HEADERS', l_po_header_id);
1858:
1859: loop
1860:
1861: fetch attachments_cursor into l_datatype_id, l_media_id;

Line 2070: from po_headers_all where po_header_id = l_line_loc.from_header_id;

2066: l_line_loc.from_line_id is NOT NULL)
2067: then
2068: begin
2069: select nvl(global_agreement_flag, 'N') into l_global_flag
2070: from po_headers_all where po_header_id = l_line_loc.from_header_id;
2071: exception
2072: when NO_DATA_FOUND then
2073: l_global_flag := 'N';
2074: end;

Line 2079: open attachments_from_ga_cursor('PO_HEADERS', l_line_loc.from_header_id);

2075:
2076: if l_global_flag = 'Y' then
2077: --
2078: --Use attachments_from_ga_cursor instead of attachments_cursor
2079: open attachments_from_ga_cursor('PO_HEADERS', l_line_loc.from_header_id);
2080: loop
2081:
2082: fetch attachments_from_ga_cursor into l_datatype_id, l_media_id;
2083: exit when attachments_from_ga_cursor%NOTFOUND;

Line 2423: l_po_number PO_HEADERS_ALL.SEGMENT1%TYPE;

2419: l_bill_to_region3 hr_locations_all.region_3%TYPE;
2420: l_bill_to_id NUMBER;
2421:
2422:
2423: l_po_number PO_HEADERS_ALL.SEGMENT1%TYPE;
2424: l_po_revision NUMBER;
2425: l_release_num PO_RELEASES_ALL.RELEASE_NUM%TYPE;
2426:
2427: l_date_of_order VARCHAR2(80);

Line 2432: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

2428: l_buyer VARCHAR2(80);
2429: l_date_of_revision VARCHAR2(80);
2430: l_revision_buyer VARCHAR2(80);
2431:
2432: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
2433: l_ship_via_lookup_desc ORG_FREIGHT_TL.FREIGHT_CODE_TL%TYPE;
2434: l_fob_lookup_code PO_HEADERS_ALL.FOB_LOOKUP_CODE%TYPE;
2435: l_fob_lookup_desc PO_LOOKUP_CODES.DISPLAYED_FIELD%TYPE;
2436: l_freight_terms_lc PO_HEADERS_ALL.FREIGHT_TERMS_LOOKUP_CODE%TYPE;

Line 2434: l_fob_lookup_code PO_HEADERS_ALL.FOB_LOOKUP_CODE%TYPE;

2430: l_revision_buyer VARCHAR2(80);
2431:
2432: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
2433: l_ship_via_lookup_desc ORG_FREIGHT_TL.FREIGHT_CODE_TL%TYPE;
2434: l_fob_lookup_code PO_HEADERS_ALL.FOB_LOOKUP_CODE%TYPE;
2435: l_fob_lookup_desc PO_LOOKUP_CODES.DISPLAYED_FIELD%TYPE;
2436: l_freight_terms_lc PO_HEADERS_ALL.FREIGHT_TERMS_LOOKUP_CODE%TYPE;
2437: l_freight_terms_dsp PO_LOOKUP_CODES.DISPLAYED_FIELD%TYPE;
2438: l_payment_terms_id NUMBER;

Line 2436: l_freight_terms_lc PO_HEADERS_ALL.FREIGHT_TERMS_LOOKUP_CODE%TYPE;

2432: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
2433: l_ship_via_lookup_desc ORG_FREIGHT_TL.FREIGHT_CODE_TL%TYPE;
2434: l_fob_lookup_code PO_HEADERS_ALL.FOB_LOOKUP_CODE%TYPE;
2435: l_fob_lookup_desc PO_LOOKUP_CODES.DISPLAYED_FIELD%TYPE;
2436: l_freight_terms_lc PO_HEADERS_ALL.FREIGHT_TERMS_LOOKUP_CODE%TYPE;
2437: l_freight_terms_dsp PO_LOOKUP_CODES.DISPLAYED_FIELD%TYPE;
2438: l_payment_terms_id NUMBER;
2439: l_payment_terms ap_terms_val_v.name%TYPE;
2440: l_customer_acct_num PO_VENDOR_SITES.CUSTOMER_NUM%TYPE;

Line 2478: l_start_date po_headers.start_date%type;

2474: l_company_name hr_all_organization_units.name%TYPE;
2475:
2476: l_requestor_count NUMBER := 0;
2477: l_multiple_flag varchar2(1);
2478: l_start_date po_headers.start_date%type;
2479: l_end_date po_headers.end_date%type;
2480: l_blanket_amt_agreed NUMBER := 0;
2481: x_subtype po_headers.type_lookup_code%TYPE;
2482:

Line 2479: l_end_date po_headers.end_date%type;

2475:
2476: l_requestor_count NUMBER := 0;
2477: l_multiple_flag varchar2(1);
2478: l_start_date po_headers.start_date%type;
2479: l_end_date po_headers.end_date%type;
2480: l_blanket_amt_agreed NUMBER := 0;
2481: x_subtype po_headers.type_lookup_code%TYPE;
2482:
2483: cursor po_requestor_cursor (v_po_header_id varchar2) IS

Line 2481: x_subtype po_headers.type_lookup_code%TYPE;

2477: l_multiple_flag varchar2(1);
2478: l_start_date po_headers.start_date%type;
2479: l_end_date po_headers.end_date%type;
2480: l_blanket_amt_agreed NUMBER := 0;
2481: x_subtype po_headers.type_lookup_code%TYPE;
2482:
2483: cursor po_requestor_cursor (v_po_header_id varchar2) IS
2484: select distinct deliver_to_person_id
2485: FROM po_distributions

Line 2523: FROM po_headers

2519: and PLL.shipment_type = 'PRICE BREAK';
2520:
2521: cursor pa_header_location_id_cursor (v_po_header_id varchar2) IS
2522: select ship_to_location_id
2523: FROM po_headers
2524: where PO_HEADER_ID = to_number(v_po_header_id);
2525:
2526: cursor pa_location_id_cursor (v_po_header_id varchar2) IS
2527: select distinct pll.ship_to_location_id

Line 2562: from po_headers_all

2558: -- show warning message to the supplier
2559: if(l_document_type in ('PO', 'PA')) then
2560: select authorization_status
2561: into l_document_status
2562: from po_headers_all
2563: where po_header_id = l_document_id;
2564:
2565: elsif (l_document_type = 'RELEASE') then
2566:

Line 2576: from po_headers_all

2572: where po_release_id = l_document_id;
2573:
2574: select authorization_status
2575: into l_document_status
2576: from po_headers_all
2577: where po_header_id = l_po_header_id;
2578: end if;
2579:
2580: if(l_document_status is null or

Line 2603: from po_headers

2599: ** Desc: Get the subtype
2600: */
2601: select type_lookup_code
2602: into x_subtype
2603: from po_headers
2604: where po_header_id = l_document_id;
2605:
2606: begin
2607:

Line 2609: select org_id into l_operating_unit_id from po_headers_all

2605:
2606: begin
2607:
2608: /* Need the org_id to get the operating unit name later */
2609: select org_id into l_operating_unit_id from po_headers_all
2610: where po_header_id = l_document_id;
2611:
2612: l_po_header_id := l_document_id;
2613:

Line 2863: select org_id into l_operating_unit_id from po_headers

2859:
2860: select po_header_id into l_po_header_id from po_releases
2861: where po_release_id = l_document_id;
2862:
2863: select org_id into l_operating_unit_id from po_headers
2864: where po_header_id = l_po_header_id;
2865:
2866: l_requestor_count := 0;
2867: l_multiple_flag := 'N';

Line 3083: from po_headers

3079: into l_bill_to_id, l_vendor_site_id, l_vendor_id,
3080: l_po_number, l_po_revision, l_date_of_order, l_date_of_revision,
3081: l_ship_via_lookup_code, l_freight_terms_lc, l_fob_lookup_code, l_vendor_contact_id,
3082: l_payment_terms_id,l_start_date,l_end_date,l_blanket_amt_agreed
3083: from po_headers
3084: where po_header_id = to_number(l_po_header_id);
3085:
3086: po_core_s.get_displayed_value('FREIGHT TERMS', l_freight_terms_lc,l_freight_terms_dsp);
3087:

Line 3272: -- Need to obtain the buyers from po_headers_archive and po_releases_archive

3268: when no_data_found then
3269: null;
3270: end;
3271:
3272: -- Need to obtain the buyers from po_headers_archive and po_releases_archive
3273: -- for global buyer's need to get buyer name from per_employees_current_x
3274: if (l_document_type in ('PO', 'PA')) THEN
3275: -- there will be an entry in this table regardless of whether there is a revision
3276: -- or not

Line 3283: where person_id = (select agent_id from po_headers

3279: if (l_po_revision = 0) then
3280:
3281: select full_name into l_buyer
3282: from per_all_people_f --
3283: where person_id = (select agent_id from po_headers
3284: where po_header_id = to_number(l_po_header_id))
3285: and trunc(sysdate) between trunc(effective_start_date) and trunc(effective_end_date); --Bug#5161502
3286:
3287: else

Line 3290: where person_id = (select agent_id from po_headers_archive

3286:
3287: else
3288: select full_name into l_buyer
3289: from per_all_people_f --
3290: where person_id = (select agent_id from po_headers_archive
3291: where po_header_id = to_number(l_po_header_id) and
3292: revision_num = 0)
3293: and trunc(sysdate) between trunc(effective_start_date) and trunc(effective_end_date); --Bug#5161502
3294: end if;

Line 3306: where person_id = (select agent_id from po_headers_archive

3302: begin
3303: if (l_po_revision > 0) then
3304: select full_name into l_revision_buyer
3305: from per_all_people_f --
3306: where person_id = (select agent_id from po_headers_archive
3307: where po_header_id = to_number(l_po_header_id) and
3308: revision_num = l_po_revision)
3309: and trunc(sysdate) between trunc(effective_start_date) and trunc(effective_end_date); --Bug#5161502
3310: end if;

Line 3800: from po_headers

3796: end if;
3797: IF (l_document_type = 'PO') THEN
3798: select type_lookup_code
3799: into x_subtype
3800: from po_headers
3801: where po_header_id = l_document_id;
3802:
3803: IF (x_subtype = 'PLANNED') THEN
3804:

Line 4168: from po_headers_all

4164:
4165: if(l_document_type in ('PO', 'PA')) then
4166: select authorization_status
4167: into l_document_status
4168: from po_headers_all
4169: where po_header_id = l_document_id;
4170:
4171: elsif (l_document_type = 'RELEASE') then
4172:

Line 4178: from po_headers_all

4174: where po_release_id = l_document_id;
4175:
4176: select authorization_status
4177: into l_document_status
4178: from po_headers_all
4179: where po_header_id = l_po_header_id;
4180: end if;
4181:
4182: if(l_document_status is null or