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 103: x_subtype po_headers.type_lookup_code%TYPE;

99:
100: l_extension NUMBER := 0;
101: l_extension_total NUMBER := 0;
102: l_blanket_total_amount NUMBER := 0;
103: x_subtype po_headers.type_lookup_code%TYPE;
104: l_datatype_count NUMBER := 0;
105:
106: l_vendor_quote_num po_lines_print.VENDOR_QUOTE_NUM%TYPE;
107: l_po_quote_num po_lines_print.PO_QUOTE_NUM%TYPE;

Line 108: l_po_header_id po_headers.po_header_id%TYPE;

104: l_datatype_count NUMBER := 0;
105:
106: l_vendor_quote_num po_lines_print.VENDOR_QUOTE_NUM%TYPE;
107: l_po_quote_num po_lines_print.PO_QUOTE_NUM%TYPE;
108: l_po_header_id po_headers.po_header_id%TYPE;
109: l_src_ga_flag po_lines_print.SRC_GA_FLAG%TYPE; -- GA FPI
110:
111: l_org_id NUMBER;
112: x_orgid NUMBER;

Line 145: l_global_flag po_headers_all.global_agreement_flag%type;

141: l_po_line_only varchar2(2) := 'Y';
142: x_display_type varchar2(60);
143:
144: --
145: l_global_flag po_headers_all.global_agreement_flag%type;
146:
147: -- PO_WF_NOTIF_HEADER_NOTE
148: l_header_text FND_DOCUMENTS_LONG_TEXT.LONG_TEXT%TYPE;
149:

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

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

Line 161: l_header_note_to_vendor po_headers_all.note_to_vendor%TYPE;

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

Line 368: po_headers_all poh, -- --po_headers poh,

364: NULL,
365: --
366: NULL --Bug 9356725
367: FROM po_lines pol,
368: po_headers_all poh, -- --po_headers poh,
369: mtl_system_items_kfv msi,
370: mtl_units_of_measure_vl umvl,
371: financials_system_params_all fsp -- --financials_system_parameters fsp
372: where POL.PO_HEADER_ID = v_document_id

Line 494: from po_headers_all

490: -- show warning message to the supplier
491: if(l_document_type in ('PO', 'PA')) then
492: select authorization_status
493: into l_document_status
494: from po_headers_all
495: where po_header_id = l_document_id;
496:
497: elsif (l_document_type = 'RELEASE') then
498: /* Bug 2791859 po_releases_all should be used instead of po_releases */

Line 504: from po_headers_all

500: where po_release_id = l_document_id;
501:
502: select authorization_status
503: into l_document_status
504: from po_headers_all
505: where po_header_id = l_po_header_id;
506: end if;
507:
508: if(l_document_status is null or

Line 535: from po_headers

531:
532: IF (l_document_type = 'PA') THEN
533: select type_lookup_code
534: into x_subtype
535: from po_headers
536: where po_header_id = l_document_id;
537: END IF;
538:
539: --

Line 662: from po_headers

658: IF (l_document_type = 'PO') THEN
659:
660: select note_to_vendor ,currency_code
661: into l_header_note_to_vendor , l_currency_code
662: from po_headers
663: where po_header_id = to_number(l_document_id);
664: open shipment_cursor(l_document_id);
665:
666:

Line 676: from po_headers

672: from po_releases
673: where po_release_id = to_number(l_document_id);
674:
675: select currency_code into l_currency_code
676: from po_headers
677: where po_header_id = l_po_header_id;
678:
679: open shipment_release_cursor(l_document_id);
680:

Line 685: from po_headers

681: ELSIF (l_document_type = 'PA') THEN
682:
683: select note_to_vendor ,currency_code, blanket_total_amount
684: into l_header_note_to_vendor ,l_currency_code, l_blanket_total_amount
685: from po_headers
686: where po_header_id = to_number(l_document_id);
687:
688: if x_pb_count <> 0 then
689: open shipment_blanket_cursor(l_document_id);

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

717: */
718:
719: -- Getting the header level text information and displaying it if it exists
720: if (l_document_type in ('PO', 'PA')) then
721: open attachments_cursor('PO_HEADERS', l_document_id);
722: elsif (l_document_type = 'RELEASE') then
723: open attachments_cursor('PO_RELEASES', l_document_id);
724: else
725: null;

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

780: if (l_document_type = 'RELEASE') THEN
781: select po_header_id into l_po_header_id from po_releases
782: where po_release_id = l_document_id;
783:
784: open attachments_cursor('PO_HEADERS', l_po_header_id);
785:
786: loop
787:
788: fetch attachments_cursor into l_datatype_id, l_media_id;

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

1216: l_line_loc.from_line_id is NOT NULL)
1217: then
1218: begin
1219: select nvl(global_agreement_flag, 'N') into l_global_flag
1220: from po_headers_all where po_header_id = l_line_loc.from_header_id;
1221: exception
1222: when NO_DATA_FOUND then
1223: l_global_flag := 'N';
1224: end;

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

