1: PACKAGE BODY PO_EXHIBITS_PVT AS
2: /* $Header: PO_EXHIBITS_PVT.plb 120.2.12020000.10 2013/04/18 05:02:58 mabaig noship $ */
3:
4: d_pkg_name CONSTANT varchar2(50) :=
5: PO_LOG.get_package_base('PO_EXHIBITS_PVT');
6:
7:
8:
9:
118: BEGIN
119:
120:
121: d_position := 0;
122: IF (PO_LOG.d_proc) THEN
123: PO_LOG.proc_begin(d_module);
124: END IF;
125:
126: -- Select Line Nums which have been added by other Modifications
119:
120:
121: d_position := 0;
122: IF (PO_LOG.d_proc) THEN
123: PO_LOG.proc_begin(d_module);
124: END IF;
125:
126: -- Select Line Nums which have been added by other Modifications
127: SELECT DISTINCT line_num_display
132: AND change_status='NEW'
133: AND status in ('DRAFT','REJECTED','IN PROCESS','PRE-APPROVED');
134:
135: d_position := 10;
136: IF (PO_LOG.d_stmt) THEN
137: PO_LOG.stmt(d_module, d_position, 'l_oth_line_num_arr', l_oth_line_num_arr);
138: END IF;
139:
140: -- Get a distinct union of current Mod Line Nums and other Mods Line Nums
133: AND status in ('DRAFT','REJECTED','IN PROCESS','PRE-APPROVED');
134:
135: d_position := 10;
136: IF (PO_LOG.d_stmt) THEN
137: PO_LOG.stmt(d_module, d_position, 'l_oth_line_num_arr', l_oth_line_num_arr);
138: END IF;
139:
140: -- Get a distinct union of current Mod Line Nums and other Mods Line Nums
141: l_merged_line_num_arr := p_assigned_num_array MULTISET UNION DISTINCT
141: l_merged_line_num_arr := p_assigned_num_array MULTISET UNION DISTINCT
142: l_oth_line_num_arr;
143:
144: d_position := 20;
145: IF (PO_LOG.d_stmt) THEN
146: PO_LOG.stmt(d_module, d_position, 'l_merged_line_num_arr', l_merged_line_num_arr);
147: END IF;
148:
149: exhibit_len:=Length(p_exhibit_name);
142: l_oth_line_num_arr;
143:
144: d_position := 20;
145: IF (PO_LOG.d_stmt) THEN
146: PO_LOG.stmt(d_module, d_position, 'l_merged_line_num_arr', l_merged_line_num_arr);
147: END IF;
148:
149: exhibit_len:=Length(p_exhibit_name);
150:
174: END IF;
175: END IF;
176:
177: d_position:=30;
178: IF (PO_LOG.d_stmt) THEN
179: PO_LOG.stmt(d_module,d_position ,'Next exhibit line number',linNumDisplay);
180: END IF;
181:
182:
175: END IF;
176:
177: d_position:=30;
178: IF (PO_LOG.d_stmt) THEN
179: PO_LOG.stmt(d_module,d_position ,'Next exhibit line number',linNumDisplay);
180: END IF;
181:
182:
183: IF (PO_LOG.d_proc) THEN
179: PO_LOG.stmt(d_module,d_position ,'Next exhibit line number',linNumDisplay);
180: END IF;
181:
182:
183: IF (PO_LOG.d_proc) THEN
184: PO_LOG.proc_end(d_module);
185: END IF;
186:
187:
180: END IF;
181:
182:
183: IF (PO_LOG.d_proc) THEN
184: PO_LOG.proc_end(d_module);
185: END IF;
186:
187:
188: RETURN p_exhibit_name||linNumDisplay;
259: l_dummy NUMBER;
260:
261: BEGIN
262: d_position := 0;
263: IF (PO_LOG.d_proc) THEN
264: PO_LOG.proc_begin(d_module);
265: END IF;
266:
267: SELECT 1
260:
261: BEGIN
262: d_position := 0;
263: IF (PO_LOG.d_proc) THEN
264: PO_LOG.proc_begin(d_module);
265: END IF;
266:
267: SELECT 1
268: INTO l_dummy
270: WHERE po_exhibit_details_id = p_po_exhibit_details_id
271: AND draft_id = p_draft_id
272: FOR UPDATE NOWAIT;
273:
274: IF (PO_LOG.d_proc) THEN
275: PO_LOG.proc_end(d_module);
276: END IF;
277:
278: EXCEPTION
271: AND draft_id = p_draft_id
272: FOR UPDATE NOWAIT;
273:
274: IF (PO_LOG.d_proc) THEN
275: PO_LOG.proc_end(d_module);
276: END IF;
277:
278: EXCEPTION
279: WHEN NO_DATA_FOUND THEN
303: l_dummy NUMBER;
304:
305: BEGIN
306: d_position := 0;
307: IF (PO_LOG.d_proc) THEN
308: PO_LOG.proc_begin(d_module);
309: END IF;
310:
311: SELECT 1
304:
305: BEGIN
306: d_position := 0;
307: IF (PO_LOG.d_proc) THEN
308: PO_LOG.proc_begin(d_module);
309: END IF;
310:
311: SELECT 1
312: INTO l_dummy
313: FROM po_exhibit_details
314: WHERE po_exhibit_details_id = p_po_exhibit_details_id
315: FOR UPDATE NOWAIT;
316:
317: IF (PO_LOG.d_proc) THEN
318: PO_LOG.proc_end(d_module);
319: END IF;
320:
321: EXCEPTION
314: WHERE po_exhibit_details_id = p_po_exhibit_details_id
315: FOR UPDATE NOWAIT;
316:
317: IF (PO_LOG.d_proc) THEN
318: PO_LOG.proc_end(d_module);
319: END IF;
320:
321: EXCEPTION
322: WHEN NO_DATA_FOUND THEN
368: l_duplicate_flag_tbl PO_TBL_VARCHAR1 := PO_TBL_VARCHAR1();
369:
370: BEGIN
371: d_position := 0;
372: IF (PO_LOG.d_proc) THEN
373: PO_LOG.proc_begin(d_module);
374: END IF;
375:
376: x_record_already_exist_tbl :=
369:
370: BEGIN
371: d_position := 0;
372: IF (PO_LOG.d_proc) THEN
373: PO_LOG.proc_begin(d_module);
374: END IF;
375:
376: x_record_already_exist_tbl :=
377: draft_changes_exist
405: END LOOP;
406: -- bug5471513 END
407:
408: d_position := 10;
409: IF (PO_LOG.d_stmt) THEN
410: PO_LOG.stmt(d_module, d_position, 'transfer records from txn to dft');
411: END IF;
412:
413: FORALL i IN 1..p_po_exhibit_details_id_tbl.Count
406: -- bug5471513 END
407:
408: d_position := 10;
409: IF (PO_LOG.d_stmt) THEN
410: PO_LOG.stmt(d_module, d_position, 'transfer records from txn to dft');
411: END IF;
412:
413: FORALL i IN 1..p_po_exhibit_details_id_tbl.Count
414: INSERT INTO po_exhibit_details_draft
450: AND x_record_already_exist_tbl(i) = FND_API.G_FALSE
451: AND l_duplicate_flag_tbl(i) = FND_API.G_FALSE;
452:
453: d_position := 20;
454: IF (PO_LOG.d_stmt) THEN
455: PO_LOG.stmt(d_module, d_position, 'transfer count = ' || SQL%ROWCOUNT);
456: END IF;
457:
458: FORALL i IN 1..p_po_exhibit_details_id_tbl.COUNT
451: AND l_duplicate_flag_tbl(i) = FND_API.G_FALSE;
452:
453: d_position := 20;
454: IF (PO_LOG.d_stmt) THEN
455: PO_LOG.stmt(d_module, d_position, 'transfer count = ' || SQL%ROWCOUNT);
456: END IF;
457:
458: FORALL i IN 1..p_po_exhibit_details_id_tbl.COUNT
459: UPDATE po_exhibit_details_draft
464: AND x_record_already_exist_tbl(i) = FND_API.G_TRUE;
465:
466: d_position := 30;
467:
468: IF (PO_LOG.d_stmt) THEN
469: PO_LOG.stmt(d_module, d_position, 'update draft records that are already' ||
470: ' in draft table. Count = ' || SQL%ROWCOUNT);
471: END IF;
472:
465:
466: d_position := 30;
467:
468: IF (PO_LOG.d_stmt) THEN
469: PO_LOG.stmt(d_module, d_position, 'update draft records that are already' ||
470: ' in draft table. Count = ' || SQL%ROWCOUNT);
471: END IF;
472:
473: d_position := 40;
471: END IF;
472:
473: d_position := 40;
474:
475: IF (PO_LOG.d_proc) THEN
476: PO_LOG.proc_end(d_module);
477: END IF;
478:
479: EXCEPTION
472:
473: d_position := 40;
474:
475: IF (PO_LOG.d_proc) THEN
476: PO_LOG.proc_end(d_module);
477: END IF;
478:
479: EXCEPTION
480: WHEN OTHERS THEN
526: l_record_already_exist_tbl PO_TBL_VARCHAR1;
527:
528: BEGIN
529: d_position := 0;
530: IF (PO_LOG.d_proc) THEN
531: PO_LOG.proc_begin(d_module);
532: PO_LOG.proc_begin(d_module, 'p_po_exhibit_details_id', p_po_exhibit_details_id);
533: END IF;
534:
527:
528: BEGIN
529: d_position := 0;
530: IF (PO_LOG.d_proc) THEN
531: PO_LOG.proc_begin(d_module);
532: PO_LOG.proc_begin(d_module, 'p_po_exhibit_details_id', p_po_exhibit_details_id);
533: END IF;
534:
535: sync_draft_from_txn
528: BEGIN
529: d_position := 0;
530: IF (PO_LOG.d_proc) THEN
531: PO_LOG.proc_begin(d_module);
532: PO_LOG.proc_begin(d_module, 'p_po_exhibit_details_id', p_po_exhibit_details_id);
533: END IF;
534:
535: sync_draft_from_txn
536: ( p_po_exhibit_details_id_tbl => PO_TBL_NUMBER(p_po_exhibit_details_id),
541:
542: x_record_already_exist := l_record_already_exist_tbl(1);
543:
544: d_position := 10;
545: IF (PO_LOG.d_proc) THEN
546: PO_LOG.proc_end(d_module);
547: PO_LOG.proc_end(d_module, 'x_record_already_exist', x_record_already_exist);
548: END IF;
549:
542: x_record_already_exist := l_record_already_exist_tbl(1);
543:
544: d_position := 10;
545: IF (PO_LOG.d_proc) THEN
546: PO_LOG.proc_end(d_module);
547: PO_LOG.proc_end(d_module, 'x_record_already_exist', x_record_already_exist);
548: END IF;
549:
550: EXCEPTION
543:
544: d_position := 10;
545: IF (PO_LOG.d_proc) THEN
546: PO_LOG.proc_end(d_module);
547: PO_LOG.proc_end(d_module, 'x_record_already_exist', x_record_already_exist);
548: END IF;
549:
550: EXCEPTION
551: WHEN OTHERS THEN
603: l_dft_exists_index_tbl PO_TBL_NUMBER := PO_TBL_NUMBER();
604:
605: BEGIN
606: d_position := 0;
607: IF (PO_LOG.d_proc) THEN
608: PO_LOG.proc_begin(d_module);
609: END IF;
610:
611: l_index_tbl.extend(p_draft_id_tbl.COUNT);
604:
605: BEGIN
606: d_position := 0;
607: IF (PO_LOG.d_proc) THEN
608: PO_LOG.proc_begin(d_module);
609: END IF;
610:
611: l_index_tbl.extend(p_draft_id_tbl.COUNT);
612: l_dft_exists_tbl.extend(p_draft_id_tbl.COUNT);
653: FOR i IN 1..l_dft_exists_index_tbl.COUNT LOOP
654: l_dft_exists_tbl(l_dft_exists_index_tbl(i)) := FND_API.G_TRUE;
655: END LOOP;
656:
657: IF (PO_LOG.d_stmt) THEN
658: PO_LOG.stmt(d_module, d_position, '# of records that have dft changes',
659: l_dft_exists_index_tbl.COUNT);
660: END IF;
661:
654: l_dft_exists_tbl(l_dft_exists_index_tbl(i)) := FND_API.G_TRUE;
655: END LOOP;
656:
657: IF (PO_LOG.d_stmt) THEN
658: PO_LOG.stmt(d_module, d_position, '# of records that have dft changes',
659: l_dft_exists_index_tbl.COUNT);
660: END IF;
661:
662: RETURN l_dft_exists_tbl;
705:
706: l_exists_tbl PO_TBL_VARCHAR1;
707: BEGIN
708: d_position := 0;
709: IF (PO_LOG.d_proc) THEN
710: PO_LOG.proc_begin(d_module);
711: END IF;
712:
713: l_exists_tbl :=
706: l_exists_tbl PO_TBL_VARCHAR1;
707: BEGIN
708: d_position := 0;
709: IF (PO_LOG.d_proc) THEN
710: PO_LOG.proc_begin(d_module);
711: END IF;
712:
713: l_exists_tbl :=
714: draft_changes_exist
715: ( p_draft_id_tbl => PO_TBL_NUMBER(p_draft_id),
716: p_po_exhibit_details_id_tbl => PO_TBL_NUMBER(p_po_exhibit_details_id)
717: );
718:
719: IF (PO_LOG.d_stmt) THEN
720: PO_LOG.stmt(d_module, d_position, 'exists', l_exists_tbl(1));
721: END IF;
722:
723: RETURN l_exists_tbl(1);
716: p_po_exhibit_details_id_tbl => PO_TBL_NUMBER(p_po_exhibit_details_id)
717: );
718:
719: IF (PO_LOG.d_stmt) THEN
720: PO_LOG.stmt(d_module, d_position, 'exists', l_exists_tbl(1));
721: END IF;
722:
723: RETURN l_exists_tbl(1);
724:
766: d_position NUMBER;
767:
768: BEGIN
769: d_position := 0;
770: IF (PO_LOG.d_proc) THEN
771: PO_LOG.proc_begin(d_module);
772: END IF;
773:
774: -- Since putting DELETE within MERGE statement is causing database
767:
768: BEGIN
769: d_position := 0;
770: IF (PO_LOG.d_proc) THEN
771: PO_LOG.proc_begin(d_module);
772: END IF;
773:
774: -- Since putting DELETE within MERGE statement is causing database
775: -- to thrown internal error, for now we just separate the DELETE statement.
896: d_position NUMBER;
897:
898: BEGIN
899: d_position := 0;
900: IF (PO_LOG.d_proc) THEN
901: PO_LOG.proc_begin(d_module);
902: END IF;
903:
904: IF (p_draft_info.exhibits_changed = FND_API.G_FALSE) THEN
897:
898: BEGIN
899: d_position := 0;
900: IF (PO_LOG.d_proc) THEN
901: PO_LOG.proc_begin(d_module);
902: END IF;
903:
904: IF (p_draft_info.exhibits_changed = FND_API.G_FALSE) THEN
905: IF (PO_LOG.d_stmt) THEN
901: PO_LOG.proc_begin(d_module);
902: END IF;
903:
904: IF (p_draft_info.exhibits_changed = FND_API.G_FALSE) THEN
905: IF (PO_LOG.d_stmt) THEN
906: PO_LOG.stmt(d_module, d_position, 'no change-no need to apply');
907: END IF;
908:
909: RETURN;
902: END IF;
903:
904: IF (p_draft_info.exhibits_changed = FND_API.G_FALSE) THEN
905: IF (PO_LOG.d_stmt) THEN
906: PO_LOG.stmt(d_module, d_position, 'no change-no need to apply');
907: END IF;
908:
909: RETURN;
910: END IF;
964: po_exhibit_details_ids_tbl PO_TBL_NUMBER;
965:
966: BEGIN
967: d_position := 0;
968: IF (PO_LOG.d_proc) THEN
969: PO_LOG.proc_begin(d_module);
970: END IF;
971:
972: DELETE FROM po_exhibit_details_draft
965:
966: BEGIN
967: d_position := 0;
968: IF (PO_LOG.d_proc) THEN
969: PO_LOG.proc_begin(d_module);
970: END IF;
971:
972: DELETE FROM po_exhibit_details_draft
973: WHERE draft_id = p_draft_id
1025:
1026: BEGIN
1027:
1028: d_position := 0;
1029: IF (PO_LOG.d_proc) THEN
1030: PO_LOG.proc_begin(d_module);
1031: PO_LOG.proc_begin(d_module,'Records count',p_document_id_tbl.count);
1032: END IF;
1033:
1026: BEGIN
1027:
1028: d_position := 0;
1029: IF (PO_LOG.d_proc) THEN
1030: PO_LOG.proc_begin(d_module);
1031: PO_LOG.proc_begin(d_module,'Records count',p_document_id_tbl.count);
1032: END IF;
1033:
1034: FOR i IN 1..p_document_id_tbl.COUNT LOOP
1027:
1028: d_position := 0;
1029: IF (PO_LOG.d_proc) THEN
1030: PO_LOG.proc_begin(d_module);
1031: PO_LOG.proc_begin(d_module,'Records count',p_document_id_tbl.count);
1032: END IF;
1033:
1034: FOR i IN 1..p_document_id_tbl.COUNT LOOP
1035:
1032: END IF;
1033:
1034: FOR i IN 1..p_document_id_tbl.COUNT LOOP
1035:
1036: IF (PO_LOG.d_stmt) THEN
1037: PO_LOG.stmt(d_module, d_position, 'p_document_id_tbl',
1038: p_document_id_tbl(i));
1039: END IF;
1040:
1033:
1034: FOR i IN 1..p_document_id_tbl.COUNT LOOP
1035:
1036: IF (PO_LOG.d_stmt) THEN
1037: PO_LOG.stmt(d_module, d_position, 'p_document_id_tbl',
1038: p_document_id_tbl(i));
1039: END IF;
1040:
1041: IF( p_document_type_tbl(i) IN ('PO_STANDARD', 'PA_CONTRACT', 'PA_BLANKET') ) THEN
1156: END IF;
1157: END LOOP;
1158:
1159: d_position := 40;
1160: IF (PO_LOG.d_proc) THEN
1161: PO_LOG.proc_end(d_module);
1162: END IF;
1163:
1164: x_return_status := FND_API.G_RET_STS_SUCCESS;
1157: END LOOP;
1158:
1159: d_position := 40;
1160: IF (PO_LOG.d_proc) THEN
1161: PO_LOG.proc_end(d_module);
1162: END IF;
1163:
1164: x_return_status := FND_API.G_RET_STS_SUCCESS;
1165:
1166:
1167: EXCEPTION
1168: WHEN OTHERS THEN
1169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1170: IF (PO_LOG.d_exc) THEN
1171: PO_LOG.exc(d_module,SQLCODE || SQLERRM);
1172: END IF;
1173: RAISE;
1174: END insert_exhibits;
1167: EXCEPTION
1168: WHEN OTHERS THEN
1169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1170: IF (PO_LOG.d_exc) THEN
1171: PO_LOG.exc(d_module,SQLCODE || SQLERRM);
1172: END IF;
1173: RAISE;
1174: END insert_exhibits;
1175:
1214:
1215: BEGIN
1216:
1217: d_position := 0;
1218: IF (PO_LOG.d_proc) THEN
1219: PO_LOG.proc_begin(d_module);
1220: PO_LOG.proc_begin(d_module,'Records count',p_document_id_tbl.count);
1221: END IF;
1222:
1215: BEGIN
1216:
1217: d_position := 0;
1218: IF (PO_LOG.d_proc) THEN
1219: PO_LOG.proc_begin(d_module);
1220: PO_LOG.proc_begin(d_module,'Records count',p_document_id_tbl.count);
1221: END IF;
1222:
1223: FOR i IN 1..p_document_id_tbl.COUNT LOOP
1216:
1217: d_position := 0;
1218: IF (PO_LOG.d_proc) THEN
1219: PO_LOG.proc_begin(d_module);
1220: PO_LOG.proc_begin(d_module,'Records count',p_document_id_tbl.count);
1221: END IF;
1222:
1223: FOR i IN 1..p_document_id_tbl.COUNT LOOP
1224:
1221: END IF;
1222:
1223: FOR i IN 1..p_document_id_tbl.COUNT LOOP
1224:
1225: IF (PO_LOG.d_stmt) THEN
1226: PO_LOG.stmt(d_module, d_position, 'p_document_id_tbl',
1227: p_document_id_tbl(i));
1228: END IF;
1229:
1222:
1223: FOR i IN 1..p_document_id_tbl.COUNT LOOP
1224:
1225: IF (PO_LOG.d_stmt) THEN
1226: PO_LOG.stmt(d_module, d_position, 'p_document_id_tbl',
1227: p_document_id_tbl(i));
1228: END IF;
1229:
1230: IF( p_document_type_tbl(i) IN ('PO_STANDARD', 'PA_CONTRACT', 'PA_BLANKET') ) THEN
1244: END IF;
1245: END LOOP;
1246:
1247: d_position := 40;
1248: IF (PO_LOG.d_proc) THEN
1249: PO_LOG.proc_end(d_module);
1250: END IF;
1251:
1252: x_return_status := FND_API.G_RET_STS_SUCCESS;
1245: END LOOP;
1246:
1247: d_position := 40;
1248: IF (PO_LOG.d_proc) THEN
1249: PO_LOG.proc_end(d_module);
1250: END IF;
1251:
1252: x_return_status := FND_API.G_RET_STS_SUCCESS;
1253:
1254:
1255: EXCEPTION
1256: WHEN OTHERS THEN
1257: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1258: IF (PO_LOG.d_exc) THEN
1259: PO_LOG.exc(d_module,SQLCODE || SQLERRM);
1260: END IF;
1261: RAISE;
1262: END delete_exhibits;
1255: EXCEPTION
1256: WHEN OTHERS THEN
1257: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1258: IF (PO_LOG.d_exc) THEN
1259: PO_LOG.exc(d_module,SQLCODE || SQLERRM);
1260: END IF;
1261: RAISE;
1262: END delete_exhibits;
1263:
1311:
1312: BEGIN
1313:
1314: d_position := 10;
1315: IF (PO_LOG.d_proc) THEN
1316: PO_LOG.proc_begin(d_module, 'p_po_draft_id', p_po_draft_id);
1317: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
1318: PO_LOG.proc_begin(d_module, 'p_exhibit_name', p_exhibit_name);
1319: PO_LOG.proc_begin(d_module, 'p_doc_sub_type', p_doc_sub_type);
1312: BEGIN
1313:
1314: d_position := 10;
1315: IF (PO_LOG.d_proc) THEN
1316: PO_LOG.proc_begin(d_module, 'p_po_draft_id', p_po_draft_id);
1317: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
1318: PO_LOG.proc_begin(d_module, 'p_exhibit_name', p_exhibit_name);
1319: PO_LOG.proc_begin(d_module, 'p_doc_sub_type', p_doc_sub_type);
1320: END IF;
1313:
1314: d_position := 10;
1315: IF (PO_LOG.d_proc) THEN
1316: PO_LOG.proc_begin(d_module, 'p_po_draft_id', p_po_draft_id);
1317: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
1318: PO_LOG.proc_begin(d_module, 'p_exhibit_name', p_exhibit_name);
1319: PO_LOG.proc_begin(d_module, 'p_doc_sub_type', p_doc_sub_type);
1320: END IF;
1321:
1314: d_position := 10;
1315: IF (PO_LOG.d_proc) THEN
1316: PO_LOG.proc_begin(d_module, 'p_po_draft_id', p_po_draft_id);
1317: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
1318: PO_LOG.proc_begin(d_module, 'p_exhibit_name', p_exhibit_name);
1319: PO_LOG.proc_begin(d_module, 'p_doc_sub_type', p_doc_sub_type);
1320: END IF;
1321:
1322: l_new_exhibit_name := get_next_exhibit(p_header_id => p_po_header_id,
1315: IF (PO_LOG.d_proc) THEN
1316: PO_LOG.proc_begin(d_module, 'p_po_draft_id', p_po_draft_id);
1317: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
1318: PO_LOG.proc_begin(d_module, 'p_exhibit_name', p_exhibit_name);
1319: PO_LOG.proc_begin(d_module, 'p_doc_sub_type', p_doc_sub_type);
1320: END IF;
1321:
1322: l_new_exhibit_name := get_next_exhibit(p_header_id => p_po_header_id,
1323: p_draft_id => p_po_draft_id);
1320: END IF;
1321:
1322: l_new_exhibit_name := get_next_exhibit(p_header_id => p_po_header_id,
1323: p_draft_id => p_po_draft_id);
1324: IF (PO_LOG.d_proc) THEN
1325: PO_LOG.proc_begin(d_module, 'l_new_exhibit_name', l_new_exhibit_name);
1326: END IF;
1327:
1328: IF( p_po_draft_id = -1 ) THEN
1321:
1322: l_new_exhibit_name := get_next_exhibit(p_header_id => p_po_header_id,
1323: p_draft_id => p_po_draft_id);
1324: IF (PO_LOG.d_proc) THEN
1325: PO_LOG.proc_begin(d_module, 'l_new_exhibit_name', l_new_exhibit_name);
1326: END IF;
1327:
1328: IF( p_po_draft_id = -1 ) THEN
1329:
1416:
1417:
1418: END IF;
1419:
1420: IF (PO_LOG.d_stmt) THEN
1421: PO_LOG.stmt(d_module, d_position, 'l_document_type', l_document_type);
1422: PO_LOG.stmt(d_module, d_position, 'l_docid', l_docid);
1423: PO_LOG.stmt(d_module, d_position, 'l_new_exhibit_name', l_new_exhibit_name);
1424:
1417:
1418: END IF;
1419:
1420: IF (PO_LOG.d_stmt) THEN
1421: PO_LOG.stmt(d_module, d_position, 'l_document_type', l_document_type);
1422: PO_LOG.stmt(d_module, d_position, 'l_docid', l_docid);
1423: PO_LOG.stmt(d_module, d_position, 'l_new_exhibit_name', l_new_exhibit_name);
1424:
1425: END IF;
1418: END IF;
1419:
1420: IF (PO_LOG.d_stmt) THEN
1421: PO_LOG.stmt(d_module, d_position, 'l_document_type', l_document_type);
1422: PO_LOG.stmt(d_module, d_position, 'l_docid', l_docid);
1423: PO_LOG.stmt(d_module, d_position, 'l_new_exhibit_name', l_new_exhibit_name);
1424:
1425: END IF;
1426:
1419:
1420: IF (PO_LOG.d_stmt) THEN
1421: PO_LOG.stmt(d_module, d_position, 'l_document_type', l_document_type);
1422: PO_LOG.stmt(d_module, d_position, 'l_docid', l_docid);
1423: PO_LOG.stmt(d_module, d_position, 'l_new_exhibit_name', l_new_exhibit_name);
1424:
1425: END IF;
1426:
1427: okc_cdrl_pvt.copy_cdrl_for_exhibit (
1438: x_msg_count => l_msg_count,
1439: x_return_status => l_return_status
1440: );
1441:
1442: IF (PO_LOG.d_stmt) THEN
1443: PO_LOG.stmt(d_module, d_position, 'l_msg_data', l_msg_data);
1444: PO_LOG.stmt(d_module, d_position, 'l_msg_count', l_msg_count);
1445: PO_LOG.stmt(d_module, d_position, 'l_return_status', l_return_status);
1446:
1439: x_return_status => l_return_status
1440: );
1441:
1442: IF (PO_LOG.d_stmt) THEN
1443: PO_LOG.stmt(d_module, d_position, 'l_msg_data', l_msg_data);
1444: PO_LOG.stmt(d_module, d_position, 'l_msg_count', l_msg_count);
1445: PO_LOG.stmt(d_module, d_position, 'l_return_status', l_return_status);
1446:
1447: END IF;
1440: );
1441:
1442: IF (PO_LOG.d_stmt) THEN
1443: PO_LOG.stmt(d_module, d_position, 'l_msg_data', l_msg_data);
1444: PO_LOG.stmt(d_module, d_position, 'l_msg_count', l_msg_count);
1445: PO_LOG.stmt(d_module, d_position, 'l_return_status', l_return_status);
1446:
1447: END IF;
1448:
1441:
1442: IF (PO_LOG.d_stmt) THEN
1443: PO_LOG.stmt(d_module, d_position, 'l_msg_data', l_msg_data);
1444: PO_LOG.stmt(d_module, d_position, 'l_msg_count', l_msg_count);
1445: PO_LOG.stmt(d_module, d_position, 'l_return_status', l_return_status);
1446:
1447: END IF;
1448:
1449: d_position := 40;
1446:
1447: END IF;
1448:
1449: d_position := 40;
1450: IF (PO_LOG.d_proc) THEN
1451: PO_LOG.proc_end(d_module);
1452: END IF;
1453:
1454: x_return_status := l_return_status;--FND_API.G_RET_STS_SUCCESS;
1447: END IF;
1448:
1449: d_position := 40;
1450: IF (PO_LOG.d_proc) THEN
1451: PO_LOG.proc_end(d_module);
1452: END IF;
1453:
1454: x_return_status := l_return_status;--FND_API.G_RET_STS_SUCCESS;
1455: x_return_msg := l_msg_data;
1456:
1457: EXCEPTION
1458: WHEN OTHERS THEN
1459: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1460: IF (PO_LOG.d_exc) THEN
1461: PO_LOG.exc(d_module,SQLCODE || SQLERRM);
1462: END IF;
1463: RAISE;
1464: END copy_cdrl_exhibit;
1457: EXCEPTION
1458: WHEN OTHERS THEN
1459: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1460: IF (PO_LOG.d_exc) THEN
1461: PO_LOG.exc(d_module,SQLCODE || SQLERRM);
1462: END IF;
1463: RAISE;
1464: END copy_cdrl_exhibit;
1465:
1512:
1513: BEGIN
1514:
1515: d_position := 10;
1516: IF (PO_LOG.d_proc) THEN
1517: PO_LOG.proc_begin(d_module, 'p_po_draft_id', p_po_draft_id);
1518: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
1519: PO_LOG.proc_begin(d_module, 'p_exhibit_name', p_exhibit_name);
1520: PO_LOG.proc_begin(d_module, 'p_doc_sub_type', p_doc_sub_type);
1513: BEGIN
1514:
1515: d_position := 10;
1516: IF (PO_LOG.d_proc) THEN
1517: PO_LOG.proc_begin(d_module, 'p_po_draft_id', p_po_draft_id);
1518: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
1519: PO_LOG.proc_begin(d_module, 'p_exhibit_name', p_exhibit_name);
1520: PO_LOG.proc_begin(d_module, 'p_doc_sub_type', p_doc_sub_type);
1521: END IF;
1514:
1515: d_position := 10;
1516: IF (PO_LOG.d_proc) THEN
1517: PO_LOG.proc_begin(d_module, 'p_po_draft_id', p_po_draft_id);
1518: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
1519: PO_LOG.proc_begin(d_module, 'p_exhibit_name', p_exhibit_name);
1520: PO_LOG.proc_begin(d_module, 'p_doc_sub_type', p_doc_sub_type);
1521: END IF;
1522:
1515: d_position := 10;
1516: IF (PO_LOG.d_proc) THEN
1517: PO_LOG.proc_begin(d_module, 'p_po_draft_id', p_po_draft_id);
1518: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
1519: PO_LOG.proc_begin(d_module, 'p_exhibit_name', p_exhibit_name);
1520: PO_LOG.proc_begin(d_module, 'p_doc_sub_type', p_doc_sub_type);
1521: END IF;
1522:
1523: IF( p_po_draft_id = -1 ) THEN
1516: IF (PO_LOG.d_proc) THEN
1517: PO_LOG.proc_begin(d_module, 'p_po_draft_id', p_po_draft_id);
1518: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
1519: PO_LOG.proc_begin(d_module, 'p_exhibit_name', p_exhibit_name);
1520: PO_LOG.proc_begin(d_module, 'p_doc_sub_type', p_doc_sub_type);
1521: END IF;
1522:
1523: IF( p_po_draft_id = -1 ) THEN
1524:
1545: l_docid := p_po_draft_id;
1546:
1547: END IF;
1548:
1549: IF (PO_LOG.d_stmt) THEN
1550: PO_LOG.stmt(d_module, d_position, 'l_document_type', l_document_type);
1551: PO_LOG.stmt(d_module, d_position, 'l_docid', l_docid);
1552:
1553: END IF;
1546:
1547: END IF;
1548:
1549: IF (PO_LOG.d_stmt) THEN
1550: PO_LOG.stmt(d_module, d_position, 'l_document_type', l_document_type);
1551: PO_LOG.stmt(d_module, d_position, 'l_docid', l_docid);
1552:
1553: END IF;
1554:
1547: END IF;
1548:
1549: IF (PO_LOG.d_stmt) THEN
1550: PO_LOG.stmt(d_module, d_position, 'l_document_type', l_document_type);
1551: PO_LOG.stmt(d_module, d_position, 'l_docid', l_docid);
1552:
1553: END IF;
1554:
1555: l_exhibit_tbl(1) := p_exhibit_name;
1567: x_msg_count => l_msg_count,
1568: x_return_status => l_return_status
1569: );
1570:
1571: IF (PO_LOG.d_stmt) THEN
1572: PO_LOG.stmt(d_module, d_position, 'l_msg_data', l_msg_data);
1573: PO_LOG.stmt(d_module, d_position, 'l_msg_count', l_msg_count);
1574: PO_LOG.stmt(d_module, d_position, 'l_return_status', l_return_status);
1575:
1568: x_return_status => l_return_status
1569: );
1570:
1571: IF (PO_LOG.d_stmt) THEN
1572: PO_LOG.stmt(d_module, d_position, 'l_msg_data', l_msg_data);
1573: PO_LOG.stmt(d_module, d_position, 'l_msg_count', l_msg_count);
1574: PO_LOG.stmt(d_module, d_position, 'l_return_status', l_return_status);
1575:
1576: END IF;
1569: );
1570:
1571: IF (PO_LOG.d_stmt) THEN
1572: PO_LOG.stmt(d_module, d_position, 'l_msg_data', l_msg_data);
1573: PO_LOG.stmt(d_module, d_position, 'l_msg_count', l_msg_count);
1574: PO_LOG.stmt(d_module, d_position, 'l_return_status', l_return_status);
1575:
1576: END IF;
1577:
1570:
1571: IF (PO_LOG.d_stmt) THEN
1572: PO_LOG.stmt(d_module, d_position, 'l_msg_data', l_msg_data);
1573: PO_LOG.stmt(d_module, d_position, 'l_msg_count', l_msg_count);
1574: PO_LOG.stmt(d_module, d_position, 'l_return_status', l_return_status);
1575:
1576: END IF;
1577:
1578: d_position := 40;
1575:
1576: END IF;
1577:
1578: d_position := 40;
1579: IF (PO_LOG.d_proc) THEN
1580: PO_LOG.proc_end(d_module);
1581: END IF;
1582:
1583: x_return_status := l_return_status;--FND_API.G_RET_STS_SUCCESS;
1576: END IF;
1577:
1578: d_position := 40;
1579: IF (PO_LOG.d_proc) THEN
1580: PO_LOG.proc_end(d_module);
1581: END IF;
1582:
1583: x_return_status := l_return_status;--FND_API.G_RET_STS_SUCCESS;
1584: x_return_msg := l_msg_data;
1585:
1586: EXCEPTION
1587: WHEN OTHERS THEN
1588: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1589: IF (PO_LOG.d_exc) THEN
1590: PO_LOG.exc(d_module,SQLCODE || SQLERRM);
1591: END IF;
1592: RAISE;
1593: END delete_cdrls_for_exhibit;
1586: EXCEPTION
1587: WHEN OTHERS THEN
1588: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1589: IF (PO_LOG.d_exc) THEN
1590: PO_LOG.exc(d_module,SQLCODE || SQLERRM);
1591: END IF;
1592: RAISE;
1593: END delete_cdrls_for_exhibit;
1594: