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 86: FROM po_headers_interface phi

82: phi.clm_award_type,
83: phi.clm_standard_form,
84: phi.clm_document_format,
85: phi.umbrella_program_id --umbrella program
86: FROM po_headers_interface phi
87: WHERE phi.interface_header_id = p_interface_header_id;
88:
89: -- Type declaration for System Parameters structure
90: TYPE system_parameters_rec_type IS RECORD

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

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

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

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

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

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

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

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

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

146: -- been modified to point to PO_HEADERS_ALL type.
147: ship_to_location_id PO_HEADERS_ALL.ship_to_location_id%TYPE := null,
148: bill_to_location_id PO_HEADERS_ALL.bill_to_location_id%TYPE := null,
149: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE := null,
150: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%TYPE := null,
151: pay_on_code PO_VENDOR_SITES_ALL.pay_on_code%TYPE := null,
152: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%TYPE := null,
153: terms_id po_vendors.terms_id%TYPE := null,
154: type_1099 PO_VENDORS.type_1099%TYPE := null,

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

148: bill_to_location_id PO_HEADERS_ALL.bill_to_location_id%TYPE := null,
149: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE := null,
150: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%TYPE := null,
151: pay_on_code PO_VENDOR_SITES_ALL.pay_on_code%TYPE := null,
152: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%TYPE := null,
153: terms_id po_vendors.terms_id%TYPE := null,
154: type_1099 PO_VENDORS.type_1099%TYPE := null,
155: hold_flag PO_VENDORS.hold_flag%TYPE := null,
156: invoice_currency_code PO_VENDORS.invoice_currency_code%TYPE := null,

Line 185: g_style_id PO_HEADERS_INTERFACE.style_id%TYPE;

181:
182:
183: -- CLM CPA Creation Flow
184: g_is_clm_flow VARCHAR2(1):= 'N';
185: g_style_id PO_HEADERS_INTERFACE.style_id%TYPE;
186:
187:
188: -------------------------------------------------------------------------------
189: --Start of Comments

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

198: -- This procedure is called for getting the default po paramters
199: --Parameters:
200: --IN:
201: --p_interface_header_id
202: -- Id that uniquely identifies a row in po_headers_interface table
203: --OUT:
204: -- None
205: --Notes:
206: -- None

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

208: -- None
209: --End of Comments
210: -------------------------------------------------------------------------------
211:
212: PROCEDURE get_system_defaults(p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE) IS
213: x_date date;
214: l_api_name CONSTANT VARCHAR2(30) := 'get_system_defaults';
215: BEGIN
216: IF g_debug_stmt THEN

Line 335: l_terms_id PO_HEADERS.terms_id%TYPE;

331: PROCEDURE DEFAULT_CPA (
332: x_return_status OUT NOCOPY VARCHAR2
333: ) IS
334: l_api_name VARCHAR2(30) := 'DEFAULT_CPA';
335: l_terms_id PO_HEADERS.terms_id%TYPE;
336: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
337: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
338: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
339: l_vs_terms_id PO_HEADERS.terms_id%TYPE;

Line 336: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;

332: x_return_status OUT NOCOPY VARCHAR2
333: ) IS
334: l_api_name VARCHAR2(30) := 'DEFAULT_CPA';
335: l_terms_id PO_HEADERS.terms_id%TYPE;
336: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
337: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
338: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
339: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
340: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;

Line 337: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;

333: ) IS
334: l_api_name VARCHAR2(30) := 'DEFAULT_CPA';
335: l_terms_id PO_HEADERS.terms_id%TYPE;
336: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
337: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
338: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
339: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
340: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
341: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;

Line 338: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

334: l_api_name VARCHAR2(30) := 'DEFAULT_CPA';
335: l_terms_id PO_HEADERS.terms_id%TYPE;
336: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
337: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
338: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
339: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
340: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
341: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
342: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

Line 339: l_vs_terms_id PO_HEADERS.terms_id%TYPE;

335: l_terms_id PO_HEADERS.terms_id%TYPE;
336: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
337: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
338: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
339: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
340: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
341: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
342: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
343:

Line 340: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;

336: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
337: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
338: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
339: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
340: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
341: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
342: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
343:
344: BEGIN

Line 341: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;

337: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
338: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
339: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
340: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
341: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
342: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
343:
344: BEGIN
345: -- Initialize API return status to success

Line 342: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

338: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
339: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
340: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
341: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
342: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
343:
344: BEGIN
345: -- Initialize API return status to success
346: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

630: g_progress := '300';
631: IF g_debug_stmt THEN
632: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
633: p_token => g_progress,
634: p_message => 'Before calling PO_HEADERS_SV6.val_doc_num');
635: END IF;
636: is_valid := PO_HEADERS_SV6.val_doc_num(
637: X_doc_type => g_cpa_csr.document_type_code,
638: X_doc_num => g_cpa_csr.document_num,

Line 636: is_valid := PO_HEADERS_SV6.val_doc_num(

632: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
633: p_token => g_progress,
634: p_message => 'Before calling PO_HEADERS_SV6.val_doc_num');
635: END IF;
636: is_valid := PO_HEADERS_SV6.val_doc_num(
637: X_doc_type => g_cpa_csr.document_type_code,
638: X_doc_num => g_cpa_csr.document_num,
639: X_user_defined_num => g_params_rec.manual_po_num_type,
640: X_user_defined_po_num_code => g_params_rec.po_num_code,

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

642: g_progress := '301';
643: IF g_debug_stmt THEN
644: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
645: p_token => g_progress,
646: p_message => 'After calling PO_HEADERS_SV6.val_doc_num. X_error_code = '||l_error_code);
647: END IF;
648:
649: IF (is_valid = FALSE ) THEN
650: IF (l_error_code = 'PO_PDOI_DOC_NUM_UNIQUE') THEN

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

806: -- Transaction tables for the requested document
807: --Locks:
808: -- None.
809: --Function:
810: -- inserts the data into the PO_HEADERS table to create CPA
811: --Parameters:
812: --IN:
813: --p_auction_header_id
814: -- Id of the negotiation

Line 844: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,

840: PROCEDURE INSERT_CPA (
841: p_auction_header_id IN PON_AUCTION_HEADERS_ALL.auction_header_id%TYPE,
842: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
843: p_sourcing_k_doc_type IN VARCHAR2,
844: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
845: p_document_creation_method IN VARCHAR2,
846: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
847: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE,
848: x_return_status OUT NOCOPY VARCHAR2

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

842: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
843: p_sourcing_k_doc_type IN VARCHAR2,
844: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
845: p_document_creation_method IN VARCHAR2,
846: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
847: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE,
848: x_return_status OUT NOCOPY VARCHAR2
849: ) IS
850: l_rowid VARCHAR2(30);

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

843: p_sourcing_k_doc_type IN VARCHAR2,
844: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
845: p_document_creation_method IN VARCHAR2,
846: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
847: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE,
848: x_return_status OUT NOCOPY VARCHAR2
849: ) IS
850: l_rowid VARCHAR2(30);
851: l_po_header_id PO_HEADERS_ALL.po_header_id%TYPE;

Line 851: l_po_header_id PO_HEADERS_ALL.po_header_id%TYPE;

847: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE,
848: x_return_status OUT NOCOPY VARCHAR2
849: ) IS
850: l_rowid VARCHAR2(30);
851: l_po_header_id PO_HEADERS_ALL.po_header_id%TYPE;
852: l_document_num PO_HEADERS_INTERFACE.document_num%TYPE;
853: l_current_org PO_SYSTEM_PARAMETERS.org_id%TYPE;
854: l_org_assign_rec PO_GA_ORG_ASSIGNMENTS%ROWTYPE;
855: l_org_row_id ROWID;

Line 852: l_document_num PO_HEADERS_INTERFACE.document_num%TYPE;

