DBA Data[Home] [Help]

APPS.PO_AUTO_HEADER_PROCESS_PVT dependencies on PO_AUTOCREATE_PARAMS

Line 60: PO_AUTOCREATE_PARAMS.g_interface_header_id := p_interface_header_id;

56: IF g_debug_stmt THEN
57: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
58: END IF;
59:
60: PO_AUTOCREATE_PARAMS.g_interface_header_id := p_interface_header_id;
61:
62: -- Bug 10136310
63: IF po_autocreate_params.g_mode = 'NEW' THEN
64:

Line 63: IF po_autocreate_params.g_mode = 'NEW' THEN

59:
60: PO_AUTOCREATE_PARAMS.g_interface_header_id := p_interface_header_id;
61:
62: -- Bug 10136310
63: IF po_autocreate_params.g_mode = 'NEW' THEN
64:
65: SELECT interface_header_id,
66: draft_id,
67: po_header_id,

Line 353: ELSIF po_autocreate_params.g_mode = 'ADD' THEN

349: FROM po_headers_interface
350: WHERE interface_header_id = p_interface_header_id
351: ORDER BY interface_header_id;
352:
353: ELSIF po_autocreate_params.g_mode = 'ADD' THEN
354:
355: SELECT PHI.interface_header_id,
356: PH.draft_id,
357: PH.po_header_id,

Line 732: IF (PO_AUTOCREATE_PARAMS.g_mode = 'ADD') THEN

728: /*
729: * Temporarily using the replace(x_headers.document_num,'-') to compare with segment1
730: * But need to change later to use API which returns proper segment1
731: */
732: IF (PO_AUTOCREATE_PARAMS.g_mode = 'ADD') THEN
733:
734: l_progress := '010';
735:
736: SELECT ph.po_header_id

Line 739: WHERE ph.type_lookup_code = PO_AUTOCREATE_PARAMS.g_document_subtype

735:
736: SELECT ph.po_header_id
737: INTO x_headers.po_header_id
738: FROM po_headers_all ph
739: WHERE ph.type_lookup_code = PO_AUTOCREATE_PARAMS.g_document_subtype
740: AND ph.segment1 = REPLACE(x_headers.document_num,'-')
741: AND NVL(org_id, -99) = NVL(PO_AUTOCREATE_PARAMS.g_purchasing_ou_id, -99);
742:
743: ELSIF (PO_AUTOCREATE_PARAMS.g_mode='NEW') THEN

Line 741: AND NVL(org_id, -99) = NVL(PO_AUTOCREATE_PARAMS.g_purchasing_ou_id, -99);

737: INTO x_headers.po_header_id
738: FROM po_headers_all ph
739: WHERE ph.type_lookup_code = PO_AUTOCREATE_PARAMS.g_document_subtype
740: AND ph.segment1 = REPLACE(x_headers.document_num,'-')
741: AND NVL(org_id, -99) = NVL(PO_AUTOCREATE_PARAMS.g_purchasing_ou_id, -99);
742:
743: ELSIF (PO_AUTOCREATE_PARAMS.g_mode='NEW') THEN
744:
745: l_progress := '020';

Line 743: ELSIF (PO_AUTOCREATE_PARAMS.g_mode='NEW') THEN

739: WHERE ph.type_lookup_code = PO_AUTOCREATE_PARAMS.g_document_subtype
740: AND ph.segment1 = REPLACE(x_headers.document_num,'-')
741: AND NVL(org_id, -99) = NVL(PO_AUTOCREATE_PARAMS.g_purchasing_ou_id, -99);
742:
743: ELSIF (PO_AUTOCREATE_PARAMS.g_mode='NEW') THEN
744:
745: l_progress := '020';
746:
747: SELECT po_headers_s.nextval INTO x_headers.po_header_id FROM sys.dual;

Line 749: IF (PO_AUTOCREATE_PARAMS.g_sys.user_defined_po_num_code='AUTOMATIC') AND (PO_AUTOCREATE_PARAMS.g_document_type IN ('PO','PA')) THEN

