DBA Data[Home] [Help]

APPS.MSC_MANAGE_PLAN_PARTITIONS dependencies on FND_API

Line 121: RETURN FND_API.G_RET_STS_SUCCESS;

117: execute immediate l_sql_stmt;
118: END IF;
119: END LOOP;
120:
121: RETURN FND_API.G_RET_STS_SUCCESS;
122:
123: EXCEPTION
124: WHEN NON_EXISTING_PARTITION THEN
125: msc_util.msc_debug('Partition '||l_partition_name||'does not exist.');

Line 126: RETURN FND_API.G_RET_STS_ERROR;

122:
123: EXCEPTION
124: WHEN NON_EXISTING_PARTITION THEN
125: msc_util.msc_debug('Partition '||l_partition_name||'does not exist.');
126: RETURN FND_API.G_RET_STS_ERROR;
127: WHEN OTHERS THEN
128: l_sql_stmt := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
129: msc_util.msc_debug(l_sql_stmt);
130: RETURN FND_API.G_RET_STS_UNEXP_ERROR;

Line 130: RETURN FND_API.G_RET_STS_UNEXP_ERROR;

126: RETURN FND_API.G_RET_STS_ERROR;
127: WHEN OTHERS THEN
128: l_sql_stmt := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
129: msc_util.msc_debug(l_sql_stmt);
130: RETURN FND_API.G_RET_STS_UNEXP_ERROR;
131: END check_partition_pvt;
132:
133: --
134: -- this procedure cleans (truncate or drop) partitions

Line 170: x_return_status := FND_API.G_RET_STS_ERROR;

166: --
167: -- get fnd schema name
168: --
169: if (FND_INSTALLATION.GET_APP_INFO('FND',dummy1,dummy2,l_applsys_schema) = FALSE) then
170: x_return_status := FND_API.G_RET_STS_ERROR;
171: fnd_message.set_name('MSC','MSC_PART_UNDEFINED_SCHEMA');
172: x_msg_data := fnd_message.get;
173: return;
174: end if;

Line 204: x_return_status := FND_API.G_RET_STS_SUCCESS;

200: --
201: when others then
202: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90)
203: ||' - This is just a warning message which can be ignored.';
204: x_return_status := FND_API.G_RET_STS_SUCCESS;
205: end;
206:
207:
208: END LOOP;

Line 210: x_return_status := FND_API.G_RET_STS_SUCCESS;

206:
207:
208: END LOOP;
209:
210: x_return_status := FND_API.G_RET_STS_SUCCESS;
211:
212: EXCEPTION
213: WHEN others THEN
214: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 214: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

210: x_return_status := FND_API.G_RET_STS_SUCCESS;
211:
212: EXCEPTION
213: WHEN others THEN
214: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
215:
216:
217: END clean_partition_pvt;
218:

Line 255: x_return_status := FND_API.G_RET_STS_ERROR;

251: --
252: -- get fnd schema name
253: --
254: if (FND_INSTALLATION.GET_APP_INFO('FND',dummy1,dummy2,l_applsys_schema) = FALSE) then
255: x_return_status := FND_API.G_RET_STS_ERROR;
256: fnd_message.set_name('MSC','MSC_PART_UNDEFINED_SCHEMA');
257: x_msg_data := fnd_message.get;
258: return;
259: end if;

Line 271: x_return_status := FND_API.G_RET_STS_ERROR;

267: --- error occured during partition creation in summary tables
268: --- Since partitions are not created for lower plan IDs successfully, partition
269: --- for higher plan ID will not be created
270: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
271: x_return_status := FND_API.G_RET_STS_ERROR;
272: return;
273: END IF;
274:
275: part_created := 1;

Line 339: x_return_status := FND_API.G_RET_STS_SUCCESS;

335: part_created := part_created +1;
336:
337: END LOOP;
338: --dbms_output.put_line('****returning success****'||x_msg_data);
339: x_return_status := FND_API.G_RET_STS_SUCCESS;
340:
341: EXCEPTION
342: --
343: -- could not create partition

Line 352: x_return_status := FND_API.G_RET_STS_ERROR;

