538: --
539: cursor csr_get_budget_rowid is
540: select pb.rowid row_id
541: from PER_BUDGETS pb
542: where ota_tmt_shd.g_old_rec.tp_measurement_code = pb.unit
543: and ota_tmt_shd.g_old_rec.business_group_id = pb.business_group_id
544: and ota_tmt_shd.g_old_rec.tp_measurement_type_id = p_tp_measurement_type_id
545: and pb.budget_type_code = 'OTA_BUDGET';
546: --
539: cursor csr_get_budget_rowid is
540: select pb.rowid row_id
541: from PER_BUDGETS pb
542: where ota_tmt_shd.g_old_rec.tp_measurement_code = pb.unit
543: and ota_tmt_shd.g_old_rec.business_group_id = pb.business_group_id
544: and ota_tmt_shd.g_old_rec.tp_measurement_type_id = p_tp_measurement_type_id
545: and pb.budget_type_code = 'OTA_BUDGET';
546: --
547: cursor csr_get_budget_version_rowid is
540: select pb.rowid row_id
541: from PER_BUDGETS pb
542: where ota_tmt_shd.g_old_rec.tp_measurement_code = pb.unit
543: and ota_tmt_shd.g_old_rec.business_group_id = pb.business_group_id
544: and ota_tmt_shd.g_old_rec.tp_measurement_type_id = p_tp_measurement_type_id
545: and pb.budget_type_code = 'OTA_BUDGET';
546: --
547: cursor csr_get_budget_version_rowid is
548: select pbv.rowid row_id
547: cursor csr_get_budget_version_rowid is
548: select pbv.rowid row_id
549: from PER_BUDGETS pb
550: ,PER_BUDGET_VERSIONS pbv
551: where ota_tmt_shd.g_old_rec.tp_measurement_code = pb.unit
552: and ota_tmt_shd.g_old_rec.business_group_id = pb.business_group_id
553: and ota_tmt_shd.g_old_rec.tp_measurement_type_id = p_tp_measurement_type_id
554: and pb.budget_id = pbv.budget_id
555: and pb.budget_type_code = 'OTA_BUDGET';
548: select pbv.rowid row_id
549: from PER_BUDGETS pb
550: ,PER_BUDGET_VERSIONS pbv
551: where ota_tmt_shd.g_old_rec.tp_measurement_code = pb.unit
552: and ota_tmt_shd.g_old_rec.business_group_id = pb.business_group_id
553: and ota_tmt_shd.g_old_rec.tp_measurement_type_id = p_tp_measurement_type_id
554: and pb.budget_id = pbv.budget_id
555: and pb.budget_type_code = 'OTA_BUDGET';
556: --
549: from PER_BUDGETS pb
550: ,PER_BUDGET_VERSIONS pbv
551: where ota_tmt_shd.g_old_rec.tp_measurement_code = pb.unit
552: and ota_tmt_shd.g_old_rec.business_group_id = pb.business_group_id
553: and ota_tmt_shd.g_old_rec.tp_measurement_type_id = p_tp_measurement_type_id
554: and pb.budget_id = pbv.budget_id
555: and pb.budget_type_code = 'OTA_BUDGET';
556: --
557: begin