745: l_progress := '020';
746:
747: SELECT po_headers_s.nextval INTO x_headers.po_header_id FROM sys.dual;
748:
749: IF (PO_AUTOCREATE_PARAMS.g_sys.user_defined_po_num_code='AUTOMATIC') AND (PO_AUTOCREATE_PARAMS.g_document_type IN ('PO','PA')) THEN
750:
751: --< Bug 14314684 Create Workflow project >
752: --Commenting this condition as we dont have emergency PO number in case of CLM
753: --IF PO_AUTOCREATE_PARAMS.g_old_document_num IS NULL THEN

Line 753: --IF PO_AUTOCREATE_PARAMS.g_old_document_num IS NULL THEN

749: IF (PO_AUTOCREATE_PARAMS.g_sys.user_defined_po_num_code='AUTOMATIC') AND (PO_AUTOCREATE_PARAMS.g_document_type IN ('PO','PA')) THEN
750:
751: --< Bug 14314684 Create Workflow project >
752: --Commenting this condition as we dont have emergency PO number in case of CLM
753: --IF PO_AUTOCREATE_PARAMS.g_old_document_num IS NULL THEN
754: x_headers.document_num := '-'||x_headers.po_header_id;
755: --END IF;
756:
757: END IF;

Line 759: END IF; -- PO_AUTOCREATE_PARAMS.g_mode = 'ADD'

755: --END IF;
756:
757: END IF;
758:
759: END IF; -- PO_AUTOCREATE_PARAMS.g_mode = 'ADD'
760:
761: IF g_debug_stmt THEN
762: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After getting the po_header_id: po_header_id :'|| x_headers.po_header_id);
763: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After getting the po_header_id: document_num :'|| x_headers.document_num);

Line 769: PO_AUTOCREATE_PARAMS.g_is_complex_work_po := PO_COMPLEX_WORK_PVT.is_complex_work_style(p_style_id => x_headers.style_id);

765:
766: l_progress := '030';
767: /* Complex PO - Check to find out is there a Complex work PO */
768: IF (x_headers.style_id IS NOT NULL) THEN
769: PO_AUTOCREATE_PARAMS.g_is_complex_work_po := PO_COMPLEX_WORK_PVT.is_complex_work_style(p_style_id => x_headers.style_id);
770: ELSE
771: PO_AUTOCREATE_PARAMS.g_is_complex_work_po := FALSE;
772: END IF;
773: /* Complex PO - end */

Line 771: PO_AUTOCREATE_PARAMS.g_is_complex_work_po := FALSE;

767: /* Complex PO - Check to find out is there a Complex work PO */
768: IF (x_headers.style_id IS NOT NULL) THEN
769: PO_AUTOCREATE_PARAMS.g_is_complex_work_po := PO_COMPLEX_WORK_PVT.is_complex_work_style(p_style_id => x_headers.style_id);
770: ELSE
771: PO_AUTOCREATE_PARAMS.g_is_complex_work_po := FALSE;
772: END IF;
773: /* Complex PO - end */
774:
775:

Line 808: PO_AUTOCREATE_PARAMS.g_vendor_receipt_req_flag := x_headers.receipt_required_flag;

804: x_headers.num_1099,
805: x_headers.vat_registration_num,
806: x_headers.inspection_required_flag);
807:
808: PO_AUTOCREATE_PARAMS.g_vendor_receipt_req_flag := x_headers.receipt_required_flag;
809: PO_AUTOCREATE_PARAMS.g_vendor_inspect_req_flag := x_headers.inspection_required_flag;
810:
811:
812: IF (x_headers.vendor_site_id IS NOT NULL) THEN

Line 809: PO_AUTOCREATE_PARAMS.g_vendor_inspect_req_flag := x_headers.inspection_required_flag;

805: x_headers.vat_registration_num,
806: x_headers.inspection_required_flag);
807:
808: PO_AUTOCREATE_PARAMS.g_vendor_receipt_req_flag := x_headers.receipt_required_flag;
809: PO_AUTOCREATE_PARAMS.g_vendor_inspect_req_flag := x_headers.inspection_required_flag;
810:
811:
812: IF (x_headers.vendor_site_id IS NOT NULL) THEN
813:

Line 826: PO_AUTOCREATE_PARAMS. g_vendor_Ship_Via_Lookup_Code := g_vs_ship_via_lookup_code;

822: g_vs_terms_id,
823: x_headers.invoice_currency_code,
824: x_headers.shipping_control );
825:
826: PO_AUTOCREATE_PARAMS. g_vendor_Ship_Via_Lookup_Code := g_vs_ship_via_lookup_code;
827:
828: -- Default the pay_on_code for a Standard PO based
829: -- on the vendor site value.
830: IF (x_headers.pay_on_code = 'RECEIPT_AND_USE') THEN

Line 848: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING' AND PO_AUTOCREATE_PARAMS.g_purchasing_ou_id <> PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id AND PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD') THEN

844:
845: -- Get the conversion rate between PO Currency and Req Functional Currency for
846: -- Default Rate type of Purchasing Org.
847: -- If called from Sourcing, simply assign interface table rate to g_rate_for_req_fields
848: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'SOURCING' AND PO_AUTOCREATE_PARAMS.g_purchasing_ou_id <> PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id AND PO_AUTOCREATE_PARAMS.g_document_subtype = 'STANDARD') THEN
849: BEGIN
850: l_progress := '070';
851:
852: IF g_debug_stmt THEN

Line 859: WHERE req_fsp.org_id = PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id;

855:
856: SELECT req_fsp.set_of_books_id
857: INTO l_req_ou_sob_id
858: FROM financials_system_params_all req_fsp
859: WHERE req_fsp.org_id = PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id;
860:
861: l_progress := '071';
862: SELECT po_fsp.set_of_books_id
863: INTO l_po_ou_sob_id

Line 865: WHERE po_fsp.org_id = PO_AUTOCREATE_PARAMS.g_purchasing_ou_id;

861: l_progress := '071';
862: SELECT po_fsp.set_of_books_id
863: INTO l_po_ou_sob_id
864: FROM financials_system_params_all po_fsp
865: WHERE po_fsp.org_id = PO_AUTOCREATE_PARAMS.g_purchasing_ou_id;
866:
867: l_progress := '072';
868: IF PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id = PO_AUTOCREATE_PARAMS.g_purchasing_ou_id THEN
869: x_headers.rate := NULL;

Line 868: IF PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id = PO_AUTOCREATE_PARAMS.g_purchasing_ou_id THEN

864: FROM financials_system_params_all po_fsp
865: WHERE po_fsp.org_id = PO_AUTOCREATE_PARAMS.g_purchasing_ou_id;
866:
867: l_progress := '072';
868: IF PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id = PO_AUTOCREATE_PARAMS.g_purchasing_ou_id THEN
869: x_headers.rate := NULL;
870: END IF;
871:
872: IF x_headers.rate_type IS NULL THEN

Line 877: WHERE psp.org_id = PO_AUTOCREATE_PARAMS.g_purchasing_ou_id;

873: l_progress := '073';
874: SELECT default_rate_type
875: INTO l_rate_type
876: FROM po_system_parameters_all psp
877: WHERE psp.org_id = PO_AUTOCREATE_PARAMS.g_purchasing_ou_id;
878: ELSE
879: l_progress := '074';
880: l_rate_type := x_headers.rate_type;
881: END IF;

