DBA Data[Home] [Help]

APPS.PO_AUTO_LINE_PROCESS_PVT dependencies on PO_AUTOCREATE_PARAMS

Line 60: WHERE interface_header_id = po_autocreate_params.x_interface_header_id

56: SELECT destination_type_code,
57: destination_organization_id,
58: deliver_to_location_id
59: FROM po_distributions_interface
60: WHERE interface_header_id = po_autocreate_params.x_interface_header_id
61: AND interface_line_id = p_intf_line_id
62: ORDER BY interface_distribution_id;
63:
64: BEGIN

Line 234: AND interface_header_id =PO_AUTOCREATE_PARAMS.x_interface_header_id;

230: SELECT INTERFACE_LINE_ID INTERFACE_LINE_ID,
231: group_line_id group_line_id
232: FROM po_lines_interface
233: WHERE group_line_id IS NOT NULL
234: AND interface_header_id =PO_AUTOCREATE_PARAMS.x_interface_header_id;
235:
236: CURSOR c_clin(p_req_line_id IN NUMBER)
237: IS
238: SELECT INTERFACE_LINE_ID

Line 241: AND interface_header_id=PO_AUTOCREATE_PARAMS.x_interface_header_id

237: IS
238: SELECT INTERFACE_LINE_ID
239: FROM po_lines_interface
240: WHERE 1 =1
241: AND interface_header_id=PO_AUTOCREATE_PARAMS.x_interface_header_id
242: AND REQUISITION_LINE_ID=p_req_line_id;
243:
244: CURSOR c_option
245: IS

Line 250: AND interface_header_id =PO_AUTOCREATE_PARAMS.x_interface_header_id;

246: SELECT INTERFACE_LINE_ID,
247: CLM_BASE_LINE_NUM
248: FROM po_lines_interface
249: WHERE clm_base_line_num IS NOT NULL
250: AND interface_header_id =PO_AUTOCREATE_PARAMS.x_interface_header_id;
251:
252: CURSOR c_base(p_req_line_id IN NUMBER)
253: IS
254: SELECT INTERFACE_LINE_ID

Line 257: AND interface_header_id=PO_AUTOCREATE_PARAMS.x_interface_header_id

253: IS
254: SELECT INTERFACE_LINE_ID
255: FROM po_lines_interface
256: WHERE 1 =1
257: AND interface_header_id=PO_AUTOCREATE_PARAMS.x_interface_header_id
258: AND REQUISITION_LINE_ID=p_req_line_id;
259:
260: l_parent_line_id NUMBER;
261:

Line 283: WHERE phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id

279: pli.unit_price
280: FROM po_lines_interface pli,
281: po_headers_interface phi,
282: po_line_types plt
283: WHERE phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
284: AND phi.interface_header_id = pli.interface_header_id
285: AND pli.requisition_line_id IS NULL
286: AND plt.line_type_id = pli.line_type_id
287: AND Nvl(PLI.orig_from_req_flag, 'N') <> 'S';

Line 295: IF PO_AUTOCREATE_PARAMS.g_interface_source_code ='SOURCING' THEN

291: IF g_debug_stmt THEN
292: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
293: END IF;
294:
295: IF PO_AUTOCREATE_PARAMS.g_interface_source_code ='SOURCING' THEN
296:
297: --Since we allowe cancellation and finally close of reqs it's possible
298: --that the requistion reference sourcing passed to interface tables
299: --are already cancelled or finally closed.

Line 316: WHERE pli.interface_header_id= PO_AUTOCREATE_PARAMS.x_interface_header_id

312: l_progress := '010';
313:
314: UPDATE po_lines_interface pli
315: SET pli.requisition_line_id = NULL
316: WHERE pli.interface_header_id= PO_AUTOCREATE_PARAMS.x_interface_header_id
317: AND EXISTS
318: (SELECT requisition_line_id
319: FROM po_requisition_lines_all prl
320: WHERE prl.requisition_line_id= pli.requisition_line_id

Line 341: WHERE pli.interface_header_id= PO_AUTOCREATE_PARAMS.x_interface_header_id

337: END IF;
338:
339: UPDATE po_lines_interface pli
340: SET pli.requisition_line_id = NULL
341: WHERE pli.interface_header_id= PO_AUTOCREATE_PARAMS.x_interface_header_id
342: AND NOT EXISTS
343: (SELECT requisition_line_id
344: FROM po_requisition_lines_all prl --
345: WHERE prl.requisition_line_id= pli.requisition_line_id

Line 355: IF (PO_AUTOCREATE_PARAMS.g_document_type IN ('PO','PA'))

351: l_progress := '030';
352: -- The following code is for REQ to PO flow.
353: -- If the call is from SOURCING, then need to set the REQUISITION_LINE_ID
354: -- to null to avoid any further processing based on this.
355: IF (PO_AUTOCREATE_PARAMS.g_document_type IN ('PO','PA'))
356: --AND PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING') --
357: THEN
358: l_progress:='040';
359:

Line 356: --AND PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING') --

352: -- The following code is for REQ to PO flow.
353: -- If the call is from SOURCING, then need to set the REQUISITION_LINE_ID
354: -- to null to avoid any further processing based on this.
355: IF (PO_AUTOCREATE_PARAMS.g_document_type IN ('PO','PA'))
356: --AND PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING') --
357: THEN
358: l_progress:='040';
359:
360: IF g_debug_stmt THEN

Line 448: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.closed_code,'OPEN'), NULL),

444: NVL(pli.amount, prl.amount),
445: pli.taxable_flag,
446: pli.type_1099,
447: NVL(pli.negotiated_by_preparer_flag,'N'),
448: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.closed_code,'OPEN'), NULL),
449: NVL(pli.item_revision,prl.item_revision),
450: NVL(pli.un_number_id,prl.un_number_id),
451: NVL(pli.hazard_class_id,prl.hazard_class_id),
452: NVL(pli.line_type_id,prl.line_type_id),

Line 458: DECODE(PO_AUTOCREATE_PARAMS.g_document_type,

454: pli.qty_rcv_tolerance,
455: pli.over_tolerance_error_flag,
456: NVL(pli.firm_flag,'N'),
457: --
458: DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
459: 'PO', NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),
460: 'PA',NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),NULL),
461: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.price_type,PO_AUTOCREATE_PARAMS.g_sys.price_type_lookup_code), NULL),
462: NVL(pli.transaction_reason_code,prl.transaction_reason_code),

Line 459: 'PO', NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),

455: pli.over_tolerance_error_flag,
456: NVL(pli.firm_flag,'N'),
457: --
458: DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
459: 'PO', NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),
460: 'PA',NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),NULL),
461: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.price_type,PO_AUTOCREATE_PARAMS.g_sys.price_type_lookup_code), NULL),
462: NVL(pli.transaction_reason_code,prl.transaction_reason_code),
463: pli.line_location_id,

Line 460: 'PA',NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),NULL),

456: NVL(pli.firm_flag,'N'),
457: --
458: DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
459: 'PO', NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),
460: 'PA',NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),NULL),
461: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.price_type,PO_AUTOCREATE_PARAMS.g_sys.price_type_lookup_code), NULL),
462: NVL(pli.transaction_reason_code,prl.transaction_reason_code),
463: pli.line_location_id,
464: NVL(pli.need_by_date,prl.need_by_date),

Line 461: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.price_type,PO_AUTOCREATE_PARAMS.g_sys.price_type_lookup_code), NULL),

457: --
458: DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
459: 'PO', NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),
460: 'PA',NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),NULL),
461: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.price_type,PO_AUTOCREATE_PARAMS.g_sys.price_type_lookup_code), NULL),
462: NVL(pli.transaction_reason_code,prl.transaction_reason_code),
463: pli.line_location_id,
464: NVL(pli.need_by_date,prl.need_by_date),
465: NVL(pli.ship_to_organization_id,prl.destination_organization_id),

Line 504: AND phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id

500: po_requisition_lines_all prl,
501: po_line_types plt
502: WHERE pli.interface_line_id = pli2.interface_line_id
503: AND pli.interface_header_id = phi.interface_header_id
504: AND phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
505: AND pli.requisition_line_id = prl.requisition_line_id(+)
506: AND plt.line_type_id = NVL(prl.line_type_id,pli.line_type_id)
507: )
508: WHERE pli2.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id

Line 508: WHERE pli2.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id

504: AND phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
505: AND pli.requisition_line_id = prl.requisition_line_id(+)
506: AND plt.line_type_id = NVL(prl.line_type_id,pli.line_type_id)
507: )
508: WHERE pli2.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
509: AND NVL(pli2.clm_info_flag,'N') <> 'Y';
510:
511: l_progress:='050';
512:

Line 597: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.closed_code,'OPEN'), NULL),

593: NULL,
594: NULL,
595: pli.type_1099,
596: NVL(pli.negotiated_by_preparer_flag,'N'),
597: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.closed_code,'OPEN'), NULL),
598: NULL,
599: NVL(pli.un_number_id,prl.un_number_id),
600: NVL(pli.hazard_class_id,prl.hazard_class_id),
601: NULL,

Line 607: DECODE(PO_AUTOCREATE_PARAMS.g_document_type,

603: NVL(pli.vendor_product_num,prl.suggested_vendor_product_code),
604: pli.qty_rcv_tolerance,
605: pli.over_tolerance_error_flag,
606: NVL(pli.firm_flag,'N'),
607: DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
608: 'PO', NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),
609: 'PA',NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),NULL),
610: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.price_type,PO_AUTOCREATE_PARAMS.g_sys.price_type_lookup_code), NULL),
611: NVL(pli.transaction_reason_code,prl.transaction_reason_code),

Line 608: 'PO', NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),

604: pli.qty_rcv_tolerance,
605: pli.over_tolerance_error_flag,
606: NVL(pli.firm_flag,'N'),
607: DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
608: 'PO', NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),
609: 'PA',NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),NULL),
610: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.price_type,PO_AUTOCREATE_PARAMS.g_sys.price_type_lookup_code), NULL),
611: NVL(pli.transaction_reason_code,prl.transaction_reason_code),
612: pli.line_location_id,

Line 609: 'PA',NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),NULL),

605: pli.over_tolerance_error_flag,
606: NVL(pli.firm_flag,'N'),
607: DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
608: 'PO', NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),
609: 'PA',NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),NULL),
610: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.price_type,PO_AUTOCREATE_PARAMS.g_sys.price_type_lookup_code), NULL),
611: NVL(pli.transaction_reason_code,prl.transaction_reason_code),
612: pli.line_location_id,
613: NVL(pli.need_by_date,prl.need_by_date),