848: x_return_status OUT NOCOPY VARCHAR2
849: ) IS
850: l_rowid VARCHAR2(30);
851: l_po_header_id PO_HEADERS_ALL.po_header_id%TYPE;
852: l_document_num PO_HEADERS_INTERFACE.document_num%TYPE;
853: l_current_org PO_SYSTEM_PARAMETERS.org_id%TYPE;
854: l_org_assign_rec PO_GA_ORG_ASSIGNMENTS%ROWTYPE;
855: l_org_row_id ROWID;
856: l_return_status VARCHAR2(1);

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

858: l_contracts_call_exception EXCEPTION;
859: l_msg_data VARCHAR2(2000);
860: l_msg_count NUMBER;
861: l_manual BOOLEAN;
862: x_document_num PO_HEADERS.segment1%TYPE:=null;
863: l_api_name CONSTANT VARCHAR2(30) := 'INSERT_CPA';
864:
865: -- CLM CPA related changes
866:

Line 876: x_clm_source_document_id PO_HEADERS_DRAFT_ALL.clm_source_document_id%TYPE;

872: -- Document numbering
873: x_doc_number VARCHAR2(2000);
874: x_err_msg VARCHAR2(2000);
875: x_template_id NUMBER;
876: x_clm_source_document_id PO_HEADERS_DRAFT_ALL.clm_source_document_id%TYPE;
877:
878: l_uda_template_exception EXCEPTION;
879:
880: -- Document Format

Line 885: l_ame_approval_id po_headers_all.ame_approval_id%TYPE;

881: l_standard_form VARCHAR2(200);
882: l_document_format VARCHAR2(200);
883:
884: -- AME
885: l_ame_approval_id po_headers_all.ame_approval_id%TYPE;
886: l_ame_transaction_type po_headers_all.ame_transaction_type%TYPE;
887: l_new_ame_appr_id_req varchar2(1);
888: BEGIN
889:

Line 886: l_ame_transaction_type po_headers_all.ame_transaction_type%TYPE;

882: l_document_format VARCHAR2(200);
883:
884: -- AME
885: l_ame_approval_id po_headers_all.ame_approval_id%TYPE;
886: l_ame_transaction_type po_headers_all.ame_transaction_type%TYPE;
887: l_new_ame_appr_id_req varchar2(1);
888: BEGIN
889:
890: -- Initialize API return status to success

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

902: g_progress := '400';
903: IF g_debug_stmt THEN
904: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
905: p_token => g_progress,
906: p_message => 'Before calling PO_HEADERS_PKG_S0.Insert_Row');
907: END IF;
908: l_current_org := PO_GA_PVT.get_current_org; --
909: PO_HEADERS_PKG_S0.Insert_Row(
910: X_Rowid => l_rowid,

Line 909: PO_HEADERS_PKG_S0.Insert_Row(

905: p_token => g_progress,
906: p_message => 'Before calling PO_HEADERS_PKG_S0.Insert_Row');
907: END IF;
908: l_current_org := PO_GA_PVT.get_current_org; --
909: PO_HEADERS_PKG_S0.Insert_Row(
910: X_Rowid => l_rowid,
911: X_Po_Header_Id => l_po_header_id,
912: X_Agent_Id => g_cpa_csr.agent_id,
913: X_Type_Lookup_Code => g_cpa_csr.document_subtype,

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

1032: g_progress := '401';
1033: IF g_debug_stmt THEN
1034: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1035: p_token => g_progress,
1036: p_message => 'After calling PO_HEADERS_PKG_S0.Insert_Row. po_header_id = '||l_po_header_id||': Segment1 = '||l_document_num);
1037:
1038: END IF;
1039:
1040: -- After insert into po_headers, insert a row into org_assignments for a global agreement

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

1036: p_message => 'After calling PO_HEADERS_PKG_S0.Insert_Row. po_header_id = '||l_po_header_id||': Segment1 = '||l_document_num);
1037:
1038: END IF;
1039:
1040: -- After insert into po_headers, insert a row into org_assignments for a global agreement
1041: IF nvl(g_cpa_csr.global_agreement_flag, 'N') = 'Y' then
1042:
1043: l_current_org := PO_GA_PVT.get_current_org;
1044:

Line 1157: UPDATE PO_HEADERS_ALL

1153: END;
1154:
1155:
1156: -- Update CLM related attributes
1157: UPDATE PO_HEADERS_ALL
1158: SET uda_template_id = x_template_id,
1159: uda_template_date = SYSDATE,
1160: style_id = g_style_id,
1161: clm_standard_form = l_standard_form,

Line 1199: X_to_entity_name => 'PO_HEADERS',

1195: X_from_pk2_value => NULL,
1196: X_from_pk3_value => NULL,
1197: X_from_pk4_value => NULL,
1198: X_from_pk5_value => NULL,
1199: X_to_entity_name => 'PO_HEADERS',
1200: X_to_pk1_value => l_po_header_id,
1201: X_to_pk2_value => NULL,
1202: X_to_pk3_value => NULL,
1203: X_to_pk4_value => NULL,

Line 1230: X_to_entity_name => 'PO_HEADERS',

1226: X_from_pk2_value => p_bid_number,
1227: X_from_pk3_value => '',
1228: X_from_pk4_value => '',
1229: X_from_pk5_value => '',
1230: X_to_entity_name => 'PO_HEADERS',
1231: X_to_pk1_value => l_po_header_id,
1232: X_to_pk2_value => '',
1233: X_to_pk3_value => '',
1234: X_to_pk4_value => '',

Line 1260: x_to_entity_name => 'PO_HEADERS',

1256: x_auction_header_id => p_auction_header_id,
1257: x_auction_line_number => NULL,
1258: x_bid_number => p_bid_number,
1259: x_bid_line_number => NULL,
1260: x_to_entity_name => 'PO_HEADERS',
1261: x_to_pk1_value => l_po_header_id,
1262: x_created_by => g_cpa_csr.created_by,
1263: x_last_update_login => g_cpa_csr.last_update_login,
1264: x_program_application_id => NULL,

Line 1285: x_to_entity_name => 'PO_HEADERS',

1281: x_auction_header_id => p_auction_header_id,
1282: x_auction_line_number => NULL,
1283: x_bid_number => NULL,
1284: x_bid_line_number => NULL,
1285: x_to_entity_name => 'PO_HEADERS',
1286: x_to_pk1_value => l_po_header_id,
1287: x_created_by => g_cpa_csr.created_by,
1288: x_last_update_login => g_cpa_csr.last_update_login,
1289: x_program_application_id => NULL,

Line 1309: x_to_entity_name => 'PO_HEADERS',

1305: x_auction_header_id => p_auction_header_id,
1306: x_auction_line_number => NULL,
1307: x_bid_number => p_bid_number,
1308: x_bid_line_number => NULL,
1309: x_to_entity_name => 'PO_HEADERS',
1310: x_to_pk1_value => l_po_header_id,
1311: x_created_by => g_cpa_csr.created_by,
1312: x_last_update_login => g_cpa_csr.last_update_login,
1313: x_program_application_id => NULL,

Line 1329: FROM po_headers_all phda

1325: BEGIN
1326:
1327: SELECT phda.clm_source_document_id
1328: INTO x_clm_source_document_id
1329: FROM po_headers_all phda
1330: WHERE phda.po_header_id = l_po_header_id;
1331:
1332: EXCEPTION
1333: WHEN No_Data_Found THEN

Line 1383: (p_table_name => 'PO_HEADERS',

1379:
1380: IF Length(x_document_num) > 20 THEN
1381:
1382: x_document_num := po_core_sv1.default_po_unique_identifier
1383: (p_table_name => 'PO_HEADERS',
1384: p_org_id => g_cpa_csr.org_id
1385: );
1386:
1387: END IF;

Line 1391: (p_table_name => 'PO_HEADERS',

1387: END IF;
1388: ELSE
1389:
1390: x_document_num := po_core_sv1.default_po_unique_identifier
1391: (p_table_name => 'PO_HEADERS',
1392: p_org_id => g_cpa_csr.org_id
1393: );
1394: END IF; -- x_doc_number IS NOT NULL
1395: ELSE

Line 1418: ( p_table_name => 'PO_HEADERS',

1414: -- Consolidate PO # generation code into one API
1415:
1416: x_document_num :=
1417: PO_CORE_SV1.default_po_unique_identifier
1418: ( p_table_name => 'PO_HEADERS',
1419: p_org_id => g_cpa_csr.org_id
1420: );
1421:
1422: g_progress:= '411';

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

1435: g_progress:= '412';
1436: IF g_debug_stmt THEN
1437: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1438: p_token => g_progress,
1439: p_message => 'Before updating po_headers_all for conterms_exist_flag and document number');
1440: END IF;
1441:
1442: --SQL WHAT: Updates Conterms_exist_flag, segment1 and document_creation_method
1443: --SQL WHY: To handle creation of an automatic document_number when the po_num_code is AUTOMATIC

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

1441:
1442: --SQL WHAT: Updates Conterms_exist_flag, segment1 and document_creation_method
1443: --SQL WHY: To handle creation of an automatic document_number when the po_num_code is AUTOMATIC
1444: -- Update pf conterms_exist_flag and document_creation_method should have been
1445: -- handled in PO_HEADERS_PKG_S0.Insert_Row table handler.
1446: -- As this file is not allowed to update for 11.5.10, added separate update statement.
1447: --SQl Join:None
1448:
1449: UPDATE PO_HEADERS_ALL

Line 1449: UPDATE PO_HEADERS_ALL

1445: -- handled in PO_HEADERS_PKG_S0.Insert_Row table handler.
1446: -- As this file is not allowed to update for 11.5.10, added separate update statement.
1447: --SQl Join:None
1448:
1449: UPDATE PO_HEADERS_ALL
1450: SET conterms_exist_flag = decode(p_conterms_exist_flag,'Y','Y','N'),
1451: document_creation_method = p_document_creation_method,
1452: segment1 = x_document_num,
1453: clm_document_number = Nvl(x_doc_number, x_document_num)

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

1456: g_progress:= '413';
1457: IF g_debug_stmt THEN
1458: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1459: p_token => g_progress,
1460: p_message => 'Before updating po_headers_all for conterms_exist_flag and document number');
1461: END IF;
1462:
1463: --Copy contract terms if sourcing doc had a template attached.
1464: IF (p_conterms_exist_flag = 'Y') THEN

Line 1529: FROM po_doc_style_headers pdsh, po_headers_all pha

1525:
1526:
1527: SELECT pdsh.ame_transaction_type
1528: INTO l_ame_transaction_type
1529: FROM po_doc_style_headers pdsh, po_headers_all pha
1530: WHERE pha.po_header_id = l_po_header_id
1531: AND pha.style_id = pdsh.style_id;
1532:
1533: UPDATE po_headers_all

Line 1533: UPDATE po_headers_all

1529: FROM po_doc_style_headers pdsh, po_headers_all pha
1530: WHERE pha.po_header_id = l_po_header_id
1531: AND pha.style_id = pdsh.style_id;
1532:
1533: UPDATE po_headers_all
1534: SET ame_approval_id = l_ame_approval_id,
1535: ame_transaction_type = l_ame_transaction_type
1536: WHERE po_header_id = l_po_header_id;
1537: END IF; -- g_is_clm_flow = 'Y'

Line 1539: /* PO AME Approval workflow change : Updating po_headers_all with ame_transaction_type and ame_approval_id

1535: ame_transaction_type = l_ame_transaction_type
1536: WHERE po_header_id = l_po_header_id;
1537: END IF; -- g_is_clm_flow = 'Y'
1538: */
1539: /* PO AME Approval workflow change : Updating po_headers_all with ame_transaction_type and ame_approval_id
1540: in case AME transaction type is populated in Style Headers page*/
1541: -- Start : PO AME Approval workflow
1542:
1543: BEGIN

Line 1548: FROM po_headers_all poh,

1544: SELECT 'Y',
1545: podsh.ame_transaction_type
1546: INTO l_new_ame_appr_id_req,
1547: l_ame_transaction_type
1548: FROM po_headers_all poh,
1549: po_doc_style_headers podsh
1550: WHERE poh.style_id = podsh.style_id
1551: AND podsh.ame_transaction_type IS NOT NULL
1552: AND poh.po_header_id = l_po_header_id;

Line 1559: UPDATE po_headers_all

1555: WHEN NO_DATA_FOUND THEN
1556: l_new_ame_appr_id_req := 'N';
1557: END;
1558:
1559: UPDATE po_headers_all
1560: SET ame_approval_id = DECODE(l_new_ame_appr_id_req,
1561: 'Y', po_ame_approvals_s.NEXTVAL,
1562: ame_approval_id),
1563: ame_transaction_type = DECODE(l_new_ame_appr_id_req,

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

1633: -- Creates Contract Purchase Agreement from Sourcing document
1634: --Parameters:
1635: --IN:
1636: --p_interface_header_id
1637: -- The id that will be used to uniquely identify a row in the PO_HEADERS_INTERFACE table
1638: --p_auction_header_id
1639: -- Id of the negotiation
1640: --p_bid_number
1641: -- Bid Number for which is negotiation is awarded

Line 1669: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE,

1665: PROCEDURE create_cpa (
1666: x_return_status OUT NOCOPY VARCHAR2,
1667: x_msg_count OUT NOCOPY NUMBER,
1668: x_msg_data OUT NOCOPY VARCHAR2,
1669: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE,
1670: p_auction_header_id IN PON_AUCTION_HEADERS_ALL.auction_header_id%TYPE,
1671: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
1672: p_sourcing_k_doc_type IN VARCHAR2,
1673: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,

Line 1673: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,

1669: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE,
1670: p_auction_header_id IN PON_AUCTION_HEADERS_ALL.auction_header_id%TYPE,
1671: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
1672: p_sourcing_k_doc_type IN VARCHAR2,
1673: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
1674: p_document_creation_method IN PO_HEADERS_ALL.document_creation_method%TYPE,
1675: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
1676: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE
1677: ) IS

Line 1674: p_document_creation_method IN PO_HEADERS_ALL.document_creation_method%TYPE,

1670: p_auction_header_id IN PON_AUCTION_HEADERS_ALL.auction_header_id%TYPE,
1671: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
1672: p_sourcing_k_doc_type IN VARCHAR2,
1673: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
1674: p_document_creation_method IN PO_HEADERS_ALL.document_creation_method%TYPE,
1675: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
1676: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE
1677: ) IS
1678: l_return_status VARCHAR2(1);

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

1671: p_bid_number IN PON_BID_HEADERS.bid_number%TYPE,
1672: p_sourcing_k_doc_type IN VARCHAR2,
1673: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
1674: p_document_creation_method IN PO_HEADERS_ALL.document_creation_method%TYPE,
1675: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
1676: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE
1677: ) IS
1678: l_return_status VARCHAR2(1);
1679: l_api_name CONSTANT VARCHAR2(30) := 'create_cpa';