Line 888: po_currency_sv.get_rate(PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id,

884: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Getting rate type:'||l_rate_type);
885: END IF;
886:
887: -- Returns the conversion rate between PO Currency and Req Functional Currency
888: po_currency_sv.get_rate(PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id,
889: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,
890: l_rate_type,
891: x_headers.rate_date,
892: 'N',

Line 889: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,

885: END IF;
886:
887: -- Returns the conversion rate between PO Currency and Req Functional Currency
888: po_currency_sv.get_rate(PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id,
889: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,
890: l_rate_type,
891: x_headers.rate_date,
892: 'N',
893: PO_AUTOCREATE_PARAMS.g_rate_for_req_fields,

Line 893: PO_AUTOCREATE_PARAMS.g_rate_for_req_fields,

889: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,
890: l_rate_type,
891: x_headers.rate_date,
892: 'N',
893: PO_AUTOCREATE_PARAMS.g_rate_for_req_fields,
894: l_display_rate);
895:
896: l_progress := '075';
897: IF g_debug_stmt THEN

Line 898: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After deriving the rate info: rate ='||PO_AUTOCREATE_PARAMS.g_rate_for_req_fields);

894: l_display_rate);
895:
896: l_progress := '075';
897: IF g_debug_stmt THEN
898: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After deriving the rate info: rate ='||PO_AUTOCREATE_PARAMS.g_rate_for_req_fields);
899: END IF;
900:
901: EXCEPTION
902: WHEN OTHERS THEN

Line 910: IF PO_AUTOCREATE_PARAMS.g_rate_for_req_fields IS NULL THEN

906: po_message_s.sql_error('GET_RATE_FOR_REQ_PRICE',l_progress,SQLCODE);
907: END;
908:
909: -- If g_rate_for_req_fields is NULL, assign interface rate to g_rate_for_req_fields
910: IF PO_AUTOCREATE_PARAMS.g_rate_for_req_fields IS NULL THEN
911: PO_AUTOCREATE_PARAMS.g_rate_for_req_fields := x_headers.rate;
912: END IF;
913:
914: ELSE

Line 911: PO_AUTOCREATE_PARAMS.g_rate_for_req_fields := x_headers.rate;

907: END;
908:
909: -- If g_rate_for_req_fields is NULL, assign interface rate to g_rate_for_req_fields
910: IF PO_AUTOCREATE_PARAMS.g_rate_for_req_fields IS NULL THEN
911: PO_AUTOCREATE_PARAMS.g_rate_for_req_fields := x_headers.rate;
912: END IF;
913:
914: ELSE
915: PO_AUTOCREATE_PARAMS.g_rate_for_req_fields := x_headers.rate;

Line 915: PO_AUTOCREATE_PARAMS.g_rate_for_req_fields := x_headers.rate;

911: PO_AUTOCREATE_PARAMS.g_rate_for_req_fields := x_headers.rate;
912: END IF;
913:
914: ELSE
915: PO_AUTOCREATE_PARAMS.g_rate_for_req_fields := x_headers.rate;
916: END IF;
917:
918: -- Derive the rate info ends here
919:

Line 921: IF PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'CONSUMPTION_ADVICE' THEN -- bug 2741985

917:
918: -- Derive the rate info ends here
919:
920: -- Derive Invoice Match Option
921: IF PO_AUTOCREATE_PARAMS.g_interface_source_code <> 'CONSUMPTION_ADVICE' THEN -- bug 2741985
922: l_progress := '080';
923: get_invoice_match_option(x_headers.vendor_id,
924: x_headers.vendor_site_id,
925: x_headers.invoice_match_option);

Line 927: PO_AUTOCREATE_PARAMS.g_vendor_invoice_match_option := x_headers.invoice_match_option;

923: get_invoice_match_option(x_headers.vendor_id,
924: x_headers.vendor_site_id,
925: x_headers.invoice_match_option);
926:
927: PO_AUTOCREATE_PARAMS.g_vendor_invoice_match_option := x_headers.invoice_match_option;
928:
929: END IF;
930:
931: l_progress := '090';

Line 934: IF PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN

930:
931: l_progress := '090';
932: /* Defaulting attributes - start */
933: -- Defaulting global_aggrement_flag
934: IF PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN
935: l_progress := '100';
936: IF PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET' THEN
937: IF x_headers.global_agreement_flag = 'N' THEN
938: x_headers.global_agreement_flag := NULL;

Line 936: IF PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET' THEN

932: /* Defaulting attributes - start */
933: -- Defaulting global_aggrement_flag
934: IF PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN
935: l_progress := '100';
936: IF PO_AUTOCREATE_PARAMS.g_document_subtype = 'BLANKET' THEN
937: IF x_headers.global_agreement_flag = 'N' THEN
938: x_headers.global_agreement_flag := NULL;
939: END IF;
940: IF x_headers.global_agreement_flag = 'Y' THEN

Line 944: END IF; --PO_AUTOCREATE_PARAMS.g_mode = 'NEW'

940: IF x_headers.global_agreement_flag = 'Y' THEN
941: x_headers.min_release_amount := NULL;
942: END IF;
943: END IF; -- x_headers.document_subtype = 'BLANKET'
944: END IF; --PO_AUTOCREATE_PARAMS.g_mode = 'NEW'
945:
946: -- Defaulting acceptance_required_flag
947: IF PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN
948: l_progress := '110';

Line 947: IF PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN

943: END IF; -- x_headers.document_subtype = 'BLANKET'
944: END IF; --PO_AUTOCREATE_PARAMS.g_mode = 'NEW'
945:
946: -- Defaulting acceptance_required_flag
947: IF PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN
948: l_progress := '110';
949: IF (PO_AUTOCREATE_PARAMS.g_document_type IN ('PO','PA')) THEN
950: x_headers.acceptance_required_flag := NVL(x_headers.acceptance_required_flag, NVL(PO_AUTOCREATE_PARAMS.g_sys.acceptance_required_flag,'N'));
951: ELSE

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

945:
946: -- Defaulting acceptance_required_flag
947: IF PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN
948: l_progress := '110';
949: IF (PO_AUTOCREATE_PARAMS.g_document_type IN ('PO','PA')) THEN
950: x_headers.acceptance_required_flag := NVL(x_headers.acceptance_required_flag, NVL(PO_AUTOCREATE_PARAMS.g_sys.acceptance_required_flag,'N'));
951: ELSE
952: x_headers.acceptance_required_flag := PO_AUTOCREATE_PARAMS.g_sys.acceptance_required_flag;
953: END IF;

Line 950: x_headers.acceptance_required_flag := NVL(x_headers.acceptance_required_flag, NVL(PO_AUTOCREATE_PARAMS.g_sys.acceptance_required_flag,'N'));

946: -- Defaulting acceptance_required_flag
947: IF PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN
948: l_progress := '110';
949: IF (PO_AUTOCREATE_PARAMS.g_document_type IN ('PO','PA')) THEN
950: x_headers.acceptance_required_flag := NVL(x_headers.acceptance_required_flag, NVL(PO_AUTOCREATE_PARAMS.g_sys.acceptance_required_flag,'N'));
951: ELSE
952: x_headers.acceptance_required_flag := PO_AUTOCREATE_PARAMS.g_sys.acceptance_required_flag;
953: END IF;
954: END IF;

Line 952: x_headers.acceptance_required_flag := PO_AUTOCREATE_PARAMS.g_sys.acceptance_required_flag;

948: l_progress := '110';
949: IF (PO_AUTOCREATE_PARAMS.g_document_type IN ('PO','PA')) THEN
950: x_headers.acceptance_required_flag := NVL(x_headers.acceptance_required_flag, NVL(PO_AUTOCREATE_PARAMS.g_sys.acceptance_required_flag,'N'));
951: ELSE
952: x_headers.acceptance_required_flag := PO_AUTOCREATE_PARAMS.g_sys.acceptance_required_flag;
953: END IF;
954: END IF;
955: -- End Defaulting acceptance_required_flag
956:

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

1032: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
1033: END IF;
1034:
1035: -- Validate ship_to and bill_to
1036: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code = 'SOURCING') THEN
1037: x_valid_ship_to := NVL(x_headers.ship_to_loc_id, NVL(g_vendor_ship_to_loc_id, PO_AUTOCREATE_PARAMS.g_sys.ship_to_location_id));
1038: x_valid_bill_to := NVL(x_headers.bill_to_loc_id, NVL(g_vendor_bill_to_loc_id, PO_AUTOCREATE_PARAMS.g_sys.bill_to_location_id));
1039: ELSE
1040: x_valid_ship_to := NVL(g_vendor_ship_to_loc_id, x_headers.ship_to_loc_id);

