DBA Data[Home] [Help]

APPS.PO_SOURCING_PVT dependencies on PO_HEADERS

Line 35: --SQL WHAT: Selects the records from the po_headers_interface table

31: g_debug_stmt CONSTANT BOOLEAN := PO_DEBUG.is_debug_stmt_on;
32: g_debug_unexp CONSTANT BOOLEAN := PO_DEBUG.is_debug_unexp_on;
33:
34:
35: --SQL WHAT: Selects the records from the po_headers_interface table
36: --SQL WHY: These values are used in creating a Purchase Order
37: --SQl Join:None
38:
39: CURSOR g_interface_cursor(p_interface_header_id NUMBER) IS

Line 82: FROM po_headers_interface phi

78: phi.amount_limit,
79: phi.global_agreement_flag,
80: phi.shipping_control,
81: phi.org_id
82: FROM po_headers_interface phi
83: WHERE phi.interface_header_id = p_interface_header_id;
84:
85: -- Type declaration for System Parameters structure
86: TYPE system_parameters_rec_type IS RECORD

Line 142: -- been modified to point to PO_HEADERS_ALL type.

138: -- Type declaration for Vendor defaults structure
139: TYPE vendor_defaults_rec_type IS RECORD
140: (vendor_id PO_VENDORS.vendor_id%TYPE := null,
141: -- Bug# 4546121:All columns that referred to the obsolete columns in po_vendors have
142: -- been modified to point to PO_HEADERS_ALL type.
143: ship_to_location_id PO_HEADERS_ALL.ship_to_location_id%TYPE := null,
144: bill_to_location_id PO_HEADERS_ALL.bill_to_location_id%TYPE := null,
145: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE := null,
146: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%TYPE := null,

Line 143: ship_to_location_id PO_HEADERS_ALL.ship_to_location_id%TYPE := null,

139: TYPE vendor_defaults_rec_type IS RECORD
140: (vendor_id PO_VENDORS.vendor_id%TYPE := null,
141: -- Bug# 4546121:All columns that referred to the obsolete columns in po_vendors have
142: -- been modified to point to PO_HEADERS_ALL type.
143: ship_to_location_id PO_HEADERS_ALL.ship_to_location_id%TYPE := null,
144: bill_to_location_id PO_HEADERS_ALL.bill_to_location_id%TYPE := null,
145: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE := null,
146: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%TYPE := null,
147: pay_on_code PO_VENDOR_SITES_ALL.pay_on_code%TYPE := null,

Line 144: bill_to_location_id PO_HEADERS_ALL.bill_to_location_id%TYPE := null,

140: (vendor_id PO_VENDORS.vendor_id%TYPE := null,
141: -- Bug# 4546121:All columns that referred to the obsolete columns in po_vendors have
142: -- been modified to point to PO_HEADERS_ALL type.
143: ship_to_location_id PO_HEADERS_ALL.ship_to_location_id%TYPE := null,
144: bill_to_location_id PO_HEADERS_ALL.bill_to_location_id%TYPE := null,
145: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE := null,
146: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%TYPE := null,
147: pay_on_code PO_VENDOR_SITES_ALL.pay_on_code%TYPE := null,
148: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%TYPE := null,

Line 145: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE := null,

141: -- Bug# 4546121:All columns that referred to the obsolete columns in po_vendors have
142: -- been modified to point to PO_HEADERS_ALL type.
143: ship_to_location_id PO_HEADERS_ALL.ship_to_location_id%TYPE := null,
144: bill_to_location_id PO_HEADERS_ALL.bill_to_location_id%TYPE := null,
145: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE := null,
146: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%TYPE := null,
147: pay_on_code PO_VENDOR_SITES_ALL.pay_on_code%TYPE := null,
148: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%TYPE := null,
149: terms_id po_vendors.terms_id%TYPE := null,

Line 146: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%TYPE := null,

142: -- been modified to point to PO_HEADERS_ALL type.
143: ship_to_location_id PO_HEADERS_ALL.ship_to_location_id%TYPE := null,
144: bill_to_location_id PO_HEADERS_ALL.bill_to_location_id%TYPE := null,
145: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE := null,
146: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%TYPE := null,
147: pay_on_code PO_VENDOR_SITES_ALL.pay_on_code%TYPE := null,
148: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%TYPE := null,
149: terms_id po_vendors.terms_id%TYPE := null,
150: type_1099 PO_VENDORS.type_1099%TYPE := null,

Line 148: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%TYPE := null,

144: bill_to_location_id PO_HEADERS_ALL.bill_to_location_id%TYPE := null,
145: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE := null,
146: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%TYPE := null,
147: pay_on_code PO_VENDOR_SITES_ALL.pay_on_code%TYPE := null,
148: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%TYPE := null,
149: terms_id po_vendors.terms_id%TYPE := null,
150: type_1099 PO_VENDORS.type_1099%TYPE := null,
151: hold_flag PO_VENDORS.hold_flag%TYPE := null,
152: invoice_currency_code PO_VENDORS.invoice_currency_code%TYPE := null,

Line 188: -- Id that uniquely identifies a row in po_headers_interface table

184: -- This procedure is called for getting the default po paramters
185: --Parameters:
186: --IN:
187: --p_interface_header_id
188: -- Id that uniquely identifies a row in po_headers_interface table
189: --OUT:
190: -- None
191: --Notes:
192: -- None

Line 198: PROCEDURE get_system_defaults(p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE) IS

194: -- None
195: --End of Comments
196: -------------------------------------------------------------------------------
197:
198: PROCEDURE get_system_defaults(p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE) IS
199: x_date date;
200: l_api_name CONSTANT VARCHAR2(30) := 'get_system_defaults';
201: BEGIN
202: IF g_debug_stmt THEN

Line 321: l_terms_id PO_HEADERS.terms_id%TYPE;

317: PROCEDURE DEFAULT_CPA (
318: x_return_status OUT NOCOPY VARCHAR2
319: ) IS
320: l_api_name VARCHAR2(30) := 'DEFAULT_CPA';
321: l_terms_id PO_HEADERS.terms_id%TYPE;
322: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
323: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
324: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
325: l_vs_terms_id PO_HEADERS.terms_id%TYPE;

Line 322: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;

318: x_return_status OUT NOCOPY VARCHAR2
319: ) IS
320: l_api_name VARCHAR2(30) := 'DEFAULT_CPA';
321: l_terms_id PO_HEADERS.terms_id%TYPE;
322: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
323: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
324: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
325: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
326: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;

Line 323: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;

319: ) IS
320: l_api_name VARCHAR2(30) := 'DEFAULT_CPA';
321: l_terms_id PO_HEADERS.terms_id%TYPE;
322: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
323: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
324: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
325: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
326: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
327: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;

Line 324: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

320: l_api_name VARCHAR2(30) := 'DEFAULT_CPA';
321: l_terms_id PO_HEADERS.terms_id%TYPE;
322: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
323: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
324: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
325: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
326: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
327: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
328: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

Line 325: l_vs_terms_id PO_HEADERS.terms_id%TYPE;

321: l_terms_id PO_HEADERS.terms_id%TYPE;
322: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
323: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
324: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
325: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
326: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
327: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
328: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
329:

Line 326: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;

322: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
323: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
324: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
325: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
326: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
327: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
328: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
329:
330: BEGIN

Line 327: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;

323: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
324: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
325: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
326: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
327: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
328: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
329:
330: BEGIN
331: -- Initialize API return status to success

Line 328: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

324: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
325: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
326: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
327: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
328: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
329:
330: BEGIN
331: -- Initialize API return status to success
332: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 620: p_message => 'Before calling PO_HEADERS_SV6.val_doc_num');