Line 610: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.price_type,PO_AUTOCREATE_PARAMS.g_sys.price_type_lookup_code), NULL),

606: NVL(pli.firm_flag,'N'),
607: DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
608: 'PO', NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),
609: 'PA',NVL(pli.min_release_amount,PO_AUTOCREATE_PARAMS.g_sys.min_rel_amount),NULL),
610: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'PO', NVL(pli.price_type,PO_AUTOCREATE_PARAMS.g_sys.price_type_lookup_code), NULL),
611: NVL(pli.transaction_reason_code,prl.transaction_reason_code),
612: pli.line_location_id,
613: NVL(pli.need_by_date,prl.need_by_date),
614: NVL(pli.ship_to_organization_id,prl.destination_organization_id),

Line 648: AND phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id

644: po_headers_interface phi,
645: po_requisition_lines_all prl --
646: WHERE pli.interface_line_id = pli2.interface_line_id
647: AND pli.interface_header_id = phi.interface_header_id
648: AND phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
649: AND pli.requisition_line_id = prl.requisition_line_id(+)
650: )
651: WHERE pli2.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
652: AND ( NVL(pli2.clm_info_flag,'N') = 'Y');

Line 651: WHERE pli2.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id

647: AND pli.interface_header_id = phi.interface_header_id
648: AND phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
649: AND pli.requisition_line_id = prl.requisition_line_id(+)
650: )
651: WHERE pli2.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
652: AND ( NVL(pli2.clm_info_flag,'N') = 'Y');
653:
654: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING') THEN
655:

Line 654: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING') THEN

650: )
651: WHERE pli2.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
652: AND ( NVL(pli2.clm_info_flag,'N') = 'Y');
653:
654: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING') THEN
655:
656: l_progress :='060';
657: IF g_debug_stmt THEN
658: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress,

Line 690: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id;

686: l_progress :='062';
687: UPDATE po_lines_interface
688: SET group_line_id = l_parent_line_id
689: WHERE INTERFACE_LINE_ID = crec.INTERFACE_LINE_ID
690: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id;
691: -- Added for Linking requisition to modification project
692:
693: IF po_autocreate_params.g_process_code = 'ADD_FUNDS' THEN
694: l_progress :='063';

Line 693: IF po_autocreate_params.g_process_code = 'ADD_FUNDS' THEN

689: WHERE INTERFACE_LINE_ID = crec.INTERFACE_LINE_ID
690: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id;
691: -- Added for Linking requisition to modification project
692:
693: IF po_autocreate_params.g_process_code = 'ADD_FUNDS' THEN
694: l_progress :='063';
695: BEGIN
696: SELECT line_num_display
697: INTO l_clin_num_display

Line 699: WHERE PO_HEADER_ID = po_autocreate_params.g_po_header_id

695: BEGIN
696: SELECT line_num_display
697: INTO l_clin_num_display
698: FROM PO_LINES_merge_v
699: WHERE PO_HEADER_ID = po_autocreate_params.g_po_header_id
700: AND draft_id = po_autocreate_params.g_draft_id
701: AND LINE_NUM =
702: (SELECT line_num
703: FROM po_lines_interface

Line 700: AND draft_id = po_autocreate_params.g_draft_id

696: SELECT line_num_display
697: INTO l_clin_num_display
698: FROM PO_LINES_merge_v
699: WHERE PO_HEADER_ID = po_autocreate_params.g_po_header_id
700: AND draft_id = po_autocreate_params.g_draft_id
701: AND LINE_NUM =
702: (SELECT line_num
703: FROM po_lines_interface
704: WHERE interface_line_id = l_parent_line_id

Line 705: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id

701: AND LINE_NUM =
702: (SELECT line_num
703: FROM po_lines_interface
704: WHERE interface_line_id = l_parent_line_id
705: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id
706: );
707:
708: IF l_is_first_slin = 'Y' THEN
709: l_progress :='064';

Line 710: l_slin_num_display := pon_clo_renumber_pkg.GetNextSlinNumber('PO',po_autocreate_params.g_po_header_id,l_clin_num_display,'Y');

706: );
707:
708: IF l_is_first_slin = 'Y' THEN
709: l_progress :='064';
710: l_slin_num_display := pon_clo_renumber_pkg.GetNextSlinNumber('PO',po_autocreate_params.g_po_header_id,l_clin_num_display,'Y');
711: l_is_first_slin := 'N';
712: l_slin_count := To_Number(l_slin_num_display);
713: ELSE
714: l_progress :='065';

Line 728: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id

724: l_progress :='066';
725: UPDATE po_lines_interface
726: SET line_num_display = l_slin_num_display
727: WHERE INTERFACE_LINE_ID = crec.INTERFACE_LINE_ID
728: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id
729: AND clm_info_flag ='Y';
730:
731: EXCEPTION
732: WHEN OTHERS THEN

Line 755: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id;

751: l_progress :='071';
752: UPDATE po_lines_interface
753: SET CLM_BASE_LINE_NUM = l_parent_line_id
754: WHERE INTERFACE_LINE_ID = crec.INTERFACE_LINE_ID
755: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id;
756:
757: END LOOP;
758: END IF;
759: END IF;

Line 762: IF PO_AUTOCREATE_PARAMS.g_document_type = 'PO' THEN

758: END IF;
759: END IF;
760:
761: -- setup distributions interface
762: IF PO_AUTOCREATE_PARAMS.g_document_type = 'PO' THEN
763: l_progress :='080';
764: IF g_debug_stmt THEN
765: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Before insert into Distribution interface');
766: END IF;

Line 832: Decode(PO_AUTOCREATE_PARAMS.g_interface_source_code , 'SOURCING' , prd.req_line_quantity * pli.quantity/prl.quantity, prd.req_line_quantity),

828: prd.distribution_num,
829: prd.code_combination_id,
830: prd.set_of_books_id,
831: /* Bug : 13695551 : For clm sourcing, we donot split, so we need to prorate distribution quantities for quantity and amount based lines */
832: Decode(PO_AUTOCREATE_PARAMS.g_interface_source_code , 'SOURCING' , prd.req_line_quantity * pli.quantity/prl.quantity, prd.req_line_quantity),
833: DECODE ( PO_AUTOCREATE_PARAMS.g_interface_source_code , 'SOURCING' , prd.req_line_amount * pli.amount/prl.amount , prd.req_line_amount ),
834: phi.rate,
835: phi.rate_date,
836: prd.distribution_id,

Line 833: DECODE ( PO_AUTOCREATE_PARAMS.g_interface_source_code , 'SOURCING' , prd.req_line_amount * pli.amount/prl.amount , prd.req_line_amount ),

829: prd.code_combination_id,
830: prd.set_of_books_id,
831: /* Bug : 13695551 : For clm sourcing, we donot split, so we need to prorate distribution quantities for quantity and amount based lines */
832: Decode(PO_AUTOCREATE_PARAMS.g_interface_source_code , 'SOURCING' , prd.req_line_quantity * pli.quantity/prl.quantity, prd.req_line_quantity),
833: DECODE ( PO_AUTOCREATE_PARAMS.g_interface_source_code , 'SOURCING' , prd.req_line_amount * pli.amount/prl.amount , prd.req_line_amount ),
834: phi.rate,
835: phi.rate_date,
836: prd.distribution_id,
837: prl.deliver_to_location_id,

Line 887: AND phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id

883: po_headers_interface phi
884: WHERE prd.requisition_line_id = prl.requisition_line_id
885: AND prl.requisition_line_id = pli.requisition_line_id
886: AND pli.interface_header_id = phi.interface_header_id
887: AND phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
888: AND
889: /* Bug : 13695551 : From sourcing, one req distribution should be funding multiple award line distributions*/
890: ( (po_autocreate_params.g_is_clm_po ='Y' AND PO_AUTOCREATE_PARAMS.g_interface_source_code = 'SOURCING')
891: OR

Line 890: ( (po_autocreate_params.g_is_clm_po ='Y' AND PO_AUTOCREATE_PARAMS.g_interface_source_code = 'SOURCING')

886: AND pli.interface_header_id = phi.interface_header_id
887: AND phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
888: AND
889: /* Bug : 13695551 : From sourcing, one req distribution should be funding multiple award line distributions*/
890: ( (po_autocreate_params.g_is_clm_po ='Y' AND PO_AUTOCREATE_PARAMS.g_interface_source_code = 'SOURCING')
891: OR
892: (NOT EXISTS (SELECT 'Y'
893: FROM po_distributions_all pda
894: WHERE pda.req_distribution_id = prd.distribution_id))

Line 906: IF po_autocreate_params.g_is_clm_po ='Y' THEN

902: /* Option lines do not have distributions , but we still
903: do the insert. We get the deliver to information
904: from the distribution record.
905: */
906: IF po_autocreate_params.g_is_clm_po ='Y' THEN
907: l_progress :='090';
908:
909: IF g_debug_stmt THEN
910: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'insert into p_dists record for Option Line');

Line 937: WHERE pli.interface_header_id = po_autocreate_params.x_interface_header_id

933: prl.destination_subinventory,
934: prl.destination_context
935: FROM po_requisition_lines_all prl,
936: po_lines_interface pli --option
937: WHERE pli.interface_header_id = po_autocreate_params.x_interface_header_id
938: AND (( pli.clm_option_indicator = 'O' AND NVL(pli.clm_exercised_flag,'N') = 'N') -- Bug 9960752
939: OR prl.fund_source_not_known = 'Y' )
940: --CLM Phase 2 Changes : PR Lines with no distributions should be handled like
941: --option lines

Line 956: WHERE interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id;

952:
953: SELECT COUNT(*)
954: INTO l_count_dist
955: FROM po_distributions_interface
956: WHERE interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id;
957:
958: IF g_debug_stmt THEN
959: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Count from dist iterface is '||l_count_dist);
960: END IF;

Line 964: IF po_autocreate_params.g_is_clm_po ='Y' THEN

960: END IF;
961: END IF;--end RFQ , PO
962:
963: -- For D.o.D case need to set the Distributions properly.
964: IF po_autocreate_params.g_is_clm_po ='Y' THEN
965:
966: l_progress :='110';
967:
968: UPDATE po_distributions_interface pdi

Line 973: AND pi.interface_header_id = po_autocreate_params.x_interface_header_id

969: SET group_line_id =
970: (SELECT interface_line_id
971: FROM po_lines_interface pi
972: WHERE pi.requisition_line_id = pdi.group_line_id
973: AND pi.interface_header_id = po_autocreate_params.x_interface_header_id
974: )
975: WHERE pdi.interface_header_id = po_autocreate_params.x_interface_header_id;
976:
977: IF g_debug_stmt THEN

Line 975: WHERE pdi.interface_header_id = po_autocreate_params.x_interface_header_id;

971: FROM po_lines_interface pi
972: WHERE pi.requisition_line_id = pdi.group_line_id
973: AND pi.interface_header_id = po_autocreate_params.x_interface_header_id
974: )
975: WHERE pdi.interface_header_id = po_autocreate_params.x_interface_header_id;
976:
977: IF g_debug_stmt THEN
978: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress,
979: p_message => 'No of Distribution records updated : ' || SQL%ROWCOUNT);

Line 990: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code='SOURCING') THEN

