321: end if;
322:
323: x_cust_plan_id := p_csc_cust_plans_rec.cust_plan_id;
324:
325: -- Invoke table handler(CSC_CUST_PLANS_PKG.Insert_Row)
326: CSC_CUST_PLANS_PKG.Insert_Row(
327: px_CUST_PLAN_ID => x_CUST_PLAN_ID,
328: p_PLAN_ID => p_CSC_CUST_PLANS_rec.PLAN_ID,
329: p_PARTY_ID => p_CSC_CUST_PLANS_rec.PARTY_ID,
322:
323: x_cust_plan_id := p_csc_cust_plans_rec.cust_plan_id;
324:
325: -- Invoke table handler(CSC_CUST_PLANS_PKG.Insert_Row)
326: CSC_CUST_PLANS_PKG.Insert_Row(
327: px_CUST_PLAN_ID => x_CUST_PLAN_ID,
328: p_PLAN_ID => p_CSC_CUST_PLANS_rec.PLAN_ID,
329: p_PARTY_ID => p_CSC_CUST_PLANS_rec.PARTY_ID,
330: p_CUST_ACCOUNT_ID => p_CSC_CUST_PLANS_rec.CUST_ACCOUNT_ID,
611:
612: -- Initialize API return status to SUCCESS
613: x_return_status := FND_API.G_RET_STS_SUCCESS;
614:
615: CSC_CUST_PLANS_PKG.Lock_Row(
616: p_CUST_PLAN_ID => p_csc_cust_plans_rec.cust_plan_id,
617: p_PLAN_ID => p_csc_cust_plans_rec.plan_id,
618: p_PARTY_ID => p_csc_cust_plans_rec.party_id,
619: P_CUST_ACCOUNT_ID => p_csc_cust_plans_rec.cust_account_id,
740: RAISE FND_API.G_EXC_ERROR;
741: END IF;
742: END IF;
743:
744: -- Invoke table handler(CSC_CUST_PLANS_PKG.Update_Row)
745: CSC_CUST_PLANS_PKG.Update_Row(
746: p_CUST_PLAN_ID => l_upd_csc_cust_plans_rec.CUST_PLAN_ID,
747: p_PLAN_ID => l_upd_csc_cust_plans_rec.PLAN_ID,
748: p_PARTY_ID => l_upd_csc_cust_plans_rec.PARTY_ID,
741: END IF;
742: END IF;
743:
744: -- Invoke table handler(CSC_CUST_PLANS_PKG.Update_Row)
745: CSC_CUST_PLANS_PKG.Update_Row(
746: p_CUST_PLAN_ID => l_upd_csc_cust_plans_rec.CUST_PLAN_ID,
747: p_PLAN_ID => l_upd_csc_cust_plans_rec.PLAN_ID,
748: p_PARTY_ID => l_upd_csc_cust_plans_rec.PARTY_ID,
749: p_CUST_ACCOUNT_ID => l_upd_csc_cust_plans_rec.CUST_ACCOUNT_ID,
924:
925:
926: /******************* using regular update procedure
927:
928: CSC_CUST_PLANS_PKG.LOCK_ROW (
929: p_plan_id => p_plan_id,
930: p_party_id => p_party_id_tbl(i).party_id,
931: p_cust_account_id => p_party_id_tbl(i).cust_account_id,
932: -- p_cust_account_org => p_party_id_tbl(i).cust_account_org,
1020: end loop;
1021:
1022: /******* using regular update procedure to take of audit insert
1023:
1024: CSC_CUST_PLANS_PKG.LOCK_ROW (
1025: p_plan_id => p_plan_id,
1026: p_party_id => p_party_id_tbl(i).party_id,
1027: p_cust_account_id => p_party_id_tbl(i).cust_account_id,
1028: -- p_cust_account_org => p_party_id_tbl(i).cust_account_org,
1119: raise FND_API.G_EXC_ERROR;
1120: END IF;
1121: close c1;
1122:
1123: CSC_CUST_PLANS_PKG.LOCK_ROW(
1124: p_plan_id => p_original_plan_id,
1125: p_party_id => p_party_id,
1126: p_cust_account_id => p_cust_account_id,
1127: -- p_cust_account_org => p_cust_account_org,
1246: raise no_data_found;
1247: end if;
1248: close c1;
1249:
1250: -- Invoke table handler(CSC_CUST_PLANS_PKG.Delete_Row)
1251: CSC_CUST_PLANS_PKG.Delete_Row(
1252: p_CUST_PLAN_ID => p_CUST_PLAN_ID);
1253:
1254: -- Insert row into CSC_CUST_PLANS_AUDIT table with the selected cursor values
1247: end if;
1248: close c1;
1249:
1250: -- Invoke table handler(CSC_CUST_PLANS_PKG.Delete_Row)
1251: CSC_CUST_PLANS_PKG.Delete_Row(
1252: p_CUST_PLAN_ID => p_CUST_PLAN_ID);
1253:
1254: -- Insert row into CSC_CUST_PLANS_AUDIT table with the selected cursor values
1255: -- and with PLAN_STATUS_CODE = 'DELETED';