616: g_progress := '300';
617: IF g_debug_stmt THEN
618: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
619: p_token => g_progress,
620: p_message => 'Before calling PO_HEADERS_SV6.val_doc_num');
621: END IF;
622: is_valid := PO_HEADERS_SV6.val_doc_num(
623: X_doc_type => g_cpa_csr.document_type_code,
624: X_doc_num => g_cpa_csr.document_num,

Line 622: is_valid := PO_HEADERS_SV6.val_doc_num(

618: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
619: p_token => g_progress,
620: p_message => 'Before calling PO_HEADERS_SV6.val_doc_num');
621: END IF;
622: is_valid := PO_HEADERS_SV6.val_doc_num(
623: X_doc_type => g_cpa_csr.document_type_code,
624: X_doc_num => g_cpa_csr.document_num,
625: X_user_defined_num => g_params_rec.manual_po_num_type,
626: X_user_defined_po_num_code => g_params_rec.po_num_code,

Line 632: p_message => 'After calling PO_HEADERS_SV6.val_doc_num. X_error_code = '||l_error_code);

628: g_progress := '301';
629: IF g_debug_stmt THEN
630: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
631: p_token => g_progress,
632: p_message => 'After calling PO_HEADERS_SV6.val_doc_num. X_error_code = '||l_error_code);
633: END IF;
634:
635: IF (is_valid = FALSE ) THEN
636: IF (l_error_code = 'PO_PDOI_DOC_NUM_UNIQUE') THEN