986:
987: --default the distribution for non req backing negotiations.The above
988: --insert only takes care of the interface lines which are backed by
989: --requisitions.
990: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code='SOURCING') THEN
991: IF (PO_LOG.d_stmt) THEN
992: PO_LOG.stmt(g_log_head || l_api_name, l_progress, 'Defaulting dists interface for sourcing.');
993: END IF;
994:

Line 1004: IF (PO_AUTOCREATE_PARAMS.g_is_complex_work_po) THEN

1000: IF (PO_LOG.d_stmt) THEN
1001: PO_LOG.stmt(g_log_head || l_api_name, 190, 'i.interface_line_id', i.interface_line_id);
1002: END IF;
1003:
1004: IF (PO_AUTOCREATE_PARAMS.g_is_complex_work_po) THEN
1005: l_progress:='121';
1006: -- create complex work PO from sourcing
1007:
1008: IF (i.ship_to_organization_id IS NOT NULL) THEN

Line 1025: l_ship_to_org_id := NVL(l_ship_to_org_id, PO_AUTOCREATE_PARAMS.g_sys.master_inv_org_id);

1021: EXCEPTION
1022: WHEN no_data_found THEN
1023: l_ship_to_org_id := NULL;
1024: END;
1025: l_ship_to_org_id := NVL(l_ship_to_org_id, PO_AUTOCREATE_PARAMS.g_sys.master_inv_org_id);
1026: END IF;
1027:
1028: -- IF i.ship_to_organization_id IS NOT NULL
1029: -- SQL WHAT: insert minimal data into po_distributions_interface

Line 1068: PO_AUTOCREATE_PARAMS.g_sys.sob_id,

1064: i.item_id, i.category_id,
1065: i.ship_to_organization_id,
1066: i.ship_to_location_id,
1067: NULL, --deliver_to_person_id
1068: PO_AUTOCREATE_PARAMS.g_sys.sob_id,
1069: PO_AUTOCREATE_PARAMS.g_sys.coa_id,
1070: i.line_type_id,
1071: i.quantity,
1072: i.amount,

Line 1069: PO_AUTOCREATE_PARAMS.g_sys.coa_id,

1065: i.ship_to_organization_id,
1066: i.ship_to_location_id,
1067: NULL, --deliver_to_person_id
1068: PO_AUTOCREATE_PARAMS.g_sys.sob_id,
1069: PO_AUTOCREATE_PARAMS.g_sys.coa_id,
1070: i.line_type_id,
1071: i.quantity,
1072: i.amount,
1073: i.rate,

Line 1078: NVL(PO_AUTOCREATE_PARAMS.g_sys.po_encumbrance_flag, 'N'),

1074: i.rate_date,
1075: i.vendor_id,
1076: i.vendor_site_id,
1077: i.agent_id,
1078: NVL(PO_AUTOCREATE_PARAMS.g_sys.po_encumbrance_flag, 'N'),
1079: NULL,
1080: i.document_subtype,
1081: NULL,
1082: NULL,

Line 1096: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id, --< Shared Proc FPJ >

1092: NULL,
1093: NULL,
1094: NULL,
1095: NULL, --project_accounting_context
1096: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id, --< Shared Proc FPJ >
1097: i.unit_price
1098: );
1099: -- need to populate the p_dists record from the distribution interface
1100: END IF; -- IF po_autocreate_params.g_is_complex_work_po

Line 1100: END IF; -- IF po_autocreate_params.g_is_complex_work_po

1096: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id, --< Shared Proc FPJ >
1097: i.unit_price
1098: );
1099: -- need to populate the p_dists record from the distribution interface
1100: END IF; -- IF po_autocreate_params.g_is_complex_work_po
1101: --
1102: END LOOP;
1103: END IF;
1104:

Line 1755: WHERE interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id

1751: IS
1752: SELECT interface_line_id,
1753: need_by_date
1754: FROM po_lines_interface
1755: WHERE interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
1756: AND line_num = p_line_num
1757: AND shipment_num IS NOT NULL
1758: AND interface_line_id <> p_intf_line_id
1759: ORDER BY shipment_num;

Line 1771: p_message => 'Document Type : '|| PO_AUTOCREATE_PARAMS.g_document_type ||

1767: BEGIN
1768: IF g_debug_stmt THEN
1769: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
1770: PO_DEBUG.debug_stmt( p_log_head => g_log_head||l_api_name, p_token => l_progress,
1771: p_message => 'Document Type : '|| PO_AUTOCREATE_PARAMS.g_document_type ||
1772: ' Document_subtype : '|| PO_AUTOCREATE_PARAMS.g_document_subtype ||
1773: ' Interface Lines Count ' || p_lines.intf_line_id_tbl.Count );
1774: END IF;
1775:

Line 1772: ' Document_subtype : '|| PO_AUTOCREATE_PARAMS.g_document_subtype ||

1768: IF g_debug_stmt THEN
1769: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
1770: PO_DEBUG.debug_stmt( p_log_head => g_log_head||l_api_name, p_token => l_progress,
1771: p_message => 'Document Type : '|| PO_AUTOCREATE_PARAMS.g_document_type ||
1772: ' Document_subtype : '|| PO_AUTOCREATE_PARAMS.g_document_subtype ||
1773: ' Interface Lines Count ' || p_lines.intf_line_id_tbl.Count );
1774: END IF;
1775:
1776: l_progress := '010';

Line 1778: IF (PO_AUTOCREATE_PARAMS.g_document_type = 'PO' AND PO_AUTOCREATE_PARAMS.g_document_subtype IN ('STANDARD', 'PLANNED', 'RELEASE')) THEN

1774: END IF;
1775:
1776: l_progress := '010';
1777:
1778: IF (PO_AUTOCREATE_PARAMS.g_document_type = 'PO' AND PO_AUTOCREATE_PARAMS.g_document_subtype IN ('STANDARD', 'PLANNED', 'RELEASE')) THEN
1779: g_calculate_tax_flag := 'Y';
1780: END IF;
1781:
1782: l_progress := '020' ;

Line 1879: l_requesting_ou_id := PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id;

1875: RAISE;
1876: END;
1877: ELSE
1878: l_progress := '052';
1879: l_requesting_ou_id := PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id;
1880: END IF;
1881:
1882: -- Determine the currency conversion rate for the current line.
1883: -- If called from Sourcing, simply use the rate specified in the interface