1225:
1226: if l_global_flag = 'Y' then
1227: --
1228: --Use attachments_from_ga_cursor instead of attachments_cursor
1229: open attachments_from_ga_cursor('PO_HEADERS', l_line_loc.from_header_id);
1230: loop
1231:
1232: fetch attachments_from_ga_cursor into l_datatype_id, l_media_id;
1233: exit when attachments_from_ga_cursor%NOTFOUND;

Line 1971: from po_headers

1967: -- Removed fetching org_id from the below sqls
1968: IF (l_document_type = 'PO') THEN
1969: select note_to_vendor,currency_code
1970: into l_header_note_to_vendor ,l_currency_code
1971: from po_headers
1972: where po_header_id = to_number(l_document_id);
1973: open shipment_cursor(l_document_id);
1974: ELSIF (l_document_type = 'RELEASE') THEN
1975: select note_to_vendor

Line 1982: from po_headers

1978: open shipment_release_cursor(l_document_id);
1979: ELSIF (l_document_type = 'PA') THEN
1980: select note_to_vendor,currency_code
1981: into l_header_note_to_vendor ,l_currency_code
1982: from po_headers
1983: where po_header_id = to_number(l_document_id);
1984: open shipment_blanket_cursor(l_document_id);
1985: END IF;
1986:

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

1993: -- l_currency_code := PO_CORE_S2.get_base_currency;
1994:
1995: -- Getting the header level text information and displaying it if it exists
1996: if (l_document_type = 'PO') then
1997: open attachments_cursor('PO_HEADERS', l_document_id);
1998: elsif (l_document_type = 'RELEASE') then
1999: open attachments_cursor('PO_RELEASES', l_document_id);
2000: else
2001: null;

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

2053:
2054: select po_header_id into l_po_header_id from po_releases
2055: where po_release_id = l_document_id;
2056:
2057: open attachments_cursor('PO_HEADERS', l_po_header_id);
2058:
2059: loop
2060:
2061: fetch attachments_cursor into l_datatype_id, l_media_id;

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

2269: l_line_loc.from_line_id is NOT NULL)
2270: then
2271: begin
2272: select nvl(global_agreement_flag, 'N') into l_global_flag
2273: from po_headers_all where po_header_id = l_line_loc.from_header_id;
2274: exception
2275: when NO_DATA_FOUND then
2276: l_global_flag := 'N';
2277: end;

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

2278:
2279: if l_global_flag = 'Y' then
2280: --
2281: --Use attachments_from_ga_cursor instead of attachments_cursor
2282: open attachments_from_ga_cursor('PO_HEADERS', l_line_loc.from_header_id);
2283: loop
2284:
2285: fetch attachments_from_ga_cursor into l_datatype_id, l_media_id;
2286: exit when attachments_from_ga_cursor%NOTFOUND;

Line 2644: l_po_number PO_HEADERS_ALL.SEGMENT1%TYPE;

2640: l_bill_to_region3 hr_locations_all.region_3%TYPE;
2641: l_bill_to_id NUMBER;
2642:
2643:
2644: l_po_number PO_HEADERS_ALL.SEGMENT1%TYPE;
2645: l_po_revision NUMBER;
2646: l_release_num PO_RELEASES_ALL.RELEASE_NUM%TYPE;
2647:
2648: l_date_of_order VARCHAR2(80);

Line 2653: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

