DBA Data[Home] [Help]

APPS.MSC_MANAGE_PLAN_PARTITIONS dependencies on FND_API

Line 90: RETURN FND_API.G_RET_STS_SUCCESS;

86: execute immediate l_sql_stmt;
87: END IF;
88: END LOOP;
89:
90: RETURN FND_API.G_RET_STS_SUCCESS;
91:
92: EXCEPTION
93: WHEN NON_EXISTING_PARTITION THEN
94: msc_util.msc_debug('Partition '||l_partition_name||'does not exist.');

Line 95: RETURN FND_API.G_RET_STS_ERROR;

91:
92: EXCEPTION
93: WHEN NON_EXISTING_PARTITION THEN
94: msc_util.msc_debug('Partition '||l_partition_name||'does not exist.');
95: RETURN FND_API.G_RET_STS_ERROR;
96: WHEN OTHERS THEN
97: l_sql_stmt := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
98: msc_util.msc_debug(l_sql_stmt);
99: RETURN FND_API.G_RET_STS_UNEXP_ERROR;

Line 99: RETURN FND_API.G_RET_STS_UNEXP_ERROR;

95: RETURN FND_API.G_RET_STS_ERROR;
96: WHEN OTHERS THEN
97: l_sql_stmt := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
98: msc_util.msc_debug(l_sql_stmt);
99: RETURN FND_API.G_RET_STS_UNEXP_ERROR;
100: END check_partition_pvt;
101:
102: --
103: -- this procedure cleans (truncate or drop) partitions

Line 139: x_return_status := FND_API.G_RET_STS_ERROR;

135: --
136: -- get fnd schema name
137: --
138: if (FND_INSTALLATION.GET_APP_INFO('FND',dummy1,dummy2,l_applsys_schema) = FALSE) then
139: x_return_status := FND_API.G_RET_STS_ERROR;
140: fnd_message.set_name('MSC','MSC_PART_UNDEFINED_SCHEMA');
141: x_msg_data := fnd_message.get;
142: return;
143: end if;

Line 172: x_return_status := FND_API.G_RET_STS_SUCCESS;

168: -- ignore the drop errors
169: --
170: when others then
171: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
172: x_return_status := FND_API.G_RET_STS_SUCCESS;
173: end;
174:
175:
176: END LOOP;

Line 178: x_return_status := FND_API.G_RET_STS_SUCCESS;

174:
175:
176: END LOOP;
177:
178: x_return_status := FND_API.G_RET_STS_SUCCESS;
179:
180: EXCEPTION
181: WHEN others THEN
182: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 182: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

178: x_return_status := FND_API.G_RET_STS_SUCCESS;
179:
180: EXCEPTION
181: WHEN others THEN
182: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
183:
184:
185: END clean_partition_pvt;
186:

Line 223: x_return_status := FND_API.G_RET_STS_ERROR;

219: --
220: -- get fnd schema name
221: --
222: if (FND_INSTALLATION.GET_APP_INFO('FND',dummy1,dummy2,l_applsys_schema) = FALSE) then
223: x_return_status := FND_API.G_RET_STS_ERROR;
224: fnd_message.set_name('MSC','MSC_PART_UNDEFINED_SCHEMA');
225: x_msg_data := fnd_message.get;
226: return;
227: end if;

Line 239: x_return_status := FND_API.G_RET_STS_ERROR;

235: --- error occured during partition creation in summary tables
236: --- Since partitions are not created for lower plan IDs successfully, partition
237: --- for higher plan ID will not be created
238: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
239: x_return_status := FND_API.G_RET_STS_ERROR;
240: return;
241: END IF;
242:
243: part_created := 1;

Line 294: x_return_status := FND_API.G_RET_STS_SUCCESS;

290: part_created := part_created +1;
291:
292: END LOOP;
293: --dbms_output.put_line('****returning success****'||x_msg_data);
294: x_return_status := FND_API.G_RET_STS_SUCCESS;
295:
296: EXCEPTION
297: --
298: -- could not create partition

Line 307: x_return_status := FND_API.G_RET_STS_ERROR;

303: -- fnd_message.set_name('MSC','MSC_PART_CREATE_FAILED');
304: -- fnd_message.set_token('PARTITION',l_partition_name);
305: -- x_msg_data := fnd_message.get;
306: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
307: x_return_status := FND_API.G_RET_STS_ERROR;
308:
309: --
310: -- if partitions were created partially then remove the ones
311: -- that were successful so that we can exit in a clean state