Line 1885: IF ( PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING'

1881:
1882: -- Determine the currency conversion rate for the current line.
1883: -- If called from Sourcing, simply use the rate specified in the interface
1884: -- table.
1885: IF ( PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING'
1886: AND PO_AUTOCREATE_PARAMS.g_purchasing_ou_id <> l_requesting_ou_id
1887: AND PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD'
1888: AND NVL (p_lines.clm_info_flag_tbl (i), 'N') <> 'Y' ) THEN
1889: l_progress := '060';

Line 1886: AND PO_AUTOCREATE_PARAMS.g_purchasing_ou_id <> l_requesting_ou_id

1882: -- Determine the currency conversion rate for the current line.
1883: -- If called from Sourcing, simply use the rate specified in the interface
1884: -- table.
1885: IF ( PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING'
1886: AND PO_AUTOCREATE_PARAMS.g_purchasing_ou_id <> l_requesting_ou_id
1887: AND PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD'
1888: AND NVL (p_lines.clm_info_flag_tbl (i), 'N') <> 'Y' ) THEN
1889: l_progress := '060';
1890: get_rate_for_req_price (p_requesting_ou_id => l_requesting_ou_id,

Line 1887: AND PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD'

1883: -- If called from Sourcing, simply use the rate specified in the interface
1884: -- table.
1885: IF ( PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING'
1886: AND PO_AUTOCREATE_PARAMS.g_purchasing_ou_id <> l_requesting_ou_id
1887: AND PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD'
1888: AND NVL (p_lines.clm_info_flag_tbl (i), 'N') <> 'Y' ) THEN
1889: l_progress := '060';
1890: get_rate_for_req_price (p_requesting_ou_id => l_requesting_ou_id,
1891: p_purchasing_ou_id => PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,

Line 1891: p_purchasing_ou_id => PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,

1887: AND PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD'
1888: AND NVL (p_lines.clm_info_flag_tbl (i), 'N') <> 'Y' ) THEN
1889: l_progress := '060';
1890: get_rate_for_req_price (p_requesting_ou_id => l_requesting_ou_id,
1891: p_purchasing_ou_id => PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,
1892: p_po_currency_code => p_lines.hd_currency_code_tbl(i),
1893: p_rate_type => p_lines.hd_rate_type_tbl(i),
1894: p_rate_date => p_lines.hd_rate_date_tbl(i),
1895: x_rate => p_lines.rate_for_req_fields_tbl(i) );

Line 1899: p_lines.rate_for_req_fields_tbl(i) := NVL (PO_AUTOCREATE_PARAMS.g_rate_for_req_fields, 1);

1895: x_rate => p_lines.rate_for_req_fields_tbl(i) );
1896: END IF;
1897:
1898: IF (p_lines.rate_for_req_fields_tbl(i) IS NULL) THEN
1899: p_lines.rate_for_req_fields_tbl(i) := NVL (PO_AUTOCREATE_PARAMS.g_rate_for_req_fields, 1);
1900: END IF;
1901: /* initialize values */
1902: x_quantity := p_lines.quantity_tbl(i);
1903: x_unit_of_measure := p_lines.unit_of_measure_tbl(i); --uom_code_tbl

Line 1933: if (PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING') then

1929: /*Bug 13855350 : While autocreating from BWC, clm_idc_type is stamped as null,
1930: when called from sourcing if outcome is award value is IDC_NA
1931: else appropriate value from picklist is chosen
1932: Hence the default value for award is IDC_NA*/
1933: if (PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING') then
1934: p_lines.clm_idc_type_tbl(i) := nvl(p_lines.clm_idc_type_tbl(i),'IDC_NA');
1935: end if;
1936:
1937: IF(PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD' OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'

Line 1937: IF(PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD' OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'

1933: if (PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING') then
1934: p_lines.clm_idc_type_tbl(i) := nvl(p_lines.clm_idc_type_tbl(i),'IDC_NA');
1935: end if;
1936:
1937: IF(PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD' OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'
1938: OR PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET') THEN
1939:
1940: BEGIN
1941: l_progress := '090';

Line 1938: OR PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET') THEN

1934: p_lines.clm_idc_type_tbl(i) := nvl(p_lines.clm_idc_type_tbl(i),'IDC_NA');
1935: end if;
1936:
1937: IF(PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD' OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'
1938: OR PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET') THEN
1939:
1940: BEGIN
1941: l_progress := '090';
1942:

Line 1966: WHERE PO_HEADER_ID = po_autocreate_params.g_po_header_id

1962: x_po_transaction_reason_code,
1963: x_price_break_lookup_code,
1964: l_manual_price_change_flag
1965: FROM PO_LINES_draft_all
1966: WHERE PO_HEADER_ID = po_autocreate_params.g_po_header_id
1967: AND LINE_NUM = p_lines.line_num_tbl(i)
1968: AND draft_id =po_autocreate_params.g_draft_id;
1969:
1970: p_lines.po_line_id_tbl(i) := x_po_line_id;

Line 1968: AND draft_id =po_autocreate_params.g_draft_id;

1964: l_manual_price_change_flag
1965: FROM PO_LINES_draft_all
1966: WHERE PO_HEADER_ID = po_autocreate_params.g_po_header_id
1967: AND LINE_NUM = p_lines.line_num_tbl(i)
1968: AND draft_id =po_autocreate_params.g_draft_id;
1969:
1970: p_lines.po_line_id_tbl(i) := x_po_line_id;
1971: p_lines.po_header_id_tbl(i) := po_autocreate_params.g_po_header_id;
1972: IF g_debug_stmt THEN

Line 1971: p_lines.po_header_id_tbl(i) := po_autocreate_params.g_po_header_id;

1967: AND LINE_NUM = p_lines.line_num_tbl(i)
1968: AND draft_id =po_autocreate_params.g_draft_id;
1969:
1970: p_lines.po_line_id_tbl(i) := x_po_line_id;
1971: p_lines.po_header_id_tbl(i) := po_autocreate_params.g_po_header_id;
1972: IF g_debug_stmt THEN
1973: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Matching Line Found : '|| x_po_line_id);
1974: END IF;
1975:

Line 2001: po_autocreate_params.g_sys.master_inv_org_id) ,

1997: p_purchase_basis => l_purchase_basis ,
1998: p_line_location_id => NULL ,
1999: p_item_id => p_lines.item_id_tbl(i) ,
2000: p_org_id => NVL(p_lines.dest_organization_id_tbl(i),
2001: po_autocreate_params.g_sys.master_inv_org_id) ,
2002: p_vendor_id => p_lines.hd_vendor_id_tbl(i) ,
2003: p_drop_ship_flag => p_lines.drop_ship_flag_tbl(i) ,
2004: x_enforce_ship_to_loc_code => p_lines.rc_enforce_shipto_loc_code_tbl(i) ,
2005: x_allow_substitute_receipts => p_lines.rc_subst_receipt_flag_tbl(i) ,

Line 2023: IF (p_lines.from_line_id_tbl(i) IS NOT NULL) AND (PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD') THEN

2019: -- When autocreating a PO that references a GA, and the req line and
2020: -- GA line have different UOM's, convert to the GA's UOM if the
2021: -- UOM Convert profile is Yes. If UOM Convert is No, do not create
2022: -- this line.
2023: IF (p_lines.from_line_id_tbl(i) IS NOT NULL) AND (PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD') THEN
2024:
2025: l_progress := '110';
2026:
2027: BEGIN

Line 2193: AND msi.organization_id = po_autocreate_params.g_sys.master_inv_org_id;

2189: p_lines.it_secondary_uom_code_tbl(i), --
2190: p_lines.it_grade_control_flag_tbl(i) --
2191: FROM mtl_system_items msi
2192: WHERE msi.inventory_item_id = p_lines.item_id_tbl(i)
2193: AND msi.organization_id = po_autocreate_params.g_sys.master_inv_org_id;
2194:
2195: IF g_debug_stmt THEN
2196: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress,
2197: p_message => 'Item List Price : ' || p_lines.it_list_price_per_unit_tbl(i)

Line 2315: WHERE NVL(org_id, -99) = NVL(PO_AUTOCREATE_PARAMS.g_purchasing_ou_id, -99); --

2311: p_lines.it_receipt_req_flag_tbl(i),
2312: p_lines.it_invoice_tolerance_tbl(i),
2313: p_lines.it_rcv_tolerance_tbl(i)
2314: FROM po_system_parameters_all posp --
2315: WHERE NVL(org_id, -99) = NVL(PO_AUTOCREATE_PARAMS.g_purchasing_ou_id, -99); --
2316:
2317: EXCEPTION
2318: WHEN no_data_found THEN
2319: IF g_debug_stmt THEN

Line 2379: p_interface_source_code => PO_AUTOCREATE_PARAMS.g_interface_source_code,

2375: l_cc_amount := p_lines.amount_tbl(i);
2376: l_progress := '220';
2377:
2378: do_currency_conversion( p_order_type_lookup_code => x_order_type_lookup_code,
2379: p_interface_source_code => PO_AUTOCREATE_PARAMS.g_interface_source_code,
2380: p_rate => p_lines.rate_for_req_fields_tbl(i),
2381: p_po_currency_code => p_lines.hd_currency_code_tbl(i),
2382: p_requisition_line_id => p_lines.requisition_line_id_tbl(i),
2383: x_quantity => x_quantity, -- IN/OUT

Line 2411: IF PO_AUTOCREATE_PARAMS.g_interface_source_code <>'SOURCING' THEN

2407: --sourcing populates the unit price in bidder's currency, so we are
2408: -- not converting the currency. And sourcing does not have
2409: --list_price_per_unit and market price storred in their system,
2410: --so dont do the following for sourcing
2411: IF PO_AUTOCREATE_PARAMS.g_interface_source_code <>'SOURCING' THEN
2412: l_progress := '240';
2413: IF (p_lines.it_unit_meas_lookup_code_tbl(i) = p_lines.unit_of_measure_tbl(i)) THEN
2414: IF (p_lines.it_list_price_per_unit_tbl(i) <> '') THEN
2415: IF (p_lines.it_list_price_per_unit_tbl(i) > p_lines.unit_price_tbl(i)) THEN

Line 2426: IF PO_AUTOCREATE_PARAMS.g_interface_source_code IN ('SOURCING','CONSUMPTION_ADVICE') THEN -- CONSIGNED FPI

2422: --
2423: --default un_number_id,hazard_class_id from item attributes when
2424: --not backed by a req. Also default UOM for amount based lines for this
2425: --condition.
2426: IF PO_AUTOCREATE_PARAMS.g_interface_source_code IN ('SOURCING','CONSUMPTION_ADVICE') THEN -- CONSIGNED FPI
2427: l_progress := '250';
2428:
2429: IF p_lines.requisition_line_id_tbl(i) IS NULL THEN
2430:

Line 2439: AND organization_id = po_autocreate_params.g_sys.master_inv_org_id;

2435: INTO x_un_number_id,
2436: x_hazard_class_id
2437: FROM mtl_system_items
2438: WHERE inventory_item_id = p_lines.item_id_tbl(i)
2439: AND organization_id = po_autocreate_params.g_sys.master_inv_org_id;
2440: EXCEPTION
2441: WHEN no_data_found THEN
2442: IF g_debug_stmt THEN
2443: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'NO_DATA_FOUND: '||SQLERRM);

Line 2496: IF( PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD'

2492: END IF;
2493: END IF;
2494: END IF;
2495:
2496: IF( PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD'
2497: OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'
2498: OR PO_AUTOCREATE_PARAMS.g_document_subtype='BLANKET' ) THEN
2499: l_progress :='290';
2500:

Line 2497: OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'

2493: END IF;
2494: END IF;
2495:
2496: IF( PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD'
2497: OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'
2498: OR PO_AUTOCREATE_PARAMS.g_document_subtype='BLANKET' ) THEN
2499: l_progress :='290';
2500:
2501: SELECT po_lines_s.nextval INTO x_po_line_id FROM sys.dual;

Line 2498: OR PO_AUTOCREATE_PARAMS.g_document_subtype='BLANKET' ) THEN

2494: END IF;
2495:
2496: IF( PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD'
2497: OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'
2498: OR PO_AUTOCREATE_PARAMS.g_document_subtype='BLANKET' ) THEN
2499: l_progress :='290';
2500:
2501: SELECT po_lines_s.nextval INTO x_po_line_id FROM sys.dual;
2502:

Line 2516: IF ( (PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD' OR ( PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET' AND l_enhanced_pricing_flag = 'Y') )

2512: --
2513: -- 5) Not a complex work PO
2514: l_contractor_status := PO_SERVICES_PVT.get_contractor_status(p_lines.requisition_line_id_tbl(i));
2515: -- Enhanced Pricing: Enable pricing call for BLANKET document subtype if pricing enhanced for the style selected
2516: IF ( (PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD' OR ( PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET' AND l_enhanced_pricing_flag = 'Y') )
2517: AND ( p_lines.from_line_id_tbl(i) IS NOT NULL OR p_lines.contract_id_tbl(i) IS NOT NULL OR l_enhanced_pricing_flag = 'Y' )
2518: AND (NVL(p_lines.clm_info_flag_tbl(i),'N')<> 'Y')
2519: AND ( PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'CONSUMPTION_ADVICE' )
2520: AND (NOT po_autocreate_params.g_is_complex_work_po) --

Line 2519: AND ( PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'CONSUMPTION_ADVICE' )

2515: -- Enhanced Pricing: Enable pricing call for BLANKET document subtype if pricing enhanced for the style selected
2516: IF ( (PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD' OR ( PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET' AND l_enhanced_pricing_flag = 'Y') )
2517: AND ( p_lines.from_line_id_tbl(i) IS NOT NULL OR p_lines.contract_id_tbl(i) IS NOT NULL OR l_enhanced_pricing_flag = 'Y' )
2518: AND (NVL(p_lines.clm_info_flag_tbl(i),'N')<> 'Y')
2519: AND ( PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'CONSUMPTION_ADVICE' )
2520: AND (NOT po_autocreate_params.g_is_complex_work_po) --
2521: AND ( l_contractor_status IS NULL OR l_contractor_status <> 'ASSIGNED' ) ) THEN
2522:
2523: l_progress := '310';

Line 2520: AND (NOT po_autocreate_params.g_is_complex_work_po) --

2516: IF ( (PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD' OR ( PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET' AND l_enhanced_pricing_flag = 'Y') )
2517: AND ( p_lines.from_line_id_tbl(i) IS NOT NULL OR p_lines.contract_id_tbl(i) IS NOT NULL OR l_enhanced_pricing_flag = 'Y' )
2518: AND (NVL(p_lines.clm_info_flag_tbl(i),'N')<> 'Y')
2519: AND ( PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'CONSUMPTION_ADVICE' )
2520: AND (NOT po_autocreate_params.g_is_complex_work_po) --
2521: AND ( l_contractor_status IS NULL OR l_contractor_status <> 'ASSIGNED' ) ) THEN
2522:
2523: l_progress := '310';
2524: --

Line 2535: p_org_id => PO_AUTOCREATE_PARAMS.g_purchasing_ou_id ,

2531: p_cum_flag => FALSE ,
2532: p_need_by_date => p_lines.need_by_date_tbl(i) ,
2533: p_line_location_id => NULL ,
2534: p_contract_id => p_lines.contract_id_tbl(i) ,
2535: p_org_id => PO_AUTOCREATE_PARAMS.g_purchasing_ou_id ,
2536: p_supplier_id => p_lines.hd_vendor_id_tbl(i) ,
2537: p_supplier_site_id => p_lines.hd_vendor_site_id_tbl(i) ,
2538: p_creation_date => p_lines.creation_date_tbl(i) ,
2539: p_order_header_id => po_autocreate_params.g_po_header_id ,

Line 2539: p_order_header_id => po_autocreate_params.g_po_header_id ,

2535: p_org_id => PO_AUTOCREATE_PARAMS.g_purchasing_ou_id ,
2536: p_supplier_id => p_lines.hd_vendor_id_tbl(i) ,
2537: p_supplier_site_id => p_lines.hd_vendor_site_id_tbl(i) ,
2538: p_creation_date => p_lines.creation_date_tbl(i) ,
2539: p_order_header_id => po_autocreate_params.g_po_header_id ,
2540: p_order_line_id => x_po_line_id ,
2541: p_line_type_id => p_lines.line_type_id_tbl(i) ,
2542: p_item_revision => p_lines.item_revision_tbl(i) ,
2543: p_item_id => p_lines.item_id_tbl(i) ,

Line 2588: IF ( PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD'

2584:
2585: /* GA FPI end */
2586: -- If we are Autocreating a Standard PO,
2587: -- then setup the Interface tables to copy over Price Differentials.
2588: IF ( PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD'
2589: AND PO_AUTOCREATE_PARAMS.g_interface_source_code NOT IN ('SOURCING', 'CONSUMPTION_ADVICE')
2590: AND (NOT po_autocreate_params.g_is_complex_work_po)) THEN
2591:
2592: l_progress := '340';

Line 2589: AND PO_AUTOCREATE_PARAMS.g_interface_source_code NOT IN ('SOURCING', 'CONSUMPTION_ADVICE')

2585: /* GA FPI end */
2586: -- If we are Autocreating a Standard PO,
2587: -- then setup the Interface tables to copy over Price Differentials.
2588: IF ( PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD'
2589: AND PO_AUTOCREATE_PARAMS.g_interface_source_code NOT IN ('SOURCING', 'CONSUMPTION_ADVICE')
2590: AND (NOT po_autocreate_params.g_is_complex_work_po)) THEN
2591:
2592: l_progress := '340';
2593:

Line 2590: AND (NOT po_autocreate_params.g_is_complex_work_po)) THEN

2586: -- If we are Autocreating a Standard PO,
2587: -- then setup the Interface tables to copy over Price Differentials.
2588: IF ( PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD'
2589: AND PO_AUTOCREATE_PARAMS.g_interface_source_code NOT IN ('SOURCING', 'CONSUMPTION_ADVICE')
2590: AND (NOT po_autocreate_params.g_is_complex_work_po)) THEN
2591:
2592: l_progress := '340';
2593:
2594: -- Determine where to get the Price Differentials from.

Line 2644: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Create_line: Header_id : '||po_autocreate_params.g_po_header_id);

2640: l_progress := '370';
2641:
2642: IF g_debug_stmt THEN
2643: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Create_line: Line id: '||x_po_line_id);
2644: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Create_line: Header_id : '||po_autocreate_params.g_po_header_id);
2645: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Create_line: Line number: '||p_lines.line_num_tbl(i));
2646: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Create_line: TRX RSON CODE : '||p_lines.transaction_reason_code_tbl(i));
2647: END IF;
2648:

Line 2670: IF PO_AUTOCREATE_PARAMS.g_interface_source_code='SOURCING' THEN

2666: --
2667: --
2668:
2669: BEGIN
2670: IF PO_AUTOCREATE_PARAMS.g_interface_source_code='SOURCING' THEN
2671:
2672: l_negotiated_by_preparer_flag := 'Y';
2673:
2674: ELSIF p_lines.from_header_id_tbl(i) IS NOT NULL THEN

Line 2727: IF ( PO_AUTOCREATE_PARAMS.g_document_subtype ='STANDARD'

2723: END;
2724:
2725: --
2726: -- IF secondary quantity is null and item is dual uom control , default the secondary qty.
2727: IF ( PO_AUTOCREATE_PARAMS.g_document_subtype ='STANDARD'
2728: OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'
2729: OR PO_AUTOCREATE_PARAMS.g_document_type = 'PA') THEN
2730: l_progress := '410';
2731: IF p_lines.item_id_tbl(i) IS NOT NULL THEN

Line 2728: OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'

2724:
2725: --
2726: -- IF secondary quantity is null and item is dual uom control , default the secondary qty.
2727: IF ( PO_AUTOCREATE_PARAMS.g_document_subtype ='STANDARD'
2728: OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'
2729: OR PO_AUTOCREATE_PARAMS.g_document_type = 'PA') THEN
2730: l_progress := '410';
2731: IF p_lines.item_id_tbl(i) IS NOT NULL THEN
2732: l_progress := '420';

Line 2729: OR PO_AUTOCREATE_PARAMS.g_document_type = 'PA') THEN

2725: --
2726: -- IF secondary quantity is null and item is dual uom control , default the secondary qty.
2727: IF ( PO_AUTOCREATE_PARAMS.g_document_subtype ='STANDARD'
2728: OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'
2729: OR PO_AUTOCREATE_PARAMS.g_document_type = 'PA') THEN
2730: l_progress := '410';
2731: IF p_lines.item_id_tbl(i) IS NOT NULL THEN
2732: l_progress := '420';
2733: IF p_lines.it_secondary_uom_code_tbl(i) IS NOT NULL THEN

Line 2735: OR po_autocreate_params.g_sys.master_inv_org_id <> p_lines.dest_organization_id_tbl(i) ) THEN

2731: IF p_lines.item_id_tbl(i) IS NOT NULL THEN
2732: l_progress := '420';
2733: IF p_lines.it_secondary_uom_code_tbl(i) IS NOT NULL THEN
2734: IF ( p_lines.secondary_quantity_tbl(i) IS NULL
2735: OR po_autocreate_params.g_sys.master_inv_org_id <> p_lines.dest_organization_id_tbl(i) ) THEN
2736: l_progress := '430';
2737: PO_UOM_S.get_secondary_uom( p_lines.item_id_tbl(i),
2738: p_lines.dest_organization_id_tbl(i),
2739: x_secondary_uom,

Line 2742: IF PO_AUTOCREATE_PARAMS.g_document_type <> 'PA' THEN

2738: p_lines.dest_organization_id_tbl(i),
2739: x_secondary_uom,
2740: x_secondary_unit_def);
2741:
2742: IF PO_AUTOCREATE_PARAMS.g_document_type <> 'PA' THEN
2743: l_progress := '440';
2744: PO_UOM_S.uom_convert (x_quantity,
2745: x_unit_of_measure,
2746: p_lines.item_id_tbl(i),

Line 2750: IF p_lines.dest_organization_id_tbl(i) = po_autocreate_params.g_sys.master_inv_org_id THEN

2746: p_lines.item_id_tbl(i),
2747: x_secondary_unit_def,
2748: x_secondary_quantity_def) ;
2749:
2750: IF p_lines.dest_organization_id_tbl(i) = po_autocreate_params.g_sys.master_inv_org_id THEN
2751: l_progress := '450';
2752: p_lines.secondary_unit_of_meas_tbl(i) := x_secondary_unit_def ;
2753: p_lines.secondary_quantity_tbl(i) := x_secondary_quantity_def ;
2754: END IF;

Line 2806: p_lines.po_header_id_tbl(i) := po_autocreate_params.g_po_header_id;

2802:
2803: l_progress := '500';
2804: /* Initialize line record here:*/
2805: p_lines.po_line_id_tbl(i) := x_po_line_id;
2806: p_lines.po_header_id_tbl(i) := po_autocreate_params.g_po_header_id;
2807: p_lines.unit_of_measure_tbl(i) := x_unit_of_measure;
2808: p_lines.base_unit_price_tbl(i) := l_base_unit_price ;
2809: p_lines.unit_price_tbl(i) := x_unit_price ; --interface.unit_price,
2810: p_lines.taxable_flag_tbl(i) := NVL(p_lines.it_taxable_flag_tbl(i),l_param_taxable_flag);

Line 2815: p_lines.org_id_tbl(i) := PO_AUTOCREATE_PARAMS.g_purchasing_ou_id;

2811: p_lines.negotiated_flag_tbl(i) := l_negotiated_by_preparer_flag;
2812: p_lines.secondary_unit_of_meas_tbl(i) := x_secondary_unit_def;
2813: p_lines.secondary_quantity_tbl(i) := x_secondary_quantity_def;
2814: p_lines.preferred_grade_tbl(i) := x_preferred_grade_def;
2815: p_lines.org_id_tbl(i) := PO_AUTOCREATE_PARAMS.g_purchasing_ou_id;
2816: p_lines.order_type_lookup_code_tbl(i) := l_order_type_lookup_code;
2817: p_lines.purchase_basis_tbl(i) := l_purchase_basis1;
2818: p_lines.matching_basis_tbl(i) := l_matching_basis;
2819: p_lines.retainage_rate_tbl(i) := NVL(p_lines.retainage_rate_tbl(i), l_retainage_rate);

Line 2823: SELECT DECODE(PO_AUTOCREATE_PARAMS.g_document_type,

2819: p_lines.retainage_rate_tbl(i) := NVL(p_lines.retainage_rate_tbl(i), l_retainage_rate);
2820:
2821: l_progress := '510';
2822: /* Bug 9915090 - In Case of IDVs quantity should be populated with extended price / offer price. */
2823: SELECT DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
2824: 'RFQ', NULL,
2825: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,
2826: 'SOURCING',NULL, ROUND (p_lines.it_list_price_per_unit_tbl(i),NVL(x_ext_precision,15)))) ,
2827: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL, ROUND(p_lines.it_market_price_tbl(i),NVL(x_ext_precision,15))) ,

Line 2825: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,

2821: l_progress := '510';
2822: /* Bug 9915090 - In Case of IDVs quantity should be populated with extended price / offer price. */
2823: SELECT DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
2824: 'RFQ', NULL,
2825: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,
2826: 'SOURCING',NULL, ROUND (p_lines.it_list_price_per_unit_tbl(i),NVL(x_ext_precision,15)))) ,
2827: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL, ROUND(p_lines.it_market_price_tbl(i),NVL(x_ext_precision,15))) ,
2828: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', 1,'PA',x_quantity, x_quantity) ,
2829: nvl2(g_calculate_tax_flag, 'CREATE', NULL) ,

Line 2827: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL, ROUND(p_lines.it_market_price_tbl(i),NVL(x_ext_precision,15))) ,

2823: SELECT DECODE(PO_AUTOCREATE_PARAMS.g_document_type,
2824: 'RFQ', NULL,
2825: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,
2826: 'SOURCING',NULL, ROUND (p_lines.it_list_price_per_unit_tbl(i),NVL(x_ext_precision,15)))) ,
2827: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL, ROUND(p_lines.it_market_price_tbl(i),NVL(x_ext_precision,15))) ,
2828: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', 1,'PA',x_quantity, x_quantity) ,
2829: nvl2(g_calculate_tax_flag, 'CREATE', NULL) ,
2830: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL,p_lines.type_1099_tbl(i)) ,
2831: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_un_number_id,p_lines.un_number_id_tbl(i)) ,

Line 2828: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', 1,'PA',x_quantity, x_quantity) ,

2824: 'RFQ', NULL,
2825: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,
2826: 'SOURCING',NULL, ROUND (p_lines.it_list_price_per_unit_tbl(i),NVL(x_ext_precision,15)))) ,
2827: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL, ROUND(p_lines.it_market_price_tbl(i),NVL(x_ext_precision,15))) ,
2828: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', 1,'PA',x_quantity, x_quantity) ,
2829: nvl2(g_calculate_tax_flag, 'CREATE', NULL) ,
2830: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL,p_lines.type_1099_tbl(i)) ,
2831: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_un_number_id,p_lines.un_number_id_tbl(i)) ,
2832: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_hazard_class_id,p_lines.hazard_class_id_tbl(i)) ,

