DBA Data[Home] [Help]

APPS.PO_COPYDOC_S1 dependencies on PO_HEADERS

Line 70: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,

66:
67: -- Private function prototypes
68:
69: PROCEDURE fetch_header(
70: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
71: x_from_po_header_id IN po_headers.po_header_id%TYPE,
72: x_online_report_id IN po_online_report_text.online_report_id%TYPE,
73: x_sequence IN OUT NOCOPY po_online_report_text.sequence%TYPE,
74: x_return_code OUT NOCOPY NUMBER

Line 71: x_from_po_header_id IN po_headers.po_header_id%TYPE,

67: -- Private function prototypes
68:
69: PROCEDURE fetch_header(
70: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
71: x_from_po_header_id IN po_headers.po_header_id%TYPE,
72: x_online_report_id IN po_online_report_text.online_report_id%TYPE,
73: x_sequence IN OUT NOCOPY po_online_report_text.sequence%TYPE,
74: x_return_code OUT NOCOPY NUMBER
75: );

Line 77: x_po_header_record IN PO_HEADERS%ROWTYPE,

73: x_sequence IN OUT NOCOPY po_online_report_text.sequence%TYPE,
74: x_return_code OUT NOCOPY NUMBER
75: );
76: PROCEDURE insert_header(
77: x_po_header_record IN PO_HEADERS%ROWTYPE,
78: x_online_report_id IN po_online_report_text.online_report_id%TYPE,
79: x_sequence IN OUT NOCOPY po_online_report_text.sequence%TYPE,
80: x_return_code OUT NOCOPY NUMBER,
81: x_copy_terms IN VARCHAR2 --

Line 117: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,

113: );
114:
115: PROCEDURE process_header(
116: x_action_code IN VARCHAR2,
117: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
118: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
119: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
120: x_from_po_header_id IN po_headers.po_header_id%TYPE,
121: x_to_segment1 IN po_headers.segment1%TYPE,

Line 118: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA

114:
115: PROCEDURE process_header(
116: x_action_code IN VARCHAR2,
117: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
118: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
119: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
120: x_from_po_header_id IN po_headers.po_header_id%TYPE,
121: x_to_segment1 IN po_headers.segment1%TYPE,
122: x_agent_id IN po_headers.agent_id%TYPE,

Line 119: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,

115: PROCEDURE process_header(
116: x_action_code IN VARCHAR2,
117: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
118: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
119: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
120: x_from_po_header_id IN po_headers.po_header_id%TYPE,
121: x_to_segment1 IN po_headers.segment1%TYPE,
122: x_agent_id IN po_headers.agent_id%TYPE,
123: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,

Line 120: x_from_po_header_id IN po_headers.po_header_id%TYPE,

116: x_action_code IN VARCHAR2,
117: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
118: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
119: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
120: x_from_po_header_id IN po_headers.po_header_id%TYPE,
121: x_to_segment1 IN po_headers.segment1%TYPE,
122: x_agent_id IN po_headers.agent_id%TYPE,
123: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,
124: x_inv_org_id IN financials_system_parameters.inventory_organization_id%TYPE,

Line 121: x_to_segment1 IN po_headers.segment1%TYPE,

117: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
118: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
119: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
120: x_from_po_header_id IN po_headers.po_header_id%TYPE,
121: x_to_segment1 IN po_headers.segment1%TYPE,
122: x_agent_id IN po_headers.agent_id%TYPE,
123: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,
124: x_inv_org_id IN financials_system_parameters.inventory_organization_id%TYPE,
125: x_copy_attachments IN BOOLEAN,

Line 122: x_agent_id IN po_headers.agent_id%TYPE,

118: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
119: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
120: x_from_po_header_id IN po_headers.po_header_id%TYPE,
121: x_to_segment1 IN po_headers.segment1%TYPE,
122: x_agent_id IN po_headers.agent_id%TYPE,
123: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,
124: x_inv_org_id IN financials_system_parameters.inventory_organization_id%TYPE,
125: x_copy_attachments IN BOOLEAN,
126: x_online_report_id IN po_online_report_text.online_report_id%TYPE,

Line 134: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,

130: );
131:
132: PROCEDURE process_line(
133: x_action_code IN VARCHAR2,
134: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
135: x_po_line_record IN OUT NOCOPY po_lines%ROWTYPE,
136: x_orig_po_line_id IN po_lines.po_line_id%TYPE,
137: x_wip_install_status IN VARCHAR2,
138: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,

Line 182: p_po_header_rec IN PO_HEADERS%ROWTYPE,

178: p_orig_po_distribution_id IN NUMBER,
179: p_generate_new_accounts IN BOOLEAN,
180: p_copy_attachments IN BOOLEAN,
181: p_online_report_id IN NUMBER,
182: p_po_header_rec IN PO_HEADERS%ROWTYPE,
183: p_po_line_rec IN PO_LINES%ROWTYPE,
184: p_po_shipment_rec IN PO_LINE_LOCATIONS%ROWTYPE,
185: p_sob_id IN FINANCIALS_SYSTEM_PARAMETERS.set_of_books_id%TYPE,
186: x_po_distribution_rec IN OUT NOCOPY PO_DISTRIBUTIONS%ROWTYPE,

Line 197: g_tax_attribute_update_code PO_HEADERS_ALL.tax_attribute_update_code%TYPE;

193: -- Global variable declarations
194:
195: g_debug_flag BOOLEAN := TRUE;
196: --
197: g_tax_attribute_update_code PO_HEADERS_ALL.tax_attribute_update_code%TYPE;
198:
199: -- End of Global variable declarations
200:
201:

Line 414: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,

410: ** Get all the header info for the document with x_from_po_header_id
411: ** and store into x_po_header_record for future processing
412: *************************************************************/
413: PROCEDURE fetch_header(
414: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
415: x_from_po_header_id IN po_headers.po_header_id%TYPE,
416: x_online_report_id IN po_online_report_text.online_report_id%TYPE,
417: x_sequence IN OUT NOCOPY po_online_report_text.sequence%TYPE,
418: x_return_code OUT NOCOPY NUMBER

Line 415: x_from_po_header_id IN po_headers.po_header_id%TYPE,

411: ** and store into x_po_header_record for future processing
412: *************************************************************/
413: PROCEDURE fetch_header(
414: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
415: x_from_po_header_id IN po_headers.po_header_id%TYPE,
416: x_online_report_id IN po_online_report_text.online_report_id%TYPE,
417: x_sequence IN OUT NOCOPY po_online_report_text.sequence%TYPE,
418: x_return_code OUT NOCOPY NUMBER
419: ) IS

Line 429: FROM PO_HEADERS

425: x_progress := '001';
426:
427: SELECT *
428: INTO x_po_header_record
429: FROM PO_HEADERS
430: WHERE po_header_id = x_from_po_header_id;
431:
432: x_return_code := 0;
433:

Line 448: x_po_header_record IN PO_HEADERS%ROWTYPE,

444: /****************************************************************
445: ** create new PO record from info. stored in x_po_header_record
446: ****************************************************************/
447: PROCEDURE insert_header(
448: x_po_header_record IN PO_HEADERS%ROWTYPE,
449: x_online_report_id IN po_online_report_text.online_report_id%TYPE,
450: x_sequence IN OUT NOCOPY po_online_report_text.sequence%TYPE,
451: x_return_code OUT NOCOPY NUMBER,
452: x_copy_terms IN VARCHAR2 --

Line 470: l_ame_transaction_type po_headers_all.ame_transaction_type%type; --PO AME porting

466: l_msg_data VARCHAR2(2000);
467: l_msg_count NUMBER;
468: l_ame_approval_id NUMBER;
469: l_clm_default_dist VARCHAR2(1);
470: l_ame_transaction_type po_headers_all.ame_transaction_type%type; --PO AME porting
471: BEGIN
472:
473: l_progress := '000';
474:

Line 518: INSERT INTO PO_HEADERS (

514: -- Bug #2015328, added decode statements to null out start_date and
515: -- end_date when a standard purchase order is copied from other type
516: -- of docs. This is because the std. purchase order should not have
517: -- the start and end date defined in terms and conditions.
518: INSERT INTO PO_HEADERS (
519: acceptance_due_date,
520: acceptance_required_flag,
521: agent_id,
522: amount_limit,

Line 1297: l_vendor_site_id po_headers.vendor_site_id%TYPE := null;

1293:
1294: l_progress VARCHAR2(4);
1295:
1296: --bug #2717053: changed var names/types to conform to standards
1297: l_vendor_site_id po_headers.vendor_site_id%TYPE := null;
1298: l_to_ship_to_location_id po_line_locations.ship_to_location_id%TYPE;
1299: l_to_ship_to_organization_id po_line_locations.ship_to_organization_id%TYPE;
1300: l_item_id po_lines.item_id%TYPE := null;
1301: l_count number:= 0;

Line 1303: l_quote_type_code po_headers.quote_type_lookup_code%TYPE := null;

1299: l_to_ship_to_organization_id po_line_locations.ship_to_organization_id%TYPE;
1300: l_item_id po_lines.item_id%TYPE := null;
1301: l_count number:= 0;
1302: l_quantity po_line_locations.quantity%TYPE;
1303: l_quote_type_code po_headers.quote_type_lookup_code%TYPE := null;
1304:
1305: x_sob_id number:= null;
1306:
1307: -- CONSIGNED FPI START

Line 1310: po_headers.vendor_id%TYPE := null;

1306:
1307: -- CONSIGNED FPI START
1308: -- Bug Fix for #2697755: COPY PO WITH CONSIGNED SHIPMENT LINE FAILS
1309: l_vendor_id
1310: po_headers.vendor_id%TYPE := null;
1311: l_consigned_flag
1312: po_line_locations.consigned_flag%TYPE := null;
1313: l_consigned_from_supplier_flag
1314: po_asl_attributes.consigned_from_supplier_flag%TYPE := null;

Line 1415: FROM po_headers ph

1411:
1412: Begin
1413: SELECT ph.quote_type_lookup_code
1414: INTO l_quote_type_code
1415: FROM po_headers ph
1416: WHERE ph.po_header_id = x_po_shipment_record.po_header_id;
1417: Exception
1418: When others then
1419: l_quote_type_code := NULL;

Line 1498: po_headers where

1494: l_progress := '070';
1495:
1496: begin
1497: select vendor_site_id into l_vendor_site_id from
1498: po_headers where
1499: po_header_id=x_po_shipment_record.po_header_id;
1500:
1501: select ship_to_location_id into l_to_ship_to_location_id
1502: from po_vendor_sites where

Line 1565: from po_headers

1561: l_progress := '110';
1562:
1563: select vendor_id, vendor_site_id
1564: into l_vendor_id, l_vendor_site_id
1565: from po_headers
1566: where po_header_id = x_po_shipment_record.po_header_id;
1567:
1568: l_progress := '120';
1569:

Line 2403: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,

2399: ** Copy attachment if necessary
2400: ***************************************************************/
2401: PROCEDURE process_header(
2402: x_action_code IN VARCHAR2,
2403: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
2404: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
2405: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
2406: x_from_po_header_id IN po_headers.po_header_id%TYPE,
2407: x_to_segment1 IN po_headers.segment1%TYPE,

Line 2404: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA

2400: ***************************************************************/
2401: PROCEDURE process_header(
2402: x_action_code IN VARCHAR2,
2403: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
2404: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
2405: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
2406: x_from_po_header_id IN po_headers.po_header_id%TYPE,
2407: x_to_segment1 IN po_headers.segment1%TYPE,
2408: x_agent_id IN po_headers.agent_id%TYPE,

Line 2405: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,

2401: PROCEDURE process_header(
2402: x_action_code IN VARCHAR2,
2403: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
2404: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
2405: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
2406: x_from_po_header_id IN po_headers.po_header_id%TYPE,
2407: x_to_segment1 IN po_headers.segment1%TYPE,
2408: x_agent_id IN po_headers.agent_id%TYPE,
2409: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,

Line 2406: x_from_po_header_id IN po_headers.po_header_id%TYPE,

2402: x_action_code IN VARCHAR2,
2403: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
2404: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
2405: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
2406: x_from_po_header_id IN po_headers.po_header_id%TYPE,
2407: x_to_segment1 IN po_headers.segment1%TYPE,
2408: x_agent_id IN po_headers.agent_id%TYPE,
2409: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,
2410: x_inv_org_id IN financials_system_parameters.inventory_organization_id%TYPE,

Line 2407: x_to_segment1 IN po_headers.segment1%TYPE,

2403: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
2404: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
2405: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
2406: x_from_po_header_id IN po_headers.po_header_id%TYPE,
2407: x_to_segment1 IN po_headers.segment1%TYPE,
2408: x_agent_id IN po_headers.agent_id%TYPE,
2409: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,
2410: x_inv_org_id IN financials_system_parameters.inventory_organization_id%TYPE,
2411: x_copy_attachments IN BOOLEAN,

Line 2408: x_agent_id IN po_headers.agent_id%TYPE,

2404: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
2405: x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE,
2406: x_from_po_header_id IN po_headers.po_header_id%TYPE,
2407: x_to_segment1 IN po_headers.segment1%TYPE,
2408: x_agent_id IN po_headers.agent_id%TYPE,
2409: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,
2410: x_inv_org_id IN financials_system_parameters.inventory_organization_id%TYPE,
2411: x_copy_attachments IN BOOLEAN,
2412: x_online_report_id IN po_online_report_text.online_report_id%TYPE,

Line 2422: l_po_from_document_type po_headers.type_lookup_code%TYPE;

2418: l_progress VARCHAR2(4);
2419: x_internal_return_code NUMBER := NULL;
2420:
2421: /* FPJ CONTERMS START */
2422: l_po_from_document_type po_headers.type_lookup_code%TYPE;
2423: l_contracts_from_document_type VARCHAR2(150); --Change this in 11iX
2424: l_contracts_to_document_type VARCHAR2(150); --Change this in 11iX
2425:
2426: l_return_status VARCHAR2(1);

Line 2432: l_internal_party_id po_headers_all.org_id%TYPE;

2428: l_msg_data VARCHAR2(2000);
2429:
2430: l_conterms_exist_flag VARCHAR2(1);
2431: l_temp_copy_terms VARCHAR2(1);
2432: l_internal_party_id po_headers_all.org_id%TYPE;
2433: l_internal_contact_id po_headers_all.agent_id%TYPE;
2434: l_external_party_id po_headers_all.vendor_id%TYPE;
2435: l_external_party_site_id po_headers_all.vendor_site_id%TYPE;
2436: l_external_contact_id po_headers_all.vendor_contact_id%TYPE;

Line 2433: l_internal_contact_id po_headers_all.agent_id%TYPE;

2429:
2430: l_conterms_exist_flag VARCHAR2(1);
2431: l_temp_copy_terms VARCHAR2(1);
2432: l_internal_party_id po_headers_all.org_id%TYPE;
2433: l_internal_contact_id po_headers_all.agent_id%TYPE;
2434: l_external_party_id po_headers_all.vendor_id%TYPE;
2435: l_external_party_site_id po_headers_all.vendor_site_id%TYPE;
2436: l_external_contact_id po_headers_all.vendor_contact_id%TYPE;
2437: l_copy_contracts_attachments VARCHAR2(1) := 'N';

Line 2434: l_external_party_id po_headers_all.vendor_id%TYPE;

2430: l_conterms_exist_flag VARCHAR2(1);
2431: l_temp_copy_terms VARCHAR2(1);
2432: l_internal_party_id po_headers_all.org_id%TYPE;
2433: l_internal_contact_id po_headers_all.agent_id%TYPE;
2434: l_external_party_id po_headers_all.vendor_id%TYPE;
2435: l_external_party_site_id po_headers_all.vendor_site_id%TYPE;
2436: l_external_contact_id po_headers_all.vendor_contact_id%TYPE;
2437: l_copy_contracts_attachments VARCHAR2(1) := 'N';
2438: /* FPJ CONTERMS END */

Line 2435: l_external_party_site_id po_headers_all.vendor_site_id%TYPE;

2431: l_temp_copy_terms VARCHAR2(1);
2432: l_internal_party_id po_headers_all.org_id%TYPE;
2433: l_internal_contact_id po_headers_all.agent_id%TYPE;
2434: l_external_party_id po_headers_all.vendor_id%TYPE;
2435: l_external_party_site_id po_headers_all.vendor_site_id%TYPE;
2436: l_external_contact_id po_headers_all.vendor_contact_id%TYPE;
2437: l_copy_contracts_attachments VARCHAR2(1) := 'N';
2438: /* FPJ CONTERMS END */
2439:

Line 2436: l_external_contact_id po_headers_all.vendor_contact_id%TYPE;

2432: l_internal_party_id po_headers_all.org_id%TYPE;
2433: l_internal_contact_id po_headers_all.agent_id%TYPE;
2434: l_external_party_id po_headers_all.vendor_id%TYPE;
2435: l_external_party_site_id po_headers_all.vendor_site_id%TYPE;
2436: l_external_contact_id po_headers_all.vendor_contact_id%TYPE;
2437: l_copy_contracts_attachments VARCHAR2(1) := 'N';
2438: /* FPJ CONTERMS END */
2439:
2440: BEGIN

Line 2522: FROM po_headers

2518: ,l_internal_contact_id
2519: ,l_external_party_id
2520: ,l_external_party_site_id
2521: ,l_external_contact_id
2522: FROM po_headers
2523: WHERE po_header_id = x_from_po_header_id;
2524:
2525: -- contract terms exist and user has chosen to copy
2526: IF (UPPER(l_conterms_exist_flag) = 'Y') THEN

Line 2601: UPDATE po_headers_all

2597: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2598: l_progress := '070';
2599:
2600: -- terms copying failed , set conterms exist flag on the new doc to N
2601: UPDATE po_headers_all
2602: SET conterms_exist_flag = 'N'
2603: WHERE po_header_id = x_po_header_record.po_header_id;
2604: END IF; -- return status is error
2605:

Line 2615: fnd_attached_documents2_pkg.copy_attachments('PO_HEADERS',

2611: l_progress := '080';
2612:
2613: IF (x_copy_attachments) THEN
2614: l_progress := '090';
2615: fnd_attached_documents2_pkg.copy_attachments('PO_HEADERS',
2616: x_from_po_header_id,
2617: '',
2618: '',
2619: '',

Line 2621: 'PO_HEADERS',

2617: '',
2618: '',
2619: '',
2620: '',
2621: 'PO_HEADERS',
2622: x_po_header_record.po_header_id,
2623: '',
2624: '',
2625: '',

Line 2766: , p_new_po_header_id IN PO_HEADERS.po_header_id%TYPE

2762: --------------------------------------------------------------------------------
2763: PROCEDURE copy_line_adjustments
2764: (
2765: p_orig_po_line_id IN PO_LINES.po_line_id%TYPE
2766: , p_new_po_header_id IN PO_HEADERS.po_header_id%TYPE
2767: , p_new_po_line_id IN PO_LINES.po_line_id%TYPE
2768: , p_line_num IN PO_LINES.line_num%TYPE
2769: , p_online_report_id IN PO_ONLINE_REPORT_TEXT.online_report_id%TYPE
2770: , x_sequence IN OUT NOCOPY PO_ONLINE_REPORT_TEXT.sequence%TYPE

Line 2838: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,

2834: --
2835:
2836: PROCEDURE process_line(
2837: x_action_code IN VARCHAR2,
2838: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
2839: x_po_line_record IN OUT NOCOPY po_lines%ROWTYPE,
2840: x_orig_po_line_id IN po_lines.po_line_id%TYPE,
2841: x_wip_install_status IN VARCHAR2,
2842: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,

Line 3314: p_po_header_rec IN PO_HEADERS%ROWTYPE,

3310: p_orig_po_distribution_id IN NUMBER,
3311: p_generate_new_accounts IN BOOLEAN,
3312: p_copy_attachments IN BOOLEAN,
3313: p_online_report_id IN NUMBER,
3314: p_po_header_rec IN PO_HEADERS%ROWTYPE,
3315: p_po_line_rec IN PO_LINES%ROWTYPE,
3316: p_po_shipment_rec IN PO_LINE_LOCATIONS%ROWTYPE,
3317: p_sob_id IN FINANCIALS_SYSTEM_PARAMETERS.set_of_books_id%TYPE,
3318: x_po_distribution_rec IN OUT NOCOPY PO_DISTRIBUTIONS%ROWTYPE,

Line 3504: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,

3500: -- we would mantain the existing behavior
3501: --
3502: PROCEDURE copy_document(
3503: x_action_code IN VARCHAR2,
3504: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
3505: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
3506: x_copy_attachments IN BOOLEAN,
3507: x_copy_price IN BOOLEAN,
3508: x_from_po_header_id IN po_headers.po_header_id%TYPE,

Line 3505: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA

3501: --
3502: PROCEDURE copy_document(
3503: x_action_code IN VARCHAR2,
3504: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
3505: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
3506: x_copy_attachments IN BOOLEAN,
3507: x_copy_price IN BOOLEAN,
3508: x_from_po_header_id IN po_headers.po_header_id%TYPE,
3509: x_to_po_header_id OUT NOCOPY po_headers.po_header_id%TYPE,

Line 3508: x_from_po_header_id IN po_headers.po_header_id%TYPE,

3504: x_to_doc_subtype IN po_headers.type_lookup_code%TYPE,
3505: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
3506: x_copy_attachments IN BOOLEAN,
3507: x_copy_price IN BOOLEAN,
3508: x_from_po_header_id IN po_headers.po_header_id%TYPE,
3509: x_to_po_header_id OUT NOCOPY po_headers.po_header_id%TYPE,
3510: x_online_report_id OUT NOCOPY po_online_report_text.online_report_id%TYPE,
3511: x_to_segment1 IN OUT NOCOPY po_headers.segment1%TYPE,
3512: x_agent_id IN po_headers.agent_id%TYPE,

Line 3509: x_to_po_header_id OUT NOCOPY po_headers.po_header_id%TYPE,

3505: x_to_global_flag IN PO_HEADERS_ALL.global_agreement_flag%TYPE, -- GA
3506: x_copy_attachments IN BOOLEAN,
3507: x_copy_price IN BOOLEAN,
3508: x_from_po_header_id IN po_headers.po_header_id%TYPE,
3509: x_to_po_header_id OUT NOCOPY po_headers.po_header_id%TYPE,
3510: x_online_report_id OUT NOCOPY po_online_report_text.online_report_id%TYPE,
3511: x_to_segment1 IN OUT NOCOPY po_headers.segment1%TYPE,
3512: x_agent_id IN po_headers.agent_id%TYPE,
3513: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,

Line 3511: x_to_segment1 IN OUT NOCOPY po_headers.segment1%TYPE,

3507: x_copy_price IN BOOLEAN,
3508: x_from_po_header_id IN po_headers.po_header_id%TYPE,
3509: x_to_po_header_id OUT NOCOPY po_headers.po_header_id%TYPE,
3510: x_online_report_id OUT NOCOPY po_online_report_text.online_report_id%TYPE,
3511: x_to_segment1 IN OUT NOCOPY po_headers.segment1%TYPE,
3512: x_agent_id IN po_headers.agent_id%TYPE,
3513: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,
3514: x_inv_org_id IN financials_system_parameters.inventory_organization_id%TYPE,
3515: x_wip_install_status IN VARCHAR2,

Line 3512: x_agent_id IN po_headers.agent_id%TYPE,

3508: x_from_po_header_id IN po_headers.po_header_id%TYPE,
3509: x_to_po_header_id OUT NOCOPY po_headers.po_header_id%TYPE,
3510: x_online_report_id OUT NOCOPY po_online_report_text.online_report_id%TYPE,
3511: x_to_segment1 IN OUT NOCOPY po_headers.segment1%TYPE,
3512: x_agent_id IN po_headers.agent_id%TYPE,
3513: x_sob_id IN financials_system_parameters.set_of_books_id%TYPE,
3514: x_inv_org_id IN financials_system_parameters.inventory_organization_id%TYPE,
3515: x_wip_install_status IN VARCHAR2,
3516: x_return_code OUT NOCOPY NUMBER,

Line 3524: x_po_header_record PO_HEADERS%ROWTYPE;

3520: ) IS
3521:
3522: COPYDOC_FATAL EXCEPTION;
3523:
3524: x_po_header_record PO_HEADERS%ROWTYPE;
3525: x_po_line_record po_lines%ROWTYPE;
3526: x_po_shipment_record po_line_locations%ROWTYPE;
3527: x_po_distribution_record po_distributions%ROWTYPE;
3528:

Line 3545: x_orig_quotation_class_code po_headers.quotation_class_code%TYPE := NULL;

3541: x_sequence po_online_report_text.sequence%TYPE := 1;
3542: /* this is used only for BID quotation to calculate quantity at the line
3543: level from shipments. */
3544: x_line_quantity NUMBER;
3545: x_orig_quotation_class_code po_headers.quotation_class_code%TYPE := NULL;
3546:
3547: --< Shared Proc FPJ Start >
3548: l_orig_txn_flow_header_id
3549: PO_LINE_LOCATIONS_ALL.transaction_flow_header_id%TYPE;

Line 3704: FROM po_headers_all

3700: --update the clm_document_number
3701: IF po_clm_clo_util.getCLMStatus = 'Y' THEN
3702: SELECT UDA_TEMPLATE_ID, clm_source_document_id
3703: INTO l_template_id, l_clm_src_doc_id
3704: FROM po_headers_all
3705: WHERE PO_HEADER_ID = x_from_po_header_id;
3706:
3707: l_match_val := po_doc_numbering_pkg.get_owned_by_issuing_org(l_clm_src_doc_id);
3708:

Line 3723: ('PO_HEADERS');

3719: x_document_num := REPLACE(l_doc_number,'-','');
3720:
3721: IF Length(x_document_num) > 20 THEN
3722: x_document_num := po_core_sv1.default_po_unique_identifier
3723: ('PO_HEADERS');
3724: END IF;
3725:
3726: UPDATE po_headers_all
3727: SET clm_document_number = l_doc_number,

Line 3726: UPDATE po_headers_all

3722: x_document_num := po_core_sv1.default_po_unique_identifier
3723: ('PO_HEADERS');
3724: END IF;
3725:
3726: UPDATE po_headers_all
3727: SET clm_document_number = l_doc_number,
3728: segment1 = x_document_num
3729: WHERE po_header_id = x_po_header_record.po_header_id;
3730: END IF;

Line 3816: FROM po_headers

3812: x_progress := '048';
3813:
3814: SELECT quotation_class_code
3815: INTO x_orig_quotation_class_code
3816: FROM po_headers
3817: WHERE po_header_id = x_from_po_header_id;
3818:
3819: --
3820: IF po_clm_clo_util.getCLMStatus = 'Y'

Line 3952: WHERE style_id = (SELECT style_id FROM po_headers_all WHERE po_header_id = x_from_po_header_id);

3948:
3949: SELECT Nvl(contract_financing_flag,'N')
3950: INTO l_is_complex_finance_po
3951: FROM po_doc_style_headers
3952: WHERE style_id = (SELECT style_id FROM po_headers_all WHERE po_header_id = x_from_po_header_id);
3953:
3954:
3955: IF( l_is_complex_finance_po LIKE 'Y' AND x_po_shipment_record.shipment_type LIKE 'STANDARD') THEN
3956:

Line 4240: p_po_header_id PO_HEADERS_ALL.po_header_id%TYPE

4236: * Returns: TRUE if any of the shipments in the given PO are drop ship,
4237: * FALSE otherwise.
4238: **/
4239: FUNCTION po_is_dropship (
4240: p_po_header_id PO_HEADERS_ALL.po_header_id%TYPE
4241: ) RETURN BOOLEAN IS
4242:
4243: CURSOR l_po_shipment_csr(p_po_header_id PO_HEADERS_ALL.po_header_id%TYPE) IS
4244: SELECT line_location_id

Line 4243: CURSOR l_po_shipment_csr(p_po_header_id PO_HEADERS_ALL.po_header_id%TYPE) IS

4239: FUNCTION po_is_dropship (
4240: p_po_header_id PO_HEADERS_ALL.po_header_id%TYPE
4241: ) RETURN BOOLEAN IS
4242:
4243: CURSOR l_po_shipment_csr(p_po_header_id PO_HEADERS_ALL.po_header_id%TYPE) IS
4244: SELECT line_location_id
4245: FROM PO_LINE_LOCATIONS
4246: WHERE po_header_id = p_po_header_id
4247: AND SHIPMENT_TYPE NOT IN ('SCHEDULED','BLANKET');

Line 4300: p_po_header_id IN PO_HEADERS_ALL.po_header_id%TYPE

4296: --End of Comments
4297: ----------------------------------------------------------------------------
4298:
4299: FUNCTION po_has_config_id(
4300: p_po_header_id IN PO_HEADERS_ALL.po_header_id%TYPE
4301: ) RETURN BOOLEAN IS
4302:
4303: l_has_config_id NUMBER;
4304:

Line 4433: l_doc_org_id PO_HEADERS_ALL.ORG_ID%type;

4429: ,x_text_line OUT NOCOPY VARCHAR2
4430: ,x_return_status OUT NOCOPY VARCHAR2
4431: ,x_exception_msg OUT NOCOPY VARCHAR2)
4432: IS
4433: l_doc_org_id PO_HEADERS_ALL.ORG_ID%type;
4434: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%type;
4435: l_global_agreement_flag PO_HEADERS_ALL.global_agreement_flag%type;
4436: l_inv_org_id FINANCIALS_SYSTEM_PARAMS_ALL.inventory_organization_id%type;
4437: l_sob_id FINANCIALS_SYSTEM_PARAMS_ALL.set_of_books_id%type;

Line 4434: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%type;

4430: ,x_return_status OUT NOCOPY VARCHAR2
4431: ,x_exception_msg OUT NOCOPY VARCHAR2)
4432: IS
4433: l_doc_org_id PO_HEADERS_ALL.ORG_ID%type;
4434: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%type;
4435: l_global_agreement_flag PO_HEADERS_ALL.global_agreement_flag%type;
4436: l_inv_org_id FINANCIALS_SYSTEM_PARAMS_ALL.inventory_organization_id%type;
4437: l_sob_id FINANCIALS_SYSTEM_PARAMS_ALL.set_of_books_id%type;
4438: l_return_code NUMBER;

Line 4435: l_global_agreement_flag PO_HEADERS_ALL.global_agreement_flag%type;

4431: ,x_exception_msg OUT NOCOPY VARCHAR2)
4432: IS
4433: l_doc_org_id PO_HEADERS_ALL.ORG_ID%type;
4434: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%type;
4435: l_global_agreement_flag PO_HEADERS_ALL.global_agreement_flag%type;
4436: l_inv_org_id FINANCIALS_SYSTEM_PARAMS_ALL.inventory_organization_id%type;
4437: l_sob_id FINANCIALS_SYSTEM_PARAMS_ALL.set_of_books_id%type;
4438: l_return_code NUMBER;
4439: l_online_report_id PO_ONLINE_REPORT_TEXT.online_report_id%type;

Line 4469: FROM po_headers_all POH, financials_system_params_all FSP

4465: FSP.SET_OF_BOOKS_ID
4466: INTO l_doc_org_id, l_type_lookup_code,
4467: l_global_agreement_flag,
4468: l_inv_org_id, l_sob_id
4469: FROM po_headers_all POH, financials_system_params_all FSP
4470: WHERE po_header_id = p_po_header_id
4471: AND poh.org_id = fsp.org_id;
4472:
4473: IF PO_LOG.d_stmt THEN

Line 4640: ,x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE

4636: p_level IN VARCHAR2
4637: ,p_from_po_header_id IN NUMBER
4638: ,p_from_pk_value IN NUMBER
4639: ,p_to_pk_value IN NUMBER
4640: ,x_po_header_record IN OUT NOCOPY PO_HEADERS%ROWTYPE
4641: ,x_po_line_record IN OUT NOCOPY po_lines%ROWTYPE
4642: ,x_po_shipment_record IN OUT NOCOPY PO_LINE_LOCATIONS%ROWTYPE
4643: ,x_po_distribution_rec IN OUT NOCOPY PO_DISTRIBUTIONS%ROWTYPE
4644: ,x_return_status OUT NOCOPY VARCHAR2

Line 4674: UPDATE PO_HEADERS_ALL

4670: IF p_level = 'HEADER' THEN
4671:
4672: IF PO_CLM_CLO_UTIL.Isclminstalled THEN
4673:
4674: UPDATE PO_HEADERS_ALL
4675: SET uda_template_id = x_po_header_record.uda_template_id,
4676: uda_template_date = x_po_header_record.uda_template_date,
4677: clm_effective_date = x_po_header_record.clm_effective_date,
4678: clm_vendor_offer_number = x_po_header_record.clm_vendor_offer_number,

Line 4705: FROM po_headers_all

4701: END IF;
4702:
4703: SELECT UDA_TEMPLATE_ID
4704: INTO l_template_id
4705: FROM po_headers_all
4706: WHERE PO_HEADER_ID = p_from_pk_value;
4707:
4708: PO_DEBUG.debug_stmt(l_log_head || l_api_name, l_progress, 'Template id is ' || l_template_id);
4709:

Line 4827: FROM po_headers_all

4823:
4824:
4825: SELECT 'PURCHASING', TYPE_LOOKUP_CODE, STYLE_ID
4826: INTO l_functional_area_code, l_document_type_code, l_document_style_id
4827: FROM po_headers_all
4828: WHERE PO_HEADER_ID = p_from_po_header_id;
4829:
4830: l_progress := '8881';
4831: PO_DEBUG.debug_stmt(l_log_head || l_api_name, l_progress, 'Fetched template details');

Line 4872: FROM po_headers_all_ext_b phaeb,

4868: --Bug 13482355
4869: BEGIN
4870: SELECT DISTINCT ags.ATTR_GROUP_NAME
4871: BULK COLLECT INTO l_ags_table
4872: FROM po_headers_all_ext_b phaeb,
4873: po_uda_ag_template_usages usages,
4874: ego_attr_groups_v ags
4875: WHERE phaeb.po_header_id = p_from_pk_value
4876: AND phaeb.draft_id=-1