348: -- fnd_message.set_name('MSC','MSC_PART_CREATE_FAILED');
349: -- fnd_message.set_token('PARTITION',l_partition_name);
350: -- x_msg_data := fnd_message.get;
351: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
352: x_return_status := FND_API.G_RET_STS_ERROR;
353:
354: --
355: -- if partitions were created partially then remove the ones
356: -- that were successful so that we can exit in a clean state

Line 415: x_return_status := FND_API.G_RET_STS_ERROR;

411: --
412: -- get fnd schema name
413: --
414: if (FND_INSTALLATION.GET_APP_INFO('FND',dummy1,dummy2,l_applsys_schema) = FALSE) then
415: x_return_status := FND_API.G_RET_STS_ERROR;
416: fnd_message.set_name('MSC','MSC_PART_UNDEFINED_SCHEMA');
417: x_msg_data := fnd_message.get;
418: return;
419: end if;

Line 431: x_return_status := FND_API.G_RET_STS_ERROR;

427: --- error occured during partition creation in summary tables
428: --- Since partitions are not created for lower instance IDs successfully, partition
429: --- for higher instnaces will not be created
430: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
431: x_return_status := FND_API.G_RET_STS_ERROR;
432: return;
433: END IF;
434:
435:

Line 499: x_return_status := FND_API.G_RET_STS_SUCCESS;

495: );
496:
497: COMMIT;
498:
499: x_return_status := FND_API.G_RET_STS_SUCCESS;
500:
501: EXCEPTION
502: --
503: -- could not create partition

Line 512: x_return_status := FND_API.G_RET_STS_ERROR;

508: -- fnd_message.set_name('MSC','MSC_PART_CREATE_FAILED');
509: -- fnd_message.set_token('PARTITION',l_partition_name);
510: -- x_msg_data := fnd_message.get;
511: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
512: x_return_status := FND_API.G_RET_STS_ERROR;
513:
514: --
515: -- if partitions were created partially then remove the ones
516: -- that were successful so that we can exit in a clean state

Line 586: x_return_status := FND_API.G_RET_STS_SUCCESS;

582: BEGIN
583:
584: -- set return status
585:
586: x_return_status := FND_API.G_RET_STS_SUCCESS;
587:
588: --
589: -- check if plans are sharing partitions
590: --

Line 614: x_return_status := FND_API.G_RET_STS_ERROR;

610: -- partitions on the fly. Hence, return error. Partitions
611: -- should be created by the system dba because that involves
612: -- analyzing as well as recompiling db objects
613:
614: x_return_status := FND_API.G_RET_STS_ERROR;
615: fnd_message.set_name('MSC','MSC_NO_FREE_PARTITION');
616: x_msg_data := fnd_message.get;
617: l_plan_id := -1; --return -1;
618: EXIT;

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

636:
637: --
638: -- if could not create partition then return error
639: --
640: if (x_return_status = FND_API.G_RET_STS_ERROR) then
641: l_plan_id := -1;
642: return l_plan_id;
643: end if;
644:

Line 678: x_return_status := FND_API.G_RET_STS_ERROR;

674: -- drop the partitions that were created in this run so
675: -- as to ensure a clean exit
676: --
677: clean_partition_pvt(l_plan_id,MAXVALUE,1,'drop',x_return_status, x_msg_data);
678: x_return_status := FND_API.G_RET_STS_ERROR;
679: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
680: l_plan_id := -1;
681: return l_plan_id;
682: end;*/

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

685: -- found a free plan. update it's name
686: --
687: -- dbms_output.put_line('Found a free plan'||p_plan_name);
688: BEGIN
689: if check_partition_pvt(l_plan_id) = FND_API.G_RET_STS_SUCCESS then
690: UPDATE MSC_PLAN_PARTITIONS
691: SET plan_name = p_plan_name,
692: free_flag = 2
693: WHERE plan_id = l_plan_id;

Line 703: x_return_status := FND_API.G_RET_STS_ERROR;

699: WHERE plan_id = l_plan_id;
700: END IF;
701: EXCEPTION
702: WHEN OTHERS THEN
703: x_return_status := FND_API.G_RET_STS_ERROR;
704: --fnd_message.set_name('MSC','MSC_PART_UPDATE_FAILED');
705: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
706: -- fnd_message.get;
707: l_plan_id := -1;

Line 718: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

714:
715: EXCEPTION WHEN others THEN
716:
717:
718: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
719: l_plan_id := -1;
720: return l_plan_id;
721:
722: END get_plan;

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

