DBA Data[Home] [Help]

APPS.AHL_UC_UTILIZATION_PVT dependencies on CS_COUNTERS

Line 385: CURSOR cs_counters_csr (c_counter_id NUMBER) IS

381: WHERE instance_id = c_instance_id
382: AND TRUNC(sysdate) < TRUNC(NVL(active_end_date, sysdate+1));
383:
384: -- Validate Counter ID.
385: CURSOR cs_counters_csr (c_counter_id NUMBER) IS
386: SELECT cgrp.source_object_id
387: FROM cs_counters ctr, cs_counter_groups cgrp
388: WHERE cgrp.counter_group_id = ctr.counter_group_id
389: AND cgrp.source_object_code = 'CP'

Line 387: FROM cs_counters ctr, cs_counter_groups cgrp

383:
384: -- Validate Counter ID.
385: CURSOR cs_counters_csr (c_counter_id NUMBER) IS
386: SELECT cgrp.source_object_id
387: FROM cs_counters ctr, cs_counter_groups cgrp
388: WHERE cgrp.counter_group_id = ctr.counter_group_id
389: AND cgrp.source_object_code = 'CP'
390: AND ctr.counter_id = c_counter_id
391: AND trunc(sysdate) >= trunc(nvl(ctr.start_date_active,sysdate))

Line 414: FROM cs_counters ctr

410:
411: -- Validate counter name.
412: CURSOR cs_counter_name_csr(c_counter_name VARCHAR2) IS
413: SELECT 'X'
414: FROM cs_counters ctr
415: WHERE ctr.name = c_counter_name
416: AND trunc(sysdate) >= trunc(nvl(ctr.start_date_active,sysdate))
417: AND trunc(sysdate) < trunc(nvl(ctr.end_date_active,sysdate+1));
418:

Line 463: OPEN cs_counters_csr(p_utilization_rec.counter_id);

459:
460: -- Check if counter_id is valid.
461: IF (p_utilization_rec.counter_id IS NOT NULL) AND
462: (p_utilization_rec.counter_id <> FND_API.G_MISS_NUM) THEN
463: OPEN cs_counters_csr(p_utilization_rec.counter_id);
464: FETCH cs_counters_csr INTO l_csi_item_instance_id;
465: IF (cs_counters_csr%NOTFOUND) THEN
466: FND_MESSAGE.set_name('AHL','AHL_UC_CSCTR_INVALID');
467: FND_MESSAGE.set_token('CTRID',p_utilization_rec.counter_id);

Line 464: FETCH cs_counters_csr INTO l_csi_item_instance_id;

460: -- Check if counter_id is valid.
461: IF (p_utilization_rec.counter_id IS NOT NULL) AND
462: (p_utilization_rec.counter_id <> FND_API.G_MISS_NUM) THEN
463: OPEN cs_counters_csr(p_utilization_rec.counter_id);
464: FETCH cs_counters_csr INTO l_csi_item_instance_id;
465: IF (cs_counters_csr%NOTFOUND) THEN
466: FND_MESSAGE.set_name('AHL','AHL_UC_CSCTR_INVALID');
467: FND_MESSAGE.set_token('CTRID',p_utilization_rec.counter_id);
468: FND_MSG_PUB.add;

Line 465: IF (cs_counters_csr%NOTFOUND) THEN

461: IF (p_utilization_rec.counter_id IS NOT NULL) AND
462: (p_utilization_rec.counter_id <> FND_API.G_MISS_NUM) THEN
463: OPEN cs_counters_csr(p_utilization_rec.counter_id);
464: FETCH cs_counters_csr INTO l_csi_item_instance_id;
465: IF (cs_counters_csr%NOTFOUND) THEN
466: FND_MESSAGE.set_name('AHL','AHL_UC_CSCTR_INVALID');
467: FND_MESSAGE.set_token('CTRID',p_utilization_rec.counter_id);
468: FND_MSG_PUB.add;
469: --dbms_output.put_line('Counter ID not found');

Line 487: CLOSE cs_counters_csr;