Line 796: -- inserts the data into the PO_HEADERS table to create CPA

792: -- Transaction tables for the requested document
793: --Locks:
794: -- None.
795: --Function:
796: -- inserts the data into the PO_HEADERS table to create CPA
797: --Parameters:
798: --IN:
799: --p_auction_header_id
800: -- Id of the negotiation

Line 830: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,

826: PROCEDURE INSERT_CPA (
827: p_auction_header_id IN PON_AUCTION_HEADERS_ALL.auction_header_id%TYPE,
828: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
829: p_sourcing_k_doc_type IN VARCHAR2,
830: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
831: p_document_creation_method IN VARCHAR2,
832: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
833: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE,
834: x_return_status OUT NOCOPY VARCHAR2

Line 832: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,

828: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
829: p_sourcing_k_doc_type IN VARCHAR2,
830: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
831: p_document_creation_method IN VARCHAR2,
832: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
833: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE,
834: x_return_status OUT NOCOPY VARCHAR2
835: ) IS
836: l_rowid VARCHAR2(30);

Line 833: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE,

829: p_sourcing_k_doc_type IN VARCHAR2,
830: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
831: p_document_creation_method IN VARCHAR2,
832: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
833: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE,
834: x_return_status OUT NOCOPY VARCHAR2
835: ) IS
836: l_rowid VARCHAR2(30);
837: l_po_header_id PO_HEADERS_ALL.po_header_id%TYPE;

Line 837: l_po_header_id PO_HEADERS_ALL.po_header_id%TYPE;

833: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE,
834: x_return_status OUT NOCOPY VARCHAR2
835: ) IS
836: l_rowid VARCHAR2(30);
837: l_po_header_id PO_HEADERS_ALL.po_header_id%TYPE;
838: l_document_num PO_HEADERS_INTERFACE.document_num%TYPE;
839: l_current_org PO_SYSTEM_PARAMETERS.org_id%TYPE;
840: l_org_assign_rec PO_GA_ORG_ASSIGNMENTS%ROWTYPE;
841: l_org_row_id ROWID;

Line 838: l_document_num PO_HEADERS_INTERFACE.document_num%TYPE;

834: x_return_status OUT NOCOPY VARCHAR2
835: ) IS
836: l_rowid VARCHAR2(30);
837: l_po_header_id PO_HEADERS_ALL.po_header_id%TYPE;
838: l_document_num PO_HEADERS_INTERFACE.document_num%TYPE;
839: l_current_org PO_SYSTEM_PARAMETERS.org_id%TYPE;
840: l_org_assign_rec PO_GA_ORG_ASSIGNMENTS%ROWTYPE;
841: l_org_row_id ROWID;
842: l_return_status VARCHAR2(1);

Line 848: x_document_num PO_HEADERS.segment1%TYPE:=null;

844: l_contracts_call_exception EXCEPTION;
845: l_msg_data VARCHAR2(2000);
846: l_msg_count NUMBER;
847: l_manual BOOLEAN;
848: x_document_num PO_HEADERS.segment1%TYPE:=null;
849: l_api_name CONSTANT VARCHAR2(30) := 'INSERT_CPA';
850: BEGIN
851:
852: -- Initialize API return status to success

Line 868: p_message => 'Before calling PO_HEADERS_PKG_S0.Insert_Row');

864: g_progress := '400';
865: IF g_debug_stmt THEN
866: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
867: p_token => g_progress,
868: p_message => 'Before calling PO_HEADERS_PKG_S0.Insert_Row');
869: END IF;
870: l_current_org := PO_GA_PVT.get_current_org; --
871: PO_HEADERS_PKG_S0.Insert_Row(
872: X_Rowid => l_rowid,

Line 871: PO_HEADERS_PKG_S0.Insert_Row(

867: p_token => g_progress,
868: p_message => 'Before calling PO_HEADERS_PKG_S0.Insert_Row');
869: END IF;
870: l_current_org := PO_GA_PVT.get_current_org; --
871: PO_HEADERS_PKG_S0.Insert_Row(
872: X_Rowid => l_rowid,
873: X_Po_Header_Id => l_po_header_id,
874: X_Agent_Id => g_cpa_csr.agent_id,
875: X_Type_Lookup_Code => g_cpa_csr.document_subtype,

Line 996: p_message => 'After calling PO_HEADERS_PKG_S0.Insert_Row. po_header_id = '||l_po_header_id||': Segment1 = '||l_document_num);

992: g_progress := '401';
993: IF g_debug_stmt THEN
994: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
995: p_token => g_progress,
996: p_message => 'After calling PO_HEADERS_PKG_S0.Insert_Row. po_header_id = '||l_po_header_id||': Segment1 = '||l_document_num);
997:
998: END IF;
999:
1000: -- After insert into po_headers, insert a row into org_assignments for a global agreement

Line 1000: -- After insert into po_headers, insert a row into org_assignments for a global agreement

996: p_message => 'After calling PO_HEADERS_PKG_S0.Insert_Row. po_header_id = '||l_po_header_id||': Segment1 = '||l_document_num);
997:
998: END IF;
999:
1000: -- After insert into po_headers, insert a row into org_assignments for a global agreement
1001: IF nvl(g_cpa_csr.global_agreement_flag, 'N') = 'Y' then
1002:
1003: l_current_org := PO_GA_PVT.get_current_org;
1004:

Line 1062: X_to_entity_name => 'PO_HEADERS',

1058: X_from_pk2_value => NULL,
1059: X_from_pk3_value => NULL,
1060: X_from_pk4_value => NULL,
1061: X_from_pk5_value => NULL,
1062: X_to_entity_name => 'PO_HEADERS',
1063: X_to_pk1_value => l_po_header_id,
1064: X_to_pk2_value => NULL,
1065: X_to_pk3_value => NULL,
1066: X_to_pk4_value => NULL,

Line 1093: X_to_entity_name => 'PO_HEADERS',

1089: X_from_pk2_value => p_bid_number,
1090: X_from_pk3_value => '',
1091: X_from_pk4_value => '',
1092: X_from_pk5_value => '',
1093: X_to_entity_name => 'PO_HEADERS',
1094: X_to_pk1_value => l_po_header_id,
1095: X_to_pk2_value => '',
1096: X_to_pk3_value => '',
1097: X_to_pk4_value => '',

Line 1123: x_to_entity_name => 'PO_HEADERS',

1119: x_auction_header_id => p_auction_header_id,
1120: x_auction_line_number => NULL,
1121: x_bid_number => p_bid_number,
1122: x_bid_line_number => NULL,
1123: x_to_entity_name => 'PO_HEADERS',
1124: x_to_pk1_value => l_po_header_id,
1125: x_created_by => g_cpa_csr.created_by,
1126: x_last_update_login => g_cpa_csr.last_update_login,
1127: x_program_application_id => NULL,

Line 1148: x_to_entity_name => 'PO_HEADERS',

1144: x_auction_header_id => p_auction_header_id,
1145: x_auction_line_number => NULL,
1146: x_bid_number => NULL,
1147: x_bid_line_number => NULL,
1148: x_to_entity_name => 'PO_HEADERS',
1149: x_to_pk1_value => l_po_header_id,
1150: x_created_by => g_cpa_csr.created_by,
1151: x_last_update_login => g_cpa_csr.last_update_login,
1152: x_program_application_id => NULL,

Line 1172: x_to_entity_name => 'PO_HEADERS',

1168: x_auction_header_id => p_auction_header_id,
1169: x_auction_line_number => NULL,
1170: x_bid_number => p_bid_number,
1171: x_bid_line_number => NULL,
1172: x_to_entity_name => 'PO_HEADERS',
1173: x_to_pk1_value => l_po_header_id,
1174: x_created_by => g_cpa_csr.created_by,
1175: x_last_update_login => g_cpa_csr.last_update_login,
1176: x_program_application_id => NULL,

Line 1201: ( p_table_name => 'PO_HEADERS',

1197: -- Consolidate PO # generation code into one API
1198:
1199: x_document_num :=
1200: PO_CORE_SV1.default_po_unique_identifier
1201: ( p_table_name => 'PO_HEADERS',
1202: p_org_id => g_cpa_csr.org_id
1203: );
1204:
1205: g_progress:= '411';

Line 1220: p_message => 'Before updating po_headers_all for conterms_exist_flag and document number');