2649: l_buyer per_all_people_f.full_name%TYPE; --bug 15957689
2650: l_date_of_revision VARCHAR2(80);
2651: l_revision_buyer per_all_people_f.full_name%TYPE; --bug 15957689
2652:
2653: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
2654: l_ship_via_lookup_desc ORG_FREIGHT_TL.FREIGHT_CODE_TL%TYPE;
2655: l_fob_lookup_code PO_HEADERS_ALL.FOB_LOOKUP_CODE%TYPE;
2656: l_fob_lookup_desc PO_LOOKUP_CODES.DISPLAYED_FIELD%TYPE;
2657: l_freight_terms_lc PO_HEADERS_ALL.FREIGHT_TERMS_LOOKUP_CODE%TYPE;

Line 2655: l_fob_lookup_code PO_HEADERS_ALL.FOB_LOOKUP_CODE%TYPE;

2651: l_revision_buyer per_all_people_f.full_name%TYPE; --bug 15957689
2652:
2653: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
2654: l_ship_via_lookup_desc ORG_FREIGHT_TL.FREIGHT_CODE_TL%TYPE;
2655: l_fob_lookup_code PO_HEADERS_ALL.FOB_LOOKUP_CODE%TYPE;
2656: l_fob_lookup_desc PO_LOOKUP_CODES.DISPLAYED_FIELD%TYPE;
2657: l_freight_terms_lc PO_HEADERS_ALL.FREIGHT_TERMS_LOOKUP_CODE%TYPE;
2658: l_freight_terms_dsp PO_LOOKUP_CODES.DISPLAYED_FIELD%TYPE;
2659: l_payment_terms_id NUMBER;

Line 2657: l_freight_terms_lc PO_HEADERS_ALL.FREIGHT_TERMS_LOOKUP_CODE%TYPE;

2653: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
2654: l_ship_via_lookup_desc ORG_FREIGHT_TL.FREIGHT_CODE_TL%TYPE;
2655: l_fob_lookup_code PO_HEADERS_ALL.FOB_LOOKUP_CODE%TYPE;
2656: l_fob_lookup_desc PO_LOOKUP_CODES.DISPLAYED_FIELD%TYPE;
2657: l_freight_terms_lc PO_HEADERS_ALL.FREIGHT_TERMS_LOOKUP_CODE%TYPE;
2658: l_freight_terms_dsp PO_LOOKUP_CODES.DISPLAYED_FIELD%TYPE;
2659: l_payment_terms_id NUMBER;
2660: l_payment_terms ap_terms_val_v.name%TYPE;
2661: l_customer_acct_num PO_VENDOR_SITES.CUSTOMER_NUM%TYPE;

Line 2702: x_subtype po_headers.type_lookup_code%TYPE;

2698: l_multiple_flag varchar2(1);
2699: l_start_date varchar2(80);
2700: l_end_date varchar2(80);
2701: l_blanket_amt_agreed NUMBER := 0;
2702: x_subtype po_headers.type_lookup_code%TYPE;
2703:
2704: cursor po_requestor_cursor (v_po_header_id varchar2) IS
2705: select distinct deliver_to_person_id
2706: FROM po_distributions

Line 2744: FROM po_headers

2740: and PLL.shipment_type = 'PRICE BREAK';
2741:
2742: cursor pa_header_location_id_cursor (v_po_header_id varchar2) IS
2743: select ship_to_location_id
2744: FROM po_headers
2745: where PO_HEADER_ID = to_number(v_po_header_id);
2746:
2747: cursor pa_location_id_cursor (v_po_header_id varchar2) IS
2748: select distinct pll.ship_to_location_id

Line 2824: from po_headers_all

2820: -- show warning message to the supplier
2821: if(l_document_type in ('PO', 'PA')) then
2822: select authorization_status
2823: into l_document_status
2824: from po_headers_all
2825: where po_header_id = l_document_id;
2826:
2827: elsif (l_document_type = 'RELEASE') then
2828:

Line 2838: from po_headers_all

2834: where po_release_id = l_document_id;
2835:
2836: select authorization_status
2837: into l_document_status
2838: from po_headers_all
2839: where po_header_id = l_po_header_id;
2840: end if;
2841:
2842: --

Line 2873: from po_headers