741:
742: --
743: -- break if partition creation fails
744: --
745: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then
746: exit;
747: end if;
748:
749: INSERT INTO MSC_INST_PARTITIONS (

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

768: commit;
769:
770: END LOOP;
771:
772: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
773: retcode := G_SUCCESS;
774: else
775: retcode := G_ERROR;
776: end if;

Line 799: x_return_status := FND_API.G_RET_STS_SUCCESS;

795: l_inst_id NUMBER:= NULL;
796:
797: BEGIN
798: -- set return status
799: x_return_status := FND_API.G_RET_STS_SUCCESS;
800:
801: -- find free instance
802: OPEN C_FREE_INSTANCE;
803: FETCH C_FREE_INSTANCE INTO l_inst_id;

Line 813: x_return_status := FND_API.G_RET_STS_ERROR;

809: -- cannot create an instance partition dynamically.
810: -- the sysadmin will have to create them
811: --
812: fnd_message.set_name('MSC','MSC_NO_FREE_PARTITION');
813: x_return_status := FND_API.G_RET_STS_ERROR;
814: x_msg_data := fnd_message.get;
815: return -1;
816:
817: /*

Line 824: if x_return_status = FND_API.G_RET_STS_ERROR THEN

820: FROM DUAL;
821:
822: create_inst_partitions_pvt( l_inst_id,x_return_status,x_msg_data);
823:
824: if x_return_status = FND_API.G_RET_STS_ERROR THEN
825: return -1;
826: end if;
827: */
828:

Line 841: x_return_status := FND_API.G_RET_STS_ERROR;

837: WHERE instance_id = l_inst_id;
838:
839: exception
840: when others then
841: x_return_status := FND_API.G_RET_STS_ERROR;
842: --fnd_message.set_name('MSC','MSC_PART_UPDATE_FAILED');
843: x_msg_data := to_char(sqlcode) ||':'|| substr(sqlerrm,1,90);
844: -- fnd_message.get;
845: l_inst_id := -1;

Line 852: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

848:
849: return l_inst_id;
850:
851: EXCEPTION WHEN others THEN
852: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
853: l_inst_id := -1;
854: return l_inst_id;
855:
856: END get_instance;

Line 908: x_return_status := FND_API.G_RET_STS_ERROR;

904: CLOSE Instance_exists_C;
905: end if;
906:
907: if (l_count <> 1) then
908: x_return_status := FND_API.G_RET_STS_ERROR;
909: x_msg_data := to_char(l_id) || 'Id does not exist';
910: return;
911: end if;
912:

Line 925: x_return_status := FND_API.G_RET_STS_SUCCESS;

921:
922: P_partition_name := partitioned_tables(i) || '__' || to_char(P_instance_id);
923: end if;
924:
925: x_return_status := FND_API.G_RET_STS_SUCCESS;
926: return;
927: end if;
928: END LOOP;
929:

Line 930: x_return_status := FND_API.G_RET_STS_ERROR;

926: return;
927: end if;
928: END LOOP;
929:
930: x_return_status := FND_API.G_RET_STS_ERROR;
931: x_msg_data := P_table_name || ' is not partitioned';
932: return;
933: END get_partition_name;
934:

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

940: x_msg_data OUT NOCOPY VARCHAR2) IS
941: BEGIN
942: clean_partition_pvt(P_plan_id,MAXVALUE,1,'truncate', x_return_status, x_msg_data);
943:
944: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
945: begin
946:
947: UPDATE MSC_PLAN_PARTITIONS
948: SET free_flag = 1

Line 952: x_return_status := FND_API.G_RET_STS_ERROR;

948: SET free_flag = 1
949: WHERE plan_id = P_plan_id;
950: exception
951: when others then
952: x_return_status := FND_API.G_RET_STS_ERROR;
953: fnd_message.set_name('MSC','MSC_PART_UPDATE_FAILED');
954: x_msg_data := fnd_message.get;
955: return;
956: end;

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

975: end if;
976:
977: -- dbms_output.put_line('return status was '||x_return_status||' '||errbuf);
978:
979: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
980: retcode := G_SUCCESS;
981: else
982: retcode := G_ERROR;
983: end if;