1216: g_progress:= '412';
1217: IF g_debug_stmt THEN
1218: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1219: p_token => g_progress,
1220: p_message => 'Before updating po_headers_all for conterms_exist_flag and document number');
1221: END IF;
1222:
1223: --SQL WHAT: Updates Conterms_exist_flag, segment1 and document_creation_method
1224: --SQL WHY: To handle creation of an automatic document_number when the po_num_code is AUTOMATIC

Line 1226: -- handled in PO_HEADERS_PKG_S0.Insert_Row table handler.

1222:
1223: --SQL WHAT: Updates Conterms_exist_flag, segment1 and document_creation_method
1224: --SQL WHY: To handle creation of an automatic document_number when the po_num_code is AUTOMATIC
1225: -- Update pf conterms_exist_flag and document_creation_method should have been
1226: -- handled in PO_HEADERS_PKG_S0.Insert_Row table handler.
1227: -- As this file is not allowed to update for 11.5.10, added separate update statement.
1228: --SQl Join:None
1229:
1230: UPDATE PO_HEADERS_ALL

Line 1230: UPDATE PO_HEADERS_ALL

1226: -- handled in PO_HEADERS_PKG_S0.Insert_Row table handler.
1227: -- As this file is not allowed to update for 11.5.10, added separate update statement.
1228: --SQl Join:None
1229:
1230: UPDATE PO_HEADERS_ALL
1231: SET conterms_exist_flag = decode(p_conterms_exist_flag,'Y','Y','N'),
1232: document_creation_method = p_document_creation_method,
1233: segment1 = x_document_num
1234: WHERE po_header_id = l_po_header_id;

Line 1240: p_message => 'Before updating po_headers_all for conterms_exist_flag and document number');

1236: g_progress:= '413';
1237: IF g_debug_stmt THEN
1238: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1239: p_token => g_progress,
1240: p_message => 'Before updating po_headers_all for conterms_exist_flag and document number');
1241: END IF;
1242:
1243: --Copy contract terms if sourcing doc had a template attached.
1244: IF (p_conterms_exist_flag = 'Y') THEN

Line 1342: -- The id that will be used to uniquely identify a row in the PO_HEADERS_INTERFACE table

1338: -- Creates Contract Purchase Agreement from Sourcing document
1339: --Parameters:
1340: --IN:
1341: --p_interface_header_id
1342: -- The id that will be used to uniquely identify a row in the PO_HEADERS_INTERFACE table
1343: --p_auction_header_id
1344: -- Id of the negotiation
1345: --p_bid_number
1346: -- Bid Number for which is negotiation is awarded

Line 1374: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE,

1370: PROCEDURE create_cpa (
1371: x_return_status OUT NOCOPY VARCHAR2,
1372: x_msg_count OUT NOCOPY NUMBER,
1373: x_msg_data OUT NOCOPY VARCHAR2,
1374: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE,
1375: p_auction_header_id IN PON_AUCTION_HEADERS_ALL.auction_header_id%TYPE,
1376: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
1377: p_sourcing_k_doc_type IN VARCHAR2,
1378: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,

Line 1378: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,

1374: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE,
1375: p_auction_header_id IN PON_AUCTION_HEADERS_ALL.auction_header_id%TYPE,
1376: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
1377: p_sourcing_k_doc_type IN VARCHAR2,
1378: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
1379: p_document_creation_method IN PO_HEADERS_ALL.document_creation_method%TYPE,
1380: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
1381: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE
1382: ) IS

Line 1379: p_document_creation_method IN PO_HEADERS_ALL.document_creation_method%TYPE,

1375: p_auction_header_id IN PON_AUCTION_HEADERS_ALL.auction_header_id%TYPE,
1376: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
1377: p_sourcing_k_doc_type IN VARCHAR2,
1378: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
1379: p_document_creation_method IN PO_HEADERS_ALL.document_creation_method%TYPE,
1380: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
1381: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE
1382: ) IS
1383: l_return_status VARCHAR2(1);

Line 1380: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,

1376: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
1377: p_sourcing_k_doc_type IN VARCHAR2,
1378: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
1379: p_document_creation_method IN PO_HEADERS_ALL.document_creation_method%TYPE,
1380: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
1381: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE
1382: ) IS
1383: l_return_status VARCHAR2(1);
1384: l_api_name CONSTANT VARCHAR2(30) := 'create_cpa';

Line 1381: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE

1377: p_sourcing_k_doc_type IN VARCHAR2,
1378: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
1379: p_document_creation_method IN PO_HEADERS_ALL.document_creation_method%TYPE,
1380: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
1381: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE
1382: ) IS
1383: l_return_status VARCHAR2(1);
1384: l_api_name CONSTANT VARCHAR2(30) := 'create_cpa';
1385:

Line 1386: l_document_type PO_HEADERS_INTERFACE.document_type_code%TYPE;

1382: ) IS
1383: l_return_status VARCHAR2(1);
1384: l_api_name CONSTANT VARCHAR2(30) := 'create_cpa';
1385:
1386: l_document_type PO_HEADERS_INTERFACE.document_type_code%TYPE;
1387: l_document_subtype PO_HEADERS_INTERFACE.document_subtype%TYPE;
1388: l_action PO_HEADERS_INTERFACE.action%TYPE;
1389: BEGIN
1390: -- Initialize API return status to success

Line 1387: l_document_subtype PO_HEADERS_INTERFACE.document_subtype%TYPE;

1383: l_return_status VARCHAR2(1);
1384: l_api_name CONSTANT VARCHAR2(30) := 'create_cpa';
1385:
1386: l_document_type PO_HEADERS_INTERFACE.document_type_code%TYPE;
1387: l_document_subtype PO_HEADERS_INTERFACE.document_subtype%TYPE;
1388: l_action PO_HEADERS_INTERFACE.action%TYPE;
1389: BEGIN
1390: -- Initialize API return status to success
1391: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1388: l_action PO_HEADERS_INTERFACE.action%TYPE;

1384: l_api_name CONSTANT VARCHAR2(30) := 'create_cpa';
1385:
1386: l_document_type PO_HEADERS_INTERFACE.document_type_code%TYPE;
1387: l_document_subtype PO_HEADERS_INTERFACE.document_subtype%TYPE;
1388: l_action PO_HEADERS_INTERFACE.action%TYPE;
1389: BEGIN
1390: -- Initialize API return status to success
1391: x_return_status := FND_API.G_RET_STS_SUCCESS;
1392:

Line 1472: -- Insert record in the po_headers table and add attachments and contract terms

1468: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1469: END IF;
1470: END IF;
1471:
1472: -- Insert record in the po_headers table and add attachments and contract terms
1473: g_progress := '505';
1474: IF g_debug_stmt THEN
1475: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1476: p_token => g_progress,

Line 1581: -- po_headers_interface

1577: --Name: DELETE_INTERFACE_HEADER
1578: --Pre-reqs:
1579: -- None
1580: --Modifies:
1581: -- po_headers_interface
1582: --Locks:
1583: -- None.
1584: --Function:
1585: -- This deletes the interface header row from interface table

Line 1589: -- The id that will be used to uniquely identify a row in the PO_HEADERS_INTERFACE table

1585: -- This deletes the interface header row from interface table
1586: --Parameters:
1587: --IN:
1588: --p_interface_header_id
1589: -- The id that will be used to uniquely identify a row in the PO_HEADERS_INTERFACE table
1590: --OUT:
1591: --x_return_status
1592: -- The standard OUT parameter giving return status of the API call.
1593: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error

Line 1603: p_interface_header_id IN PO_HEADERS_INTERFACE.INTERFACE_HEADER_ID%TYPE,

1599: --End of Comments
1600: -------------------------------------------------------------------------------
1601:
1602: PROCEDURE DELETE_INTERFACE_HEADER (
1603: p_interface_header_id IN PO_HEADERS_INTERFACE.INTERFACE_HEADER_ID%TYPE,
1604: x_return_status OUT NOCOPY VARCHAR2
1605: ) IS
1606: l_api_name CONSTANT VARCHAR2(30) := 'DELETE_INTERFACE_HEADER';
1607: BEGIN

Line 1611: DELETE po_headers_interface

1607: BEGIN
1608: -- Initialize API return status to success
1609: x_return_status := FND_API.G_RET_STS_SUCCESS;
1610:
1611: DELETE po_headers_interface
1612: WHERE interface_header_id = p_interface_header_id;
1613:
1614: g_progress := '600';
1615: IF g_debug_stmt THEN

Line 1618: p_message => 'No of Records deleted from PO_HEADERS_INTERFACE'||SQL%rowcount);

1614: g_progress := '600';
1615: IF g_debug_stmt THEN
1616: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1617: p_token => g_progress,
1618: p_message => 'No of Records deleted from PO_HEADERS_INTERFACE'||SQL%rowcount);
1619: END IF;
1620: EXCEPTION
1621: WHEN OTHERS THEN
1622: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;