Line 370: x_return_status := FND_API.G_RET_STS_ERROR;

366: --
367: -- get fnd schema name
368: --
369: if (FND_INSTALLATION.GET_APP_INFO('FND',dummy1,dummy2,l_applsys_schema) = FALSE) then
370: x_return_status := FND_API.G_RET_STS_ERROR;
371: fnd_message.set_name('MSC','MSC_PART_UNDEFINED_SCHEMA');
372: x_msg_data := fnd_message.get;
373: return;
374: end if;

Line 386: x_return_status := FND_API.G_RET_STS_ERROR;

382: --- error occured during partition creation in summary tables
383: --- Since partitions are not created for lower instance IDs successfully, partition
384: --- for higher instnaces will not be created
385: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
386: x_return_status := FND_API.G_RET_STS_ERROR;
387: return;
388: END IF;
389:
390:

Line 450: x_return_status := FND_API.G_RET_STS_SUCCESS;

446: );
447:
448: COMMIT;
449:
450: x_return_status := FND_API.G_RET_STS_SUCCESS;
451:
452: EXCEPTION
453: --
454: -- could not create partition

Line 463: x_return_status := FND_API.G_RET_STS_ERROR;

459: -- fnd_message.set_name('MSC','MSCFULL_PEGGINGCREATE_FAILED');
460: -- fnd_message.set_token('PARTITION',l_partition_name);
461: -- x_msg_data := fnd_message.get;
462: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
463: x_return_status := FND_API.G_RET_STS_ERROR;
464:
465: --
466: -- if partitions were created partially then remove the ones
467: -- that were successful so that we can exit in a clean state

Line 537: x_return_status := FND_API.G_RET_STS_SUCCESS;

533: BEGIN
534:
535: -- set return status
536:
537: x_return_status := FND_API.G_RET_STS_SUCCESS;
538:
539: --
540: -- check if plans are sharing partitions
541: --

Line 565: x_return_status := FND_API.G_RET_STS_ERROR;

561: -- partitions on the fly. Hence, return error. Partitions
562: -- should be created by the system dba because that involves
563: -- analyzing as well as recompiling db objects
564:
565: x_return_status := FND_API.G_RET_STS_ERROR;
566: fnd_message.set_name('MSC','MSC_NO_FREE_PARTITION');
567: x_msg_data := fnd_message.get;
568: l_plan_id := -1; --return -1;
569: EXIT;

Line 591: if (x_return_status = FND_API.G_RET_STS_ERROR) then

587:
588: --
589: -- if could not create partition then return error
590: --
591: if (x_return_status = FND_API.G_RET_STS_ERROR) then
592: l_plan_id := -1;
593: return l_plan_id;
594: end if;
595:

Line 629: x_return_status := FND_API.G_RET_STS_ERROR;

625: -- drop the partitions that were created in this run so
626: -- as to ensure a clean exit
627: --
628: clean_partition_pvt(l_plan_id,MAXVALUE,1,'drop',x_return_status, x_msg_data);
629: x_return_status := FND_API.G_RET_STS_ERROR;
630: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
631: l_plan_id := -1;
632: return l_plan_id;
633: end;*/

Line 640: if check_partition_pvt(l_plan_id) = FND_API.G_RET_STS_SUCCESS then

636: -- found a free plan. update it's name
637: --
638: -- dbms_output.put_line('Found a free plan'||p_plan_name);
639: BEGIN
640: if check_partition_pvt(l_plan_id) = FND_API.G_RET_STS_SUCCESS then
641: UPDATE MSC_PLAN_PARTITIONS
642: SET plan_name = p_plan_name,
643: free_flag = 2
644: WHERE plan_id = l_plan_id;

Line 654: x_return_status := FND_API.G_RET_STS_ERROR;

650: WHERE plan_id = l_plan_id;
651: END IF;
652: EXCEPTION
653: WHEN OTHERS THEN
654: x_return_status := FND_API.G_RET_STS_ERROR;
655: --fnd_message.set_name('MSC','MSC_PART_UPDATE_FAILED');
656: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
657: -- fnd_message.get;
658: l_plan_id := -1;

Line 669: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

665:
666: EXCEPTION WHEN others THEN
667:
668:
669: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
670: l_plan_id := -1;
671: return l_plan_id;
672:
673: END get_plan;

Line 696: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then