Line 1037: x_valid_ship_to := NVL(x_headers.ship_to_loc_id, NVL(g_vendor_ship_to_loc_id, PO_AUTOCREATE_PARAMS.g_sys.ship_to_location_id));

1033: END IF;
1034:
1035: -- Validate ship_to and bill_to
1036: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code = 'SOURCING') THEN
1037: x_valid_ship_to := NVL(x_headers.ship_to_loc_id, NVL(g_vendor_ship_to_loc_id, PO_AUTOCREATE_PARAMS.g_sys.ship_to_location_id));
1038: x_valid_bill_to := NVL(x_headers.bill_to_loc_id, NVL(g_vendor_bill_to_loc_id, PO_AUTOCREATE_PARAMS.g_sys.bill_to_location_id));
1039: ELSE
1040: x_valid_ship_to := NVL(g_vendor_ship_to_loc_id, x_headers.ship_to_loc_id);
1041: x_valid_bill_to := NVL(g_vendor_bill_to_loc_id, x_headers.bill_to_loc_id);

Line 1038: x_valid_bill_to := NVL(x_headers.bill_to_loc_id, NVL(g_vendor_bill_to_loc_id, PO_AUTOCREATE_PARAMS.g_sys.bill_to_location_id));

1034:
1035: -- Validate ship_to and bill_to
1036: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code = 'SOURCING') THEN
1037: x_valid_ship_to := NVL(x_headers.ship_to_loc_id, NVL(g_vendor_ship_to_loc_id, PO_AUTOCREATE_PARAMS.g_sys.ship_to_location_id));
1038: x_valid_bill_to := NVL(x_headers.bill_to_loc_id, NVL(g_vendor_bill_to_loc_id, PO_AUTOCREATE_PARAMS.g_sys.bill_to_location_id));
1039: ELSE
1040: x_valid_ship_to := NVL(g_vendor_ship_to_loc_id, x_headers.ship_to_loc_id);
1041: x_valid_bill_to := NVL(g_vendor_bill_to_loc_id, x_headers.bill_to_loc_id);
1042: END IF;

