1071: Close temp_plan_exist_Cur;
1072: end if;
1073: retcode := 2;
1074: if v_lookup_name is not null then
1075: fnd_message.set_name('MSC',v_lookup_name);
1076: fnd_message.set_token('PLAN_NAME',v_rec_c1.compile_designator);
1077: errbuf := fnd_message.get;
1078: end if;
1079: when OTHERS THEN
1072: end if;
1073: retcode := 2;
1074: if v_lookup_name is not null then
1075: fnd_message.set_name('MSC',v_lookup_name);
1076: fnd_message.set_token('PLAN_NAME',v_rec_c1.compile_designator);
1077: errbuf := fnd_message.get;
1078: end if;
1079: when OTHERS THEN
1080: retcode := 2;
1073: retcode := 2;
1074: if v_lookup_name is not null then
1075: fnd_message.set_name('MSC',v_lookup_name);
1076: fnd_message.set_token('PLAN_NAME',v_rec_c1.compile_designator);
1077: errbuf := fnd_message.get;
1078: end if;
1079: when OTHERS THEN
1080: retcode := 2;
1081: errbuf := sqlerrm;
1176: open plan_name_cur(p_org_plan_id);
1177: fetch plan_name_cur into v_org_plan_name_Cur;
1178: if plan_name_Cur%notfound then
1179: retcode := 2;
1180: fnd_message.set_name('MSC','MSC_X_API_INVALID_PLAN_NAME');
1181: errbuf := fnd_message.get;
1182: raise error_deletion;
1183: END IF;
1184: close plan_name_cur;
1177: fetch plan_name_cur into v_org_plan_name_Cur;
1178: if plan_name_Cur%notfound then
1179: retcode := 2;
1180: fnd_message.set_name('MSC','MSC_X_API_INVALID_PLAN_NAME');
1181: errbuf := fnd_message.get;
1182: raise error_deletion;
1183: END IF;
1184: close plan_name_cur;
1185:
1192: fetch plan_name_cur into v_temp_plan_name_Cur;
1193: if plan_name_Cur%notfound or v_temp_plan_name_cur.plan_completion_date is null
1194: or p_org_plan_id <> v_temp_plan_name_cur.copy_plan_id then
1195: retcode := 2;
1196: fnd_message.set_name('MSC','MSC_X_API_INVALID_PLAN_NAME');
1197: errbuf := fnd_message.get;
1198: close plan_name_cur;
1199: raise error_deletion;
1200: end if;
1193: if plan_name_Cur%notfound or v_temp_plan_name_cur.plan_completion_date is null
1194: or p_org_plan_id <> v_temp_plan_name_cur.copy_plan_id then
1195: retcode := 2;
1196: fnd_message.set_name('MSC','MSC_X_API_INVALID_PLAN_NAME');
1197: errbuf := fnd_message.get;
1198: close plan_name_cur;
1199: raise error_deletion;
1200: end if;
1201: close plan_name_cur;
1203: open desig_cur(p_temp_plan_id);
1204: fetch desig_cur into v_temp_desig_cur;
1205: if desig_cur%notfound then
1206: retcode:= 2;
1207: fnd_message.set_name('MSC','MSC_X_API_INVALID_PLAN_NAME');
1208: errbuf := fnd_message.get;
1209: close desig_cur;
1210: raise error_deletion;
1211: end if;
1204: fetch desig_cur into v_temp_desig_cur;
1205: if desig_cur%notfound then
1206: retcode:= 2;
1207: fnd_message.set_name('MSC','MSC_X_API_INVALID_PLAN_NAME');
1208: errbuf := fnd_message.get;
1209: close desig_cur;
1210: raise error_deletion;
1211: end if;
1212: close desig_cur;
1890: EXCEPTION
1891: when v_ex_error_plan_launch then
1892: retcode := 2;
1893: if v_lookup_name is not null then
1894: fnd_message.set_name('MSC',v_lookup_name);
1895: fnd_message.set_token('PLAN_NAME',v_rec_c1.compile_designator);
1896: errbuf := fnd_message.get;
1897: end if;
1898: when OTHERS THEN
1891: when v_ex_error_plan_launch then
1892: retcode := 2;
1893: if v_lookup_name is not null then
1894: fnd_message.set_name('MSC',v_lookup_name);
1895: fnd_message.set_token('PLAN_NAME',v_rec_c1.compile_designator);
1896: errbuf := fnd_message.get;
1897: end if;
1898: when OTHERS THEN
1899: retcode := 2;
1892: retcode := 2;
1893: if v_lookup_name is not null then
1894: fnd_message.set_name('MSC',v_lookup_name);
1895: fnd_message.set_token('PLAN_NAME',v_rec_c1.compile_designator);
1896: errbuf := fnd_message.get;
1897: end if;
1898: when OTHERS THEN
1899: retcode := 2;
1900: errbuf := sqlerrm;