Line 1050: x_return_status := FND_API.G_RET_STS_ERROR;

1046: else
1047: clean_partition_pvt(-1,partition_num,2,'drop',x_return_status, errbuf);
1048: end if;
1049:
1050: x_return_status := FND_API.G_RET_STS_ERROR;
1051: fnd_message.set_name('MSC','MSC_PART_INSERT_FAILED');
1052: errbuf := fnd_message.get;
1053: retcode := to_number(x_return_status);
1054: end;

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

1075: else
1076: clean_partition_pvt(-1,partition_num,2,'drop', x_return_status, errbuf);
1077: end if;
1078:
1079: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1080: retcode := G_SUCCESS;
1081: else
1082: retcode := G_ERROR;
1083: end if;

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

1114:
1115:
1116: l_plan_id NUMBER;
1117: l_plan_name VARCHAR(100);
1118: x_return_status VARCHAR2(10) := FND_API.G_RET_STS_SUCCESS;
1119: share_partition VARCHAR2(1);
1120: plan_exists BOOLEAN := FALSE;
1121: i NUMBER;
1122: BEGIN

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

1128: share_partition := fnd_profile.value('MSC_SHARE_PARTITIONS');
1129: -- dbms_output.put_line('share_partition := '||share_partition);
1130: if (share_partition = 'Y') then
1131: create_partition_pvt(PMAXVALUE,MAXVALUE,x_return_status,errbuf);
1132: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1133: retcode := G_SUCCESS;
1134: else
1135: retcode := G_ERROR;
1136: end if;

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

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

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

1206:
1207: --
1208: -- break if partition creation fails
1209: --
1210: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then
1211: exit;
1212: end if;
1213:
1214: INSERT INTO MSC_PLAN_PARTITIONS (

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

1238:
1239: END LOOP;
1240: end if;
1241:
1242: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1243: retcode := G_SUCCESS;
1244: else
1245: retcode := G_ERROR;
1246: end if;

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

1297: FROM MSC_apps_instances
1298: ORDER BY instance_id;
1299:
1300: l_instance_id NUMBER;
1301: x_return_status VARCHAR2(10) := FND_API.G_RET_STS_SUCCESS;
1302: instance_exists BOOLEAN := FALSE;
1303: BEGIN
1304:
1305: OPEN C_INSTANCE;

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

1321:
1322: --
1323: -- break if partition creation fails
1324: --
1325: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then
1326: exit;
1327: end if;
1328:
1329: commit;

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

1349: --
1350: -- update msc_inst_partitions to mark the partition
1351: -- as free since the pvt api defaults it to used.
1352: --
1353: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1354: UPDATE MSC_INST_PARTITIONS
1355: SET free_flag = 1
1356: WHERE instance_id = l_instance_id;
1357: end if;

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

1358:
1359: commit;
1360: end if;
1361:
1362: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1363: retcode := G_SUCCESS;
1364: else
1365: retcode := G_ERROR;
1366: end if;

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

1562: -- dbms_output.put_line('share partitions :='||share_partition);
1563: if (share_partition = 'Y' and plan_partition_count > 0) then
1564: create_partition_pvt(PMAXVALUE,MAXVALUE,x_return_status,errbuf);
1565: analyze_plan(errbuf,retcode,PMAXVALUE);
1566: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1567: retcode := G_SUCCESS;
1568: else
1569: retcode := G_ERROR;
1570: end if;

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

1586:
1587: --
1588: -- if could not create partition then return error
1589: --
1590: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then
1591: retcode := G_ERROR;
1592: return;
1593: else
1594: retcode := G_SUCCESS;

Line 1656: if x_return_status = FND_API.G_RET_STS_ERROR THEN

1652: FROM DUAL;
1653:
1654: create_inst_partitions_pvt( l_inst_id,x_return_status,errbuf);
1655:
1656: if x_return_status = FND_API.G_RET_STS_ERROR THEN
1657: retcode := G_ERROR;
1658: return;
1659: end if;
1660: --

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

1660: --
1661: -- update msc_inst_partitions to mark the partition
1662: -- as free since the pvt api defaults it to used.
1663: --
1664: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
1665: UPDATE MSC_INST_PARTITIONS
1666: SET free_flag = 1
1667: WHERE instance_id = l_inst_id;
1668: end if;