Line 1131: po_vendors_sv.val_freight_carrier(g_vs_ship_via_lookup_code, PO_AUTOCREATE_PARAMS.g_sys.def_inv_org_id, x_headers.ship_via_lookup_code);

1127: **
1128: ========================================================================== */
1129: -- Validate ship via
1130: IF g_vs_ship_via_lookup_code IS NOT NULL THEN
1131: po_vendors_sv.val_freight_carrier(g_vs_ship_via_lookup_code, PO_AUTOCREATE_PARAMS.g_sys.def_inv_org_id, x_headers.ship_via_lookup_code);
1132: END IF;
1133: IF x_headers.ship_via_lookup_code IS NULL THEN
1134: po_vendors_sv.val_freight_carrier(g_ship_via_lookup_code, PO_AUTOCREATE_PARAMS.g_sys.def_inv_org_id, x_headers.ship_via_lookup_code);
1135: END IF;

Line 1134: po_vendors_sv.val_freight_carrier(g_ship_via_lookup_code, PO_AUTOCREATE_PARAMS.g_sys.def_inv_org_id, x_headers.ship_via_lookup_code);

1130: IF g_vs_ship_via_lookup_code IS NOT NULL THEN
1131: po_vendors_sv.val_freight_carrier(g_vs_ship_via_lookup_code, PO_AUTOCREATE_PARAMS.g_sys.def_inv_org_id, x_headers.ship_via_lookup_code);
1132: END IF;
1133: IF x_headers.ship_via_lookup_code IS NULL THEN
1134: po_vendors_sv.val_freight_carrier(g_ship_via_lookup_code, PO_AUTOCREATE_PARAMS.g_sys.def_inv_org_id, x_headers.ship_via_lookup_code);
1135: END IF;
1136:
1137: l_progress := '040';
1138: -- Validate fob code

Line 1219: IF PO_AUTOCREATE_PARAMS.g_mode = 'ADD' THEN

1215: IF g_debug_stmt THEN
1216: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
1217: END IF;
1218:
1219: IF PO_AUTOCREATE_PARAMS.g_mode = 'ADD' THEN
1220:
1221: /*If we are in the ADD mode then we are either adding lines to an
1222: Award or Modification
1223: The draft_id gets passed to backend code from the UI.

Line 1227: IF PO_AUTOCREATE_PARAMS.g_draft_id > -1 THEN -- Draft exists

1223: The draft_id gets passed to backend code from the UI.
1224: If lines are being added to Modification g_draft_id will have the
1225: value of the draft_id of the modification
1226: else g_draft_id will be -1*/
1227: IF PO_AUTOCREATE_PARAMS.g_draft_id > -1 THEN -- Draft exists
1228: l_progress := '020';
1229: -- Indecates Draft exists for that document
1230: PO_AUTOCREATE_PARAMS.g_is_mod_exists := TRUE;
1231: -- Use the existing draft

Line 1230: PO_AUTOCREATE_PARAMS.g_is_mod_exists := TRUE;

1226: else g_draft_id will be -1*/
1227: IF PO_AUTOCREATE_PARAMS.g_draft_id > -1 THEN -- Draft exists
1228: l_progress := '020';
1229: -- Indecates Draft exists for that document
1230: PO_AUTOCREATE_PARAMS.g_is_mod_exists := TRUE;
1231: -- Use the existing draft
1232: x_headers.draft_id := PO_AUTOCREATE_PARAMS.g_draft_id;
1233:
1234: -- Update the PO drafts

Line 1232: x_headers.draft_id := PO_AUTOCREATE_PARAMS.g_draft_id;

1228: l_progress := '020';
1229: -- Indecates Draft exists for that document
1230: PO_AUTOCREATE_PARAMS.g_is_mod_exists := TRUE;
1231: -- Use the existing draft
1232: x_headers.draft_id := PO_AUTOCREATE_PARAMS.g_draft_id;
1233:
1234: -- Update the PO drafts
1235: UPDATE po_drafts
1236: SET last_update_date = x_headers.last_update_date,

Line 1254: ELSE -- Draft not exists PO_AUTOCREATE_PARAMS.g_draft_id is null or -1

1250: IF g_debug_stmt THEN
1251: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After updating the existing draft');
1252: END IF;
1253:
1254: ELSE -- Draft not exists PO_AUTOCREATE_PARAMS.g_draft_id is null or -1
1255: l_progress := '030';
1256:
1257: --bug 16425245
1258: l_create_doc_from_draft := PO_AUTOCREATE_POSTPROC_PVT.create_doc_from_draft_check(x_headers.po_header_id);

Line 1268: po_autocreate_params.g_draft_id := x_headers.draft_id;

1264: -- bug 16425245
1265:
1266: -- Get the new Draft Id
1267: x_headers.draft_id := PO_DRAFTS_PVT.draft_id_nextval;
1268: po_autocreate_params.g_draft_id := x_headers.draft_id;
1269: -- Indicates Draft exists for that document
1270: PO_AUTOCREATE_PARAMS.g_is_mod_exists := FALSE;
1271:
1272: IF g_debug_stmt THEN

Line 1270: PO_AUTOCREATE_PARAMS.g_is_mod_exists := FALSE;

1266: -- Get the new Draft Id
1267: x_headers.draft_id := PO_DRAFTS_PVT.draft_id_nextval;
1268: po_autocreate_params.g_draft_id := x_headers.draft_id;
1269: -- Indicates Draft exists for that document
1270: PO_AUTOCREATE_PARAMS.g_is_mod_exists := FALSE;
1271:
1272: IF g_debug_stmt THEN
1273: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Getting new draft id for existing document:'||x_headers.draft_id);
1274: END IF;