692:
693: --
694: -- break if partition creation fails
695: --
696: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then
697: exit;
698: end if;
699:
700: INSERT INTO MSC_INST_PARTITIONS (

Line 723: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

719: commit;
720:
721: END LOOP;
722:
723: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
724: retcode := G_SUCCESS;
725: else
726: retcode := G_ERROR;
727: end if;

Line 750: x_return_status := FND_API.G_RET_STS_SUCCESS;

746: l_inst_id NUMBER:= NULL;
747:
748: BEGIN
749: -- set return status
750: x_return_status := FND_API.G_RET_STS_SUCCESS;
751:
752: -- find free instance
753: OPEN C_FREE_INSTANCE;
754: FETCH C_FREE_INSTANCE INTO l_inst_id;

Line 764: x_return_status := FND_API.G_RET_STS_ERROR;

760: -- cannot create an instance partition dynamically.
761: -- the sysadmin will have to create them
762: --
763: fnd_message.set_name('MSC','MSC_NO_FREE_PARTITION');
764: x_return_status := FND_API.G_RET_STS_ERROR;
765: x_msg_data := fnd_message.get;
766: return -1;
767:
768: /*

Line 775: if x_return_status = FND_API.G_RET_STS_ERROR THEN

771: FROM DUAL;
772:
773: create_inst_partitions_pvt( l_inst_id,x_return_status,x_msg_data);
774:
775: if x_return_status = FND_API.G_RET_STS_ERROR THEN
776: return -1;
777: end if;
778: */
779:

Line 792: x_return_status := FND_API.G_RET_STS_ERROR;

788: WHERE instance_id = l_inst_id;
789:
790: exception
791: when others then
792: x_return_status := FND_API.G_RET_STS_ERROR;
793: --fnd_message.set_name('MSC','MSC_PART_UPDATE_FAILED');
794: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
795: -- fnd_message.get;
796: l_inst_id := -1;

Line 803: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

799:
800: return l_inst_id;
801:
802: EXCEPTION WHEN others THEN
803: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
804: l_inst_id := -1;
805: return l_inst_id;
806:
807: END get_instance;

Line 859: x_return_status := FND_API.G_RET_STS_ERROR;

855: CLOSE Instance_exists_C;
856: end if;
857:
858: if (l_count <> 1) then
859: x_return_status := FND_API.G_RET_STS_ERROR;
860: x_msg_data := to_char(l_id) || 'Id does not exist';
861: return;
862: end if;
863:

Line 875: x_return_status := FND_API.G_RET_STS_SUCCESS;

871:
872: P_partition_name := partitioned_tables(i) || '__' || to_char(P_instance_id);
873: end if;
874:
875: x_return_status := FND_API.G_RET_STS_SUCCESS;
876: return;
877: end if;
878: END LOOP;
879:

Line 880: x_return_status := FND_API.G_RET_STS_ERROR;

876: return;
877: end if;
878: END LOOP;
879:
880: x_return_status := FND_API.G_RET_STS_ERROR;
881: x_msg_data := P_table_name || ' is not partitioned';
882: return;
883: END get_partition_name;
884:

Line 894: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

890: x_msg_data OUT NOCOPY VARCHAR2) IS
891: BEGIN
892: clean_partition_pvt(P_plan_id,MAXVALUE,1,'truncate', x_return_status, x_msg_data);
893:
894: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
895: begin
896:
897: UPDATE MSC_PLAN_PARTITIONS
898: SET free_flag = 1

Line 902: x_return_status := FND_API.G_RET_STS_ERROR;

898: SET free_flag = 1
899: WHERE plan_id = P_plan_id;
900: exception
901: when others then
902: x_return_status := FND_API.G_RET_STS_ERROR;
903: fnd_message.set_name('MSC','MSC_PART_UPDATE_FAILED');
904: x_msg_data := fnd_message.get;
905: return;
906: end;

Line 929: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

925: end if;
926:
927: -- dbms_output.put_line('return status was '||x_return_status||' '||errbuf);
928:
929: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
930: retcode := G_SUCCESS;
931: else
932: retcode := G_ERROR;
933: end if;

Line 1000: x_return_status := FND_API.G_RET_STS_ERROR;

996: else
997: clean_partition_pvt(-1,partition_num,2,'drop',x_return_status, errbuf);
998: end if;
999:
1000: x_return_status := FND_API.G_RET_STS_ERROR;
1001: fnd_message.set_name('MSC','MSC_PART_INSERT_FAILED');
1002: errbuf := fnd_message.get;
1003: retcode := to_number(x_return_status);
1004: end;