Line 1676: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE

1672: p_sourcing_k_doc_type IN VARCHAR2,
1673: p_conterms_exist_flag IN PO_HEADERS_ALL.conterms_exist_flag%TYPE,
1674: p_document_creation_method IN PO_HEADERS_ALL.document_creation_method%TYPE,
1675: x_document_id OUT NOCOPY PO_HEADERS_ALL.po_header_id%TYPE,
1676: x_document_number OUT NOCOPY PO_HEADERS_ALL.segment1%TYPE
1677: ) IS
1678: l_return_status VARCHAR2(1);
1679: l_api_name CONSTANT VARCHAR2(30) := 'create_cpa';
1680:

Line 1681: l_document_type PO_HEADERS_INTERFACE.document_type_code%TYPE;

1677: ) IS
1678: l_return_status VARCHAR2(1);
1679: l_api_name CONSTANT VARCHAR2(30) := 'create_cpa';
1680:
1681: l_document_type PO_HEADERS_INTERFACE.document_type_code%TYPE;
1682: l_document_subtype PO_HEADERS_INTERFACE.document_subtype%TYPE;
1683: l_action PO_HEADERS_INTERFACE.action%TYPE;
1684:
1685: -- CLM CPA

Line 1682: l_document_subtype PO_HEADERS_INTERFACE.document_subtype%TYPE;

1678: l_return_status VARCHAR2(1);
1679: l_api_name CONSTANT VARCHAR2(30) := 'create_cpa';
1680:
1681: l_document_type PO_HEADERS_INTERFACE.document_type_code%TYPE;
1682: l_document_subtype PO_HEADERS_INTERFACE.document_subtype%TYPE;
1683: l_action PO_HEADERS_INTERFACE.action%TYPE;
1684:
1685: -- CLM CPA
1686: l_clm_enabled_flag VARCHAR2(1):= 'N';

Line 1683: l_action PO_HEADERS_INTERFACE.action%TYPE;

1679: l_api_name CONSTANT VARCHAR2(30) := 'create_cpa';
1680:
1681: l_document_type PO_HEADERS_INTERFACE.document_type_code%TYPE;
1682: l_document_subtype PO_HEADERS_INTERFACE.document_subtype%TYPE;
1683: l_action PO_HEADERS_INTERFACE.action%TYPE;
1684:
1685: -- CLM CPA
1686: l_clm_enabled_flag VARCHAR2(1):= 'N';
1687: l_change_process_type PO_DOC_STYLE_HEADERS.change_process_type%TYPE;

Line 1723: FROM po_headers_interface phi

1719: BEGIN
1720:
1721: SELECT phi.style_id
1722: INTO g_style_id
1723: FROM po_headers_interface phi
1724: WHERE phi.interface_header_id=p_interface_header_id;
1725:
1726: EXCEPTION
1727: WHEN OTHERS THEN

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

1828: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1829: END IF;
1830: END IF;
1831:
1832: -- Insert record in the po_headers table and add attachments and contract terms
1833: g_progress := '505';
1834: IF g_debug_stmt THEN
1835: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1836: p_token => g_progress,

Line 1941: -- po_headers_interface

1937: --Name: DELETE_INTERFACE_HEADER
1938: --Pre-reqs:
1939: -- None
1940: --Modifies:
1941: -- po_headers_interface
1942: --Locks:
1943: -- None.
1944: --Function:
1945: -- This deletes the interface header row from interface table

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

1945: -- This deletes the interface header row from interface table
1946: --Parameters:
1947: --IN:
1948: --p_interface_header_id
1949: -- The id that will be used to uniquely identify a row in the PO_HEADERS_INTERFACE table
1950: --OUT:
1951: --x_return_status
1952: -- The standard OUT parameter giving return status of the API call.
1953: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error

Line 1963: p_interface_header_id IN PO_HEADERS_INTERFACE.INTERFACE_HEADER_ID%TYPE,

1959: --End of Comments
1960: -------------------------------------------------------------------------------
1961:
1962: PROCEDURE DELETE_INTERFACE_HEADER (
1963: p_interface_header_id IN PO_HEADERS_INTERFACE.INTERFACE_HEADER_ID%TYPE,
1964: x_return_status OUT NOCOPY VARCHAR2
1965: ) IS
1966: l_api_name CONSTANT VARCHAR2(30) := 'DELETE_INTERFACE_HEADER';
1967: BEGIN

Line 1971: DELETE po_headers_interface

1967: BEGIN
1968: -- Initialize API return status to success
1969: x_return_status := FND_API.G_RET_STS_SUCCESS;
1970:
1971: DELETE po_headers_interface
1972: WHERE interface_header_id = p_interface_header_id;
1973:
1974: g_progress := '600';
1975: IF g_debug_stmt THEN

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

1974: g_progress := '600';
1975: IF g_debug_stmt THEN
1976: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1977: p_token => g_progress,
1978: p_message => 'No of Records deleted from PO_HEADERS_INTERFACE'||SQL%rowcount);
1979: END IF;
1980: EXCEPTION
1981: WHEN OTHERS THEN
1982: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;