483: l_tmp_instance_id := l_csi_item_instance_id;
484: END IF; -- csi not found.
485: CLOSE csi_item_instances_csr;
486: END IF;
487: CLOSE cs_counters_csr;
488: END IF;
489: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
490: FND_LOG.STRING(G_LEVEL_STATEMENT,
491: L_DEBUG_KEY,

Line 987: l_uom_code cs_counters.uom_code%TYPE;

983: l_utilization_rec utilization_rec_type;
984: l_ratio NUMBER;
985: l_reading_value NUMBER;
986: l_start_current_value NUMBER;
987: l_uom_code cs_counters.uom_code%TYPE;
988:
989: l_ctr_grp_log_rec CS_CTR_CAPTURE_READING_PUB.ctr_grp_log_rec_type;
990: l_ctr_rdg_tbl CS_CTR_CAPTURE_READING_PUB.ctr_rdg_tbl_type;
991: l_prop_rdg_tbl CS_CTR_CAPTURE_READING_PUB.prop_rdg_tbl_type;

Line 1195: Cannot use cs_counters and cs_counter_groups anymore **/

1191:
1192: PROCEDURE update_reading_cn(p_utilization_rec IN utilization_rec_type) IS
1193: TYPE instance_tbl_type IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
1194: /** Begin changes by jaramana on October 29, 2007 for bug 6513576
1195: Cannot use cs_counters and cs_counter_groups anymore **/
1196: -- Cursor changed by jaramana on 03-DEC-2008 for bug 7426643 (FP of 7263702)
1197: -- Removed the use of csi_cp_counters_v
1198: CURSOR get_components_counter(c_instance_id NUMBER, c_counter_name VARCHAR2) IS
1199: SELECT CI.subject_id

Line 1203: FROM cs_counters CC,

1199: SELECT CI.subject_id
1200: FROM csi_ii_relationships CI
1201: WHERE EXISTS (SELECT 'X'
1202: /*
1203: FROM cs_counters CC,
1204: cs_counter_groups CG
1205: WHERE CC.counter_group_id = CG.counter_group_id
1206: AND CG.source_object_id = CI.subject_id
1207: AND CG.source_object_code = 'CP'

Line 1253: CURSOR cs_counters_name_csr(c_csi_item_instance_id NUMBER, c_name VARCHAR2) IS

1249: AND trunc(nvl(active_end_date,sysdate+1)) > trunc(sysdate)
1250: AND relationship_type_code = 'COMPONENT-OF';
1251:
1252: -- Get counters that match on a given counter name.
1253: CURSOR cs_counters_name_csr(c_csi_item_instance_id NUMBER, c_name VARCHAR2) IS
1254: /*
1255: SELECT ctr.name counter_name, ctr.counter_id, ctr.uom_code, cgrp.counter_group_id
1256: FROM cs_counter_groups cgrp, cs_counters ctr
1257: WHERE cgrp.counter_group_id = ctr.counter_group_id

Line 1256: FROM cs_counter_groups cgrp, cs_counters ctr

1252: -- Get counters that match on a given counter name.
1253: CURSOR cs_counters_name_csr(c_csi_item_instance_id NUMBER, c_name VARCHAR2) IS
1254: /*
1255: SELECT ctr.name counter_name, ctr.counter_id, ctr.uom_code, cgrp.counter_group_id
1256: FROM cs_counter_groups cgrp, cs_counters ctr
1257: WHERE cgrp.counter_group_id = ctr.counter_group_id
1258: AND cgrp.source_object_code = 'CP'
1259: AND cgrp.source_object_id = c_csi_item_instance_id
1260: AND ctr.name = c_name

Line 1271: l_cs_counters_name_csr cs_counters_name_csr%ROWTYPE;

1267: AND CCCV.COUNTER_TEMPLATE_NAME = c_name
1268: AND trunc(nvl(CCCV.start_date_active, sysdate)) <= trunc(sysdate)
1269: AND trunc(nvl(CCCV.end_date_active, sysdate+1)) > trunc(sysdate);
1270: /** End changes by jaramana on October 29, 2007 for bug 6513576 **/
1271: l_cs_counters_name_csr cs_counters_name_csr%ROWTYPE;
1272:
1273: -- Get current counter reading values based on the counter_id
1274: -- Cursor get_current_value_id commented out by jaramana on on June 13, 2007
1275: -- while fixing bug 6123549 since this cursor is not used in this procedure at all.

Line 1306: OPEN cs_counters_name_csr(l_utilization_rec.csi_item_instance_id,

1302: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) THEN
1303: FND_LOG.STRING(G_LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Entering Procedure');
1304: END IF;
1305: l_utilization_rec := p_utilization_rec;
1306: OPEN cs_counters_name_csr(l_utilization_rec.csi_item_instance_id,
1307: l_utilization_rec.counter_name);
1308: FETCH cs_counters_name_csr INTO l_cs_counters_name_csr;
1309: IF cs_counters_name_csr%FOUND THEN
1310: --p_utilization_rec.uom_code := l_cs_counters_name_csr.uom_code;

Line 1308: FETCH cs_counters_name_csr INTO l_cs_counters_name_csr;

1304: END IF;
1305: l_utilization_rec := p_utilization_rec;
1306: OPEN cs_counters_name_csr(l_utilization_rec.csi_item_instance_id,
1307: l_utilization_rec.counter_name);
1308: FETCH cs_counters_name_csr INTO l_cs_counters_name_csr;
1309: IF cs_counters_name_csr%FOUND THEN
1310: --p_utilization_rec.uom_code := l_cs_counters_name_csr.uom_code;
1311: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
1312: FND_LOG.STRING(G_LEVEL_STATEMENT,

Line 1309: IF cs_counters_name_csr%FOUND THEN

1305: l_utilization_rec := p_utilization_rec;
1306: OPEN cs_counters_name_csr(l_utilization_rec.csi_item_instance_id,
1307: l_utilization_rec.counter_name);
1308: FETCH cs_counters_name_csr INTO l_cs_counters_name_csr;
1309: IF cs_counters_name_csr%FOUND THEN
1310: --p_utilization_rec.uom_code := l_cs_counters_name_csr.uom_code;
1311: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
1312: FND_LOG.STRING(G_LEVEL_STATEMENT,
1313: L_DEBUG_KEY,

Line 1310: --p_utilization_rec.uom_code := l_cs_counters_name_csr.uom_code;

1306: OPEN cs_counters_name_csr(l_utilization_rec.csi_item_instance_id,
1307: l_utilization_rec.counter_name);
1308: FETCH cs_counters_name_csr INTO l_cs_counters_name_csr;
1309: IF cs_counters_name_csr%FOUND THEN
1310: --p_utilization_rec.uom_code := l_cs_counters_name_csr.uom_code;
1311: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
1312: FND_LOG.STRING(G_LEVEL_STATEMENT,
1313: L_DEBUG_KEY,
1314: 'cs_counters_name_csr%FOUND. Calling update_reading_ins');

Line 1314: 'cs_counters_name_csr%FOUND. Calling update_reading_ins');

1310: --p_utilization_rec.uom_code := l_cs_counters_name_csr.uom_code;
1311: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
1312: FND_LOG.STRING(G_LEVEL_STATEMENT,
1313: L_DEBUG_KEY,
1314: 'cs_counters_name_csr%FOUND. Calling update_reading_ins');
1315: END IF;
1316: update_reading_ins(l_utilization_rec);
1317: CLOSE cs_counters_name_csr;
1318: ELSE

Line 1317: CLOSE cs_counters_name_csr;

1313: L_DEBUG_KEY,
1314: 'cs_counters_name_csr%FOUND. Calling update_reading_ins');
1315: END IF;
1316: update_reading_ins(l_utilization_rec);
1317: CLOSE cs_counters_name_csr;
1318: ELSE
1319: CLOSE cs_counters_name_csr;
1320: IF (NVL(l_utilization_rec.delta_flag, 'N') = 'N') THEN
1321: --The start instance doesn't have the given counter associated, reading value is

Line 1319: CLOSE cs_counters_name_csr;

1315: END IF;
1316: update_reading_ins(l_utilization_rec);
1317: CLOSE cs_counters_name_csr;
1318: ELSE
1319: CLOSE cs_counters_name_csr;
1320: IF (NVL(l_utilization_rec.delta_flag, 'N') = 'N') THEN
1321: --The start instance doesn't have the given counter associated, reading value is
1322: --net reading but the counter doesn't exists for the start instance
1323: --So raise error and return, no need to go further down.

Line 1335: 'cs_counters_name_csr%FOUND is false. l_utilization_rec.delta_flag is Y and l_utilization_rec.cascade_flag is Y');

1331: --have the given counter associated but their ancestors don't.
1332: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
1333: FND_LOG.STRING(G_LEVEL_STATEMENT,
1334: L_DEBUG_KEY,
1335: 'cs_counters_name_csr%FOUND is false. l_utilization_rec.delta_flag is Y and l_utilization_rec.cascade_flag is Y');
1336: END IF;
1337: l_inst_idx :=1;
1338: -- Begin changes made by jaramana on 03-DEC-2008 for bug 7426643 (FP of 7263702)
1339: OPEN get_components_counter(l_utilization_rec.csi_item_instance_id, l_utilization_rec.counter_name);

Line 1426: Cannot use cs_counters and cs_counter_groups anymore **/

1422: i NUMBER;
1423: L_DEBUG_KEY CONSTANT VARCHAR2(150) := G_LOG_PREFIX || '.Update_Reading_All';
1424:
1425: /** Begin changes by jaramana on October 29, 2007 for bug 6513576
1426: Cannot use cs_counters and cs_counter_groups anymore **/
1427: --Given start instance_id and uom_code, this cursor is used to get all of the distinct
1428: --counters this start instance has
1429: CURSOR get_inst_counters(c_instance_id NUMBER, c_uom_code VARCHAR2) IS
1430: SELECT DISTINCT CCCV.COUNTER_TEMPLATE_NAME counter_name