2869: ** Desc: Get the subtype
2870: */
2871: select type_lookup_code
2872: into x_subtype
2873: from po_headers
2874: where po_header_id = l_document_id;
2875:
2876: --
2877: IF (g_po_wf_debug = 'Y') THEN

Line 2886: select org_id into l_operating_unit_id from po_headers_all

2882: begin
2883:
2884: /* Need the org_id to get the operating unit name later */
2885: /* BUG 9858430
2886: select org_id into l_operating_unit_id from po_headers_all
2887: where po_header_id = l_document_id; */
2888:
2889: l_po_header_id := l_document_id;
2890:

Line 3214: select org_id into l_operating_unit_id from po_headers

3210: select po_header_id into l_po_header_id from po_releases
3211: where po_release_id = l_document_id;
3212:
3213: /*BUG 9858430
3214: select org_id into l_operating_unit_id from po_headers
3215: where po_header_id = l_po_header_id;*/
3216:
3217: l_requestor_count := 0;
3218: l_multiple_flag := 'N';

Line 3514: from po_headers

3510: into l_bill_to_id, l_vendor_site_id, l_vendor_id,
3511: l_po_number, l_po_revision, l_date_of_order, l_date_of_revision,
3512: l_ship_via_lookup_code, l_freight_terms_lc, l_fob_lookup_code, l_vendor_contact_id,
3513: l_payment_terms_id,l_start_date,l_end_date,l_blanket_amt_agreed
3514: from po_headers
3515: where po_header_id = to_number(l_po_header_id);
3516:
3517: po_core_s.get_displayed_value('FREIGHT TERMS', l_freight_terms_lc,l_freight_terms_dsp);
3518:

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

3726: when no_data_found then
3727: null;
3728: end;
3729:
3730: -- Need to obtain the buyers from po_headers_archive and po_releases_archive
3731: -- for global buyer's need to get buyer name from per_employees_current_x
3732: if (l_document_type in ('PO', 'PA')) THEN
3733: -- there will be an entry in this table regardless of whether there is a revision
3734: -- or not

Line 3741: where person_id = (select agent_id from po_headers

3737: if (l_po_revision = 0) then
3738:
3739: select full_name into l_buyer
3740: from per_all_people_f --
3741: where person_id = (select agent_id from po_headers
3742: where po_header_id = to_number(l_po_header_id))
3743: and trunc(sysdate) between trunc(effective_start_date) and trunc(effective_end_date); --Bug#5161502
3744:
3745: else

Line 3748: where person_id = (select agent_id from po_headers_archive

3744:
3745: else
3746: select full_name into l_buyer
3747: from per_all_people_f --
3748: where person_id = (select agent_id from po_headers_archive
3749: where po_header_id = to_number(l_po_header_id) and
3750: revision_num = 0)
3751: and trunc(sysdate) between trunc(effective_start_date) and trunc(effective_end_date); --Bug#5161502
3752: end if;

Line 3764: where person_id = (select agent_id from po_headers_archive

3760: begin
3761: if (l_po_revision > 0) then
3762: select full_name into l_revision_buyer
3763: from per_all_people_f --
3764: where person_id = (select agent_id from po_headers_archive
3765: where po_header_id = to_number(l_po_header_id) and
3766: revision_num = l_po_revision)
3767: and trunc(sysdate) between trunc(effective_start_date) and trunc(effective_end_date); --Bug#5161502
3768: end if;

Line 4258: from po_headers

4254: end if;
4255: IF (l_document_type = 'PO') THEN
4256: select type_lookup_code
4257: into x_subtype
4258: from po_headers
4259: where po_header_id = l_document_id;
4260:
4261: --
4262: IF (g_po_wf_debug = 'Y') THEN

Line 4654: from po_headers_all

4650:
4651: if(l_document_type in ('PO', 'PA')) then
4652: select authorization_status
4653: into l_document_status
4654: from po_headers_all
4655: where po_header_id = l_document_id;
4656:
4657: elsif (l_document_type = 'RELEASE') then
4658:

Line 4664: from po_headers_all

4660: where po_release_id = l_document_id;
4661:
4662: select authorization_status
4663: into l_document_status
4664: from po_headers_all
4665: where po_header_id = l_po_header_id;
4666: end if;
4667:
4668: --