Line 1581: po_autocreate_params.g_draft_id := x_headers.draft_id;

1577:
1578: l_progress := '060';
1579: -- Get the new Draft Id
1580: x_headers.draft_id := PO_DRAFTS_PVT.draft_id_nextval;
1581: po_autocreate_params.g_draft_id := x_headers.draft_id;
1582: PO_FED_FIELD_FUNCTIONS.XPD_DRAFT_ID := x_headers.draft_id; --Bug 11894977
1583: -- Indecates Draft exists for that document
1584: PO_AUTOCREATE_PARAMS.g_is_mod_exists := FALSE;
1585:

Line 1584: PO_AUTOCREATE_PARAMS.g_is_mod_exists := FALSE;

1580: x_headers.draft_id := PO_DRAFTS_PVT.draft_id_nextval;
1581: po_autocreate_params.g_draft_id := x_headers.draft_id;
1582: PO_FED_FIELD_FUNCTIONS.XPD_DRAFT_ID := x_headers.draft_id; --Bug 11894977
1583: -- Indecates Draft exists for that document
1584: PO_AUTOCREATE_PARAMS.g_is_mod_exists := FALSE;
1585:
1586: IF g_debug_stmt THEN
1587: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Getting new draft id for new document:'||x_headers.draft_id);
1588: END IF;

Line 1758: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,

1754: umbrella_program_id, --umbrella program
1755: fon_ref_id --umbrella program
1756: )
1757: SELECT x_headers.draft_id,
1758: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,
1759: NULL, -- delete_flag
1760: NULL, -- change_accepted_flag
1761: x_headers.po_header_id,
1762: x_headers.agent_id,

Line 1865: PO_AUTOCREATE_PARAMS.x_conterms_exist_flag,

1861: x_headers.tax_attribute_update_code,
1862: x_headers.clm_standard_form,
1863: x_headers.clm_document_format,
1864: x_headers.clm_award_type,
1865: PO_AUTOCREATE_PARAMS.x_conterms_exist_flag,
1866: -- CLM specific attributes
1867: x_headers.clm_source_document_id,
1868: x_headers.clm_effective_date,
1869: x_headers.clm_vendor_offer_number,

Line 1889: po_autocreate_params.g_po_header_id := x_headers.po_header_id;

1885:
1886: END IF; -- g_mode = 'ADD'
1887:
1888: l_progress := '050';
1889: po_autocreate_params.g_po_header_id := x_headers.po_header_id;
1890:
1891: -- The following is needed during lines processing. (Fetch)
1892: UPDATE po_headers_interface
1893: SET po_header_id = x_headers.po_header_id ,

Line 1939: IF PO_AUTOCREATE_PARAMS.g_document_type = 'PA' AND PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN

1935: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
1936: END IF;
1937:
1938: -- For new document, create a ga_org_assignments_draft record
1939: IF PO_AUTOCREATE_PARAMS.g_document_type = 'PA' AND PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN
1940: l_progress:= '010';
1941: -- Insert record into po_ga_org_assign_draft
1942: INSERT
1943: INTO po_ga_org_assign_draft

Line 1964: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,

1960: SELECT x_headers.draft_id,
1961: NULL, -- delete_flag,
1962: NULL, -- change_accepted_flag,
1963: x_headers.po_header_id,
1964: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,
1965: x_headers.global_agreement_flag,
1966: x_headers.vendor_site_id,
1967: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,
1968: PO_GA_ORG_ASSIGNMENTS_S.nextval, -- org_assignment_id,

Line 1967: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,

1963: x_headers.po_header_id,
1964: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,
1965: x_headers.global_agreement_flag,
1966: x_headers.vendor_site_id,
1967: PO_AUTOCREATE_PARAMS.g_purchasing_ou_id,
1968: PO_GA_ORG_ASSIGNMENTS_S.nextval, -- org_assignment_id,
1969: x_headers.last_update_date,
1970: x_headers.last_updated_by,
1971: x_headers.last_update_login,