Line 1029: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

1025: else
1026: clean_partition_pvt(-1,partition_num,2,'drop', x_return_status, errbuf);
1027: end if;
1028:
1029: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1030: retcode := G_SUCCESS;
1031: else
1032: retcode := G_ERROR;
1033: end if;

Line 1068: x_return_status VARCHAR2(10) := FND_API.G_RET_STS_SUCCESS;

1064:
1065:
1066: l_plan_id NUMBER;
1067: l_plan_name VARCHAR(100);
1068: x_return_status VARCHAR2(10) := FND_API.G_RET_STS_SUCCESS;
1069: share_partition VARCHAR2(1);
1070: plan_exists BOOLEAN := FALSE;
1071: i NUMBER;
1072: BEGIN

Line 1082: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

1078: share_partition := fnd_profile.value('MSC_SHARE_PARTITIONS');
1079: -- dbms_output.put_line('share_partition := '||share_partition);
1080: if (share_partition = 'Y') then
1081: create_partition_pvt(PMAXVALUE,MAXVALUE,x_return_status,errbuf);
1082: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1083: retcode := G_SUCCESS;
1084: else
1085: retcode := G_ERROR;
1086: end if;

Line 1111: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then

1107:
1108: --
1109: -- break if partition creation fails
1110: --
1111: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then
1112: exit;
1113: end if;
1114:
1115: INSERT INTO MSC_PLAN_PARTITIONS (

Line 1160: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then

1156:
1157: --
1158: -- break if partition creation fails
1159: --
1160: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then
1161: exit;
1162: end if;
1163:
1164: INSERT INTO MSC_PLAN_PARTITIONS (

Line 1192: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

1188:
1189: END LOOP;
1190: end if;
1191:
1192: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1193: retcode := G_SUCCESS;
1194: else
1195: retcode := G_ERROR;
1196: end if;

Line 1251: x_return_status VARCHAR2(10) := FND_API.G_RET_STS_SUCCESS;

1247: FROM MSC_apps_instances
1248: ORDER BY instance_id;
1249:
1250: l_instance_id NUMBER;
1251: x_return_status VARCHAR2(10) := FND_API.G_RET_STS_SUCCESS;
1252: instance_exists BOOLEAN := FALSE;
1253: BEGIN
1254:
1255: OPEN C_INSTANCE;

Line 1275: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then

1271:
1272: --
1273: -- break if partition creation fails
1274: --
1275: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then
1276: exit;
1277: end if;
1278:
1279: commit;

Line 1303: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

1299: --
1300: -- update msc_inst_partitions to mark the partition
1301: -- as free since the pvt api defaults it to used.
1302: --
1303: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1304: UPDATE MSC_INST_PARTITIONS
1305: SET free_flag = 1
1306: WHERE instance_id = l_instance_id;
1307: end if;

Line 1312: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

1308:
1309: commit;
1310: end if;
1311:
1312: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1313: retcode := G_SUCCESS;
1314: else
1315: retcode := G_ERROR;
1316: end if;

Line 1512: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

1508: -- dbms_output.put_line('share partitions :='||share_partition);
1509: if (share_partition = 'Y' and plan_partition_count > 0) then
1510: create_partition_pvt(PMAXVALUE,MAXVALUE,x_return_status,errbuf);
1511: analyze_plan(errbuf,retcode,PMAXVALUE);
1512: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1513: retcode := G_SUCCESS;
1514: else
1515: retcode := G_ERROR;
1516: end if;

Line 1536: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then

1532:
1533: --
1534: -- if could not create partition then return error
1535: --
1536: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then
1537: retcode := G_ERROR;
1538: return;
1539: else
1540: retcode := G_SUCCESS;

Line 1602: if x_return_status = FND_API.G_RET_STS_ERROR THEN

1598: FROM DUAL;
1599:
1600: create_inst_partitions_pvt( l_inst_id,x_return_status,errbuf);
1601:
1602: if x_return_status = FND_API.G_RET_STS_ERROR THEN
1603: retcode := G_ERROR;
1604: return;
1605: end if;
1606: --

Line 1610: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

1606: --
1607: -- update msc_inst_partitions to mark the partition
1608: -- as free since the pvt api defaults it to used.
1609: --
1610: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1611: UPDATE MSC_INST_PARTITIONS
1612: SET free_flag = 1
1613: WHERE instance_id = l_inst_id;
1614: end if;