Line 2830: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL,p_lines.type_1099_tbl(i)) ,

2826: 'SOURCING',NULL, ROUND (p_lines.it_list_price_per_unit_tbl(i),NVL(x_ext_precision,15)))) ,
2827: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL, ROUND(p_lines.it_market_price_tbl(i),NVL(x_ext_precision,15))) ,
2828: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', 1,'PA',x_quantity, x_quantity) ,
2829: nvl2(g_calculate_tax_flag, 'CREATE', NULL) ,
2830: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL,p_lines.type_1099_tbl(i)) ,
2831: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_un_number_id,p_lines.un_number_id_tbl(i)) ,
2832: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_hazard_class_id,p_lines.hazard_class_id_tbl(i)) ,
2833: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.contract_id_tbl(i)) ,
2834: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_tolerance_tbl(i)) ,

Line 2831: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_un_number_id,p_lines.un_number_id_tbl(i)) ,

2827: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL, ROUND(p_lines.it_market_price_tbl(i),NVL(x_ext_precision,15))) ,
2828: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', 1,'PA',x_quantity, x_quantity) ,
2829: nvl2(g_calculate_tax_flag, 'CREATE', NULL) ,
2830: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL,p_lines.type_1099_tbl(i)) ,
2831: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_un_number_id,p_lines.un_number_id_tbl(i)) ,
2832: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_hazard_class_id,p_lines.hazard_class_id_tbl(i)) ,
2833: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.contract_id_tbl(i)) ,
2834: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_tolerance_tbl(i)) ,
2835: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_exception_code_tbl(i)) ,

Line 2832: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_hazard_class_id,p_lines.hazard_class_id_tbl(i)) ,

2828: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', 1,'PA',x_quantity, x_quantity) ,
2829: nvl2(g_calculate_tax_flag, 'CREATE', NULL) ,
2830: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL,p_lines.type_1099_tbl(i)) ,
2831: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_un_number_id,p_lines.un_number_id_tbl(i)) ,
2832: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_hazard_class_id,p_lines.hazard_class_id_tbl(i)) ,
2833: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.contract_id_tbl(i)) ,
2834: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_tolerance_tbl(i)) ,
2835: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_exception_code_tbl(i)) ,
2836: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,NVL(p_lines.from_header_id_tbl(i),x_quote_header_id)) ,

Line 2834: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_tolerance_tbl(i)) ,

2830: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL,p_lines.type_1099_tbl(i)) ,
2831: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_un_number_id,p_lines.un_number_id_tbl(i)) ,
2832: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_hazard_class_id,p_lines.hazard_class_id_tbl(i)) ,
2833: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.contract_id_tbl(i)) ,
2834: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_tolerance_tbl(i)) ,
2835: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_exception_code_tbl(i)) ,
2836: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,NVL(p_lines.from_header_id_tbl(i),x_quote_header_id)) ,
2837: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,NVL(p_lines.from_line_id_tbl(i),x_quote_line_id)) ,
2838: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,l_price_break_id) ,

Line 2835: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_exception_code_tbl(i)) ,

2831: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_un_number_id,p_lines.un_number_id_tbl(i)) ,
2832: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING', x_hazard_class_id,p_lines.hazard_class_id_tbl(i)) ,
2833: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.contract_id_tbl(i)) ,
2834: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_tolerance_tbl(i)) ,
2835: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_exception_code_tbl(i)) ,
2836: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,NVL(p_lines.from_header_id_tbl(i),x_quote_header_id)) ,
2837: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,NVL(p_lines.from_line_id_tbl(i),x_quote_line_id)) ,
2838: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,l_price_break_id) ,
2839: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL,p_lines.note_to_vendor_tbl(i)) ,

Line 2839: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL,p_lines.note_to_vendor_tbl(i)) ,

2835: DECODE(PO_AUTOCREATE_PARAMS.g_document_type, 'RFQ', NULL, p_lines.qty_rcv_exception_code_tbl(i)) ,
2836: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,NVL(p_lines.from_header_id_tbl(i),x_quote_header_id)) ,
2837: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,NVL(p_lines.from_line_id_tbl(i),x_quote_line_id)) ,
2838: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,l_price_break_id) ,
2839: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL,p_lines.note_to_vendor_tbl(i)) ,
2840: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.oke_contract_header_id_tbl(i)) ,
2841: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.oke_contract_version_id_tbl(i)) ,
2842: DECODE ( PO_AUTOCREATE_PARAMS.g_document_type,
2843: 'PA' , DECODE ( x_order_type_lookup_code,

Line 2842: DECODE ( PO_AUTOCREATE_PARAMS.g_document_type,

2838: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,l_price_break_id) ,
2839: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',NULL,p_lines.note_to_vendor_tbl(i)) ,
2840: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.oke_contract_header_id_tbl(i)) ,
2841: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.oke_contract_version_id_tbl(i)) ,
2842: DECODE ( PO_AUTOCREATE_PARAMS.g_document_type,
2843: 'PA' , DECODE ( x_order_type_lookup_code,
2844: 'AMOUNT' , NULL, p_lines.quantity_tbl(i), NULL)) ,
2845: DECODE ( PO_AUTOCREATE_PARAMS.g_document_type,
2846: 'PA' , DECODE ( x_order_type_lookup_code ,

Line 2845: DECODE ( PO_AUTOCREATE_PARAMS.g_document_type,

2841: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.oke_contract_version_id_tbl(i)) ,
2842: DECODE ( PO_AUTOCREATE_PARAMS.g_document_type,
2843: 'PA' , DECODE ( x_order_type_lookup_code,
2844: 'AMOUNT' , NULL, p_lines.quantity_tbl(i), NULL)) ,
2845: DECODE ( PO_AUTOCREATE_PARAMS.g_document_type,
2846: 'PA' , DECODE ( x_order_type_lookup_code ,
2847: 'QUANTITY', NULL, p_lines.committed_amount_tbl (i)), NULL) ,
2848: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',p_lines.price_break_lookup_code_tbl(i), NULL)
2849: INTO p_lines.list_price_per_unit_tbl(i) ,

Line 2848: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',p_lines.price_break_lookup_code_tbl(i), NULL)

2844: 'AMOUNT' , NULL, p_lines.quantity_tbl(i), NULL)) ,
2845: DECODE ( PO_AUTOCREATE_PARAMS.g_document_type,
2846: 'PA' , DECODE ( x_order_type_lookup_code ,
2847: 'QUANTITY', NULL, p_lines.committed_amount_tbl (i)), NULL) ,
2848: DECODE(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',p_lines.price_break_lookup_code_tbl(i), NULL)
2849: INTO p_lines.list_price_per_unit_tbl(i) ,
2850: p_lines.market_price_tbl(i) ,
2851: p_lines.quantity_tbl(i) ,
2852: p_lines.tax_attribute_update_code_tbl(i) ,

Line 2982: PO_AUTOCREATE_PARAMS.g_draft_id ,

2978: clm_delivery_event_code
2979: )
2980: VALUES
2981: (
2982: PO_AUTOCREATE_PARAMS.g_draft_id ,
2983: p_lines.po_line_id_tbl(i) ,
2984: P_lines.last_update_date_tbl(i) ,
2985: p_lines.last_updated_by_tbl(i) ,
2986: p_lines.po_header_id_tbl(i) ,

Line 3036: p_lines.org_id_tbl(i) --PO_AUTOCREATE_PARAMS.g_purchasing_ou_id

3032: p_lines.quantity_committed_tbl(i) ,
3033: p_lines.committed_amount_tbl(i) ,
3034: p_lines.price_break_lookup_code_tbl(i) ,
3035: p_lines.supplier_ref_number_tbl(i) ,
3036: p_lines.org_id_tbl(i) --PO_AUTOCREATE_PARAMS.g_purchasing_ou_id
3037: ,
3038: p_lines.effective_date_tbl(i) ,
3039: p_lines.expiration_date_tbl(i) ,
3040: p_lines.contractor_first_name_tbl(i) ,

Line 3085: IF( PO_AUTOCREATE_PARAMS.g_document_subtype IN ('STANDARD','PLANNED','BLANKET') ) THEN

3081: p_lines.clm_exhibit_name_tbl(i),
3082: p_lines.clm_delivery_event_code_tbl(i)
3083: );
3084:
3085: IF( PO_AUTOCREATE_PARAMS.g_document_subtype IN ('STANDARD','PLANNED','BLANKET') ) THEN
3086: PO_AUTOCREATE_PVT.calculate_local( PO_AUTOCREATE_PARAMS.g_document_subtype, 'LINE', p_lines.po_line_id_tbl(i));
3087: END IF;
3088:
3089: END IF;

Line 3086: PO_AUTOCREATE_PVT.calculate_local( PO_AUTOCREATE_PARAMS.g_document_subtype, 'LINE', p_lines.po_line_id_tbl(i));

3082: p_lines.clm_delivery_event_code_tbl(i)
3083: );
3084:
3085: IF( PO_AUTOCREATE_PARAMS.g_document_subtype IN ('STANDARD','PLANNED','BLANKET') ) THEN
3086: PO_AUTOCREATE_PVT.calculate_local( PO_AUTOCREATE_PARAMS.g_document_subtype, 'LINE', p_lines.po_line_id_tbl(i));
3087: END IF;
3088:
3089: END IF;
3090:

Line 3104: IF PO_AUTOCREATE_PARAMS.g_mode = 'ADD' AND PO_AUTOCREATE_PARAMS.g_is_mod_exists THEN -- this is a Add PR lines to mod case.

3100:
3101:
3102: /*Autocreate grouping. In case of ADD_TO_MOD action, there can be concurrent modifications.
3103: Hence lock has to taken on the current modification to which the line is grouped to*/
3104: IF PO_AUTOCREATE_PARAMS.g_mode = 'ADD' AND PO_AUTOCREATE_PARAMS.g_is_mod_exists THEN -- this is a Add PR lines to mod case.
3105:
3106: l_entity_name_tbl.EXTEND(1);
3107: l_pk1_tbl.EXTEND(1);
3108: l_pk2_tbl.EXTEND(1);

Line 3120: p_draft_id => PO_AUTOCREATE_PARAMS.g_draft_id,

3116: l_pk4_tbl(1) := NULL;
3117:
3118: PO_DRAFTS_PVT.lock_entities(
3119: p_entity_name_tbl => l_entity_name_tbl,
3120: p_draft_id => PO_AUTOCREATE_PARAMS.g_draft_id,
3121: p_pk1_tbl => l_pk1_tbl,
3122: p_pk2_tbl => l_pk2_tbl,
3123: p_pk3_tbl => l_pk3_tbl,
3124: p_pk4_tbl => l_pk4_tbl,

Line 3140: IF (PO_AUTOCREATE_PARAMS.g_document_type = 'PO') THEN

3136:
3137: END IF;
3138: /*Autocreate grouping end*/
3139:
3140: IF (PO_AUTOCREATE_PARAMS.g_document_type = 'PO') THEN
3141: IF (PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD')
3142: AND nvl(l_manual_price_change_flag, 'N') <> 'Y'
3143: AND (p_lines.from_line_id_tbl(i) IS NOT NULL OR
3144: --

Line 3141: IF (PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD')

3137: END IF;
3138: /*Autocreate grouping end*/
3139:
3140: IF (PO_AUTOCREATE_PARAMS.g_document_type = 'PO') THEN
3141: IF (PO_AUTOCREATE_PARAMS.g_document_subtype='STANDARD')
3142: AND nvl(l_manual_price_change_flag, 'N') <> 'Y'
3143: AND (p_lines.from_line_id_tbl(i) IS NOT NULL OR
3144: --
3145: p_lines.contract_id_tbl(i) IS NOT NULL OR

Line 3149: AND PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'CONSUMPTION_ADVICE' THEN

3145: p_lines.contract_id_tbl(i) IS NOT NULL OR
3146: l_enhanced_pricing_flag = 'Y'
3147: ) --Enhanced Pricing: Enable pricing call if pricing enhanced for the style selected
3148: --
3149: AND PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'CONSUMPTION_ADVICE' THEN
3150:
3151: l_progress := '540';
3152: BEGIN
3153: select pl.quantity

Line 3157: AND pl.draft_id=po_autocreate_params.g_draft_id;

3153: select pl.quantity
3154: into l_db_quantity
3155: from po_lines_draft_all pl --
3156: where pl.po_line_id = x_po_line_id
3157: AND pl.draft_id=po_autocreate_params.g_draft_id;
3158:
3159: IF g_debug_stmt
3160: THEN
3161: PO_DEBUG.debug_stmt( p_log_head => g_log_head||l_api_name

Line 3175: IF po_autocreate_params.g_mode='ADD' THEN

3171: p_message => 'EXCEPTION caught; SQL Code is '||SQLCODE||'; Error is '||SQLERRM);
3172: END IF;
3173: end;
3174:
3175: IF po_autocreate_params.g_mode='ADD' THEN
3176: l_progress := '550';
3177: -- We get the pricing criteria from the min shipment if the grouping
3178: -- profiles are set such that multiple shipments get created when
3179: -- need by or ship to info are different on different lines.

Line 3193: AND poll.draft_id= po_autocreate_params.g_draft_id

3189: l_ship_to_org,
3190: l_need_by_date
3191: from po_line_locations_draft_all poll
3192: where poll.po_line_id = x_po_line_id
3193: AND poll.draft_id= po_autocreate_params.g_draft_id
3194: and poll.shipment_num = l_min_shipment_num;
3195: EXCEPTION
3196: when others then
3197: IF g_debug_stmt THEN

Line 3257: , p_org_id => PO_AUTOCREATE_PARAMS.g_purchasing_ou_id

3253: , p_cum_flag => FALSE
3254: , p_need_by_date => l_need_by_date
3255: , p_line_location_id => NULL
3256: , p_contract_id => p_lines.contract_id_tbl(i)
3257: , p_org_id => PO_AUTOCREATE_PARAMS.g_purchasing_ou_id
3258: , p_supplier_id => p_lines.hd_vendor_id_tbl(i)
3259: , p_supplier_site_id => p_lines.hd_vendor_site_id_tbl(i)
3260: , p_creation_date => p_lines.creation_date_tbl(i)
3261: , p_order_header_id => po_autocreate_params.g_po_header_id

Line 3261: , p_order_header_id => po_autocreate_params.g_po_header_id

3257: , p_org_id => PO_AUTOCREATE_PARAMS.g_purchasing_ou_id
3258: , p_supplier_id => p_lines.hd_vendor_id_tbl(i)
3259: , p_supplier_site_id => p_lines.hd_vendor_site_id_tbl(i)
3260: , p_creation_date => p_lines.creation_date_tbl(i)
3261: , p_order_header_id => po_autocreate_params.g_po_header_id
3262: , p_order_line_id => x_po_line_id
3263: , p_line_type_id => p_lines.line_type_id_tbl(i)
3264: , p_item_revision => p_lines.item_revision_tbl(i)
3265: , p_item_id => p_lines.item_id_tbl(i)

Line 3298: draft_id = po_autocreate_params.g_draft_id

3294: ,base_unit_price = nvl(l_base_unit_price, base_unit_price)
3295: ,from_line_location_id = l_price_break_id
3296:
3297: WHERE
3298: draft_id = po_autocreate_params.g_draft_id
3299: AND po_line_id = x_po_line_id;
3300:
3301: --- Need to modify the following code to update the proper table. -- serukull
3302: --All the shipments which have been created need to get the

Line 3307: AND draft_id = po_autocreate_params.g_draft_id;

3303: --new price as on the line for Standard POs.
3304: UPDATE po_line_locations_draft_all
3305: SET price_override = nvl(x_unit_price, price_override)
3306: WHERE po_line_id = x_po_line_id
3307: AND draft_id = po_autocreate_params.g_draft_id;
3308:
3309: END IF;
3310:
3311: l_progress := '590';

Line 3316: IF (PO_AUTOCREATE_PARAMS.g_document_subtype <> 'RELEASE') THEN

3312:
3313: -- This update should not happen for RELEASES as this would update the BLANKET with REQ price
3314: -- because x_po_line_id is the blanket line_id for 'Release'
3315: -- Introducing the 'If' statement for checking that its not a release
3316: IF (PO_AUTOCREATE_PARAMS.g_document_subtype <> 'RELEASE') THEN
3317:
3318: /** If FSP org and item combination is dual uom control, update the po lines secondary quantity
3319: with the default conversion based on the PO lines quantity **/
3320:

Line 3349: AND plda.draft_id = po_autocreate_params.g_draft_id

3345: ,plda.closed_by = NULL
3346: ,plda.secondary_quantity = NULL
3347: ,plda.secondary_unit_of_measure = NULL
3348: WHERE 1=1
3349: AND plda.draft_id = po_autocreate_params.g_draft_id
3350: AND plda.po_line_id = x_po_line_id
3351: RETURNING quantity INTO l_quantity_temp;
3352:
3353: --

Line 3370: AND draft_id=po_autocreate_params.g_draft_id;

3366: UPDATE po_lines_draft_all
3367: SET secondary_quantity = x_secondary_quantity_def,
3368: secondary_unit_of_measure = x_secondary_unit_def
3369: WHERE po_line_id = x_po_line_id
3370: AND draft_id=po_autocreate_params.g_draft_id;
3371: END IF;
3372: --
3373: IF g_debug_stmt
3374: THEN

Line 3382: IF (po_autocreate_params.g_is_clm_po ='Y' AND po_autocreate_params.g_process_code = 'ADD_FUNDS') THEN

3378:
3379: END IF;
3380:
3381: -- Added for Linking Requisition to modification project
3382: IF (po_autocreate_params.g_is_clm_po ='Y' AND po_autocreate_params.g_process_code = 'ADD_FUNDS') THEN
3383: UPDATE po_Lines_draft_all
3384: SET clm_exercised_flag = 'Y',
3385: clm_exercised_date = SYSDATE,
3386: change_status = 'UPDATE'

Line 3388: AND draft_id=po_autocreate_params.g_draft_id

3384: SET clm_exercised_flag = 'Y',
3385: clm_exercised_date = SYSDATE,
3386: change_status = 'UPDATE'
3387: WHERE po_line_id = x_po_line_id
3388: AND draft_id=po_autocreate_params.g_draft_id
3389: AND clm_option_indicator = 'O'
3390: AND Nvl(clm_exercised_flag,'N')='N';
3391: END IF;
3392:

Line 3406: po_autocreate_params.g_clm_source_document_id := Nvl(p_lines.from_header_id_tbl(1),p_lines.contract_id_tbl(1));

3402: SET po_line_id = p_lines.po_line_id_tbl(i)
3403: WHERE
3404: interface_line_id = p_lines.intf_line_id_tbl(i);
3405:
3406: po_autocreate_params.g_clm_source_document_id := Nvl(p_lines.from_header_id_tbl(1),p_lines.contract_id_tbl(1));
3407:
3408: FOR i IN 1 .. p_lines.intf_line_id_tbl.Count
3409: LOOP
3410: IF ( po_autocreate_params.g_clm_source_document_id = p_lines.from_header_id_tbl(i)) THEN

Line 3410: IF ( po_autocreate_params.g_clm_source_document_id = p_lines.from_header_id_tbl(i)) THEN

3406: po_autocreate_params.g_clm_source_document_id := Nvl(p_lines.from_header_id_tbl(1),p_lines.contract_id_tbl(1));
3407:
3408: FOR i IN 1 .. p_lines.intf_line_id_tbl.Count
3409: LOOP
3410: IF ( po_autocreate_params.g_clm_source_document_id = p_lines.from_header_id_tbl(i)) THEN
3411: po_autocreate_params.g_clm_source_document_id := p_lines.from_header_id_tbl(i);
3412: ELSIF (po_autocreate_params.g_clm_source_document_id = p_lines.contract_id_tbl(i)) THEN
3413: po_autocreate_params.g_clm_source_document_id := p_lines.contract_id_tbl(i);
3414: ELSE

Line 3411: po_autocreate_params.g_clm_source_document_id := p_lines.from_header_id_tbl(i);

3407:
3408: FOR i IN 1 .. p_lines.intf_line_id_tbl.Count
3409: LOOP
3410: IF ( po_autocreate_params.g_clm_source_document_id = p_lines.from_header_id_tbl(i)) THEN
3411: po_autocreate_params.g_clm_source_document_id := p_lines.from_header_id_tbl(i);
3412: ELSIF (po_autocreate_params.g_clm_source_document_id = p_lines.contract_id_tbl(i)) THEN
3413: po_autocreate_params.g_clm_source_document_id := p_lines.contract_id_tbl(i);
3414: ELSE
3415: po_autocreate_params.g_clm_source_document_id := NULL;

Line 3412: ELSIF (po_autocreate_params.g_clm_source_document_id = p_lines.contract_id_tbl(i)) THEN

3408: FOR i IN 1 .. p_lines.intf_line_id_tbl.Count
3409: LOOP
3410: IF ( po_autocreate_params.g_clm_source_document_id = p_lines.from_header_id_tbl(i)) THEN
3411: po_autocreate_params.g_clm_source_document_id := p_lines.from_header_id_tbl(i);
3412: ELSIF (po_autocreate_params.g_clm_source_document_id = p_lines.contract_id_tbl(i)) THEN
3413: po_autocreate_params.g_clm_source_document_id := p_lines.contract_id_tbl(i);
3414: ELSE
3415: po_autocreate_params.g_clm_source_document_id := NULL;
3416: EXIT;

Line 3413: po_autocreate_params.g_clm_source_document_id := p_lines.contract_id_tbl(i);

3409: LOOP
3410: IF ( po_autocreate_params.g_clm_source_document_id = p_lines.from_header_id_tbl(i)) THEN
3411: po_autocreate_params.g_clm_source_document_id := p_lines.from_header_id_tbl(i);
3412: ELSIF (po_autocreate_params.g_clm_source_document_id = p_lines.contract_id_tbl(i)) THEN
3413: po_autocreate_params.g_clm_source_document_id := p_lines.contract_id_tbl(i);
3414: ELSE
3415: po_autocreate_params.g_clm_source_document_id := NULL;
3416: EXIT;
3417: END IF;

Line 3415: po_autocreate_params.g_clm_source_document_id := NULL;

3411: po_autocreate_params.g_clm_source_document_id := p_lines.from_header_id_tbl(i);
3412: ELSIF (po_autocreate_params.g_clm_source_document_id = p_lines.contract_id_tbl(i)) THEN
3413: po_autocreate_params.g_clm_source_document_id := p_lines.contract_id_tbl(i);
3414: ELSE
3415: po_autocreate_params.g_clm_source_document_id := NULL;
3416: EXIT;
3417: END IF;
3418: END LOOP;
3419:

Line 3421: po_autocreate_params.g_number_records_processed := p_lines.po_line_id_tbl.count;

3417: END IF;
3418: END LOOP;
3419:
3420: l_progress := '700';
3421: po_autocreate_params.g_number_records_processed := p_lines.po_line_id_tbl.count;
3422:
3423: IF g_debug_stmt
3424: THEN
3425: PO_DEBUG.debug_stmt ( p_log_head => g_log_head||l_api_name

Line 3427: ,p_message => 'po_autocreate_params.g_number_records_processed :'|| po_autocreate_params.g_number_records_processed );

3423: IF g_debug_stmt
3424: THEN
3425: PO_DEBUG.debug_stmt ( p_log_head => g_log_head||l_api_name
3426: ,p_token => l_progress
3427: ,p_message => 'po_autocreate_params.g_number_records_processed :'|| po_autocreate_params.g_number_records_processed );
3428:
3429: END IF;
3430:
3431: IF g_debug_stmt THEN

Line 3507: PO_AUTOCREATE_PARAMS.g_draft_id ,

3503: created_by
3504: )
3505: VALUES
3506: (
3507: PO_AUTOCREATE_PARAMS.g_draft_id ,
3508: p_price_diff.intf_price_diff_id_tbl(i) ,
3509: p_price_diff.price_diff_num_tbl(i) ,
3510: p_price_diff.entity_type_tbl(i) ,
3511: p_price_diff.entity_id_tbl(i) ,

Line 3576: IF(PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET' AND PO_AUTOCREATE_PARAMS.g_interface_source_code = 'SOURCING') THEN

3572: -- we need to import all attributes for each line.
3573: -- to facilitate bulk update, we are storing the newly created po_line on
3574: -- po_attr_values_interface and po_attr_values_interface_tlp
3575:
3576: IF(PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET' AND PO_AUTOCREATE_PARAMS.g_interface_source_code = 'SOURCING') THEN
3577:
3578: l_progress:='001';
3579:
3580: IF g_debug_stmt THEN

Line 3952: SELECT PO_AUTOCREATE_PARAMS.g_draft_id,

3948: THUMBNAIL_IMAGE,
3949: UNSPSC,
3950: LAST_UPDATED_PROGRAM
3951: )
3952: SELECT PO_AUTOCREATE_PARAMS.g_draft_id,
3953: ATTACHMENT_URL,
3954: PO_ATTRIBUTE_VALUES_S.nextval,
3955: AVAILABILITY,
3956: CREATED_BY,

Line 4280: WHERE interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id;

4276: THUMBNAIL_IMAGE,
4277: UNSPSC,
4278: 'AUTOCREATE_BACKEND_FOR_SOURCING'
4279: FROM PO_ATTR_VALUES_INTERFACE
4280: WHERE interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id;
4281:
4282: IF g_debug_stmt THEN
4283: PO_DEBUG.debug_stmt(p_log_head=>g_log_head||l_api_name ,p_token=>l_progress ,p_message=>'Number of rows inserted in PO_ATTRIBUTE_VALUES table='||SQL%ROWCOUNT );
4284: END IF;

Line 4467: SELECT PO_AUTOCREATE_PARAMS.g_draft_id,

4463: TL_TEXT_CAT_ATTRIBUTE8,
4464: TL_TEXT_CAT_ATTRIBUTE9,
4465: LAST_UPDATED_PROGRAM
4466: )
4467: SELECT PO_AUTOCREATE_PARAMS.g_draft_id,
4468: ALIAS,
4469: PO_ATTRIBUTE_VALUES_TLP_S.nextval,
4470: COMMENTS,
4471: CREATED_BY,

Line 4642: WHERE interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id;

4638: TL_TEXT_CAT_ATTRIBUTE8,
4639: TL_TEXT_CAT_ATTRIBUTE9,
4640: 'AUTOCREATE_BACKEND_FOR_SOURCING'
4641: FROM PO_ATTR_VALUES_TLP_INTERFACE
4642: WHERE interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id;
4643:
4644: --
4645: IF g_debug_stmt THEN
4646: PO_DEBUG.debug_stmt(p_log_head=>g_log_head||l_api_name ,p_token=>l_progress ,p_message=>'Number of rows inserted in PO_ATTRIBUTE_VALUES_TLP table='||SQL%rowcount );

Line 4928: WHERE PLI.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id

4924:
4925: BEGIN
4926: SELECT PLI.auction_header_id INTO l_auction_header_id
4927: FROM po_lines_interface pli,pon_award_allocations paa
4928: WHERE PLI.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
4929: AND pli.auction_header_id = paa.auction_header_id
4930: AND paa.is_linked_pr_line_yn = 'Y'
4931: AND ROWNUM <2;
4932: EXCEPTION

Line 5051: WHERE phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id

5047: FROM po_clmreq_dist_details_v prd
5048: GROUP BY prd.requisition_line_id) req_dist_amt,
5049: po_requisition_lines_all prl,
5050: po_line_types_b plb
5051: WHERE phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
5052: AND pli.interface_header_id = phi.interface_header_id
5053: AND Nvl(pli.orig_from_req_flag, 'N') = 'S'
5054: AND pli.bid_number = paa.bid_number
5055: AND pli.bid_line_number = paa.bid_line_number