DBA Data[Home] [Help]

APPS.CSI_COUNTER_READINGS_PVT dependencies on CSI_CTR_GEN_UTILITY_PVT

Line 293: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

289: l_curr_adj NUMBER;
290: BEGIN
291: -- For Bi-directional counters, Net and LTD will be same as Counter Reading
292: -- Read the debug profiles values in to global variable 7197402
293: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
294:
295: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading Procedure');
296: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_net_rdg' || p_prev_net_rdg);
297: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_ltd_rdg' || p_prev_ltd_rdg);

Line 295: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading Procedure');

291: -- For Bi-directional counters, Net and LTD will be same as Counter Reading
292: -- Read the debug profiles values in to global variable 7197402
293: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
294:
295: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading Procedure');
296: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_net_rdg' || p_prev_net_rdg);
297: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_ltd_rdg' || p_prev_ltd_rdg);
298: csi_ctr_gen_utility_pvt.put_line('6398254: p_curr_rdg' || p_curr_rdg);
299: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_rdg' || p_prev_rdg);

Line 296: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_net_rdg' || p_prev_net_rdg);

292: -- Read the debug profiles values in to global variable 7197402
293: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
294:
295: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading Procedure');
296: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_net_rdg' || p_prev_net_rdg);
297: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_ltd_rdg' || p_prev_ltd_rdg);
298: csi_ctr_gen_utility_pvt.put_line('6398254: p_curr_rdg' || p_curr_rdg);
299: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_rdg' || p_prev_rdg);
300: csi_ctr_gen_utility_pvt.put_line(' p_curr_adj' || p_curr_adj);

Line 297: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_ltd_rdg' || p_prev_ltd_rdg);

293: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
294:
295: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading Procedure');
296: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_net_rdg' || p_prev_net_rdg);
297: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_ltd_rdg' || p_prev_ltd_rdg);
298: csi_ctr_gen_utility_pvt.put_line('6398254: p_curr_rdg' || p_curr_rdg);
299: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_rdg' || p_prev_rdg);
300: csi_ctr_gen_utility_pvt.put_line(' p_curr_adj' || p_curr_adj);
301: csi_ctr_gen_utility_pvt.put_line('6398254: p_rdg_type' || p_rdg_type);

Line 298: csi_ctr_gen_utility_pvt.put_line('6398254: p_curr_rdg' || p_curr_rdg);

294:
295: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading Procedure');
296: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_net_rdg' || p_prev_net_rdg);
297: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_ltd_rdg' || p_prev_ltd_rdg);
298: csi_ctr_gen_utility_pvt.put_line('6398254: p_curr_rdg' || p_curr_rdg);
299: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_rdg' || p_prev_rdg);
300: csi_ctr_gen_utility_pvt.put_line(' p_curr_adj' || p_curr_adj);
301: csi_ctr_gen_utility_pvt.put_line('6398254: p_rdg_type' || p_rdg_type);
302: csi_ctr_gen_utility_pvt.put_line('p_direction' || p_direction);

Line 299: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_rdg' || p_prev_rdg);

295: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading Procedure');
296: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_net_rdg' || p_prev_net_rdg);
297: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_ltd_rdg' || p_prev_ltd_rdg);
298: csi_ctr_gen_utility_pvt.put_line('6398254: p_curr_rdg' || p_curr_rdg);
299: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_rdg' || p_prev_rdg);
300: csi_ctr_gen_utility_pvt.put_line(' p_curr_adj' || p_curr_adj);
301: csi_ctr_gen_utility_pvt.put_line('6398254: p_rdg_type' || p_rdg_type);
302: csi_ctr_gen_utility_pvt.put_line('p_direction' || p_direction);
303: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_mode' || l_ctr_rdg_rec.reset_mode); -- added 6398254

Line 300: csi_ctr_gen_utility_pvt.put_line(' p_curr_adj' || p_curr_adj);

296: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_net_rdg' || p_prev_net_rdg);
297: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_ltd_rdg' || p_prev_ltd_rdg);
298: csi_ctr_gen_utility_pvt.put_line('6398254: p_curr_rdg' || p_curr_rdg);
299: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_rdg' || p_prev_rdg);
300: csi_ctr_gen_utility_pvt.put_line(' p_curr_adj' || p_curr_adj);
301: csi_ctr_gen_utility_pvt.put_line('6398254: p_rdg_type' || p_rdg_type);
302: csi_ctr_gen_utility_pvt.put_line('p_direction' || p_direction);
303: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_mode' || l_ctr_rdg_rec.reset_mode); -- added 6398254
304: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_reason' || l_ctr_rdg_rec.reset_reason); -- added 6398254

Line 301: csi_ctr_gen_utility_pvt.put_line('6398254: p_rdg_type' || p_rdg_type);

297: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_ltd_rdg' || p_prev_ltd_rdg);
298: csi_ctr_gen_utility_pvt.put_line('6398254: p_curr_rdg' || p_curr_rdg);
299: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_rdg' || p_prev_rdg);
300: csi_ctr_gen_utility_pvt.put_line(' p_curr_adj' || p_curr_adj);
301: csi_ctr_gen_utility_pvt.put_line('6398254: p_rdg_type' || p_rdg_type);
302: csi_ctr_gen_utility_pvt.put_line('p_direction' || p_direction);
303: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_mode' || l_ctr_rdg_rec.reset_mode); -- added 6398254
304: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_reason' || l_ctr_rdg_rec.reset_reason); -- added 6398254
305: /* Only return if a Bi-directional counter AND a reset flow */

Line 302: csi_ctr_gen_utility_pvt.put_line('p_direction' || p_direction);

298: csi_ctr_gen_utility_pvt.put_line('6398254: p_curr_rdg' || p_curr_rdg);
299: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_rdg' || p_prev_rdg);
300: csi_ctr_gen_utility_pvt.put_line(' p_curr_adj' || p_curr_adj);
301: csi_ctr_gen_utility_pvt.put_line('6398254: p_rdg_type' || p_rdg_type);
302: csi_ctr_gen_utility_pvt.put_line('p_direction' || p_direction);
303: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_mode' || l_ctr_rdg_rec.reset_mode); -- added 6398254
304: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_reason' || l_ctr_rdg_rec.reset_reason); -- added 6398254
305: /* Only return if a Bi-directional counter AND a reset flow */
306:

Line 303: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_mode' || l_ctr_rdg_rec.reset_mode); -- added 6398254

299: csi_ctr_gen_utility_pvt.put_line('6398254: p_prev_rdg' || p_prev_rdg);
300: csi_ctr_gen_utility_pvt.put_line(' p_curr_adj' || p_curr_adj);
301: csi_ctr_gen_utility_pvt.put_line('6398254: p_rdg_type' || p_rdg_type);
302: csi_ctr_gen_utility_pvt.put_line('p_direction' || p_direction);
303: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_mode' || l_ctr_rdg_rec.reset_mode); -- added 6398254
304: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_reason' || l_ctr_rdg_rec.reset_reason); -- added 6398254
305: /* Only return if a Bi-directional counter AND a reset flow */
306:
307: --

Line 304: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_reason' || l_ctr_rdg_rec.reset_reason); -- added 6398254

300: csi_ctr_gen_utility_pvt.put_line(' p_curr_adj' || p_curr_adj);
301: csi_ctr_gen_utility_pvt.put_line('6398254: p_rdg_type' || p_rdg_type);
302: csi_ctr_gen_utility_pvt.put_line('p_direction' || p_direction);
303: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_mode' || l_ctr_rdg_rec.reset_mode); -- added 6398254
304: csi_ctr_gen_utility_pvt.put_line('6398254: l_ctr_rdg_rec.reset_reason' || l_ctr_rdg_rec.reset_reason); -- added 6398254
305: /* Only return if a Bi-directional counter AND a reset flow */
306:
307: --
308:

Line 330: csi_ctr_gen_utility_pvt.put_line('Inside the IF block');

326: ELSIF p_rdg_type = 2 THEN -- Change
327: -- Net Reading = Prev Net + Curr Rdg - Curr Adj -- For Ascending
328: -- Net Reading = Prev Net - Curr Rdg - Curr Adj -- For Descending
329: IF NVL(p_direction,'X') = 'A' or NVL(p_direction,'X') = 'B' THEN
330: csi_ctr_gen_utility_pvt.put_line('Inside the IF block');
331: px_net_rdg := nvl(p_prev_net_rdg,0) + nvl(p_curr_rdg,0) - l_curr_adj;
332: px_ltd_rdg := nvl(p_prev_ltd_rdg,0) + nvl(p_curr_rdg,0);
333: ELSIF NVL(p_direction,'X') = 'D' THEN
334: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading for Desc');

Line 334: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading for Desc');

330: csi_ctr_gen_utility_pvt.put_line('Inside the IF block');
331: px_net_rdg := nvl(p_prev_net_rdg,0) + nvl(p_curr_rdg,0) - l_curr_adj;
332: px_ltd_rdg := nvl(p_prev_ltd_rdg,0) + nvl(p_curr_rdg,0);
333: ELSIF NVL(p_direction,'X') = 'D' THEN
334: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading for Desc');
335: csi_ctr_gen_utility_pvt.put_line('Prev Reading = '||to_char(p_prev_rdg));
336: csi_ctr_gen_utility_pvt.put_line('Prev Net Reading = '||to_char(nvl(p_prev_net_rdg,0)));
337: csi_ctr_gen_utility_pvt.put_line('Prev LTD Reading = '||to_char(nvl(p_prev_ltd_rdg,0)));
338: csi_ctr_gen_utility_pvt.put_line('Current Reading = '||to_char(nvl(p_curr_rdg,0)));

Line 335: csi_ctr_gen_utility_pvt.put_line('Prev Reading = '||to_char(p_prev_rdg));

331: px_net_rdg := nvl(p_prev_net_rdg,0) + nvl(p_curr_rdg,0) - l_curr_adj;
332: px_ltd_rdg := nvl(p_prev_ltd_rdg,0) + nvl(p_curr_rdg,0);
333: ELSIF NVL(p_direction,'X') = 'D' THEN
334: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading for Desc');
335: csi_ctr_gen_utility_pvt.put_line('Prev Reading = '||to_char(p_prev_rdg));
336: csi_ctr_gen_utility_pvt.put_line('Prev Net Reading = '||to_char(nvl(p_prev_net_rdg,0)));
337: csi_ctr_gen_utility_pvt.put_line('Prev LTD Reading = '||to_char(nvl(p_prev_ltd_rdg,0)));
338: csi_ctr_gen_utility_pvt.put_line('Current Reading = '||to_char(nvl(p_curr_rdg,0)));
339: IF nvl(p_prev_net_rdg,0) = 0 THEN

Line 336: csi_ctr_gen_utility_pvt.put_line('Prev Net Reading = '||to_char(nvl(p_prev_net_rdg,0)));

332: px_ltd_rdg := nvl(p_prev_ltd_rdg,0) + nvl(p_curr_rdg,0);
333: ELSIF NVL(p_direction,'X') = 'D' THEN
334: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading for Desc');
335: csi_ctr_gen_utility_pvt.put_line('Prev Reading = '||to_char(p_prev_rdg));
336: csi_ctr_gen_utility_pvt.put_line('Prev Net Reading = '||to_char(nvl(p_prev_net_rdg,0)));
337: csi_ctr_gen_utility_pvt.put_line('Prev LTD Reading = '||to_char(nvl(p_prev_ltd_rdg,0)));
338: csi_ctr_gen_utility_pvt.put_line('Current Reading = '||to_char(nvl(p_curr_rdg,0)));
339: IF nvl(p_prev_net_rdg,0) = 0 THEN
340: /* Check if there is a previous reading */

Line 337: csi_ctr_gen_utility_pvt.put_line('Prev LTD Reading = '||to_char(nvl(p_prev_ltd_rdg,0)));

333: ELSIF NVL(p_direction,'X') = 'D' THEN
334: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading for Desc');
335: csi_ctr_gen_utility_pvt.put_line('Prev Reading = '||to_char(p_prev_rdg));
336: csi_ctr_gen_utility_pvt.put_line('Prev Net Reading = '||to_char(nvl(p_prev_net_rdg,0)));
337: csi_ctr_gen_utility_pvt.put_line('Prev LTD Reading = '||to_char(nvl(p_prev_ltd_rdg,0)));
338: csi_ctr_gen_utility_pvt.put_line('Current Reading = '||to_char(nvl(p_curr_rdg,0)));
339: IF nvl(p_prev_net_rdg,0) = 0 THEN
340: /* Check if there is a previous reading */
341: IF p_prev_rdg IS NOT NULL THEN

Line 338: csi_ctr_gen_utility_pvt.put_line('Current Reading = '||to_char(nvl(p_curr_rdg,0)));

334: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading for Desc');
335: csi_ctr_gen_utility_pvt.put_line('Prev Reading = '||to_char(p_prev_rdg));
336: csi_ctr_gen_utility_pvt.put_line('Prev Net Reading = '||to_char(nvl(p_prev_net_rdg,0)));
337: csi_ctr_gen_utility_pvt.put_line('Prev LTD Reading = '||to_char(nvl(p_prev_ltd_rdg,0)));
338: csi_ctr_gen_utility_pvt.put_line('Current Reading = '||to_char(nvl(p_curr_rdg,0)));
339: IF nvl(p_prev_net_rdg,0) = 0 THEN
340: /* Check if there is a previous reading */
341: IF p_prev_rdg IS NOT NULL THEN
342: px_net_rdg := nvl(p_prev_net_rdg,0) - nvl(p_curr_rdg,0);

Line 359: csi_ctr_gen_utility_pvt.put_line('New Net Reading = '||to_char(px_net_rdg));

355: END IF;
356: ELSE
357: px_ltd_rdg := nvl(p_prev_ltd_rdg,0) - nvl(p_curr_rdg,0);
358: END IF;
359: csi_ctr_gen_utility_pvt.put_line('New Net Reading = '||to_char(px_net_rdg));
360: csi_ctr_gen_utility_pvt.put_line('New LTD Reading = '||to_char(px_ltd_rdg));
361: END IF;
362: END IF;
363: /* added 6398254 */

Line 360: csi_ctr_gen_utility_pvt.put_line('New LTD Reading = '||to_char(px_ltd_rdg));

356: ELSE
357: px_ltd_rdg := nvl(p_prev_ltd_rdg,0) - nvl(p_curr_rdg,0);
358: END IF;
359: csi_ctr_gen_utility_pvt.put_line('New Net Reading = '||to_char(px_net_rdg));
360: csi_ctr_gen_utility_pvt.put_line('New LTD Reading = '||to_char(px_ltd_rdg));
361: END IF;
362: END IF;
363: /* added 6398254 */
364: csi_ctr_gen_utility_pvt.put_line('6398254: New Net Reading = '||to_char(px_net_rdg));

Line 364: csi_ctr_gen_utility_pvt.put_line('6398254: New Net Reading = '||to_char(px_net_rdg));

360: csi_ctr_gen_utility_pvt.put_line('New LTD Reading = '||to_char(px_ltd_rdg));
361: END IF;
362: END IF;
363: /* added 6398254 */
364: csi_ctr_gen_utility_pvt.put_line('6398254: New Net Reading = '||to_char(px_net_rdg));
365: csi_ctr_gen_utility_pvt.put_line('6398254: New LTD Reading = '||to_char(px_ltd_rdg));
366: /* end addition */
367: IF NVL(p_direction,'X') = 'B' AND p_rdg_type = 2 THEN
368: IF p_curr_adj IS NULL OR p_curr_adj = FND_API.G_MISS_NUM THEN

Line 365: csi_ctr_gen_utility_pvt.put_line('6398254: New LTD Reading = '||to_char(px_ltd_rdg));

361: END IF;
362: END IF;
363: /* added 6398254 */
364: csi_ctr_gen_utility_pvt.put_line('6398254: New Net Reading = '||to_char(px_net_rdg));
365: csi_ctr_gen_utility_pvt.put_line('6398254: New LTD Reading = '||to_char(px_ltd_rdg));
366: /* end addition */
367: IF NVL(p_direction,'X') = 'B' AND p_rdg_type = 2 THEN
368: IF p_curr_adj IS NULL OR p_curr_adj = FND_API.G_MISS_NUM THEN
369: IF l_ctr_rdg_rec.reset_mode = 'SOFT' THEN

Line 371: -- csi_ctr_gen_utility_pvt.put_line('6398254: Inside Bidir Reset Block p_curr_rdg' || p_curr_rdg);

367: IF NVL(p_direction,'X') = 'B' AND p_rdg_type = 2 THEN
368: IF p_curr_adj IS NULL OR p_curr_adj = FND_API.G_MISS_NUM THEN
369: IF l_ctr_rdg_rec.reset_mode = 'SOFT' THEN
370: -- AND NVL(l_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
371: -- csi_ctr_gen_utility_pvt.put_line('6398254: Inside Bidir Reset Block p_curr_rdg' || p_curr_rdg);
372:
373: px_net_rdg := nvl(p_curr_rdg,0);
374: px_ltd_rdg := nvl(p_prev_ltd_rdg,0);
375: -- Return;

Line 440: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

436: x_return_status := FND_API.G_RET_STS_SUCCESS;
437: --
438:
439: -- Read the debug profiles values in to global variable 7197402
440: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
441:
442: csi_ctr_gen_utility_pvt.put_line('6398254: Inside Reset_Target_Counters...');
443: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);
444: IF p_txn_rec.transaction_type_id in (88,91,92,94,95) THEN

Line 442: csi_ctr_gen_utility_pvt.put_line('6398254: Inside Reset_Target_Counters...');

438:
439: -- Read the debug profiles values in to global variable 7197402
440: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
441:
442: csi_ctr_gen_utility_pvt.put_line('6398254: Inside Reset_Target_Counters...');
443: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);
444: IF p_txn_rec.transaction_type_id in (88,91,92,94,95) THEN
445: l_mode := 'Meter';
446: ELSE

Line 443: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);

439: -- Read the debug profiles values in to global variable 7197402
440: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
441:
442: csi_ctr_gen_utility_pvt.put_line('6398254: Inside Reset_Target_Counters...');
443: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);
444: IF p_txn_rec.transaction_type_id in (88,91,92,94,95) THEN
445: l_mode := 'Meter';
446: ELSE
447: l_mode := 'Counter';

Line 462: csi_ctr_gen_utility_pvt.put_line('Target Counter ID '||to_char(obj_cur.object_counter_id)||

458: l_previous_ltd_rdg;
459: CLOSE PREV_READING_CUR;
460: --
461: IF l_previous_ctr_rdg = NULL THEN
462: csi_ctr_gen_utility_pvt.put_line('Target Counter ID '||to_char(obj_cur.object_counter_id)||
463: ' does not have any prior readings. First reading cannot be reset');
464: csi_ctr_gen_utility_pvt.ExitWithErrMsg
465: ( p_msg_name => 'CSI_API_CTR_INVALID_FIRST_RDG',
466: p_token1_name => 'MODE',

Line 464: csi_ctr_gen_utility_pvt.ExitWithErrMsg

460: --
461: IF l_previous_ctr_rdg = NULL THEN
462: csi_ctr_gen_utility_pvt.put_line('Target Counter ID '||to_char(obj_cur.object_counter_id)||
463: ' does not have any prior readings. First reading cannot be reset');
464: csi_ctr_gen_utility_pvt.ExitWithErrMsg
465: ( p_msg_name => 'CSI_API_CTR_INVALID_FIRST_RDG',
466: p_token1_name => 'MODE',
467: p_token1_val => l_mode
468: );

Line 472: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be less than the previous reading');

468: );
469: END IF;
470: --
471: IF p_ctr_rdg_rec.counter_reading > l_previous_ctr_rdg THEN
472: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be less than the previous reading');
473: csi_ctr_gen_utility_pvt.ExitWithErrMsg
474: ( p_msg_name => 'CSI_API_CTR_LESS_RESET_RDG',
475: p_token1_name => 'PREV_RDG',
476: p_token1_val => to_char(l_previous_ctr_rdg),

Line 473: csi_ctr_gen_utility_pvt.ExitWithErrMsg

469: END IF;
470: --
471: IF p_ctr_rdg_rec.counter_reading > l_previous_ctr_rdg THEN
472: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be less than the previous reading');
473: csi_ctr_gen_utility_pvt.ExitWithErrMsg
474: ( p_msg_name => 'CSI_API_CTR_LESS_RESET_RDG',
475: p_token1_name => 'PREV_RDG',
476: p_token1_val => to_char(l_previous_ctr_rdg),
477: p_token2_name => 'MODE',

Line 497: csi_ctr_gen_utility_pvt.put_line('6398254: reset reason' || l_ctr_rdg_rec.reset_reason);

493: l_ctr_rdg_rec.source_code := p_ctr_rdg_rec.source_code;
494: l_ctr_rdg_rec.source_line_id := p_ctr_rdg_rec.source_line_id;
495: l_ctr_rdg_rec.comments := p_ctr_rdg_rec.comments;
496:
497: csi_ctr_gen_utility_pvt.put_line('6398254: reset reason' || l_ctr_rdg_rec.reset_reason);
498: csi_ctr_gen_utility_pvt.put_line('6398254: net reading' || l_ctr_rdg_rec.net_reading);
499:
500: --
501: -- Generate the Value_id for insert

Line 498: csi_ctr_gen_utility_pvt.put_line('6398254: net reading' || l_ctr_rdg_rec.net_reading);

494: l_ctr_rdg_rec.source_line_id := p_ctr_rdg_rec.source_line_id;
495: l_ctr_rdg_rec.comments := p_ctr_rdg_rec.comments;
496:
497: csi_ctr_gen_utility_pvt.put_line('6398254: reset reason' || l_ctr_rdg_rec.reset_reason);
498: csi_ctr_gen_utility_pvt.put_line('6398254: net reading' || l_ctr_rdg_rec.net_reading);
499:
500: --
501: -- Generate the Value_id for insert
502: l_process_flag := TRUE;

Line 529: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');

525: OPEN get_uom_class(obj_cur.object_uom_code);
526: FETCH get_uom_class into l_object_uom_class;
527:
528: IF get_uom_class%notfound THEN
529: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');
530: END IF;
531:
532: IF get_uom_class%ISOPEN THEN
533: CLOSE get_uom_class;

Line 540: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');

536: OPEN get_uom_class(l_source_uom_code);
537: FETCH get_uom_class into l_source_uom_class;
538:
539: IF get_uom_class%notfound THEN
540: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');
541: END IF;
542:
543: IF get_uom_class%ISOPEN THEN
544: CLOSE get_uom_class;

Line 554: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);

550: ,obj_cur.object_uom_code
551: ,null
552: ,l_uom_rate);
553:
554: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
555: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
556: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
557: IF l_uom_rate = -99999 then
558: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');

Line 555: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);

551: ,null
552: ,l_uom_rate);
553:
554: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
555: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
556: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
557: IF l_uom_rate = -99999 then
558: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');
559: END IF;

Line 556: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));

552: ,l_uom_rate);
553:
554: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
555: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
556: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
557: IF l_uom_rate = -99999 then
558: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');
559: END IF;
560: ELSE

Line 558: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');

554: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
555: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
556: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
557: IF l_uom_rate = -99999 then
558: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');
559: END IF;
560: ELSE
561: l_uom_rate := 1;
562: END IF;

Line 592: csi_ctr_gen_utility_pvt.put_line('Resetting target Counter '||to_char(l_ctr_rdg_rec.counter_id));

588: l_ctr_rdg_rec.counter_reading := l_counter_reading;
589:
590: --
591: -- Call the Table Handler to insert into CSI_COUNTER_READINGS
592: csi_ctr_gen_utility_pvt.put_line('Resetting target Counter '||to_char(l_ctr_rdg_rec.counter_id));
593: --
594: CSI_COUNTER_READINGS_PKG.Insert_Row(
595: px_COUNTER_VALUE_ID => l_ctr_rdg_rec.counter_value_id
596: ,p_COUNTER_ID => l_ctr_rdg_rec.counter_id

Line 731: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');

727: x_msg_data := FND_MSG_PUB.GET
728: (l_msg_index,
729: FND_API.G_FALSE
730: );
731: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
732: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
733: l_msg_index := l_msg_index + 1;
734: l_msg_count := l_msg_count - 1;
735: END LOOP;

Line 732: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

728: (l_msg_index,
729: FND_API.G_FALSE
730: );
731: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
732: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
733: l_msg_index := l_msg_index + 1;
734: l_msg_count := l_msg_count - 1;
735: END LOOP;
736: RAISE FND_API.G_EXC_ERROR;

Line 780: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

776: BEGIN
777: SAVEPOINT create_reading_transaction;
778: --
779: -- Read the debug profiles values in to global variable 7197402
780: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
781:
782: -- Initialize message list if p_init_msg_list is set to TRUE.
783: IF FND_API.to_Boolean(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
784: FND_MSG_PUB.initialize;

Line 802: csi_ctr_gen_utility_pvt.ExitWithErrMsg

798: END IF;
799: END LOOP;
800: ELSE
801: IF csi_counter_readings_pvt.Transaction_ID_Exists(p_txn_rec.transaction_id) THEN
802: csi_ctr_gen_utility_pvt.ExitWithErrMsg
803: ( p_msg_name => 'CSI_TXN_ID_ALREADY_EXISTS'
804: ,p_token1_name => 'TRANSACTION_ID'
805: ,p_token1_val => to_char(p_txn_rec.transaction_id)
806: );

Line 812: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_NO_TXN_TYPE_ID');

808: END IF;
809: --
810: IF p_txn_rec.transaction_type_id IS NULL OR
811: p_txn_rec.transaction_type_id = FND_API.G_MISS_NUM THEN
812: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_NO_TXN_TYPE_ID');
813: ELSE
814: IF p_txn_rec.transaction_type_id NOT in (80,81,82,83,84,85,86,87,88,89,91,92,94,95)
815: THEN
816: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_INVALID_TXN_TYPE_ID');

Line 816: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_INVALID_TXN_TYPE_ID');

812: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_NO_TXN_TYPE_ID');
813: ELSE
814: IF p_txn_rec.transaction_type_id NOT in (80,81,82,83,84,85,86,87,88,89,91,92,94,95)
815: THEN
816: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_INVALID_TXN_TYPE_ID');
817: ELSE
818: Begin
819: SELECT 'x'
820: INTO l_dummy

Line 825: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_INVALID_TXN_TYPE_ID');

821: FROM csi_txn_types
822: WHERE transaction_type_id = p_txn_rec.transaction_type_id;
823: Exception
824: when no_data_found THEN
825: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_INVALID_TXN_TYPE_ID');
826: End;
827: END IF;
828: END IF;
829: --

Line 832: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_NO_TXN_DATE');

828: END IF;
829: --
830: IF p_txn_rec.source_transaction_date IS NULL OR
831: p_txn_rec.source_transaction_date = FND_API.G_MISS_DATE THEN
832: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_NO_TXN_DATE');
833: END IF;
834: --
835: IF p_txn_rec.transaction_date IS NULL OR
836: p_txn_rec.transaction_date = FND_API.G_MISS_DATE THEN

Line 843: csi_ctr_gen_utility_pvt.put_line( '....create_reading_transactions' ||'-'||

839: --
840: p_txn_rec.object_version_number := 1;
841: p_txn_rec.gl_interface_status_code := 1; -- Pending
842: --
843: csi_ctr_gen_utility_pvt.put_line( '....create_reading_transactions' ||'-'||
844: p_api_version ||'-'||
845: nvl(p_commit,FND_API.G_FALSE) ||'-'||
846: nvl(p_init_msg_list,FND_API.G_FALSE) ||'-'||
847: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );

Line 1049: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

1045: x_return_status := FND_API.G_RET_STS_SUCCESS;
1046: --
1047:
1048: -- Read the debug profiles values in to global variable 7197402
1049: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
1050:
1051: csi_ctr_gen_utility_pvt.put_line( '....capture_counter_reading_pvt' ||'-'||
1052: p_api_version ||'-'||
1053: nvl(p_commit,FND_API.G_FALSE) ||'-'||

Line 1051: csi_ctr_gen_utility_pvt.put_line( '....capture_counter_reading_pvt' ||'-'||

1047:
1048: -- Read the debug profiles values in to global variable 7197402
1049: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
1050:
1051: csi_ctr_gen_utility_pvt.put_line( '....capture_counter_reading_pvt' ||'-'||
1052: p_api_version ||'-'||
1053: nvl(p_commit,FND_API.G_FALSE) ||'-'||
1054: nvl(p_init_msg_list,FND_API.G_FALSE) ||'-'||
1055: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );

Line 1057: csi_ctr_gen_utility_pvt.put_line('Passed Transaction ID is '||to_char(p_txn_rec.transaction_id));

1053: nvl(p_commit,FND_API.G_FALSE) ||'-'||
1054: nvl(p_init_msg_list,FND_API.G_FALSE) ||'-'||
1055: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );
1056: -- *
1057: csi_ctr_gen_utility_pvt.put_line('Passed Transaction ID is '||to_char(p_txn_rec.transaction_id));
1058: --
1059: IF p_txn_rec.transaction_type_id in (91,92,94,95) THEN
1060: l_mode := 'Meter';
1061: ELSE

Line 1067: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1063: END IF;
1064: --
1065: IF p_ctr_rdg_rec.counter_id IS NULL OR
1066: p_ctr_rdg_rec.counter_id = FND_API.G_MISS_NUM THEN
1067: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1068: ( p_msg_name => 'CSI_API_CTR_INVALID',
1069: p_token1_name => 'MODE',
1070: p_token1_val => l_mode
1071: );

Line 1085: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1081: where counter_id = p_ctr_rdg_rec.counter_id
1082: and nvl(end_date_active,(sysdate+1)) > sysdate;
1083: Exception
1084: when no_data_found then
1085: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1086: ( p_msg_name => 'CSI_API_CTR_INVALID',
1087: p_token1_name => 'MODE',
1088: p_token1_val => l_mode
1089: );

Line 1096: csi_ctr_gen_utility_pvt.put_line('At least one reading should be entered...');

1092: -- Atleast one reading should be captured.
1093: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND
1094: NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND
1095: NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1096: csi_ctr_gen_utility_pvt.put_line('At least one reading should be entered...');
1097: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1098: ( p_msg_name => 'CSI_API_CTR_RDG_MISSING',
1099: p_token1_name => 'MODE',
1100: p_token1_val => l_mode

Line 1097: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1093: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND
1094: NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND
1095: NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1096: csi_ctr_gen_utility_pvt.put_line('At least one reading should be entered...');
1097: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1098: ( p_msg_name => 'CSI_API_CTR_RDG_MISSING',
1099: p_token1_name => 'MODE',
1100: p_token1_val => l_mode
1101: );

Line 1105: csi_ctr_gen_utility_pvt.put_line('Counter has invalid Direction...');

1101: );
1102: END IF;
1103: --
1104: IF nvl(l_direction,'X') NOT IN ('A','D','B') THEN
1105: csi_ctr_gen_utility_pvt.put_line('Counter has invalid Direction...');
1106: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1107: ( p_msg_name => 'CSI_API_CTR_INVALID_DIR',
1108: p_token1_name => 'MODE',
1109: p_token1_val => l_mode

Line 1106: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1102: END IF;
1103: --
1104: IF nvl(l_direction,'X') NOT IN ('A','D','B') THEN
1105: csi_ctr_gen_utility_pvt.put_line('Counter has invalid Direction...');
1106: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1107: ( p_msg_name => 'CSI_API_CTR_INVALID_DIR',
1108: p_token1_name => 'MODE',
1109: p_token1_val => l_mode
1110: );

Line 1114: csi_ctr_gen_utility_pvt.put_line('Cannot disable the value during Insert...');

1110: );
1111: END IF;
1112: --
1113: IF nvl(p_ctr_rdg_rec.disabled_flag,'N') = 'Y' THEN
1114: csi_ctr_gen_utility_pvt.put_line('Cannot disable the value during Insert...');
1115: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1116: ( p_msg_name => 'CSI_API_CTR_NO_RDG_DISABLE',
1117: p_token1_name => 'MODE',
1118: p_token1_val => l_mode

Line 1115: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1111: END IF;
1112: --
1113: IF nvl(p_ctr_rdg_rec.disabled_flag,'N') = 'Y' THEN
1114: csi_ctr_gen_utility_pvt.put_line('Cannot disable the value during Insert...');
1115: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1116: ( p_msg_name => 'CSI_API_CTR_NO_RDG_DISABLE',
1117: p_token1_name => 'MODE',
1118: p_token1_val => l_mode
1119: );

Line 1133: csi_ctr_gen_utility_pvt.put_line('Only First Reading can be captured for a Target Counter manually');

1129: where counter_id = p_ctr_rdg_rec.counter_id
1130: and ROWNUM = 1;
1131: --
1132: IF l_rec_count > 0 THEN
1133: csi_ctr_gen_utility_pvt.put_line('Only First Reading can be captured for a Target Counter manually');
1134: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1135: ( p_msg_name => 'CSI_API_NO_RDG_TARGET_CTR',
1136: p_token1_name => 'MODE',
1137: p_token1_val => l_mode

Line 1134: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1130: and ROWNUM = 1;
1131: --
1132: IF l_rec_count > 0 THEN
1133: csi_ctr_gen_utility_pvt.put_line('Only First Reading can be captured for a Target Counter manually');
1134: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1135: ( p_msg_name => 'CSI_API_NO_RDG_TARGET_CTR',
1136: p_token1_name => 'MODE',
1137: p_token1_val => l_mode
1138: );

Line 1141: csi_ctr_gen_utility_pvt.put_line('Cannot Capture Reading for a Target Counter...');

1137: p_token1_val => l_mode
1138: );
1139: END IF;
1140: ELSE
1141: csi_ctr_gen_utility_pvt.put_line('Cannot Capture Reading for a Target Counter...');
1142: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1143: ( p_msg_name => 'CSI_API_NO_RDG_TARGET_CTR',
1144: p_token1_name => 'MODE',
1145: p_token1_val => l_mode

Line 1142: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1138: );
1139: END IF;
1140: ELSE
1141: csi_ctr_gen_utility_pvt.put_line('Cannot Capture Reading for a Target Counter...');
1142: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1143: ( p_msg_name => 'CSI_API_NO_RDG_TARGET_CTR',
1144: p_token1_name => 'MODE',
1145: p_token1_val => l_mode
1146: );

Line 1152: csi_ctr_gen_utility_pvt.put_line('Cannot Capture Reading for a Formula Counter...');

1148: END IF;
1149: --
1150: -- Cannot Capture Reading for Formula Counters
1151: IF Is_Formula_Counter(p_ctr_rdg_rec.counter_id) THEN
1152: csi_ctr_gen_utility_pvt.put_line('Cannot Capture Reading for a Formula Counter...');
1153: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1154: ( p_msg_name => 'CSI_API_NO_RDG_FORMULA_CTR',
1155: p_token1_name => 'MODE',
1156: p_token1_val => l_mode

Line 1153: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1149: --
1150: -- Cannot Capture Reading for Formula Counters
1151: IF Is_Formula_Counter(p_ctr_rdg_rec.counter_id) THEN
1152: csi_ctr_gen_utility_pvt.put_line('Cannot Capture Reading for a Formula Counter...');
1153: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1154: ( p_msg_name => 'CSI_API_NO_RDG_FORMULA_CTR',
1155: p_token1_name => 'MODE',
1156: p_token1_val => l_mode
1157: );

Line 1163: -- csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_RDG_DATE');

1159: --
1160: IF p_ctr_rdg_rec.value_timestamp IS NULL OR
1161: p_ctr_rdg_rec.value_timestamp = FND_API.G_MISS_DATE THEN
1162: p_ctr_rdg_rec.value_timestamp := sysdate;
1163: -- csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_RDG_DATE');
1164: END IF;
1165: --
1166:
1167: Begin

Line 1206: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Update_Counter_Reading when disabling WO ');

1202: ,x_msg_count => x_msg_count
1203: ,x_msg_data => x_msg_data
1204: );
1205: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
1206: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Update_Counter_Reading when disabling WO ');
1207: l_msg_index := 1;
1208: l_msg_count := x_msg_count;
1209: WHILE l_msg_count > 0 LOOP
1210: x_msg_data := FND_MSG_PUB.GET

Line 1214: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

1210: x_msg_data := FND_MSG_PUB.GET
1211: (l_msg_index,
1212: FND_API.G_FALSE
1213: );
1214: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
1215: l_msg_index := l_msg_index + 1;
1216: l_msg_count := l_msg_count - 1;
1217: END LOOP;
1218: RAISE FND_API.G_EXC_ERROR;

Line 1221: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1217: END LOOP;
1218: RAISE FND_API.G_EXC_ERROR;
1219: END IF;
1220: ELSE
1221: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1222: (p_msg_name => 'CSI_API_CTR_RDG_DATE_EXISTS',
1223: p_token1_name => 'VALUE_TIMESTAMP',
1224: p_token1_val => to_char(p_ctr_rdg_rec.value_timestamp,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS')),
1225: p_token2_name => 'MODE',

Line 1232: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1228: END IF;
1229: END;
1230: ELSE
1231: /* end of return status fixes */
1232: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1233: (p_msg_name => 'CSI_API_CTR_RDG_DATE_EXISTS',
1234: p_token1_name => 'VALUE_TIMESTAMP',
1235: p_token1_val => to_char(p_ctr_rdg_rec.value_timestamp,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS')),
1236: p_token2_name => 'MODE',

Line 1246: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1242: null;
1243: End;
1244: --
1245: IF p_ctr_rdg_rec.value_timestamp > sysdate THEN
1246: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1247: ( p_msg_name => 'CSI_API_CTR_FUTURE_RDG_DATE',
1248: p_token1_name => 'VALUE_TIMESTAMP',
1249: p_token1_val => to_char(p_ctr_rdg_rec.value_timestamp,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS')),
1250: p_token2_name => 'MODE',

Line 1255: csi_ctr_gen_utility_pvt.put_line('Adjustment type is..' || p_ctr_rdg_rec.adjustment_type);

1251: p_token2_val => l_mode
1252: );
1253: END IF;
1254: -- *
1255: csi_ctr_gen_utility_pvt.put_line('Adjustment type is..' || p_ctr_rdg_rec.adjustment_type);
1256:
1257: IF NVL(p_ctr_rdg_rec.adjustment_type,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1258: -- Validate Adjustment Type against lookups
1259: IF NOT Valid_Adjustment_Type(p_ctr_rdg_rec.adjustment_type) THEN

Line 1260: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1256:
1257: IF NVL(p_ctr_rdg_rec.adjustment_type,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1258: -- Validate Adjustment Type against lookups
1259: IF NOT Valid_Adjustment_Type(p_ctr_rdg_rec.adjustment_type) THEN
1260: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1261: ( p_msg_name => 'CSI_API_CTR_INV_ADJ_TYPE',
1262: p_token1_name => 'ADJ_TYPE',
1263: p_token1_val => p_ctr_rdg_rec.adjustment_type
1264: );

Line 1273: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1269: -- Validate Reset Mode against lookups
1270: -- IF NOT Valid_Reset_Mode(p_ctr_rdg_rec.reset_mode) THEN
1271: -- Since we allow only SOFT reset at this point, no need to check against Lookups
1272: IF p_ctr_rdg_rec.reset_mode <> 'SOFT' THEN
1273: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1274: ( p_msg_name => 'CSI_API_CTR_INV_RESET_MODE',
1275: p_token1_name => 'RESET_MODE',
1276: p_token1_val => p_ctr_rdg_rec.reset_mode
1277: );

Line 1281: csi_ctr_gen_utility_pvt.put_line('Reset counter reading is mandatory for SOFT reset..');

1277: );
1278: END IF;
1279: --
1280: IF NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1281: csi_ctr_gen_utility_pvt.put_line('Reset counter reading is mandatory for SOFT reset..');
1282: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1283: ( p_msg_name => 'CSI_API_CTR_SOFT_RDG_MISS',
1284: p_token1_name => 'MODE',
1285: p_token1_val => l_mode

Line 1282: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1278: END IF;
1279: --
1280: IF NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1281: csi_ctr_gen_utility_pvt.put_line('Reset counter reading is mandatory for SOFT reset..');
1282: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1283: ( p_msg_name => 'CSI_API_CTR_SOFT_RDG_MISS',
1284: p_token1_name => 'MODE',
1285: p_token1_val => l_mode
1286: );

Line 1292: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1288: --
1289:
1290:
1291: IF NVL(p_ctr_rdg_rec.reset_reason,FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
1292: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1293: ( p_msg_name => 'CSI_API_CTR_RESET_REASON_MISS',
1294: p_token1_name => 'MODE',
1295: p_token1_val => l_mode
1296: );

Line 1303: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading cannot be Null or Zero for Adjustments...');

1299: --
1300: -- Adjustment reading is Mandatory for Adjustments
1301: IF NVL(p_ctr_rdg_rec.adjustment_type,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR AND
1302: NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1303: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading cannot be Null or Zero for Adjustments...');
1304: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1305: ( p_msg_name => 'CSI_API_CTR_ADJ_RDG_MISS',
1306: p_token1_name => 'MODE',
1307: p_token1_val => l_mode

Line 1304: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1300: -- Adjustment reading is Mandatory for Adjustments
1301: IF NVL(p_ctr_rdg_rec.adjustment_type,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR AND
1302: NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1303: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading cannot be Null or Zero for Adjustments...');
1304: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1305: ( p_msg_name => 'CSI_API_CTR_ADJ_RDG_MISS',
1306: p_token1_name => 'MODE',
1307: p_token1_val => l_mode
1308: );

Line 1314: csi_ctr_gen_utility_pvt.put_line('Adjustment Type is Mandatory for Adjustments...');

1310: --
1311: -- Reverse Validation
1312: IF NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM AND
1313: NVL(p_ctr_rdg_rec.adjustment_type,FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
1314: csi_ctr_gen_utility_pvt.put_line('Adjustment Type is Mandatory for Adjustments...');
1315: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1316: ( p_msg_name => 'CSI_API_CTR_ADJ_TYPE_MISS',
1317: p_token1_name => 'MODE',
1318: p_token1_val => l_mode

Line 1315: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1311: -- Reverse Validation
1312: IF NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM AND
1313: NVL(p_ctr_rdg_rec.adjustment_type,FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
1314: csi_ctr_gen_utility_pvt.put_line('Adjustment Type is Mandatory for Adjustments...');
1315: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1316: ( p_msg_name => 'CSI_API_CTR_ADJ_TYPE_MISS',
1317: p_token1_name => 'MODE',
1318: p_token1_val => l_mode
1319: );

Line 1323: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading cannot be Zero or Negative...');

1319: );
1320: END IF;
1321: --
1322: IF NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <= 0 THEN
1323: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading cannot be Zero or Negative...');
1324: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1325: ( p_msg_name => 'CSI_API_CTR_POSITIVE_ADJ_RDG',
1326: p_token1_name => 'MODE',
1327: p_token1_val => l_mode

Line 1324: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1320: END IF;
1321: --
1322: IF NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <= 0 THEN
1323: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading cannot be Zero or Negative...');
1324: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1325: ( p_msg_name => 'CSI_API_CTR_POSITIVE_ADJ_RDG',
1326: p_token1_name => 'MODE',
1327: p_token1_val => l_mode
1328: );

Line 1333: csi_ctr_gen_utility_pvt.put_line('Reset Mode is Mandatory for Resets...');

1329: END IF;
1330: -- Reverse Validations
1331: IF NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1332: IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
1333: csi_ctr_gen_utility_pvt.put_line('Reset Mode is Mandatory for Resets...');
1334: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1335: ( p_msg_name => 'CSI_API_CTR_RESET_MODE_MISS',
1336: p_token1_name => 'MODE',
1337: p_token1_val => l_mode

Line 1334: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1330: -- Reverse Validations
1331: IF NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1332: IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
1333: csi_ctr_gen_utility_pvt.put_line('Reset Mode is Mandatory for Resets...');
1334: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1335: ( p_msg_name => 'CSI_API_CTR_RESET_MODE_MISS',
1336: p_token1_name => 'MODE',
1337: p_token1_val => l_mode
1338: );

Line 1342: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1338: );
1339: END IF;
1340: -- Reset Reason is Mandatory
1341: IF NVL(p_ctr_rdg_rec.reset_reason,FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
1342: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1343: ( p_msg_name => 'CSI_API_CTR_RESET_REASON_MISS',
1344: p_token1_name => 'MODE',
1345: p_token1_val => l_mode
1346: );

Line 1350: csi_ctr_gen_utility_pvt.put_line('Reset Mode is Mandatory for Resets...'|| p_ctr_rdg_rec.reset_counter_reading );

1346: );
1347: END IF;
1348: END IF;
1349: -- *
1350: csi_ctr_gen_utility_pvt.put_line('Reset Mode is Mandatory for Resets...'|| p_ctr_rdg_rec.reset_counter_reading );
1351: IF NVL(p_ctr_rdg_rec.reset_reason,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1352: IF NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1353: csi_ctr_gen_utility_pvt.put_line('Reset Reading is Mandatory for Resets...');
1354: csi_ctr_gen_utility_pvt.ExitWithErrMsg

Line 1353: csi_ctr_gen_utility_pvt.put_line('Reset Reading is Mandatory for Resets...');

1349: -- *
1350: csi_ctr_gen_utility_pvt.put_line('Reset Mode is Mandatory for Resets...'|| p_ctr_rdg_rec.reset_counter_reading );
1351: IF NVL(p_ctr_rdg_rec.reset_reason,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1352: IF NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1353: csi_ctr_gen_utility_pvt.put_line('Reset Reading is Mandatory for Resets...');
1354: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1355: ( p_msg_name => 'CSI_API_CTR_RESET_RDG_MISS',
1356: p_token1_name => 'MODE',
1357: p_token1_val => l_mode

Line 1354: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1350: csi_ctr_gen_utility_pvt.put_line('Reset Mode is Mandatory for Resets...'|| p_ctr_rdg_rec.reset_counter_reading );
1351: IF NVL(p_ctr_rdg_rec.reset_reason,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1352: IF NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1353: csi_ctr_gen_utility_pvt.put_line('Reset Reading is Mandatory for Resets...');
1354: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1355: ( p_msg_name => 'CSI_API_CTR_RESET_RDG_MISS',
1356: p_token1_name => 'MODE',
1357: p_token1_val => l_mode
1358: );

Line 1362: csi_ctr_gen_utility_pvt.put_line('Reset Mode is Mandatory for Resets...');

1358: );
1359: END IF;
1360: --
1361: IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
1362: csi_ctr_gen_utility_pvt.put_line('Reset Mode is Mandatory for Resets...');
1363: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1364: ( p_msg_name => 'CSI_API_CTR_RESET_MODE_MISS',
1365: p_token1_name => 'MODE',
1366: p_token1_val => l_mode

Line 1363: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1359: END IF;
1360: --
1361: IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
1362: csi_ctr_gen_utility_pvt.put_line('Reset Mode is Mandatory for Resets...');
1363: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1364: ( p_msg_name => 'CSI_API_CTR_RESET_MODE_MISS',
1365: p_token1_name => 'MODE',
1366: p_token1_val => l_mode
1367: );

Line 1375: csi_ctr_gen_utility_pvt.put_line('At least one reading should be entered...');

1371: -- Atleast one reading should be captured.
1372: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND
1373: NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND
1374: NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1375: csi_ctr_gen_utility_pvt.put_line('At least one reading should be entered...');
1376: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1377: ( p_msg_name => 'CSI_API_CTR_RDG_MISSING',
1378: p_token1_name => 'MODE',
1379: p_token1_val => l_mode

Line 1376: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1372: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND
1373: NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND
1374: NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
1375: csi_ctr_gen_utility_pvt.put_line('At least one reading should be entered...');
1376: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1377: ( p_msg_name => 'CSI_API_CTR_RDG_MISSING',
1378: p_token1_name => 'MODE',
1379: p_token1_val => l_mode
1380: );

Line 1400: csi_ctr_gen_utility_pvt.put_line('Reading Date cannot be earlier than the Reading Lock Date...');

1396: End;
1397: --
1398: IF l_rdg_lock_date IS NOT NULL THEN
1399: IF p_ctr_rdg_rec.value_timestamp <= l_rdg_lock_date THEN
1400: csi_ctr_gen_utility_pvt.put_line('Reading Date cannot be earlier than the Reading Lock Date...');
1401: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1402: ( p_msg_name => 'CSI_API_CTR_RDG_DATE_LOCKED',
1403: p_token1_name => 'LOCKED_DATE',
1404: p_token1_val => to_char(l_rdg_lock_date,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS')), --fix for bug 5435071

Line 1401: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1397: --
1398: IF l_rdg_lock_date IS NOT NULL THEN
1399: IF p_ctr_rdg_rec.value_timestamp <= l_rdg_lock_date THEN
1400: csi_ctr_gen_utility_pvt.put_line('Reading Date cannot be earlier than the Reading Lock Date...');
1401: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1402: ( p_msg_name => 'CSI_API_CTR_RDG_DATE_LOCKED',
1403: p_token1_name => 'LOCKED_DATE',
1404: p_token1_val => to_char(l_rdg_lock_date,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS')), --fix for bug 5435071
1405: p_token2_name => 'MODE',

Line 1411: csi_ctr_gen_utility_pvt.put_line('Getting PREV Counter reading' || p_ctr_rdg_rec.value_timestamp );

1407: );
1408: END IF;
1409: END IF;
1410: -- *
1411: csi_ctr_gen_utility_pvt.put_line('Getting PREV Counter reading' || p_ctr_rdg_rec.value_timestamp );
1412: -- Get the last reading for this counter
1413: OPEN PREV_READING_CUR(p_ctr_rdg_rec.counter_id,p_ctr_rdg_rec.value_timestamp);
1414: FETCH PREV_READING_CUR
1415: INTO l_prev_ctr_reading,

Line 1423: csi_ctr_gen_utility_pvt.put_line('PREV Counter reading' || l_prev_ctr_reading );

1419: l_prev_comments;
1420: CLOSE PREV_READING_CUR;
1421:
1422: -- *
1423: csi_ctr_gen_utility_pvt.put_line('PREV Counter reading' || l_prev_ctr_reading );
1424:
1425:
1426: --
1427: -- Check whether this is the first reading

Line 1432: csi_ctr_gen_utility_pvt.put_line('First Reading cannot be Adjustment or Reset or Automatic Rollover');

1428: IF l_prev_ctr_reading IS NULL THEN -- First Reading
1429: IF NVL(p_ctr_rdg_rec.adjustment_type,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR OR
1430: NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR OR
1431: NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1432: csi_ctr_gen_utility_pvt.put_line('First Reading cannot be Adjustment or Reset or Automatic Rollover');
1433: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1434: ( p_msg_name => 'CSI_API_CTR_INVALID_FIRST_RDG',
1435: p_token1_name => 'MODE',
1436: p_token1_val => l_mode

Line 1433: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1429: IF NVL(p_ctr_rdg_rec.adjustment_type,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR OR
1430: NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR OR
1431: NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1432: csi_ctr_gen_utility_pvt.put_line('First Reading cannot be Adjustment or Reset or Automatic Rollover');
1433: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1434: ( p_msg_name => 'CSI_API_CTR_INVALID_FIRST_RDG',
1435: p_token1_name => 'MODE',
1436: p_token1_val => l_mode
1437: );

Line 1442: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading cannot be greater than Previous Net Reading');

1438: END IF;
1439: ELSE
1440: IF NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1441: IF p_ctr_rdg_rec.adjustment_reading > l_prev_net_reading THEN
1442: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading cannot be greater than Previous Net Reading');
1443: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1444: ( p_msg_name => 'CSI_API_CTR_INVALID_ADJ_RDG',
1445: p_token1_name => 'PREV_NET',
1446: p_token1_val => to_char(l_prev_net_reading)

Line 1443: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1439: ELSE
1440: IF NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1441: IF p_ctr_rdg_rec.adjustment_reading > l_prev_net_reading THEN
1442: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading cannot be greater than Previous Net Reading');
1443: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1444: ( p_msg_name => 'CSI_API_CTR_INVALID_ADJ_RDG',
1445: p_token1_name => 'PREV_NET',
1446: p_token1_val => to_char(l_prev_net_reading)
1447: );

Line 1453: csi_ctr_gen_utility_pvt.put_line('Getting LAST Counter reading' || to_char(p_ctr_rdg_rec.value_timestamp,'DD-MON-YYYY HH24:MI:SS'));

1449: END IF;
1450: END IF;
1451:
1452: -- *
1453: csi_ctr_gen_utility_pvt.put_line('Getting LAST Counter reading' || to_char(p_ctr_rdg_rec.value_timestamp,'DD-MON-YYYY HH24:MI:SS'));
1454:
1455: csi_ctr_gen_utility_pvt.put_line('next value timestamp before fetch' || l_next_value_timestamp);
1456:
1457: -- Get the next reading for this counter

Line 1455: csi_ctr_gen_utility_pvt.put_line('next value timestamp before fetch' || l_next_value_timestamp);

1451:
1452: -- *
1453: csi_ctr_gen_utility_pvt.put_line('Getting LAST Counter reading' || to_char(p_ctr_rdg_rec.value_timestamp,'DD-MON-YYYY HH24:MI:SS'));
1454:
1455: csi_ctr_gen_utility_pvt.put_line('next value timestamp before fetch' || l_next_value_timestamp);
1456:
1457: -- Get the next reading for this counter
1458: OPEN NEXT_READING_CUR(p_ctr_rdg_rec.counter_id,p_ctr_rdg_rec.value_timestamp);
1459: FETCH NEXT_READING_CUR

Line 1467: csi_ctr_gen_utility_pvt.put_line('LAST Counter reading' || l_next_ctr_reading );

1463: l_next_comments;
1464: CLOSE NEXT_READING_CUR;
1465:
1466: -- *
1467: csi_ctr_gen_utility_pvt.put_line('LAST Counter reading' || l_next_ctr_reading );
1468: csi_ctr_gen_utility_pvt.put_line('LAST Counter reading' || to_char(l_next_value_timestamp,'DD-MON-YYYY HH24:MI:SS') );
1469: csi_ctr_gen_utility_pvt.put_line('Reading Type is' || l_reading_type );
1470: --
1471: --

Line 1468: csi_ctr_gen_utility_pvt.put_line('LAST Counter reading' || to_char(l_next_value_timestamp,'DD-MON-YYYY HH24:MI:SS') );

1464: CLOSE NEXT_READING_CUR;
1465:
1466: -- *
1467: csi_ctr_gen_utility_pvt.put_line('LAST Counter reading' || l_next_ctr_reading );
1468: csi_ctr_gen_utility_pvt.put_line('LAST Counter reading' || to_char(l_next_value_timestamp,'DD-MON-YYYY HH24:MI:SS') );
1469: csi_ctr_gen_utility_pvt.put_line('Reading Type is' || l_reading_type );
1470: --
1471: --
1472: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN

Line 1469: csi_ctr_gen_utility_pvt.put_line('Reading Type is' || l_reading_type );

1465:
1466: -- *
1467: csi_ctr_gen_utility_pvt.put_line('LAST Counter reading' || l_next_ctr_reading );
1468: csi_ctr_gen_utility_pvt.put_line('LAST Counter reading' || to_char(l_next_value_timestamp,'DD-MON-YYYY HH24:MI:SS') );
1469: csi_ctr_gen_utility_pvt.put_line('Reading Type is' || l_reading_type );
1470: --
1471: --
1472: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1473: IF NVL(l_auto_rollover,'N') <> 'Y' OR

Line 1476: csi_ctr_gen_utility_pvt.put_line('Counter does not have automatic rollover attributes set...');

1472: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1473: IF NVL(l_auto_rollover,'N') <> 'Y' OR
1474: l_rollover_last_rdg IS NULL OR
1475: l_rollover_first_rdg IS NULL THEN
1476: csi_ctr_gen_utility_pvt.put_line('Counter does not have automatic rollover attributes set...');
1477: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1478: ( p_msg_name => 'CSI_API_CTR_ROLLOVER_ATTR_MISS',
1479: p_token1_name => 'MODE',
1480: p_token1_val => l_mode

Line 1477: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1473: IF NVL(l_auto_rollover,'N') <> 'Y' OR
1474: l_rollover_last_rdg IS NULL OR
1475: l_rollover_first_rdg IS NULL THEN
1476: csi_ctr_gen_utility_pvt.put_line('Counter does not have automatic rollover attributes set...');
1477: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1478: ( p_msg_name => 'CSI_API_CTR_ROLLOVER_ATTR_MISS',
1479: p_token1_name => 'MODE',
1480: p_token1_val => l_mode
1481: );

Line 1488: csi_ctr_gen_utility_pvt.put_line('Soft Reset is not allowed for Change Counters..');

1484: -- For Change Counters Reset and Automatic rollover are not allowed
1485:
1486: IF l_reading_type = 2 THEN
1487: /* IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1488: csi_ctr_gen_utility_pvt.put_line('Soft Reset is not allowed for Change Counters..');
1489: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1490: ( p_msg_name => 'CSI_API_NO_RESET_CHG_CTR',
1491: p_token1_name => 'MODE',
1492: p_token1_val => l_mode

Line 1489: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1485:
1486: IF l_reading_type = 2 THEN
1487: /* IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1488: csi_ctr_gen_utility_pvt.put_line('Soft Reset is not allowed for Change Counters..');
1489: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1490: ( p_msg_name => 'CSI_API_NO_RESET_CHG_CTR',
1491: p_token1_name => 'MODE',
1492: p_token1_val => l_mode
1493: );

Line 1498: csi_ctr_gen_utility_pvt.put_line('Automatic Rollover is not allowed for Change Counters..');

1494: END IF;
1495: */
1496: --
1497: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1498: csi_ctr_gen_utility_pvt.put_line('Automatic Rollover is not allowed for Change Counters..');
1499: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1500: ( p_msg_name => 'CSI_API_NO_AUTO_CHG_CTR',
1501: p_token1_name => 'MODE',
1502: p_token1_val => l_mode

Line 1499: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1495: */
1496: --
1497: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1498: csi_ctr_gen_utility_pvt.put_line('Automatic Rollover is not allowed for Change Counters..');
1499: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1500: ( p_msg_name => 'CSI_API_NO_AUTO_CHG_CTR',
1501: p_token1_name => 'MODE',
1502: p_token1_val => l_mode
1503: );

Line 1507: csi_ctr_gen_utility_pvt.put_line('Counter Reading cannot be negative for Change Counters...');

1503: );
1504: END IF;
1505: --
1506: /* IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) < 0 THEN
1507: csi_ctr_gen_utility_pvt.put_line('Counter Reading cannot be negative for Change Counters...');
1508: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1509: ( p_msg_name => 'CSI_API_CTR_NEG_RDG',
1510: p_token1_name => 'MODE',
1511: p_token1_val => l_mode

Line 1508: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1504: END IF;
1505: --
1506: /* IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) < 0 THEN
1507: csi_ctr_gen_utility_pvt.put_line('Counter Reading cannot be negative for Change Counters...');
1508: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1509: ( p_msg_name => 'CSI_API_CTR_NEG_RDG',
1510: p_token1_name => 'MODE',
1511: p_token1_val => l_mode
1512: );

Line 1520: csi_ctr_gen_utility_pvt.put_line('Reset is not allowed for Bi-directional Counters..');

1516: -- For Bi-Directionsl Counters Adjustments, Reset and Automatic rollover are not allowed
1517: IF l_direction = 'B' THEN
1518: --Commented by Anju for cMRO bug
1519: /* IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1520: csi_ctr_gen_utility_pvt.put_line('Reset is not allowed for Bi-directional Counters..');
1521: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1522: ( p_msg_name => 'CSI_API_NO_RESET_BID_CTR',
1523: p_token1_name => 'MODE',
1524: p_token1_val => l_mode

Line 1521: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1517: IF l_direction = 'B' THEN
1518: --Commented by Anju for cMRO bug
1519: /* IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1520: csi_ctr_gen_utility_pvt.put_line('Reset is not allowed for Bi-directional Counters..');
1521: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1522: ( p_msg_name => 'CSI_API_NO_RESET_BID_CTR',
1523: p_token1_name => 'MODE',
1524: p_token1_val => l_mode
1525: );

Line 1530: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);

1526: END IF;*/
1527:
1528: --
1529:
1530: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);
1531: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1532: csi_ctr_gen_utility_pvt.put_line('Automatic Rollover is not allowed for Bi-directional Counters..');
1533: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1534: ( p_msg_name => 'CSI_API_NO_AUTO_BID_CTR',

Line 1532: csi_ctr_gen_utility_pvt.put_line('Automatic Rollover is not allowed for Bi-directional Counters..');

1528: --
1529:
1530: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);
1531: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1532: csi_ctr_gen_utility_pvt.put_line('Automatic Rollover is not allowed for Bi-directional Counters..');
1533: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1534: ( p_msg_name => 'CSI_API_NO_AUTO_BID_CTR',
1535: p_token1_name => 'MODE',
1536: p_token1_val => l_mode

Line 1533: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1529:
1530: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);
1531: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1532: csi_ctr_gen_utility_pvt.put_line('Automatic Rollover is not allowed for Bi-directional Counters..');
1533: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1534: ( p_msg_name => 'CSI_API_NO_AUTO_BID_CTR',
1535: p_token1_name => 'MODE',
1536: p_token1_val => l_mode
1537: );

Line 1543: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading is' || p_ctr_rdg_rec.adjustment_reading);

1539: --
1540:
1541: /* IF NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM
1542: THEN
1543: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading is' || p_ctr_rdg_rec.adjustment_reading);
1544: csi_ctr_gen_utility_pvt.put_line('Adjustment is not allowed for Bi-directional Counters..');
1545: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1546: ( p_msg_name => 'CSI_API_NO_ADJ_BID_CTR',
1547: p_token1_name => 'MODE',

Line 1544: csi_ctr_gen_utility_pvt.put_line('Adjustment is not allowed for Bi-directional Counters..');

1540:
1541: /* IF NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM
1542: THEN
1543: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading is' || p_ctr_rdg_rec.adjustment_reading);
1544: csi_ctr_gen_utility_pvt.put_line('Adjustment is not allowed for Bi-directional Counters..');
1545: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1546: ( p_msg_name => 'CSI_API_NO_ADJ_BID_CTR',
1547: p_token1_name => 'MODE',
1548: p_token1_val => l_mode

Line 1545: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1541: /* IF NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM
1542: THEN
1543: csi_ctr_gen_utility_pvt.put_line('Adjustment Reading is' || p_ctr_rdg_rec.adjustment_reading);
1544: csi_ctr_gen_utility_pvt.put_line('Adjustment is not allowed for Bi-directional Counters..');
1545: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1546: ( p_msg_name => 'CSI_API_NO_ADJ_BID_CTR',
1547: p_token1_name => 'MODE',
1548: p_token1_val => l_mode
1549: );

Line 1557: csi_ctr_gen_utility_pvt.put_line('Automatic Rollover cannot be combined with Reset or Adj...');

1553: -- Automatic Rollover cannot be combined with other reading captures.
1554: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1555: IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR OR
1556: NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1557: csi_ctr_gen_utility_pvt.put_line('Automatic Rollover cannot be combined with Reset or Adj...');
1558: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_AUTO_RDG');
1559: END IF;
1560: END IF;
1561: -- *

Line 1558: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_AUTO_RDG');

1554: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1555: IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR OR
1556: NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1557: csi_ctr_gen_utility_pvt.put_line('Automatic Rollover cannot be combined with Reset or Adj...');
1558: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_AUTO_RDG');
1559: END IF;
1560: END IF;
1561: -- *
1562: csi_ctr_gen_utility_pvt.put_line( '1');

Line 1562: csi_ctr_gen_utility_pvt.put_line( '1');

1558: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_AUTO_RDG');
1559: END IF;
1560: END IF;
1561: -- *
1562: csi_ctr_gen_utility_pvt.put_line( '1');
1563: IF l_next_value_timestamp IS NOT NULL THEN
1564: -- *
1565: csi_ctr_gen_utility_pvt.put_line( '2');
1566: csi_ctr_gen_utility_pvt.put_line( 'l_next_value_timestamp' || l_next_value_timestamp);

Line 1565: csi_ctr_gen_utility_pvt.put_line( '2');

1561: -- *
1562: csi_ctr_gen_utility_pvt.put_line( '1');
1563: IF l_next_value_timestamp IS NOT NULL THEN
1564: -- *
1565: csi_ctr_gen_utility_pvt.put_line( '2');
1566: csi_ctr_gen_utility_pvt.put_line( 'l_next_value_timestamp' || l_next_value_timestamp);
1567: -- Automatic Rollover Cannot occur inbetween readings
1568: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1569: csi_ctr_gen_utility_pvt.put_line('Next counter reading exists. Cannot Rollover...'); ----- this point

Line 1566: csi_ctr_gen_utility_pvt.put_line( 'l_next_value_timestamp' || l_next_value_timestamp);

1562: csi_ctr_gen_utility_pvt.put_line( '1');
1563: IF l_next_value_timestamp IS NOT NULL THEN
1564: -- *
1565: csi_ctr_gen_utility_pvt.put_line( '2');
1566: csi_ctr_gen_utility_pvt.put_line( 'l_next_value_timestamp' || l_next_value_timestamp);
1567: -- Automatic Rollover Cannot occur inbetween readings
1568: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1569: csi_ctr_gen_utility_pvt.put_line('Next counter reading exists. Cannot Rollover...'); ----- this point
1570:

Line 1569: csi_ctr_gen_utility_pvt.put_line('Next counter reading exists. Cannot Rollover...'); ----- this point

1565: csi_ctr_gen_utility_pvt.put_line( '2');
1566: csi_ctr_gen_utility_pvt.put_line( 'l_next_value_timestamp' || l_next_value_timestamp);
1567: -- Automatic Rollover Cannot occur inbetween readings
1568: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1569: csi_ctr_gen_utility_pvt.put_line('Next counter reading exists. Cannot Rollover...'); ----- this point
1570:
1571: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1572: ( p_msg_name => 'CSI_API_CTR_NEXT_RDG_DT_EXISTS',
1573: p_token1_name => 'NEXT_DATE',

Line 1571: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1567: -- Automatic Rollover Cannot occur inbetween readings
1568: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
1569: csi_ctr_gen_utility_pvt.put_line('Next counter reading exists. Cannot Rollover...'); ----- this point
1570:
1571: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1572: ( p_msg_name => 'CSI_API_CTR_NEXT_RDG_DT_EXISTS',
1573: p_token1_name => 'NEXT_DATE',
1574: p_token1_val => to_char(l_next_value_timestamp,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS'))
1575: );

Line 1579: csi_ctr_gen_utility_pvt.put_line('Next counter reading exists. Cannot Reset in between...');

1575: );
1576: END IF;
1577: -- Reset cannot happen in between. It has to be at the end
1578: IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1579: csi_ctr_gen_utility_pvt.put_line('Next counter reading exists. Cannot Reset in between...');
1580:
1581: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1582: ( p_msg_name => 'CSI_API_CTR_NEXT_RDG_DT_EXISTS',
1583: p_token1_name => 'NEXT_DATE',

Line 1581: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1577: -- Reset cannot happen in between. It has to be at the end
1578: IF NVL(p_ctr_rdg_rec.reset_mode,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
1579: csi_ctr_gen_utility_pvt.put_line('Next counter reading exists. Cannot Reset in between...');
1580:
1581: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1582: ( p_msg_name => 'CSI_API_CTR_NEXT_RDG_DT_EXISTS',
1583: p_token1_name => 'NEXT_DATE',
1584: p_token1_val => to_char(l_next_value_timestamp,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS'))
1585: );

Line 1592: csi_ctr_gen_utility_pvt.put_line('Between readings adjustments cannot be clubbed with others...');

1588: -- Inbetween Adjustments cannot be clubbed with other readings
1589: IF NVL(p_ctr_rdg_rec.adjustment_type,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR OR
1590: NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1591: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1592: csi_ctr_gen_utility_pvt.put_line('Between readings adjustments cannot be clubbed with others...');
1593: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1594: ( p_msg_name => 'CSI_API_CTR_ADJ_RDG_ONLY',
1595: p_token1_name => 'NEXT_DATE',
1596: p_token1_val => to_char(l_next_value_timestamp,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS'))

Line 1593: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1589: IF NVL(p_ctr_rdg_rec.adjustment_type,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR OR
1590: NVL(p_ctr_rdg_rec.adjustment_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1591: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1592: csi_ctr_gen_utility_pvt.put_line('Between readings adjustments cannot be clubbed with others...');
1593: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1594: ( p_msg_name => 'CSI_API_CTR_ADJ_RDG_ONLY',
1595: p_token1_name => 'NEXT_DATE',
1596: p_token1_val => to_char(l_next_value_timestamp,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS'))
1597: );

Line 1612: csi_ctr_gen_utility_pvt.put_line('Reset counter reading not in the range of valid rollover values ...D Dir ');

1608: rollover attributes does exists */
1609: IF nvl(l_auto_rollover,'N') = 'Y' THEN
1610: IF p_ctr_rdg_rec.reset_counter_reading < l_rollover_last_rdg OR
1611: p_ctr_rdg_rec.reset_counter_reading > l_rollover_first_rdg THEN
1612: csi_ctr_gen_utility_pvt.put_line('Reset counter reading not in the range of valid rollover values ...D Dir ');
1613: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1614: ( p_msg_name => 'CSI_API_CTR_DSC_ROLLOVER_RDG',
1615: p_token1_name => 'MODE',
1616: p_token1_val => l_mode

Line 1613: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1609: IF nvl(l_auto_rollover,'N') = 'Y' THEN
1610: IF p_ctr_rdg_rec.reset_counter_reading < l_rollover_last_rdg OR
1611: p_ctr_rdg_rec.reset_counter_reading > l_rollover_first_rdg THEN
1612: csi_ctr_gen_utility_pvt.put_line('Reset counter reading not in the range of valid rollover values ...D Dir ');
1613: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1614: ( p_msg_name => 'CSI_API_CTR_DSC_ROLLOVER_RDG',
1615: p_token1_name => 'MODE',
1616: p_token1_val => l_mode
1617: );

Line 1623: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be greater than the previous reading ...D Dir ');

1619: END IF;
1620:
1621:
1622: IF p_ctr_rdg_rec.reset_counter_reading < l_prev_ctr_reading THEN
1623: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be greater than the previous reading ...D Dir ');
1624: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1625: ( p_msg_name => 'CSI_API_CTR_MORE_RESET_RDG',
1626: p_token1_name => 'PREV_RDG',
1627: p_token1_val => to_char(l_prev_ctr_reading),

Line 1624: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1620:
1621:
1622: IF p_ctr_rdg_rec.reset_counter_reading < l_prev_ctr_reading THEN
1623: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be greater than the previous reading ...D Dir ');
1624: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1625: ( p_msg_name => 'CSI_API_CTR_MORE_RESET_RDG',
1626: p_token1_name => 'PREV_RDG',
1627: p_token1_val => to_char(l_prev_ctr_reading),
1628: p_token2_name => 'MODE',

Line 1637: csi_ctr_gen_utility_pvt.put_line('Reset counter reading not in the range of valid rollover values ...A Dir ');

1633: IF nvl(l_auto_rollover,'N') = 'Y' THEN
1634: IF p_ctr_rdg_rec.reset_counter_reading > l_rollover_last_rdg OR
1635: p_ctr_rdg_rec.reset_counter_reading < l_rollover_first_rdg THEN
1636:
1637: csi_ctr_gen_utility_pvt.put_line('Reset counter reading not in the range of valid rollover values ...A Dir ');
1638: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1639: ( p_msg_name => 'CSI_API_CTR_ASC_ROLLOVER_RDG',
1640: p_token1_name => 'MODE',
1641: p_token1_val => l_mode

Line 1638: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1634: IF p_ctr_rdg_rec.reset_counter_reading > l_rollover_last_rdg OR
1635: p_ctr_rdg_rec.reset_counter_reading < l_rollover_first_rdg THEN
1636:
1637: csi_ctr_gen_utility_pvt.put_line('Reset counter reading not in the range of valid rollover values ...A Dir ');
1638: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1639: ( p_msg_name => 'CSI_API_CTR_ASC_ROLLOVER_RDG',
1640: p_token1_name => 'MODE',
1641: p_token1_val => l_mode
1642: );

Line 1646: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be less than the previous reading ... A Dir');

1642: );
1643: END IF;
1644: END IF;
1645: IF p_ctr_rdg_rec.reset_counter_reading > l_prev_ctr_reading THEN
1646: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be less than the previous reading ... A Dir');
1647: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1648: ( p_msg_name => 'CSI_API_CTR_LESS_RESET_RDG',
1649: p_token1_name => 'PREV_RDG',
1650: p_token1_val => to_char(l_prev_ctr_reading),

Line 1647: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1643: END IF;
1644: END IF;
1645: IF p_ctr_rdg_rec.reset_counter_reading > l_prev_ctr_reading THEN
1646: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be less than the previous reading ... A Dir');
1647: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1648: ( p_msg_name => 'CSI_API_CTR_LESS_RESET_RDG',
1649: p_token1_name => 'PREV_RDG',
1650: p_token1_val => to_char(l_prev_ctr_reading),
1651: p_token2_name => 'MODE',

Line 1659: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be greater than the previous reading ...D Dir ');

1655: END IF;
1656: ELSE
1657: IF l_direction = 'D' THEN
1658: IF p_ctr_rdg_rec.reset_counter_reading < l_prev_ctr_reading THEN
1659: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be greater than the previous reading ...D Dir ');
1660: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1661: ( p_msg_name => 'CSI_API_CTR_MORE_RESET_RDG',
1662: p_token1_name => 'PREV_RDG',
1663: p_token1_val => to_char(l_prev_ctr_reading),

Line 1660: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1656: ELSE
1657: IF l_direction = 'D' THEN
1658: IF p_ctr_rdg_rec.reset_counter_reading < l_prev_ctr_reading THEN
1659: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be greater than the previous reading ...D Dir ');
1660: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1661: ( p_msg_name => 'CSI_API_CTR_MORE_RESET_RDG',
1662: p_token1_name => 'PREV_RDG',
1663: p_token1_val => to_char(l_prev_ctr_reading),
1664: p_token2_name => 'MODE',

Line 1671: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be less than the previous reading ... A Dir');

1667: END IF;
1668: /* As in 11.5.10, ensure that Reset of Bidirection counter, reading is less than current reading */
1669: ELSIF l_direction = 'A' THEN
1670: IF p_ctr_rdg_rec.reset_counter_reading > l_prev_ctr_reading THEN
1671: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be less than the previous reading ... A Dir');
1672: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1673: ( p_msg_name => 'CSI_API_CTR_LESS_RESET_RDG',
1674: p_token1_name => 'PREV_RDG',
1675: p_token1_val => to_char(l_prev_ctr_reading),

Line 1672: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1668: /* As in 11.5.10, ensure that Reset of Bidirection counter, reading is less than current reading */
1669: ELSIF l_direction = 'A' THEN
1670: IF p_ctr_rdg_rec.reset_counter_reading > l_prev_ctr_reading THEN
1671: csi_ctr_gen_utility_pvt.put_line('Reset counter reading has to be less than the previous reading ... A Dir');
1672: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1673: ( p_msg_name => 'CSI_API_CTR_LESS_RESET_RDG',
1674: p_token1_name => 'PREV_RDG',
1675: p_token1_val => to_char(l_prev_ctr_reading),
1676: p_token2_name => 'MODE',

Line 1695: csi_ctr_gen_utility_pvt.put_line('1. Reading should be in increasing order...');

1691: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1692: IF ( (p_ctr_rdg_rec.counter_reading < nvl(l_prev_ctr_reading,p_ctr_rdg_rec.counter_reading)) OR
1693: ( l_next_ctr_reading IS NOT NULL AND
1694: p_ctr_rdg_rec.counter_reading > l_next_ctr_reading) ) THEN
1695: csi_ctr_gen_utility_pvt.put_line('1. Reading should be in increasing order...');
1696: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1697: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
1698: p_token1_name => 'DIRECTION',
1699: -- p_token1_val => l_direction,

Line 1696: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1692: IF ( (p_ctr_rdg_rec.counter_reading < nvl(l_prev_ctr_reading,p_ctr_rdg_rec.counter_reading)) OR
1693: ( l_next_ctr_reading IS NOT NULL AND
1694: p_ctr_rdg_rec.counter_reading > l_next_ctr_reading) ) THEN
1695: csi_ctr_gen_utility_pvt.put_line('1. Reading should be in increasing order...');
1696: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1697: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
1698: p_token1_name => 'DIRECTION',
1699: -- p_token1_val => l_direction,
1700: p_token1_val => 'an Ascending',

Line 1713: csi_ctr_gen_utility_pvt.put_line('2. Reading should be in decreasing order...');

1709: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1710: IF ( (p_ctr_rdg_rec.counter_reading > nvl(l_prev_ctr_reading,p_ctr_rdg_rec.counter_reading)) OR
1711: ( l_next_ctr_reading IS NOT NULL AND
1712: p_ctr_rdg_rec.counter_reading < l_next_ctr_reading) ) THEN
1713: csi_ctr_gen_utility_pvt.put_line('2. Reading should be in decreasing order...');
1714: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1715: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
1716: p_token1_name => 'DIRECTION',
1717: -- p_token1_val => l_direction,

Line 1714: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1710: IF ( (p_ctr_rdg_rec.counter_reading > nvl(l_prev_ctr_reading,p_ctr_rdg_rec.counter_reading)) OR
1711: ( l_next_ctr_reading IS NOT NULL AND
1712: p_ctr_rdg_rec.counter_reading < l_next_ctr_reading) ) THEN
1713: csi_ctr_gen_utility_pvt.put_line('2. Reading should be in decreasing order...');
1714: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1715: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
1716: p_token1_name => 'DIRECTION',
1717: -- p_token1_val => l_direction,
1718: p_token1_val => 'a Descending',

Line 1732: csi_ctr_gen_utility_pvt.put_line('Counter Reading has to be within Rollover From-To Rdgs..');

1728: ELSE -- Automatic Rollover
1729: IF nvl(l_direction,'X') = 'A' THEN
1730: IF p_ctr_rdg_rec.counter_reading > l_rollover_last_rdg OR
1731: p_ctr_rdg_rec.counter_reading < l_rollover_first_rdg THEN
1732: csi_ctr_gen_utility_pvt.put_line('Counter Reading has to be within Rollover From-To Rdgs..');
1733: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1734: ( p_msg_name => 'CSI_API_CTR_ASC_ROLLOVER_RDG',
1735: p_token1_name => 'MODE',
1736: p_token1_val => l_mode

Line 1733: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1729: IF nvl(l_direction,'X') = 'A' THEN
1730: IF p_ctr_rdg_rec.counter_reading > l_rollover_last_rdg OR
1731: p_ctr_rdg_rec.counter_reading < l_rollover_first_rdg THEN
1732: csi_ctr_gen_utility_pvt.put_line('Counter Reading has to be within Rollover From-To Rdgs..');
1733: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1734: ( p_msg_name => 'CSI_API_CTR_ASC_ROLLOVER_RDG',
1735: p_token1_name => 'MODE',
1736: p_token1_val => l_mode
1737: );

Line 1742: csi_ctr_gen_utility_pvt.put_line('Counter Reading has to be within Rollover From-To Rdgs..');

1738: END IF;
1739: ELSIF nvl(l_direction,'X') = 'D' THEN
1740: IF p_ctr_rdg_rec.counter_reading < l_rollover_last_rdg OR
1741: p_ctr_rdg_rec.counter_reading > l_rollover_first_rdg THEN
1742: csi_ctr_gen_utility_pvt.put_line('Counter Reading has to be within Rollover From-To Rdgs..');
1743: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1744: ( p_msg_name => 'CSI_API_CTR_DSC_ROLLOVER_RDG',
1745: p_token1_name => 'MODE',
1746: p_token1_val => l_mode

Line 1743: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1739: ELSIF nvl(l_direction,'X') = 'D' THEN
1740: IF p_ctr_rdg_rec.counter_reading < l_rollover_last_rdg OR
1741: p_ctr_rdg_rec.counter_reading > l_rollover_first_rdg THEN
1742: csi_ctr_gen_utility_pvt.put_line('Counter Reading has to be within Rollover From-To Rdgs..');
1743: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1744: ( p_msg_name => 'CSI_API_CTR_DSC_ROLLOVER_RDG',
1745: p_token1_name => 'MODE',
1746: p_token1_val => l_mode
1747: );

Line 1768: csi_ctr_gen_utility_pvt.put_line( 'l_reading_type ' || l_reading_type);

1764: --
1765: -- If counter_reading gets a user entered value or thru' adjustments (Previous value)
1766: -- Insert into CSI_COUNTER_READINGS
1767:
1768: csi_ctr_gen_utility_pvt.put_line( 'l_reading_type ' || l_reading_type);
1769: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.counter_reading ' || p_ctr_rdg_rec.counter_reading);
1770: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.automatic_rollover_flag ' || p_ctr_rdg_rec.automatic_rollover_flag);
1771: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);
1772:

Line 1769: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.counter_reading ' || p_ctr_rdg_rec.counter_reading);

1765: -- If counter_reading gets a user entered value or thru' adjustments (Previous value)
1766: -- Insert into CSI_COUNTER_READINGS
1767:
1768: csi_ctr_gen_utility_pvt.put_line( 'l_reading_type ' || l_reading_type);
1769: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.counter_reading ' || p_ctr_rdg_rec.counter_reading);
1770: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.automatic_rollover_flag ' || p_ctr_rdg_rec.automatic_rollover_flag);
1771: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);
1772:
1773: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_reason ' || p_ctr_rdg_rec.reset_reason);

Line 1770: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.automatic_rollover_flag ' || p_ctr_rdg_rec.automatic_rollover_flag);

1766: -- Insert into CSI_COUNTER_READINGS
1767:
1768: csi_ctr_gen_utility_pvt.put_line( 'l_reading_type ' || l_reading_type);
1769: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.counter_reading ' || p_ctr_rdg_rec.counter_reading);
1770: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.automatic_rollover_flag ' || p_ctr_rdg_rec.automatic_rollover_flag);
1771: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);
1772:
1773: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_reason ' || p_ctr_rdg_rec.reset_reason);
1774:

Line 1771: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);

1767:
1768: csi_ctr_gen_utility_pvt.put_line( 'l_reading_type ' || l_reading_type);
1769: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.counter_reading ' || p_ctr_rdg_rec.counter_reading);
1770: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.automatic_rollover_flag ' || p_ctr_rdg_rec.automatic_rollover_flag);
1771: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);
1772:
1773: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_reason ' || p_ctr_rdg_rec.reset_reason);
1774:
1775: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_counter_reading ' || p_ctr_rdg_rec.reset_counter_reading);

Line 1773: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_reason ' || p_ctr_rdg_rec.reset_reason);

1769: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.counter_reading ' || p_ctr_rdg_rec.counter_reading);
1770: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.automatic_rollover_flag ' || p_ctr_rdg_rec.automatic_rollover_flag);
1771: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);
1772:
1773: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_reason ' || p_ctr_rdg_rec.reset_reason);
1774:
1775: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_counter_reading ' || p_ctr_rdg_rec.reset_counter_reading);
1776:
1777: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN

Line 1775: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_counter_reading ' || p_ctr_rdg_rec.reset_counter_reading);

1771: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_mode ' || p_ctr_rdg_rec.reset_mode);
1772:
1773: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_reason ' || p_ctr_rdg_rec.reset_reason);
1774:
1775: csi_ctr_gen_utility_pvt.put_line( 'p_ctr_rdg_rec.reset_counter_reading ' || p_ctr_rdg_rec.reset_counter_reading);
1776:
1777: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1778: IF NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM OR
1779: (NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM

Line 1782: --csi_ctr_gen_utility_pvt.put_line( 'check' || check);

1778: IF NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM OR
1779: (NVL(p_ctr_rdg_rec.reset_counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM
1780: AND (p_ctr_rdg_rec.counter_reading <> p_ctr_rdg_rec.reset_counter_reading)) THEN
1781: -- check := true;
1782: --csi_ctr_gen_utility_pvt.put_line( 'check' || check);
1783: -- IF (p_ctr_rdg_rec.counter_reading <> p_ctr_rdg_rec.reset_counter_reading) THEN -- for cMRO resetTHEN
1784: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') <> 'Y' THEN
1785:
1786: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading 1');

Line 1786: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading 1');

1782: --csi_ctr_gen_utility_pvt.put_line( 'check' || check);
1783: -- IF (p_ctr_rdg_rec.counter_reading <> p_ctr_rdg_rec.reset_counter_reading) THEN -- for cMRO resetTHEN
1784: IF NVL(p_ctr_rdg_rec.automatic_rollover_flag,'N') <> 'Y' THEN
1785:
1786: csi_ctr_gen_utility_pvt.put_line('Calculate Net Reading 1');
1787:
1788: Calculate_Net_Reading
1789: ( p_prev_net_rdg => l_prev_net_reading
1790: ,p_prev_ltd_rdg => l_prev_ltd_reading

Line 1805: csi_ctr_gen_utility_pvt.put_line('3. LTD Reading should be in increasing orde for a CHANGE COUNTER...');

1801: IF l_reading_type = 2 THEN
1802: IF nvl(l_direction,'X') = 'A' THEN
1803: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1804: IF (l_ltd_reading < l_prev_ltd_reading) THEN
1805: csi_ctr_gen_utility_pvt.put_line('3. LTD Reading should be in increasing orde for a CHANGE COUNTER...');
1806: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1807: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
1808: p_token1_name => 'DIRECTION',
1809: -- p_token1_val => l_direction,

Line 1806: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1802: IF nvl(l_direction,'X') = 'A' THEN
1803: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1804: IF (l_ltd_reading < l_prev_ltd_reading) THEN
1805: csi_ctr_gen_utility_pvt.put_line('3. LTD Reading should be in increasing orde for a CHANGE COUNTER...');
1806: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1807: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
1808: p_token1_name => 'DIRECTION',
1809: -- p_token1_val => l_direction,
1810: p_token1_val => 'an Ascending',

Line 1821: csi_ctr_gen_utility_pvt.put_line('4. LTD Reading should be in decreasing order for a CHANGE COUNTER...');

1817: END IF;
1818: ELSIF nvl(l_direction,'X') = 'D' THEN
1819: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1820: IF (l_ltd_reading > l_prev_ltd_reading) THEN
1821: csi_ctr_gen_utility_pvt.put_line('4. LTD Reading should be in decreasing order for a CHANGE COUNTER...');
1822: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1823: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
1824: p_token1_name => 'DIRECTION',
1825: -- p_token1_val => l_direction,

Line 1822: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1818: ELSIF nvl(l_direction,'X') = 'D' THEN
1819: IF NVL(p_ctr_rdg_rec.counter_reading,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
1820: IF (l_ltd_reading > l_prev_ltd_reading) THEN
1821: csi_ctr_gen_utility_pvt.put_line('4. LTD Reading should be in decreasing order for a CHANGE COUNTER...');
1822: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1823: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
1824: p_token1_name => 'DIRECTION',
1825: -- p_token1_val => l_direction,
1826: p_token1_val => 'a Descending',

Line 1865: csi_ctr_gen_utility_pvt.ExitWithErrMsg

1861: END IF;
1862: END LOOP;
1863: ELSE
1864: IF Counter_Value_Exists(p_ctr_rdg_rec.counter_value_id) THEN
1865: csi_ctr_gen_utility_pvt.ExitWithErrMsg
1866: ( p_msg_name => 'CSI_API_CTR_VALUE_EXISTS',
1867: p_token1_name => 'CTR_NAME',
1868: p_token1_val => l_ctr_name,
1869: p_token2_name => 'CTR_VALUE_ID',

Line 1953: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');

1949: ,x_msg_count => x_msg_count
1950: ,x_msg_data => x_msg_data
1951: );
1952: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
1953: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
1954: l_msg_index := 1;
1955: l_msg_count := x_msg_count;
1956: WHILE l_msg_count > 0 LOOP
1957: x_msg_data := FND_MSG_PUB.GET

Line 1961: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

1957: x_msg_data := FND_MSG_PUB.GET
1958: ( l_msg_index,
1959: FND_API.G_FALSE
1960: );
1961: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
1962: l_msg_index := l_msg_index + 1;
1963: l_msg_count := l_msg_count - 1;
1964: END LOOP;
1965: RAISE FND_API.G_EXC_ERROR;

Line 2026: csi_ctr_gen_utility_pvt.put_line('Target counter reading = '||to_char(l_target_ctr_rec.counter_reading));

2022: -- l_target_ctr_rec.counter_reading := ABS(p_ctr_rdg_rec.counter_reading);
2023: l_target_ctr_rec.counter_reading := p_ctr_rdg_rec.counter_reading;
2024: END IF;
2025: END IF; -- Rollover flag check
2026: csi_ctr_gen_utility_pvt.put_line('Target counter reading = '||to_char(l_target_ctr_rec.counter_reading));
2027:
2028: --
2029: -- Call Compute_Target_Counters
2030: --

Line 2031: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Target_Counters 1...');

2027:
2028: --
2029: -- Call Compute_Target_Counters
2030: --
2031: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Target_Counters 1...');
2032: Compute_Target_Counters
2033: (
2034: p_api_version => 1.0
2035: ,p_commit => p_commit

Line 2046: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');

2042: ,x_msg_count => x_msg_count
2043: ,x_msg_data => x_msg_data
2044: );
2045: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
2046: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');
2047: l_msg_index := 1;
2048: l_msg_count := x_msg_count;
2049: WHILE l_msg_count > 0 LOOP
2050: x_msg_data := FND_MSG_PUB.GET

Line 2054: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

2050: x_msg_data := FND_MSG_PUB.GET
2051: ( l_msg_index,
2052: FND_API.G_FALSE
2053: );
2054: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
2055: l_msg_index := l_msg_index + 1;
2056: l_msg_count := l_msg_count - 1;
2057: END LOOP;
2058: RAISE FND_API.G_EXC_ERROR;

Line 2089: csi_ctr_gen_utility_pvt.put_line('Re-calculating target counters');

2085: p_ctr_rdg_rec.adjustment_reading <> FND_API.G_MISS_NUM AND
2086: p_ctr_rdg_rec.adjustment_reading <> 0) OR
2087: NVL(l_next_reset_mode,'X') = 'SOFT' THEN
2088: -- *
2089: csi_ctr_gen_utility_pvt.put_line('Re-calculating target counters');
2090: l_update_loop := TRUE;
2091: FOR later_rdg IN LATER_READINGS_CUR(p_ctr_rdg_rec.counter_id,p_ctr_rdg_rec.value_timestamp)
2092:
2093: LOOP

Line 2095: csi_ctr_gen_utility_pvt.put_line('Updating Later Readings for Ctr Value ID : '||to_char(later_rdg.counter_value_id));

2091: FOR later_rdg IN LATER_READINGS_CUR(p_ctr_rdg_rec.counter_id,p_ctr_rdg_rec.value_timestamp)
2092:
2093: LOOP
2094:
2095: csi_ctr_gen_utility_pvt.put_line('Updating Later Readings for Ctr Value ID : '||to_char(later_rdg.counter_value_id));
2096:
2097: IF NVL(later_rdg.reset_mode,'X') = 'SOFT' THEN
2098: csi_ctr_gen_utility_pvt.put_line('SOFT and re-calculating net readings');
2099: UPDATE CSI_COUNTER_READINGS

Line 2098: csi_ctr_gen_utility_pvt.put_line('SOFT and re-calculating net readings');

2094:
2095: csi_ctr_gen_utility_pvt.put_line('Updating Later Readings for Ctr Value ID : '||to_char(later_rdg.counter_value_id));
2096:
2097: IF NVL(later_rdg.reset_mode,'X') = 'SOFT' THEN
2098: csi_ctr_gen_utility_pvt.put_line('SOFT and re-calculating net readings');
2099: UPDATE CSI_COUNTER_READINGS
2100: set net_reading = later_rdg.counter_reading, -- l_previous_net,
2101: life_to_date_reading = l_previous_ltd,
2102: last_update_date = sysdate,

Line 2159: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Target_Counters for Update ...');

2155: -- l_target_ctr_rec.counter_reading := ABS(later_rdg.counter_reading);
2156: l_target_ctr_rec.counter_reading := later_rdg.counter_reading;
2157: END IF;
2158: END IF;
2159: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Target_Counters for Update ...');
2160: Compute_Target_Counters
2161: (
2162: p_api_version => 1.0
2163: ,p_commit => p_commit

Line 2174: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');

2170: ,x_msg_count => x_msg_count
2171: ,x_msg_data => x_msg_data
2172: );
2173: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
2174: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');
2175: l_msg_index := 1;
2176: l_msg_count := x_msg_count;
2177: WHILE l_msg_count > 0 LOOP
2178: x_msg_data := FND_MSG_PUB.GET

Line 2182: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

2178: x_msg_data := FND_MSG_PUB.GET
2179: ( l_msg_index,
2180: FND_API.G_FALSE
2181: );
2182: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
2183: l_msg_index := l_msg_index + 1;
2184: l_msg_count := l_msg_count - 1;
2185: END LOOP;
2186: RAISE FND_API.G_EXC_ERROR;

Line 2202: csi_ctr_gen_utility_pvt.put_line('6398254: If not update_loop');

2198: --
2199: IF NOT l_update_loop THEN
2200: FOR later_rdg IN LATER_READINGS_CUR(p_ctr_rdg_rec.counter_id,p_ctr_rdg_rec.value_timestamp)
2201: LOOP
2202: csi_ctr_gen_utility_pvt.put_line('6398254: If not update_loop');
2203: -- Re-calculate Compute Target Counters
2204: -- For Resets which did not include Targets before, no need to Re-compute
2205: --
2206: IF later_rdg.reset_mode IS NULL OR

Line 2229: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Target_Counters for Update 2...');

2225: -- l_target_ctr_rec.counter_reading := ABS(later_rdg.counter_reading);
2226: l_target_ctr_rec.counter_reading := later_rdg.counter_reading;
2227: END IF;
2228: END IF;
2229: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Target_Counters for Update 2...');
2230: Compute_Target_Counters
2231: (
2232: p_api_version => 1.0
2233: ,p_commit => p_commit

Line 2244: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');

2240: ,x_msg_count => x_msg_count
2241: ,x_msg_data => x_msg_data
2242: );
2243: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
2244: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');
2245: l_msg_index := 1;
2246: l_msg_count := x_msg_count;
2247: WHILE l_msg_count > 0 LOOP
2248: x_msg_data := FND_MSG_PUB.GET

Line 2252: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

2248: x_msg_data := FND_MSG_PUB.GET
2249: ( l_msg_index,
2250: FND_API.G_FALSE
2251: );
2252: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
2253: l_msg_index := l_msg_index + 1;
2254: l_msg_count := l_msg_count - 1;
2255: END LOOP;
2256: RAISE FND_API.G_EXC_ERROR;

Line 2281: csi_ctr_gen_utility_pvt.put_line('Reset Timestamp is : '||to_char(l_reset_timestamp,'DD-MON-YYYY HH24:MI:SS'));

2277: ELSE -- Only Reset is performed
2278: l_reset_timestamp := p_ctr_rdg_rec.value_timestamp;
2279: END IF;
2280: --
2281: csi_ctr_gen_utility_pvt.put_line('Reset Timestamp is : '||to_char(l_reset_timestamp,'DD-MON-YYYY HH24:MI:SS'));
2282:
2283: --
2284: l_reset_rdg_rec.counter_id := p_ctr_rdg_rec.counter_id;
2285: l_reset_rdg_rec.value_timestamp := l_reset_timestamp;

Line 2323: csi_ctr_gen_utility_pvt.put_line('Inserting Reset Record with Ctr Value ID '||to_char(l_reset_rdg_rec.counter_value_id));

2319: p_ctr_rdg_rec.counter_value_id := l_reset_rdg_rec.counter_value_id;
2320: END IF;
2321: -- Call the Table Handler to insert the Reset Reading into CSI_COUNTER_READINGS
2322: --
2323: csi_ctr_gen_utility_pvt.put_line('Inserting Reset Record with Ctr Value ID '||to_char(l_reset_rdg_rec.counter_value_id));
2324:
2325: --
2326: CSI_COUNTER_READINGS_PKG.Insert_Row(
2327: px_COUNTER_VALUE_ID => l_reset_rdg_rec.counter_value_id

Line 2400: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');

2396: ,x_msg_count => x_msg_count
2397: ,x_msg_data => x_msg_data
2398: );
2399: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
2400: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
2401: l_msg_index := 1;
2402: l_msg_count := x_msg_count;
2403: WHILE l_msg_count > 0 LOOP
2404: x_msg_data := FND_MSG_PUB.GET

Line 2408: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

2404: x_msg_data := FND_MSG_PUB.GET
2405: ( l_msg_index,
2406: FND_API.G_FALSE
2407: );
2408: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
2409: l_msg_index := l_msg_index + 1;
2410: l_msg_count := l_msg_count - 1;
2411: END LOOP;
2412: RAISE FND_API.G_EXC_ERROR;

Line 2433: csi_ctr_gen_utility_pvt.put_line('6398254: l_reset_rdg_rec.reset_reason' || l_reset_rdg_rec.reset_reason);

2429: l_target_ctr_rec.reset_reason := l_reset_rdg_rec.reset_reason;
2430: l_target_ctr_rec.comments := l_reset_rdg_rec.comments;
2431: --
2432: -- added 6398254
2433: csi_ctr_gen_utility_pvt.put_line('6398254: l_reset_rdg_rec.reset_reason' || l_reset_rdg_rec.reset_reason);
2434: -- Call Re-Compute Target Counters
2435: csi_ctr_gen_utility_pvt.put_line('Calling Reset_Target_Counters 1...');
2436: Reset_Target_Counters
2437: (

Line 2435: csi_ctr_gen_utility_pvt.put_line('Calling Reset_Target_Counters 1...');

2431: --
2432: -- added 6398254
2433: csi_ctr_gen_utility_pvt.put_line('6398254: l_reset_rdg_rec.reset_reason' || l_reset_rdg_rec.reset_reason);
2434: -- Call Re-Compute Target Counters
2435: csi_ctr_gen_utility_pvt.put_line('Calling Reset_Target_Counters 1...');
2436: Reset_Target_Counters
2437: (
2438: p_txn_rec => p_txn_rec
2439: ,p_ctr_rdg_rec => l_target_ctr_rec

Line 2445: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Reset_Target_Counters API ');

2441: ,x_msg_count => x_msg_count
2442: ,x_msg_data => x_msg_data
2443: );
2444: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
2445: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Reset_Target_Counters API ');
2446: l_msg_index := 1;
2447: l_msg_count := x_msg_count;
2448: WHILE l_msg_count > 0 LOOP
2449: x_msg_data := FND_MSG_PUB.GET

Line 2453: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

2449: x_msg_data := FND_MSG_PUB.GET
2450: ( l_msg_index,
2451: FND_API.G_FALSE
2452: );
2453: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
2454: l_msg_index := l_msg_index + 1;
2455: l_msg_count := l_msg_count - 1;
2456: END LOOP;
2457: RAISE FND_API.G_EXC_ERROR;

Line 2600: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

2596: -- Initialize API return status to success
2597: x_return_status := FND_API.G_RET_STS_SUCCESS;
2598:
2599: -- Read the debug profiles values in to global variable 7197402
2600: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
2601: --
2602: csi_ctr_gen_utility_pvt.put_line( 'compute_formula_counters' ||'-'||
2603: p_api_version ||'-'||
2604: nvl(p_commit,FND_API.G_FALSE) ||'-'||

Line 2602: csi_ctr_gen_utility_pvt.put_line( 'compute_formula_counters' ||'-'||

2598:
2599: -- Read the debug profiles values in to global variable 7197402
2600: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
2601: --
2602: csi_ctr_gen_utility_pvt.put_line( 'compute_formula_counters' ||'-'||
2603: p_api_version ||'-'||
2604: nvl(p_commit,FND_API.G_FALSE) ||'-'||
2605: nvl(p_init_msg_list,FND_API.G_FALSE) ||'-'||
2606: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );

Line 2608: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);

2604: nvl(p_commit,FND_API.G_FALSE) ||'-'||
2605: nvl(p_init_msg_list,FND_API.G_FALSE) ||'-'||
2606: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );
2607: --
2608: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);
2609: --
2610: IF p_txn_rec.transaction_type_id in (88,91,92,94,95) THEN
2611: l_mode := 'Meter';
2612: ELSE

Line 2618: csi_ctr_gen_utility_pvt.ExitWithErrMsg

2614: END IF;
2615: --
2616: IF p_ctr_rdg_rec.counter_id IS NULL OR
2617: p_ctr_rdg_rec.counter_id = FND_API.G_MISS_NUM THEN
2618: csi_ctr_gen_utility_pvt.ExitWithErrMsg
2619: ( p_msg_name => 'CSI_API_CTR_INVALID',
2620: p_token1_name => 'MODE',
2621: p_token1_val => l_mode
2622: );

Line 2653: csi_ctr_gen_utility_pvt.ExitWithErrMsg

2649: Begin
2650: DBMS_SQL.PARSE(l_cursor_handle, l_formula_text, dbms_sql.native);
2651: Exception
2652: when others then
2653: csi_ctr_gen_utility_pvt.ExitWithErrMsg
2654: ( p_msg_name => 'CSI_API_CTR_FORMULA_DEF_INV',
2655: p_token1_name => 'FMLA_TEXT',
2656: p_token1_val => l_formula_text
2657: );

Line 2719: csi_ctr_gen_utility_pvt.put_line('Trying to Update Object Ctr : '||to_char(obj_cur.object_counter_id));

2715: -- If the source counter reading is not disabled then we update/insert the row for formula
2716: -- counter.
2717: --
2718: IF NVL(p_ctr_rdg_rec.disabled_flag,'N') <> 'Y' THEN
2719: csi_ctr_gen_utility_pvt.put_line('Trying to Update Object Ctr : '||to_char(obj_cur.object_counter_id));
2720: Update CSI_COUNTER_READINGS
2721: set counter_reading = l_counter_reading,
2722: net_reading = l_counter_reading,
2723: life_to_date_reading = l_counter_reading,

Line 2741: csi_ctr_gen_utility_pvt.put_line('Unable to Update. Inserting Object Ctr : '||to_char(obj_cur.object_counter_id));

2737: l_process_flag := FALSE;
2738: END IF;
2739: END LOOP;
2740: --
2741: csi_ctr_gen_utility_pvt.put_line('Unable to Update. Inserting Object Ctr : '||to_char(obj_cur.object_counter_id));
2742: -- Call the Table Handler to insert the new reading
2743: CSI_COUNTER_READINGS_PKG.Insert_Row(
2744: px_COUNTER_VALUE_ID => l_ctr_value_id
2745: ,p_COUNTER_ID => obj_cur.object_counter_id

Line 2817: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');

2813: ,x_msg_count => x_msg_count
2814: ,x_msg_data => x_msg_data
2815: );
2816: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
2817: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
2818: l_msg_index := 1;
2819: l_msg_count := x_msg_count;
2820: WHILE l_msg_count > 0 LOOP
2821: x_msg_data := FND_MSG_PUB.GET

Line 2825: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

2821: x_msg_data := FND_MSG_PUB.GET
2822: ( l_msg_index,
2823: FND_API.G_FALSE
2824: );
2825: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
2826: l_msg_index := l_msg_index + 1;
2827: l_msg_count := l_msg_count - 1;
2828: END LOOP;
2829: RAISE FND_API.G_EXC_ERROR;

Line 2847: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');

2843: ,x_msg_count => x_msg_count
2844: ,x_msg_data => x_msg_data
2845: );
2846: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
2847: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
2848: l_msg_index := 1;
2849: l_msg_count := x_msg_count;
2850: WHILE l_msg_count > 0 LOOP
2851: x_msg_data := FND_MSG_PUB.GET

Line 2855: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

2851: x_msg_data := FND_MSG_PUB.GET
2852: ( l_msg_index,
2853: FND_API.G_FALSE
2854: );
2855: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
2856: l_msg_index := l_msg_index + 1;
2857: l_msg_count := l_msg_count - 1;
2858: END LOOP;
2859: RAISE FND_API.G_EXC_ERROR;

Line 2863: csi_ctr_gen_utility_pvt.put_line('Disabling Obj Ctr '||to_char(obj_cur.object_counter_id));

2859: RAISE FND_API.G_EXC_ERROR;
2860: END IF;
2861: END IF;
2862: ELSE -- If source counter is disabled then the corresponding formula counter reading is updated
2863: csi_ctr_gen_utility_pvt.put_line('Disabling Obj Ctr '||to_char(obj_cur.object_counter_id));
2864: Update CSI_COUNTER_READINGS
2865: set counter_reading = l_counter_reading,
2866: net_reading = l_counter_reading,
2867: life_to_date_reading = l_counter_reading,

Line 2890: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');

2886: ,x_msg_count => x_msg_count
2887: ,x_msg_data => x_msg_data
2888: );
2889: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
2890: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
2891: l_msg_index := 1;
2892: l_msg_count := x_msg_count;
2893: WHILE l_msg_count > 0 LOOP
2894: x_msg_data := FND_MSG_PUB.GET

Line 2898: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

2894: x_msg_data := FND_MSG_PUB.GET
2895: ( l_msg_index,
2896: FND_API.G_FALSE
2897: );
2898: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
2899: l_msg_index := l_msg_index + 1;
2900: l_msg_count := l_msg_count - 1;
2901: END LOOP;
2902: RAISE FND_API.G_EXC_ERROR;

Line 2919: csi_ctr_gen_utility_pvt.ExitWithErrMsg

2915: Begin
2916: DBMS_SQL.PARSE(l_cursor_handle, l_formula_text, dbms_sql.native);
2917: Exception
2918: when others then
2919: csi_ctr_gen_utility_pvt.ExitWithErrMsg
2920: ( p_msg_name => 'CSI_API_CTR_FORMULA_DEF_INV',
2921: p_token1_name => 'FMLA_TEXT',
2922: p_token1_val => l_formula_text
2923: );

Line 2945: csi_ctr_gen_utility_pvt.put_line('Re-computing later formula Ctr Value ID '||to_char(later_rec.counter_value_id));

2941: --Get the value
2942: IF dbms_sql.fetch_rows(l_cursor_handle) > 0 THEN
2943: dbms_sql.column_value(l_cursor_handle,1,l_counter_reading);
2944: -- Updating Formula Counter
2945: csi_ctr_gen_utility_pvt.put_line('Re-computing later formula Ctr Value ID '||to_char(later_rec.counter_value_id));
2946: Update CSI_COUNTER_READINGS
2947: set counter_reading = l_counter_reading,
2948: net_reading = l_counter_reading,
2949: life_to_date_reading = l_counter_reading,

Line 3106: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

3102: x_return_status := FND_API.G_RET_STS_SUCCESS;
3103: --
3104:
3105: -- Read the debug profiles values in to global variable 7197402
3106: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
3107:
3108: csi_ctr_gen_utility_pvt.put_line('Inside Compute_Derive_Counters...');
3109: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);
3110: --

Line 3108: csi_ctr_gen_utility_pvt.put_line('Inside Compute_Derive_Counters...');

3104:
3105: -- Read the debug profiles values in to global variable 7197402
3106: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
3107:
3108: csi_ctr_gen_utility_pvt.put_line('Inside Compute_Derive_Counters...');
3109: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);
3110: --
3111: -- Start fix for bug 6852415, part 2 of 3
3112: FOR base_ctr IN base_ctrs LOOP

Line 3109: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);

3105: -- Read the debug profiles values in to global variable 7197402
3106: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
3107:
3108: csi_ctr_gen_utility_pvt.put_line('Inside Compute_Derive_Counters...');
3109: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);
3110: --
3111: -- Start fix for bug 6852415, part 2 of 3
3112: FOR base_ctr IN base_ctrs LOOP
3113: FOR ctrs IN ctrs_to_be_calc(base_ctr.base_ctr_id, base_ctr.base_ctr_timestamp) LOOP

Line 3138: csi_ctr_gen_utility_pvt.put_line('Invalid Filter Reading count for the Counter '||

3134: -- We need n+1 readings to compute the average where n is the filter count. This is because
3135: -- we don't have the previous net_reading in the same record.
3136: --
3137: IF nvl(ctrs.filter_reading_count,0) <= 0 THEN
3138: csi_ctr_gen_utility_pvt.put_line('Invalid Filter Reading count for the Counter '||
3139: to_char(ctrs.counter_id));
3140: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3141: ( p_msg_name => 'CSI_INVD_FILTER_READING_COUNT',
3142: p_token1_name => 'COUNTER_ID',

Line 3140: csi_ctr_gen_utility_pvt.ExitWithErrMsg

3136: --
3137: IF nvl(ctrs.filter_reading_count,0) <= 0 THEN
3138: csi_ctr_gen_utility_pvt.put_line('Invalid Filter Reading count for the Counter '||
3139: to_char(ctrs.counter_id));
3140: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3141: ( p_msg_name => 'CSI_INVD_FILTER_READING_COUNT',
3142: p_token1_name => 'COUNTER_ID',
3143: p_token1_val => to_char(ctrs.counter_id)
3144: );

Line 3213: csi_ctr_gen_utility_pvt.ExitWithErrMsg

3209: FETCH CTR_CUR_RDG INTO l_captured_rdg;
3210: CLOSE CTR_CUR_RDG;
3211: --
3212: IF l_time_uom IS NULL THEN
3213: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3214: ( p_msg_name => 'CSI_API_CTR_INVALID_FILT_UOM',
3215: p_token1_name => 'UOM_CODE',
3216: p_token1_val => ctrs.filter_time_uom
3217: );

Line 3320: csi_ctr_gen_utility_pvt.put_line('SQL String is '||l_sqlstr);

3316: lj:= lj+1;
3317: end loop;
3318: end if;
3319: --
3320: csi_ctr_gen_utility_pvt.put_line('SQL String is '||l_sqlstr);
3321: l_n_temp := dbms_sql.execute(l_cursor_handle);
3322: IF dbms_sql.fetch_rows(l_cursor_handle) > 0 THEN
3323: dbms_sql.column_value(l_cursor_handle,1,l_ctr_value);
3324: END IF;

Line 3443: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');

3439: ,x_msg_count => x_msg_count
3440: ,x_msg_data => x_msg_data
3441: );
3442: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3443: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
3444: l_msg_index := 1;
3445: l_msg_count := x_msg_count;
3446: WHILE l_msg_count > 0 LOOP
3447: x_msg_data := FND_MSG_PUB.GET

Line 3451: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

3447: x_msg_data := FND_MSG_PUB.GET
3448: ( l_msg_index,
3449: FND_API.G_FALSE
3450: );
3451: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
3452: l_msg_index := l_msg_index + 1;
3453: l_msg_count := l_msg_count - 1;
3454: END LOOP;
3455: RAISE FND_API.G_EXC_ERROR;

Line 3459: csi_ctr_gen_utility_pvt.put_line('No derive filters computed for '||to_char(ctrs.counter_id));

3455: RAISE FND_API.G_EXC_ERROR;
3456: END IF;
3457: END IF; -- p_mode check
3458: ELSE
3459: csi_ctr_gen_utility_pvt.put_line('No derive filters computed for '||to_char(ctrs.counter_id));
3460: END IF; -- l_ctr_value check
3461: END LOOP;
3462: -- Start fix bug 6852415, part 3 of 3
3463: END LOOP;

Line 3595: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

3591: x_return_status := FND_API.G_RET_STS_SUCCESS;
3592: --
3593:
3594: -- Read the debug profiles values in to global variable 7197402
3595: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
3596:
3597: csi_ctr_gen_utility_pvt.put_line( 'compute_target_counters' ||'-'||
3598: p_api_version ||'-'||
3599: p_mode ||'-'||

Line 3597: csi_ctr_gen_utility_pvt.put_line( 'compute_target_counters' ||'-'||

3593:
3594: -- Read the debug profiles values in to global variable 7197402
3595: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
3596:
3597: csi_ctr_gen_utility_pvt.put_line( 'compute_target_counters' ||'-'||
3598: p_api_version ||'-'||
3599: p_mode ||'-'||
3600: nvl(p_commit,FND_API.G_FALSE) ||'-'||
3601: nvl(p_init_msg_list,FND_API.G_FALSE) ||'-'||

Line 3604: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);

3600: nvl(p_commit,FND_API.G_FALSE) ||'-'||
3601: nvl(p_init_msg_list,FND_API.G_FALSE) ||'-'||
3602: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );
3603: --
3604: csi_ctr_gen_utility_pvt.dump_counter_readings_rec(p_ctr_rdg_rec);
3605: --
3606: IF p_txn_rec.transaction_type_id IN (88,91,92,94,95) THEN
3607: l_mode := 'Meter';
3608: ELSE

Line 3614: csi_ctr_gen_utility_pvt.ExitWithErrMsg

3610: END IF;
3611: --
3612: IF p_ctr_rdg_rec.counter_id IS NULL OR
3613: p_ctr_rdg_rec.counter_id = FND_API.G_MISS_NUM THEN
3614: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3615: ( p_msg_name => 'CSI_API_CTR_INVALID',
3616: p_token1_name => 'MODE',
3617: p_token1_val => l_mode
3618: );

Line 3623: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_RDG_DATE');

3619: END IF;
3620: --
3621: IF p_ctr_rdg_rec.value_timestamp IS NULL OR
3622: p_ctr_rdg_rec.value_timestamp = FND_API.G_MISS_DATE THEN
3623: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_RDG_DATE');
3624: END IF;
3625: --
3626: -- Fundamental Assumption is, the direction of All Target counters should be same as the Source Counter
3627: --

Line 3629: csi_ctr_gen_utility_pvt.put_line(' Compute Target Counters - UPDATE');

3625: --
3626: -- Fundamental Assumption is, the direction of All Target counters should be same as the Source Counter
3627: --
3628: IF p_mode = 'UPDATE' THEN
3629: csi_ctr_gen_utility_pvt.put_line(' Compute Target Counters - UPDATE');
3630: FOR obj_cur in UPD_OBJ_CUR LOOP
3631: IF NVL(obj_cur.direction,'X') NOT IN ('A','D','B') THEN
3632: csi_ctr_gen_utility_pvt.put_line('Target Counter has Invalid Direction...');
3633: csi_ctr_gen_utility_pvt.ExitWithErrMsg

Line 3632: csi_ctr_gen_utility_pvt.put_line('Target Counter has Invalid Direction...');

3628: IF p_mode = 'UPDATE' THEN
3629: csi_ctr_gen_utility_pvt.put_line(' Compute Target Counters - UPDATE');
3630: FOR obj_cur in UPD_OBJ_CUR LOOP
3631: IF NVL(obj_cur.direction,'X') NOT IN ('A','D','B') THEN
3632: csi_ctr_gen_utility_pvt.put_line('Target Counter has Invalid Direction...');
3633: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3634: ( p_msg_name => 'CSI_API_CTR_INVALID_DIR',
3635: p_token1_name => 'MODE',
3636: p_token1_val => l_mode

Line 3633: csi_ctr_gen_utility_pvt.ExitWithErrMsg

3629: csi_ctr_gen_utility_pvt.put_line(' Compute Target Counters - UPDATE');
3630: FOR obj_cur in UPD_OBJ_CUR LOOP
3631: IF NVL(obj_cur.direction,'X') NOT IN ('A','D','B') THEN
3632: csi_ctr_gen_utility_pvt.put_line('Target Counter has Invalid Direction...');
3633: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3634: ( p_msg_name => 'CSI_API_CTR_INVALID_DIR',
3635: p_token1_name => 'MODE',
3636: p_token1_val => l_mode
3637: );

Line 3652: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');

3648: END;
3649:
3650: /* Validate direction */
3651: IF obj_cur.direction = 'B' and l_source_direction <> 'B' THEN
3652: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');
3653: END IF;
3654:
3655: IF l_source_direction = 'B' and obj_cur.direction <> 'B' THEN
3656: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');

Line 3656: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');

3652: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');
3653: END IF;
3654:
3655: IF l_source_direction = 'B' and obj_cur.direction <> 'B' THEN
3656: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');
3657: END IF;
3658:
3659: IF obj_cur.object_uom_code <> l_source_uom_code THEN
3660: /* Validate if same UOM class */

Line 3665: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');

3661: OPEN get_uom_class(obj_cur.object_uom_code);
3662: FETCH get_uom_class into l_object_uom_class;
3663:
3664: IF get_uom_class%notfound THEN
3665: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');
3666: END IF;
3667:
3668: IF get_uom_class%ISOPEN THEN
3669: CLOSE get_uom_class;

Line 3676: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');

3672: OPEN get_uom_class(l_source_uom_code);
3673: FETCH get_uom_class into l_source_uom_class;
3674:
3675: IF get_uom_class%notfound THEN
3676: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');
3677: END IF;
3678:
3679: IF get_uom_class%ISOPEN THEN
3680: CLOSE get_uom_class;

Line 3690: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);

3686: ,obj_cur.object_uom_code
3687: ,null
3688: ,l_uom_rate);
3689:
3690: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
3691: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
3692: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3693: IF l_uom_rate = -99999 then
3694: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');

Line 3691: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);

3687: ,null
3688: ,l_uom_rate);
3689:
3690: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
3691: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
3692: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3693: IF l_uom_rate = -99999 then
3694: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');
3695: END IF;

Line 3692: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));

3688: ,l_uom_rate);
3689:
3690: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
3691: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
3692: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3693: IF l_uom_rate = -99999 then
3694: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');
3695: END IF;
3696: ELSE

Line 3694: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');

3690: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
3691: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
3692: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3693: IF l_uom_rate = -99999 then
3694: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');
3695: END IF;
3696: ELSE
3697: l_uom_rate := 1;
3698: END IF;

Line 3732: csi_ctr_gen_utility_pvt.put_line('Source is A, Target is D');

3728: IF l_prev_ctr_reading < 0 THEN
3729: l_counter_reading := ((l_prev_ctr_reading * -1) - ((p_ctr_rdg_rec.counter_reading * l_uom_rate) * obj_cur.factor));
3730: l_counter_reading := l_counter_reading * -1;
3731: ELSE
3732: csi_ctr_gen_utility_pvt.put_line('Source is A, Target is D');
3733: csi_ctr_gen_utility_pvt.put_line('l_prev_ctr_reading = '||to_char(l_prev_ctr_reading));
3734: csi_ctr_gen_utility_pvt.put_line('p_ctr_reading = '||to_char(p_ctr_rdg_rec.counter_reading));
3735: csi_ctr_gen_utility_pvt.put_line('l_uom_rate = '||to_char(l_uom_rate));
3736: csi_ctr_gen_utility_pvt.put_line('factor = '||to_char(obj_cur.factor));

Line 3733: csi_ctr_gen_utility_pvt.put_line('l_prev_ctr_reading = '||to_char(l_prev_ctr_reading));

3729: l_counter_reading := ((l_prev_ctr_reading * -1) - ((p_ctr_rdg_rec.counter_reading * l_uom_rate) * obj_cur.factor));
3730: l_counter_reading := l_counter_reading * -1;
3731: ELSE
3732: csi_ctr_gen_utility_pvt.put_line('Source is A, Target is D');
3733: csi_ctr_gen_utility_pvt.put_line('l_prev_ctr_reading = '||to_char(l_prev_ctr_reading));
3734: csi_ctr_gen_utility_pvt.put_line('p_ctr_reading = '||to_char(p_ctr_rdg_rec.counter_reading));
3735: csi_ctr_gen_utility_pvt.put_line('l_uom_rate = '||to_char(l_uom_rate));
3736: csi_ctr_gen_utility_pvt.put_line('factor = '||to_char(obj_cur.factor));
3737:

Line 3734: csi_ctr_gen_utility_pvt.put_line('p_ctr_reading = '||to_char(p_ctr_rdg_rec.counter_reading));

3730: l_counter_reading := l_counter_reading * -1;
3731: ELSE
3732: csi_ctr_gen_utility_pvt.put_line('Source is A, Target is D');
3733: csi_ctr_gen_utility_pvt.put_line('l_prev_ctr_reading = '||to_char(l_prev_ctr_reading));
3734: csi_ctr_gen_utility_pvt.put_line('p_ctr_reading = '||to_char(p_ctr_rdg_rec.counter_reading));
3735: csi_ctr_gen_utility_pvt.put_line('l_uom_rate = '||to_char(l_uom_rate));
3736: csi_ctr_gen_utility_pvt.put_line('factor = '||to_char(obj_cur.factor));
3737:
3738: l_counter_reading := nvl(l_prev_ctr_reading,0) - ((p_ctr_rdg_rec.counter_reading * l_uom_rate) * obj_cur.factor);

Line 3735: csi_ctr_gen_utility_pvt.put_line('l_uom_rate = '||to_char(l_uom_rate));

3731: ELSE
3732: csi_ctr_gen_utility_pvt.put_line('Source is A, Target is D');
3733: csi_ctr_gen_utility_pvt.put_line('l_prev_ctr_reading = '||to_char(l_prev_ctr_reading));
3734: csi_ctr_gen_utility_pvt.put_line('p_ctr_reading = '||to_char(p_ctr_rdg_rec.counter_reading));
3735: csi_ctr_gen_utility_pvt.put_line('l_uom_rate = '||to_char(l_uom_rate));
3736: csi_ctr_gen_utility_pvt.put_line('factor = '||to_char(obj_cur.factor));
3737:
3738: l_counter_reading := nvl(l_prev_ctr_reading,0) - ((p_ctr_rdg_rec.counter_reading * l_uom_rate) * obj_cur.factor);
3739: END IF;

Line 3736: csi_ctr_gen_utility_pvt.put_line('factor = '||to_char(obj_cur.factor));

3732: csi_ctr_gen_utility_pvt.put_line('Source is A, Target is D');
3733: csi_ctr_gen_utility_pvt.put_line('l_prev_ctr_reading = '||to_char(l_prev_ctr_reading));
3734: csi_ctr_gen_utility_pvt.put_line('p_ctr_reading = '||to_char(p_ctr_rdg_rec.counter_reading));
3735: csi_ctr_gen_utility_pvt.put_line('l_uom_rate = '||to_char(l_uom_rate));
3736: csi_ctr_gen_utility_pvt.put_line('factor = '||to_char(obj_cur.factor));
3737:
3738: l_counter_reading := nvl(l_prev_ctr_reading,0) - ((p_ctr_rdg_rec.counter_reading * l_uom_rate) * obj_cur.factor);
3739: END IF;
3740: END IF;

Line 3791: csi_ctr_gen_utility_pvt.put_line('Prev net reading = '||to_char(l_prev_net_reading));

3787: ,px_ltd_rdg => l_ltd_reading
3788: ,l_ctr_rdg_rec => p_ctr_rdg_rec -- added 6398254
3789: );
3790:
3791: csi_ctr_gen_utility_pvt.put_line('Prev net reading = '||to_char(l_prev_net_reading));
3792: csi_ctr_gen_utility_pvt.put_line('Prev ltd reading = '||to_char(l_prev_ltd_reading));
3793: csi_ctr_gen_utility_pvt.put_line('Prev reading = '||to_char(l_prev_ctr_reading));
3794: csi_ctr_gen_utility_pvt.put_line('5. Current reading = '||to_char(l_counter_reading));
3795: IF obj_cur.direction = 'D' THEN

Line 3792: csi_ctr_gen_utility_pvt.put_line('Prev ltd reading = '||to_char(l_prev_ltd_reading));

3788: ,l_ctr_rdg_rec => p_ctr_rdg_rec -- added 6398254
3789: );
3790:
3791: csi_ctr_gen_utility_pvt.put_line('Prev net reading = '||to_char(l_prev_net_reading));
3792: csi_ctr_gen_utility_pvt.put_line('Prev ltd reading = '||to_char(l_prev_ltd_reading));
3793: csi_ctr_gen_utility_pvt.put_line('Prev reading = '||to_char(l_prev_ctr_reading));
3794: csi_ctr_gen_utility_pvt.put_line('5. Current reading = '||to_char(l_counter_reading));
3795: IF obj_cur.direction = 'D' THEN
3796: IF l_counter_reading > nvl(l_prev_ctr_reading, l_counter_reading) THEN

Line 3793: csi_ctr_gen_utility_pvt.put_line('Prev reading = '||to_char(l_prev_ctr_reading));

3789: );
3790:
3791: csi_ctr_gen_utility_pvt.put_line('Prev net reading = '||to_char(l_prev_net_reading));
3792: csi_ctr_gen_utility_pvt.put_line('Prev ltd reading = '||to_char(l_prev_ltd_reading));
3793: csi_ctr_gen_utility_pvt.put_line('Prev reading = '||to_char(l_prev_ctr_reading));
3794: csi_ctr_gen_utility_pvt.put_line('5. Current reading = '||to_char(l_counter_reading));
3795: IF obj_cur.direction = 'D' THEN
3796: IF l_counter_reading > nvl(l_prev_ctr_reading, l_counter_reading) THEN
3797: csi_ctr_gen_utility_pvt.ExitWithErrMsg

Line 3794: csi_ctr_gen_utility_pvt.put_line('5. Current reading = '||to_char(l_counter_reading));

3790:
3791: csi_ctr_gen_utility_pvt.put_line('Prev net reading = '||to_char(l_prev_net_reading));
3792: csi_ctr_gen_utility_pvt.put_line('Prev ltd reading = '||to_char(l_prev_ltd_reading));
3793: csi_ctr_gen_utility_pvt.put_line('Prev reading = '||to_char(l_prev_ctr_reading));
3794: csi_ctr_gen_utility_pvt.put_line('5. Current reading = '||to_char(l_counter_reading));
3795: IF obj_cur.direction = 'D' THEN
3796: IF l_counter_reading > nvl(l_prev_ctr_reading, l_counter_reading) THEN
3797: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3798: ( p_msg_name => 'CSI_API_CTR_INV_RDG',

Line 3797: csi_ctr_gen_utility_pvt.ExitWithErrMsg

3793: csi_ctr_gen_utility_pvt.put_line('Prev reading = '||to_char(l_prev_ctr_reading));
3794: csi_ctr_gen_utility_pvt.put_line('5. Current reading = '||to_char(l_counter_reading));
3795: IF obj_cur.direction = 'D' THEN
3796: IF l_counter_reading > nvl(l_prev_ctr_reading, l_counter_reading) THEN
3797: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3798: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
3799: p_token1_name => 'DIRECTION',
3800: -- p_token1_val => obj_cur.direction,
3801: p_token1_val => 'a Descending',

Line 3810: csi_ctr_gen_utility_pvt.put_line('6. Current reading ');

3806: );
3807: END IF;
3808: ELSIF obj_cur.direction = 'A' THEN
3809: IF l_counter_reading < nvl(l_prev_ctr_reading, l_counter_reading) THEN
3810: csi_ctr_gen_utility_pvt.put_line('6. Current reading ');
3811: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3812: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
3813: p_token1_name => 'DIRECTION',
3814: -- p_token1_val => obj_cur.direction,

Line 3811: csi_ctr_gen_utility_pvt.ExitWithErrMsg

3807: END IF;
3808: ELSIF obj_cur.direction = 'A' THEN
3809: IF l_counter_reading < nvl(l_prev_ctr_reading, l_counter_reading) THEN
3810: csi_ctr_gen_utility_pvt.put_line('6. Current reading ');
3811: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3812: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
3813: p_token1_name => 'DIRECTION',
3814: -- p_token1_val => obj_cur.direction,
3815: p_token1_val => 'an Ascending',

Line 3828: csi_ctr_gen_utility_pvt.put_line('Updating Target Counter Value ID : '||to_char(obj_cur.counter_value_id));

3824: l_net_reading := l_prev_net_reading;
3825: l_ltd_reading := l_prev_ltd_reading;
3826: END IF;
3827: --
3828: csi_ctr_gen_utility_pvt.put_line('Updating Target Counter Value ID : '||to_char(obj_cur.counter_value_id));
3829:
3830: Update CSI_COUNTER_READINGS
3831: set counter_reading = l_counter_reading,
3832: net_reading = l_net_reading,

Line 3839: csi_ctr_gen_utility_pvt.put_line(' Compute Target Counters - CREATE');

3835: last_updated_by = fnd_global.user_id
3836: where counter_value_id = obj_cur.counter_value_id;
3837: END LOOP;
3838: ELSIF p_mode = 'CREATE' THEN
3839: csi_ctr_gen_utility_pvt.put_line(' Compute Target Counters - CREATE');
3840: FOR obj_cur IN OBJECT_CTR_CUR LOOP
3841: Begin
3842: IF NVL(obj_cur.direction,'X') NOT IN ('A','D','B') THEN
3843: csi_ctr_gen_utility_pvt.put_line('Target Counter has Invalid Direction...');

Line 3843: csi_ctr_gen_utility_pvt.put_line('Target Counter has Invalid Direction...');

3839: csi_ctr_gen_utility_pvt.put_line(' Compute Target Counters - CREATE');
3840: FOR obj_cur IN OBJECT_CTR_CUR LOOP
3841: Begin
3842: IF NVL(obj_cur.direction,'X') NOT IN ('A','D','B') THEN
3843: csi_ctr_gen_utility_pvt.put_line('Target Counter has Invalid Direction...');
3844: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3845: ( p_msg_name => 'CSI_API_CTR_INVALID_DIR',
3846: p_token1_name => 'MODE',
3847: p_token1_val => l_mode

Line 3844: csi_ctr_gen_utility_pvt.ExitWithErrMsg

3840: FOR obj_cur IN OBJECT_CTR_CUR LOOP
3841: Begin
3842: IF NVL(obj_cur.direction,'X') NOT IN ('A','D','B') THEN
3843: csi_ctr_gen_utility_pvt.put_line('Target Counter has Invalid Direction...');
3844: csi_ctr_gen_utility_pvt.ExitWithErrMsg
3845: ( p_msg_name => 'CSI_API_CTR_INVALID_DIR',
3846: p_token1_name => 'MODE',
3847: p_token1_val => l_mode
3848: );

Line 3863: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');

3859: END;
3860:
3861: /* Validate direction */
3862: IF obj_cur.direction = 'B' and l_source_direction <> 'B' THEN
3863: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');
3864: END IF;
3865:
3866: IF l_source_direction = 'B' and obj_cur.direction <> 'B' THEN
3867: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');

Line 3867: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');

3863: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');
3864: END IF;
3865:
3866: IF l_source_direction = 'B' and obj_cur.direction <> 'B' THEN
3867: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INV_REL_DIR');
3868: END IF;
3869:
3870: IF obj_cur.object_uom_code <> l_source_uom_code THEN
3871: /* Validate if same UOM class */

Line 3876: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');

3872: OPEN get_uom_class(obj_cur.object_uom_code);
3873: FETCH get_uom_class into l_object_uom_class;
3874:
3875: IF get_uom_class%notfound THEN
3876: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');
3877: END IF;
3878:
3879: IF get_uom_class%ISOPEN THEN
3880: CLOSE get_uom_class;

Line 3887: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');

3883: OPEN get_uom_class(l_source_uom_code);
3884: FETCH get_uom_class into l_source_uom_class;
3885:
3886: IF get_uom_class%notfound THEN
3887: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');
3888: END IF;
3889:
3890: IF get_uom_class%ISOPEN THEN
3891: CLOSE get_uom_class;

Line 3901: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);

3897: ,obj_cur.object_uom_code
3898: ,null
3899: ,l_uom_rate);
3900:
3901: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
3902: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
3903: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3904: IF l_uom_rate = -99999 then
3905: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');

Line 3902: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);

3898: ,null
3899: ,l_uom_rate);
3900:
3901: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
3902: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
3903: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3904: IF l_uom_rate = -99999 then
3905: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');
3906: END IF;

Line 3903: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));

3899: ,l_uom_rate);
3900:
3901: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
3902: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
3903: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3904: IF l_uom_rate = -99999 then
3905: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');
3906: END IF;
3907: ELSE

Line 3905: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');

3901: csi_ctr_gen_utility_pvt.put_line('Object UOM Code = '||obj_cur.object_uom_code);
3902: csi_ctr_gen_utility_pvt.put_line('Source UOM Code = '||l_source_uom_code);
3903: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3904: IF l_uom_rate = -99999 then
3905: csi_ctr_gen_utility_pvt.put_line(' Error during the conversion of UOM');
3906: END IF;
3907: ELSE
3908: l_uom_rate := 1;
3909: END IF;

Line 3943: csi_ctr_gen_utility_pvt.put_line('First reading of this Target Counter '||

3939: --
3940: IF l_prev_ctr_reading IS NULL AND
3941: (p_ctr_rdg_rec.adjustment_type IS NOT NULL AND
3942: p_ctr_rdg_rec.adjustment_type <> FND_API.G_MISS_CHAR) THEN
3943: csi_ctr_gen_utility_pvt.put_line('First reading of this Target Counter '||
3944: to_char(obj_cur.object_counter_id)||' cannot be an Adjustment reading. Ingoring it..');
3945: Raise Process_next;
3946: END IF;
3947: --

Line 3951: csi_ctr_gen_utility_pvt.put_line('Reading Type = '||to_char(obj_cur.reading_type));

3947: --
3948: /* Check if the readings needed to be reverse based on the
3949: source and target direction combination */
3950:
3951: csi_ctr_gen_utility_pvt.put_line('Reading Type = '||to_char(obj_cur.reading_type));
3952: csi_ctr_gen_utility_pvt.put_line('Source Direction = '||l_source_direction);
3953: csi_ctr_gen_utility_pvt.put_line('Object Direction = '||obj_cur.direction);
3954: csi_ctr_gen_utility_pvt.put_line('Factor = '||to_char(obj_cur.factor));
3955: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));

Line 3952: csi_ctr_gen_utility_pvt.put_line('Source Direction = '||l_source_direction);

3948: /* Check if the readings needed to be reverse based on the
3949: source and target direction combination */
3950:
3951: csi_ctr_gen_utility_pvt.put_line('Reading Type = '||to_char(obj_cur.reading_type));
3952: csi_ctr_gen_utility_pvt.put_line('Source Direction = '||l_source_direction);
3953: csi_ctr_gen_utility_pvt.put_line('Object Direction = '||obj_cur.direction);
3954: csi_ctr_gen_utility_pvt.put_line('Factor = '||to_char(obj_cur.factor));
3955: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3956: csi_ctr_gen_utility_pvt.put_line('target prev rdg = '||to_char(l_prev_ctr_reading));

Line 3953: csi_ctr_gen_utility_pvt.put_line('Object Direction = '||obj_cur.direction);

3949: source and target direction combination */
3950:
3951: csi_ctr_gen_utility_pvt.put_line('Reading Type = '||to_char(obj_cur.reading_type));
3952: csi_ctr_gen_utility_pvt.put_line('Source Direction = '||l_source_direction);
3953: csi_ctr_gen_utility_pvt.put_line('Object Direction = '||obj_cur.direction);
3954: csi_ctr_gen_utility_pvt.put_line('Factor = '||to_char(obj_cur.factor));
3955: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3956: csi_ctr_gen_utility_pvt.put_line('target prev rdg = '||to_char(l_prev_ctr_reading));
3957: csi_ctr_gen_utility_pvt.put_line('source prev rdg = '||to_char(p_ctr_rdg_rec.counter_reading));

Line 3954: csi_ctr_gen_utility_pvt.put_line('Factor = '||to_char(obj_cur.factor));

3950:
3951: csi_ctr_gen_utility_pvt.put_line('Reading Type = '||to_char(obj_cur.reading_type));
3952: csi_ctr_gen_utility_pvt.put_line('Source Direction = '||l_source_direction);
3953: csi_ctr_gen_utility_pvt.put_line('Object Direction = '||obj_cur.direction);
3954: csi_ctr_gen_utility_pvt.put_line('Factor = '||to_char(obj_cur.factor));
3955: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3956: csi_ctr_gen_utility_pvt.put_line('target prev rdg = '||to_char(l_prev_ctr_reading));
3957: csi_ctr_gen_utility_pvt.put_line('source prev rdg = '||to_char(p_ctr_rdg_rec.counter_reading));
3958: IF obj_cur.reading_type = 1 THEN

Line 3955: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));

3951: csi_ctr_gen_utility_pvt.put_line('Reading Type = '||to_char(obj_cur.reading_type));
3952: csi_ctr_gen_utility_pvt.put_line('Source Direction = '||l_source_direction);
3953: csi_ctr_gen_utility_pvt.put_line('Object Direction = '||obj_cur.direction);
3954: csi_ctr_gen_utility_pvt.put_line('Factor = '||to_char(obj_cur.factor));
3955: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3956: csi_ctr_gen_utility_pvt.put_line('target prev rdg = '||to_char(l_prev_ctr_reading));
3957: csi_ctr_gen_utility_pvt.put_line('source prev rdg = '||to_char(p_ctr_rdg_rec.counter_reading));
3958: IF obj_cur.reading_type = 1 THEN
3959: IF l_source_direction = 'A' AND obj_cur.direction = 'D' THEN

Line 3956: csi_ctr_gen_utility_pvt.put_line('target prev rdg = '||to_char(l_prev_ctr_reading));

3952: csi_ctr_gen_utility_pvt.put_line('Source Direction = '||l_source_direction);
3953: csi_ctr_gen_utility_pvt.put_line('Object Direction = '||obj_cur.direction);
3954: csi_ctr_gen_utility_pvt.put_line('Factor = '||to_char(obj_cur.factor));
3955: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3956: csi_ctr_gen_utility_pvt.put_line('target prev rdg = '||to_char(l_prev_ctr_reading));
3957: csi_ctr_gen_utility_pvt.put_line('source prev rdg = '||to_char(p_ctr_rdg_rec.counter_reading));
3958: IF obj_cur.reading_type = 1 THEN
3959: IF l_source_direction = 'A' AND obj_cur.direction = 'D' THEN
3960: IF nvl(l_prev_ctr_reading, 0) = 0 THEN

Line 3957: csi_ctr_gen_utility_pvt.put_line('source prev rdg = '||to_char(p_ctr_rdg_rec.counter_reading));

3953: csi_ctr_gen_utility_pvt.put_line('Object Direction = '||obj_cur.direction);
3954: csi_ctr_gen_utility_pvt.put_line('Factor = '||to_char(obj_cur.factor));
3955: csi_ctr_gen_utility_pvt.put_line('UOM Rate = '||to_char(l_uom_rate));
3956: csi_ctr_gen_utility_pvt.put_line('target prev rdg = '||to_char(l_prev_ctr_reading));
3957: csi_ctr_gen_utility_pvt.put_line('source prev rdg = '||to_char(p_ctr_rdg_rec.counter_reading));
3958: IF obj_cur.reading_type = 1 THEN
3959: IF l_source_direction = 'A' AND obj_cur.direction = 'D' THEN
3960: IF nvl(l_prev_ctr_reading, 0) = 0 THEN
3961: l_counter_reading := ((p_ctr_rdg_rec.counter_reading * l_uom_rate) * obj_cur.factor) * -1;

Line 3980: csi_ctr_gen_utility_pvt.put_line('New target reading = '||to_char(l_counter_reading));

3976: l_ctr_rdg_rec.adjustment_reading := (p_ctr_rdg_rec.adjustment_reading * l_uom_rate) * obj_cur.factor;
3977: END IF;
3978: END IF;
3979: END IF;
3980: csi_ctr_gen_utility_pvt.put_line('New target reading = '||to_char(l_counter_reading));
3981: END IF;
3982:
3983:
3984: IF l_source_direction = 'D' and obj_cur.direction = 'A' THEN

Line 4006: csi_ctr_gen_utility_pvt.put_line('New target reading = '||to_char(l_counter_reading));

4002: l_ctr_rdg_rec.adjustment_reading := (p_ctr_rdg_rec.adjustment_reading * l_uom_rate) * obj_cur.factor;
4003: END IF;
4004: END IF;
4005: END IF;
4006: csi_ctr_gen_utility_pvt.put_line('New target reading = '||to_char(l_counter_reading));
4007:
4008: IF obj_cur.direction = 'A' and l_source_direction = 'A' THEN
4009: l_counter_reading := nvl(l_prev_ctr_reading,0) + ((p_ctr_rdg_rec.counter_reading * l_uom_rate) * obj_cur.factor);
4010: IF p_ctr_rdg_rec.adjustment_reading is not null and p_ctr_rdg_rec.adjustment_reading <> FND_API.G_MISS_NUM then

Line 4034: csi_ctr_gen_utility_pvt.put_line('New target reading = '||to_char(l_counter_reading));

4030: l_ctr_rdg_rec.adjustment_reading := (p_ctr_rdg_rec.adjustment_reading * l_uom_rate) * obj_cur.factor;
4031: END IF;
4032: END IF;
4033: END IF;
4034: csi_ctr_gen_utility_pvt.put_line('New target reading = '||to_char(l_counter_reading));
4035: ELSIF obj_cur.direction = 'B' and l_source_direction = 'B' THEN
4036: l_counter_reading := nvl(l_prev_ctr_reading,0) + ((p_ctr_rdg_rec.counter_reading * l_uom_rate) * obj_cur.factor);
4037: IF p_ctr_rdg_rec.adjustment_reading is not null and p_ctr_rdg_rec.adjustment_reading <> FND_API.G_MISS_NUM then
4038: l_ctr_rdg_rec.adjustment_reading := (p_ctr_rdg_rec.adjustment_reading * l_uom_rate) * obj_cur.factor;

Line 4048: csi_ctr_gen_utility_pvt.put_line('New target reading = '||to_char(l_counter_reading));

4044: l_ctr_rdg_rec.adjustment_reading := (p_ctr_rdg_rec.adjustment_reading * l_uom_rate) * obj_cur.factor;
4045: END IF;
4046: END IF;
4047:
4048: csi_ctr_gen_utility_pvt.put_line('New target reading = '||to_char(l_counter_reading));
4049: -- Calculate Net and LTD Readings
4050: Calculate_Net_Reading
4051: ( p_prev_net_rdg => l_prev_net_reading
4052: ,p_prev_ltd_rdg => l_prev_ltd_reading

Line 4063: csi_ctr_gen_utility_pvt.put_line('Current reading = '||to_char(l_counter_reading));

4059: ,px_ltd_rdg => l_ltd_reading
4060: ,l_ctr_rdg_rec => p_ctr_rdg_rec -- added 6398254
4061: );
4062:
4063: csi_ctr_gen_utility_pvt.put_line('Current reading = '||to_char(l_counter_reading));
4064: IF obj_cur.direction = 'D' THEN
4065: IF l_counter_reading > nvl(l_prev_ctr_reading, l_counter_reading) THEN
4066: csi_ctr_gen_utility_pvt.put_line('7. Current reading ');
4067: csi_ctr_gen_utility_pvt.ExitWithErrMsg

Line 4066: csi_ctr_gen_utility_pvt.put_line('7. Current reading ');

4062:
4063: csi_ctr_gen_utility_pvt.put_line('Current reading = '||to_char(l_counter_reading));
4064: IF obj_cur.direction = 'D' THEN
4065: IF l_counter_reading > nvl(l_prev_ctr_reading, l_counter_reading) THEN
4066: csi_ctr_gen_utility_pvt.put_line('7. Current reading ');
4067: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4068: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
4069: p_token1_name => 'DIRECTION',
4070: -- p_token1_val => obj_cur.direction,

Line 4067: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4063: csi_ctr_gen_utility_pvt.put_line('Current reading = '||to_char(l_counter_reading));
4064: IF obj_cur.direction = 'D' THEN
4065: IF l_counter_reading > nvl(l_prev_ctr_reading, l_counter_reading) THEN
4066: csi_ctr_gen_utility_pvt.put_line('7. Current reading ');
4067: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4068: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
4069: p_token1_name => 'DIRECTION',
4070: -- p_token1_val => obj_cur.direction,
4071: p_token1_val => 'a Descending',

Line 4080: csi_ctr_gen_utility_pvt.put_line('8. Current reading ');

4076: );
4077: END IF;
4078: ELSIF obj_cur.direction = 'A' THEN
4079: IF l_counter_reading < nvl(l_prev_ctr_reading, l_counter_reading) THEN
4080: csi_ctr_gen_utility_pvt.put_line('8. Current reading ');
4081: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4082: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
4083: p_token1_name => 'DIRECTION',
4084: -- p_token1_val => obj_cur.direction,

Line 4081: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4077: END IF;
4078: ELSIF obj_cur.direction = 'A' THEN
4079: IF l_counter_reading < nvl(l_prev_ctr_reading, l_counter_reading) THEN
4080: csi_ctr_gen_utility_pvt.put_line('8. Current reading ');
4081: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4082: ( p_msg_name => 'CSI_API_CTR_INV_RDG',
4083: p_token1_name => 'DIRECTION',
4084: -- p_token1_val => obj_cur.direction,
4085: p_token1_val => 'an Ascending',

Line 4101: csi_ctr_gen_utility_pvt.put_line('Calling Insert Meter Log...');

4097: l_instance_id := p_txn_rec.source_header_ref_id;
4098: ELSE
4099: l_instance_id := null;
4100: END IF;
4101: csi_ctr_gen_utility_pvt.put_line('Calling Insert Meter Log...');
4102: Eam_Asset_Log_Pvt.Insert_Meter_Log
4103: (
4104: P_api_version => 1.0,
4105: P_init_msg_list => fnd_api.g_false,

Line 4119: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Insert_Meter_Log API ');

4115: -- Since this is only for logging we are ignoring the x_return_status.
4116: -- Just report the API error and proceed.
4117: --
4118: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4119: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Insert_Meter_Log API ');
4120: l_msg_index := 1;
4121: l_msg_count := x_msg_count;
4122: WHILE l_msg_count > 0 LOOP
4123: x_msg_data := FND_MSG_PUB.GET

Line 4127: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

4123: x_msg_data := FND_MSG_PUB.GET
4124: ( l_msg_index,
4125: FND_API.G_FALSE
4126: );
4127: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
4128: l_msg_index := l_msg_index + 1;
4129: l_msg_count := l_msg_count - 1;
4130: END LOOP;
4131: -- DO NOT RAISE ERROR

Line 4136: csi_ctr_gen_utility_pvt.put_line('Calling Update_Last_Service_Reading_Wo...');

4132: END IF;
4133: END IF; -- EAM Logging Check
4134: --
4135: IF p_txn_rec.transaction_type_id = 92 THEN
4136: csi_ctr_gen_utility_pvt.put_line('Calling Update_Last_Service_Reading_Wo...');
4137: Eam_Meters_Util.Update_Last_Service_Reading_Wo
4138: (
4139: p_wip_entity_id => p_txn_rec.source_header_ref_id,
4140: p_meter_id => l_ctr_rdg_rec.counter_id,

Line 4148: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Update_Last_Service_Reading_Wo API ');

4144: X_msg_count => x_msg_count,
4145: X_msg_data => x_msg_data
4146: );
4147: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4148: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Update_Last_Service_Reading_Wo API ');
4149: l_msg_index := 1;
4150: l_msg_count := x_msg_count;
4151: WHILE l_msg_count > 0 LOOP
4152: x_msg_data := FND_MSG_PUB.GET

Line 4156: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

4152: x_msg_data := FND_MSG_PUB.GET
4153: ( l_msg_index,
4154: FND_API.G_FALSE
4155: );
4156: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
4157: l_msg_index := l_msg_index + 1;
4158: l_msg_count := l_msg_count - 1;
4159: END LOOP;
4160: RAISE FND_API.G_EXC_ERROR;

Line 4175: csi_ctr_gen_utility_pvt.put_line('Inserting Target Counter ID : '||to_char(l_ctr_rdg_rec.counter_id));

4171: l_process_flag := FALSE;
4172: END IF;
4173: END LOOP;
4174: --
4175: csi_ctr_gen_utility_pvt.put_line('Inserting Target Counter ID : '||to_char(l_ctr_rdg_rec.counter_id));
4176: -- Call the Table Handler to insert into CSI_COUNTER_READINGS
4177: CSI_COUNTER_READINGS_PKG.Insert_Row(
4178: px_COUNTER_VALUE_ID => l_ctr_rdg_rec.counter_value_id
4179: ,p_COUNTER_ID => l_ctr_rdg_rec.counter_id

Line 4251: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');

4247: ,x_msg_count => x_msg_count
4248: ,x_msg_data => x_msg_data
4249: );
4250: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4251: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
4252: l_msg_index := 1;
4253: l_msg_count := x_msg_count;
4254: WHILE l_msg_count > 0 LOOP
4255: x_msg_data := FND_MSG_PUB.GET

Line 4259: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

4255: x_msg_data := FND_MSG_PUB.GET
4256: ( l_msg_index,
4257: FND_API.G_FALSE
4258: );
4259: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
4260: l_msg_index := l_msg_index + 1;
4261: l_msg_count := l_msg_count - 1;
4262: END LOOP;
4263: RAISE FND_API.G_EXC_ERROR;

Line 4424: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

4420: x_return_status := FND_API.G_RET_STS_SUCCESS;
4421: --
4422:
4423: -- Read the debug profiles values in to global variable 7197402
4424: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
4425:
4426: csi_ctr_gen_utility_pvt.put_line( 'update_counter_reading_pvt' ||'-'||
4427: p_api_version ||'-'||
4428: nvl(p_commit,FND_API.G_FALSE) ||'-'||

Line 4426: csi_ctr_gen_utility_pvt.put_line( 'update_counter_reading_pvt' ||'-'||

4422:
4423: -- Read the debug profiles values in to global variable 7197402
4424: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
4425:
4426: csi_ctr_gen_utility_pvt.put_line( 'update_counter_reading_pvt' ||'-'||
4427: p_api_version ||'-'||
4428: nvl(p_commit,FND_API.G_FALSE) ||'-'||
4429: nvl(p_init_msg_list,FND_API.G_FALSE) ||'-'||
4430: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );

Line 4433: csi_ctr_gen_utility_pvt.put_line('Invalid Counter Value ID...');

4429: nvl(p_init_msg_list,FND_API.G_FALSE) ||'-'||
4430: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );
4431: --
4432: IF NVL(p_ctr_rdg_rec.counter_value_id,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
4433: csi_ctr_gen_utility_pvt.put_line('Invalid Counter Value ID...');
4434: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_VALUE_ID_MISS');
4435: ELSE
4436: OPEN CURRENT_READING_CUR(p_ctr_rdg_rec.counter_value_id);
4437: FETCH CURRENT_READING_CUR INTO l_curr_ctr_rdg_rec;

Line 4434: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_VALUE_ID_MISS');

4430: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );
4431: --
4432: IF NVL(p_ctr_rdg_rec.counter_value_id,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
4433: csi_ctr_gen_utility_pvt.put_line('Invalid Counter Value ID...');
4434: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_VALUE_ID_MISS');
4435: ELSE
4436: OPEN CURRENT_READING_CUR(p_ctr_rdg_rec.counter_value_id);
4437: FETCH CURRENT_READING_CUR INTO l_curr_ctr_rdg_rec;
4438: CLOSE CURRENT_READING_CUR;

Line 4441: csi_ctr_gen_utility_pvt.put_line('Invalid Counter Value ID...');

4437: FETCH CURRENT_READING_CUR INTO l_curr_ctr_rdg_rec;
4438: CLOSE CURRENT_READING_CUR;
4439: --
4440: IF l_curr_ctr_rdg_rec.counter_value_id IS NULL THEN
4441: csi_ctr_gen_utility_pvt.put_line('Invalid Counter Value ID...');
4442: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_VALUE_ID_MISS');
4443: END IF;
4444: --
4445: Begin

Line 4442: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_VALUE_ID_MISS');

4438: CLOSE CURRENT_READING_CUR;
4439: --
4440: IF l_curr_ctr_rdg_rec.counter_value_id IS NULL THEN
4441: csi_ctr_gen_utility_pvt.put_line('Invalid Counter Value ID...');
4442: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_VALUE_ID_MISS');
4443: END IF;
4444: --
4445: Begin
4446: select transaction_type_id

Line 4462: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4458: l_mode := 'Counter';
4459: END IF;
4460: --
4461: IF l_curr_ctr_rdg_rec.object_version_number <> NVL(p_ctr_rdg_rec.object_version_number,0) THEN
4462: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4463: ( p_msg_name => 'CSI_API_CTR_OBJ_VER_MISMATCH',
4464: p_token1_name => 'MODE',
4465: p_token1_val => l_mode
4466: );

Line 4470: csi_ctr_gen_utility_pvt.put_line('Counter Reading is already disabled...');

4466: );
4467: END IF;
4468: --
4469: IF NVL(l_curr_ctr_rdg_rec.disabled_flag,'N') = 'Y' THEN
4470: csi_ctr_gen_utility_pvt.put_line('Counter Reading is already disabled...');
4471: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4472: ( p_msg_name => 'CSI_API_CTR_DISABLED_RDG',
4473: p_token1_name => 'MODE',
4474: p_token1_val => l_mode

Line 4471: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4467: END IF;
4468: --
4469: IF NVL(l_curr_ctr_rdg_rec.disabled_flag,'N') = 'Y' THEN
4470: csi_ctr_gen_utility_pvt.put_line('Counter Reading is already disabled...');
4471: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4472: ( p_msg_name => 'CSI_API_CTR_DISABLED_RDG',
4473: p_token1_name => 'MODE',
4474: p_token1_val => l_mode
4475: );

Line 4481: csi_ctr_gen_utility_pvt.put_line('Cannot Update Counter ID...');

4477: END IF;
4478: --
4479: IF p_ctr_rdg_rec.counter_id IS NOT NULL AND
4480: p_ctr_rdg_rec.counter_id <> l_curr_ctr_rdg_rec.counter_id THEN
4481: csi_ctr_gen_utility_pvt.put_line('Cannot Update Counter ID...');
4482: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4483: ( p_msg_name => 'CSI_API_CTR_UPD_COUNTER_ID',
4484: p_token1_name => 'MODE',
4485: p_token1_val => l_mode

Line 4482: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4478: --
4479: IF p_ctr_rdg_rec.counter_id IS NOT NULL AND
4480: p_ctr_rdg_rec.counter_id <> l_curr_ctr_rdg_rec.counter_id THEN
4481: csi_ctr_gen_utility_pvt.put_line('Cannot Update Counter ID...');
4482: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4483: ( p_msg_name => 'CSI_API_CTR_UPD_COUNTER_ID',
4484: p_token1_name => 'MODE',
4485: p_token1_val => l_mode
4486: );

Line 4500: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4496: where counter_id = l_curr_ctr_rdg_rec.counter_id
4497: and nvl(end_date_active,(sysdate+1)) > sysdate;
4498: Exception
4499: when no_data_found then
4500: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4501: ( p_msg_name => 'CSI_API_CTR_INVALID',
4502: p_token1_name => 'MODE',
4503: p_token1_val => l_mode
4504: );

Line 4509: csi_ctr_gen_utility_pvt.put_line('Disabled flag is not set...');

4505: End;
4506: END IF;
4507: --
4508: IF nvl(p_ctr_rdg_rec.disabled_flag,'N') <> 'Y' THEN
4509: csi_ctr_gen_utility_pvt.put_line('Disabled flag is not set...');
4510: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_DISABLED_FLAG');
4511: END IF;
4512: --
4513: IF NVL(l_direction,'X') NOT IN ('A','D','B') THEN

Line 4510: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_DISABLED_FLAG');

4506: END IF;
4507: --
4508: IF nvl(p_ctr_rdg_rec.disabled_flag,'N') <> 'Y' THEN
4509: csi_ctr_gen_utility_pvt.put_line('Disabled flag is not set...');
4510: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_DISABLED_FLAG');
4511: END IF;
4512: --
4513: IF NVL(l_direction,'X') NOT IN ('A','D','B') THEN
4514: csi_ctr_gen_utility_pvt.put_line('This counter has an Invalid Direction...');

Line 4514: csi_ctr_gen_utility_pvt.put_line('This counter has an Invalid Direction...');

4510: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_DISABLED_FLAG');
4511: END IF;
4512: --
4513: IF NVL(l_direction,'X') NOT IN ('A','D','B') THEN
4514: csi_ctr_gen_utility_pvt.put_line('This counter has an Invalid Direction...');
4515: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4516: ( p_msg_name => 'CSI_API_CTR_INVALID_DIR',
4517: p_token1_name => 'MODE',
4518: p_token1_val => l_mode

Line 4515: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4511: END IF;
4512: --
4513: IF NVL(l_direction,'X') NOT IN ('A','D','B') THEN
4514: csi_ctr_gen_utility_pvt.put_line('This counter has an Invalid Direction...');
4515: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4516: ( p_msg_name => 'CSI_API_CTR_INVALID_DIR',
4517: p_token1_name => 'MODE',
4518: p_token1_val => l_mode
4519: );

Line 4536: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Reset Reading...');

4532: CLOSE NEXT_READING_CUR;
4533:
4534: IF l_next_ctr_reading IS NOT NULL THEN
4535: /* End of checking */
4536: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Reset Reading...');
4537: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4538: ( p_msg_name => 'CSI_API_CTR_DISABLE_RESET',
4539: p_token1_name => 'MODE',
4540: p_token1_val => l_mode

Line 4537: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4533:
4534: IF l_next_ctr_reading IS NOT NULL THEN
4535: /* End of checking */
4536: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Reset Reading...');
4537: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4538: ( p_msg_name => 'CSI_API_CTR_DISABLE_RESET',
4539: p_token1_name => 'MODE',
4540: p_token1_val => l_mode
4541: );

Line 4546: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Automatic Rollover Reading...');

4542: END IF;
4543: END IF;
4544: --
4545: IF NVL(l_curr_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
4546: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Automatic Rollover Reading...');
4547: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4548: ( p_msg_name => 'CSI_API_CTR_DISABLE_ROLLOVER',
4549: p_token1_name => 'MODE',
4550: p_token1_val => l_mode

Line 4547: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4543: END IF;
4544: --
4545: IF NVL(l_curr_ctr_rdg_rec.automatic_rollover_flag,'N') = 'Y' THEN
4546: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Automatic Rollover Reading...');
4547: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4548: ( p_msg_name => 'CSI_API_CTR_DISABLE_ROLLOVER',
4549: p_token1_name => 'MODE',
4550: p_token1_val => l_mode
4551: );

Line 4556: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Target Counter...');

4552: END IF;
4553: --
4554: -- Cannot Disable Target Counters as they are driven by source counters
4555: IF Is_Target_Counter(l_curr_ctr_rdg_rec.counter_id) THEN
4556: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Target Counter...');
4557: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4558: ( p_msg_name => 'CSI_API_CTR_DISABLE_TARGET',
4559: p_token1_name => 'MODE',
4560: p_token1_val => l_mode

Line 4557: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4553: --
4554: -- Cannot Disable Target Counters as they are driven by source counters
4555: IF Is_Target_Counter(l_curr_ctr_rdg_rec.counter_id) THEN
4556: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Target Counter...');
4557: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4558: ( p_msg_name => 'CSI_API_CTR_DISABLE_TARGET',
4559: p_token1_name => 'MODE',
4560: p_token1_val => l_mode
4561: );

Line 4566: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Formula Counter...');

4562: END IF;
4563: --
4564: -- Cannot Disable Formula Counters Readings
4565: IF Is_Formula_Counter(l_curr_ctr_rdg_rec.counter_id) THEN
4566: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Formula Counter...');
4567: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4568: ( p_msg_name => 'CSI_API_CTR_DISABLE_FORMULA',
4569: p_token1_name => 'MODE',
4570: p_token1_val => l_mode

Line 4567: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4563: --
4564: -- Cannot Disable Formula Counters Readings
4565: IF Is_Formula_Counter(l_curr_ctr_rdg_rec.counter_id) THEN
4566: csi_ctr_gen_utility_pvt.put_line('Cannot Disable Formula Counter...');
4567: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4568: ( p_msg_name => 'CSI_API_CTR_DISABLE_FORMULA',
4569: p_token1_name => 'MODE',
4570: p_token1_val => l_mode
4571: );

Line 4576: csi_ctr_gen_utility_pvt.put_line('Cannot Update Value Timestamp...');

4572: END IF;
4573: --
4574: IF p_ctr_rdg_rec.value_timestamp IS NOT NULL AND
4575: p_ctr_rdg_rec.value_timestamp <> l_curr_ctr_rdg_rec.value_timestamp THEN
4576: csi_ctr_gen_utility_pvt.put_line('Cannot Update Value Timestamp...');
4577: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4578: ( p_msg_name => 'CSI_API_CTR_UPD_READING_DATE',
4579: p_token1_name => 'MODE',
4580: p_token1_val => l_mode

Line 4577: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4573: --
4574: IF p_ctr_rdg_rec.value_timestamp IS NOT NULL AND
4575: p_ctr_rdg_rec.value_timestamp <> l_curr_ctr_rdg_rec.value_timestamp THEN
4576: csi_ctr_gen_utility_pvt.put_line('Cannot Update Value Timestamp...');
4577: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4578: ( p_msg_name => 'CSI_API_CTR_UPD_READING_DATE',
4579: p_token1_name => 'MODE',
4580: p_token1_val => l_mode
4581: );

Line 4586: csi_ctr_gen_utility_pvt.put_line('Cannot Update Counter Reading...');

4582: END IF;
4583: --
4584: IF p_ctr_rdg_rec.counter_reading IS NOT NULL AND
4585: p_ctr_rdg_rec.counter_reading <> NVL(l_curr_ctr_rdg_rec.counter_reading,0) THEN
4586: csi_ctr_gen_utility_pvt.put_line('Cannot Update Counter Reading...');
4587: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4588: ( p_msg_name => 'CSI_API_CTR_UPD_CTR_READING',
4589: p_token1_name => 'MODE',
4590: p_token1_val => l_mode

Line 4587: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4583: --
4584: IF p_ctr_rdg_rec.counter_reading IS NOT NULL AND
4585: p_ctr_rdg_rec.counter_reading <> NVL(l_curr_ctr_rdg_rec.counter_reading,0) THEN
4586: csi_ctr_gen_utility_pvt.put_line('Cannot Update Counter Reading...');
4587: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4588: ( p_msg_name => 'CSI_API_CTR_UPD_CTR_READING',
4589: p_token1_name => 'MODE',
4590: p_token1_val => l_mode
4591: );

Line 4596: csi_ctr_gen_utility_pvt.put_line('Cannot Update Adjustment Type...');

4592: END IF;
4593: --
4594: IF p_ctr_rdg_rec.adjustment_type IS NOT NULL AND
4595: p_ctr_rdg_rec.adjustment_type <> NVL(l_curr_ctr_rdg_rec.adjustment_type,'$#$') THEN
4596: csi_ctr_gen_utility_pvt.put_line('Cannot Update Adjustment Type...');
4597: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4598: ( p_msg_name => 'CSI_API_CTR_UPD_ADJ_TYPE',
4599: p_token1_name => 'MODE',
4600: p_token1_val => l_mode

Line 4597: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4593: --
4594: IF p_ctr_rdg_rec.adjustment_type IS NOT NULL AND
4595: p_ctr_rdg_rec.adjustment_type <> NVL(l_curr_ctr_rdg_rec.adjustment_type,'$#$') THEN
4596: csi_ctr_gen_utility_pvt.put_line('Cannot Update Adjustment Type...');
4597: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4598: ( p_msg_name => 'CSI_API_CTR_UPD_ADJ_TYPE',
4599: p_token1_name => 'MODE',
4600: p_token1_val => l_mode
4601: );

Line 4606: csi_ctr_gen_utility_pvt.put_line('Cannot Update Adjustment Reading...');

4602: END IF;
4603: --
4604: IF p_ctr_rdg_rec.adjustment_reading IS NOT NULL AND
4605: p_ctr_rdg_rec.adjustment_reading <> NVL(l_curr_ctr_rdg_rec.adjustment_reading,0) THEN
4606: csi_ctr_gen_utility_pvt.put_line('Cannot Update Adjustment Reading...');
4607: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_UPD_ADJ_RDG');
4608: END IF;
4609: --
4610: -- If the Source counter or its object counters have a reading lock date then

Line 4607: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_UPD_ADJ_RDG');

4603: --
4604: IF p_ctr_rdg_rec.adjustment_reading IS NOT NULL AND
4605: p_ctr_rdg_rec.adjustment_reading <> NVL(l_curr_ctr_rdg_rec.adjustment_reading,0) THEN
4606: csi_ctr_gen_utility_pvt.put_line('Cannot Update Adjustment Reading...');
4607: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_UPD_ADJ_RDG');
4608: END IF;
4609: --
4610: -- If the Source counter or its object counters have a reading lock date then
4611: -- the reading date cannot be earlier than the lock date (Max of all)

Line 4626: csi_ctr_gen_utility_pvt.put_line('Reading Date cannot be earlier than the Reading Lock Date...');

4622: End;
4623: --
4624: IF l_rdg_lock_date IS NOT NULL THEN
4625: IF l_curr_ctr_rdg_rec.value_timestamp <= l_rdg_lock_date THEN
4626: csi_ctr_gen_utility_pvt.put_line('Reading Date cannot be earlier than the Reading Lock Date...');
4627: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4628: ( p_msg_name => 'CSI_API_CTR_RDG_DATE_LOCKED',
4629: p_token1_name => 'LOCKED_DATE',
4630: p_token1_val => to_char(l_rdg_lock_date,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS')), --fix for bug 5435071

Line 4627: csi_ctr_gen_utility_pvt.ExitWithErrMsg

4623: --
4624: IF l_rdg_lock_date IS NOT NULL THEN
4625: IF l_curr_ctr_rdg_rec.value_timestamp <= l_rdg_lock_date THEN
4626: csi_ctr_gen_utility_pvt.put_line('Reading Date cannot be earlier than the Reading Lock Date...');
4627: csi_ctr_gen_utility_pvt.ExitWithErrMsg
4628: ( p_msg_name => 'CSI_API_CTR_RDG_DATE_LOCKED',
4629: p_token1_name => 'LOCKED_DATE',
4630: p_token1_val => to_char(l_rdg_lock_date,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS')), --fix for bug 5435071
4631: p_token2_name => 'MODE',

Line 4658: csi_ctr_gen_utility_pvt.put_line('Next Reading is a Reset. Disabling the current reading will cause the Reset Reading to be the first reading.');

4654: CLOSE NEXT_READING_CUR;
4655: --
4656: IF l_prev_ctr_reading IS NULL AND
4657: l_next_reset_mode IS NOT NULL THEN
4658: csi_ctr_gen_utility_pvt.put_line('Next Reading is a Reset. Disabling the current reading will cause the Reset Reading to be the first reading.');
4659: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NEXT_RESET_RDG');
4660: END IF;
4661: --
4662: IF l_prev_ctr_reading IS NULL AND

Line 4659: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NEXT_RESET_RDG');

4655: --
4656: IF l_prev_ctr_reading IS NULL AND
4657: l_next_reset_mode IS NOT NULL THEN
4658: csi_ctr_gen_utility_pvt.put_line('Next Reading is a Reset. Disabling the current reading will cause the Reset Reading to be the first reading.');
4659: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NEXT_RESET_RDG');
4660: END IF;
4661: --
4662: IF l_prev_ctr_reading IS NULL AND
4663: l_next_adj_type IS NOT NULL THEN

Line 4664: csi_ctr_gen_utility_pvt.put_line('Next Reading is a Adjustment. Disabling the current reading will cause the Adjustment Reading to be the first reading.');

4660: END IF;
4661: --
4662: IF l_prev_ctr_reading IS NULL AND
4663: l_next_adj_type IS NOT NULL THEN
4664: csi_ctr_gen_utility_pvt.put_line('Next Reading is a Adjustment. Disabling the current reading will cause the Adjustment Reading to be the first reading.');
4665: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NEXT_ADJ_RDG');
4666: END IF;
4667: --
4668: IF l_prev_ctr_reading IS NULL AND

Line 4665: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NEXT_ADJ_RDG');

4661: --
4662: IF l_prev_ctr_reading IS NULL AND
4663: l_next_adj_type IS NOT NULL THEN
4664: csi_ctr_gen_utility_pvt.put_line('Next Reading is a Adjustment. Disabling the current reading will cause the Adjustment Reading to be the first reading.');
4665: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NEXT_ADJ_RDG');
4666: END IF;
4667: --
4668: IF l_prev_ctr_reading IS NULL AND
4669: nvl(l_next_auto_rollover,'N') = 'Y' THEN

Line 4670: csi_ctr_gen_utility_pvt.put_line('Next Reading is an Automatic Rollover. Disabling the current reading will cause the Automatic Rollover Reading to be the first reading.');

4666: END IF;
4667: --
4668: IF l_prev_ctr_reading IS NULL AND
4669: nvl(l_next_auto_rollover,'N') = 'Y' THEN
4670: csi_ctr_gen_utility_pvt.put_line('Next Reading is an Automatic Rollover. Disabling the current reading will cause the Automatic Rollover Reading to be the first reading.');
4671: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NEXT_AUTO_RDG');
4672: END IF;
4673: --
4674: p_ctr_rdg_rec.object_version_number := l_curr_ctr_rdg_rec.object_version_number + 1;

Line 4671: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NEXT_AUTO_RDG');

4667: --
4668: IF l_prev_ctr_reading IS NULL AND
4669: nvl(l_next_auto_rollover,'N') = 'Y' THEN
4670: csi_ctr_gen_utility_pvt.put_line('Next Reading is an Automatic Rollover. Disabling the current reading will cause the Automatic Rollover Reading to be the first reading.');
4671: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NEXT_AUTO_RDG');
4672: END IF;
4673: --
4674: p_ctr_rdg_rec.object_version_number := l_curr_ctr_rdg_rec.object_version_number + 1;
4675: --

Line 4681: csi_ctr_gen_utility_pvt.put_line('Calling Update Row to Disable the Reading...');

4677: p_ctr_rdg_rec.counter_id := l_curr_ctr_rdg_rec.counter_id;
4678: p_ctr_rdg_rec.value_timestamp := l_curr_ctr_rdg_rec.value_timestamp;
4679: --
4680: -- Call Table Handler to Update CSI_COUNTER_READINGS
4681: csi_ctr_gen_utility_pvt.put_line('Calling Update Row to Disable the Reading...');
4682: CSI_COUNTER_READINGS_PKG.Update_Row(
4683: p_COUNTER_VALUE_ID => p_ctr_rdg_rec.counter_value_id
4684: ,p_COUNTER_ID => NULL
4685: ,p_VALUE_TIMESTAMP => NULL

Line 4766: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');

4762: x_msg_data := FND_MSG_PUB.GET
4763: (l_msg_index,
4764: FND_API.G_FALSE
4765: );
4766: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
4767: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
4768: l_msg_index := l_msg_index + 1;
4769: l_msg_count := l_msg_count - 1;
4770: END LOOP;

Line 4767: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

4763: (l_msg_index,
4764: FND_API.G_FALSE
4765: );
4766: csi_ctr_gen_utility_pvt.put_line('ERROR FROM CSI_COUNTER_PVT.update_ctr_val_max_seq_no');
4767: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
4768: l_msg_index := l_msg_index + 1;
4769: l_msg_count := l_msg_count - 1;
4770: END LOOP;
4771: RAISE FND_API.G_EXC_ERROR;

Line 4780: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Disable_Target_Derive_Rdg API ');

4776: ( p_src_counter_value_id => p_ctr_rdg_rec.counter_value_id,
4777: x_return_status => x_return_status
4778: );
4779: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4780: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Disable_Target_Derive_Rdg API ');
4781: RAISE FND_API.G_EXC_ERROR;
4782: END IF;
4783: --
4784: -- Following variables will be set inside the loop

Line 4802: csi_ctr_gen_utility_pvt.put_line('Updating Later Readings for Ctr ID '||to_char(l_curr_ctr_rdg_rec.counter_id));

4798: l_next_adj_type IS NOT NULL OR
4799: NVL(l_next_reset_mode,'X') = 'SOFT' THEN
4800: l_update_loop := TRUE;
4801: l_adj_ctr := 0;
4802: csi_ctr_gen_utility_pvt.put_line('Updating Later Readings for Ctr ID '||to_char(l_curr_ctr_rdg_rec.counter_id));
4803: FOR later_rdg IN LATER_READINGS_CUR(l_curr_ctr_rdg_rec.counter_id
4804: ,l_curr_ctr_rdg_rec.value_timestamp)
4805: LOOP
4806: l_adj_ctr := l_adj_ctr + 1;

Line 4840: csi_ctr_gen_utility_pvt.put_line('Updating Counter Value ID '||to_char(later_rdg.counter_value_id));

4836: ELSE
4837: l_later_ctr_reading := later_rdg.counter_reading;
4838: END IF;
4839: --
4840: csi_ctr_gen_utility_pvt.put_line('Updating Counter Value ID '||to_char(later_rdg.counter_value_id));
4841: IF NVL(later_rdg.reset_mode,'X') = 'SOFT' THEN
4842: UPDATE CSI_COUNTER_READINGS
4843: set net_reading = l_previous_net,
4844: life_to_date_reading = l_previous_ltd,

Line 4902: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Target_Counters for Update...');

4898: l_target_ctr_rec.counter_reading := l_later_ctr_reading;
4899: END IF;
4900: END IF;
4901: --
4902: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Target_Counters for Update...');
4903: Compute_Target_Counters
4904: (
4905: p_api_version => 1.0
4906: ,p_commit => p_commit

Line 4924: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');

4920: x_msg_data := FND_MSG_PUB.GET
4921: ( l_msg_index,
4922: FND_API.G_FALSE
4923: );
4924: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');
4925: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
4926: l_msg_index := l_msg_index + 1;
4927: l_msg_count := l_msg_count - 1;
4928: END LOOP;

Line 4925: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

4921: ( l_msg_index,
4922: FND_API.G_FALSE
4923: );
4924: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');
4925: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
4926: l_msg_index := l_msg_index + 1;
4927: l_msg_count := l_msg_count - 1;
4928: END LOOP;
4929: RAISE FND_API.G_EXC_ERROR;

Line 4944: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Derive_Counters for Update...');

4940: l_derive_ctr_rec.counter_id := l_curr_ctr_rdg_rec.counter_id;
4941: l_derive_ctr_rec.value_timestamp := later_rdg.value_timestamp;
4942: --
4943: -- Compute Derive Counters
4944: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Derive_Counters for Update...');
4945: Compute_Derive_Counters
4946: (
4947: p_api_version => 1.0
4948: ,p_commit => p_commit

Line 4959: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Derive_Counters API ');

4955: ,x_msg_count => x_msg_count
4956: ,x_msg_data => x_msg_data
4957: );
4958: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4959: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Derive_Counters API ');
4960: l_msg_index := 1;
4961: l_msg_count := x_msg_count;
4962: WHILE l_msg_count > 0 LOOP
4963: x_msg_data := FND_MSG_PUB.GET

Line 4967: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

4963: x_msg_data := FND_MSG_PUB.GET
4964: ( l_msg_index,
4965: FND_API.G_FALSE
4966: );
4967: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
4968: l_msg_index := l_msg_index + 1;
4969: l_msg_count := l_msg_count - 1;
4970: END LOOP;
4971: RAISE FND_API.G_EXC_ERROR;

Line 5016: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Target_Counters for Update...');

5012: END IF;
5013: END IF;
5014: --
5015: -- Call Compute Target Counters
5016: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Target_Counters for Update...');
5017: Compute_Target_Counters
5018: (
5019: p_api_version => 1.0
5020: ,p_commit => p_commit

Line 5038: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');

5034: x_msg_data := FND_MSG_PUB.GET
5035: ( l_msg_index,
5036: FND_API.G_FALSE
5037: );
5038: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');
5039: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
5040: l_msg_index := l_msg_index + 1;
5041: l_msg_count := l_msg_count - 1;
5042: END LOOP;

Line 5039: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

5035: ( l_msg_index,
5036: FND_API.G_FALSE
5037: );
5038: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Target_Counters API ');
5039: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
5040: l_msg_index := l_msg_index + 1;
5041: l_msg_count := l_msg_count - 1;
5042: END LOOP;
5043: RAISE FND_API.G_EXC_ERROR;

Line 5056: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Derive_Counters for Update...');

5052: l_derive_ctr_rec.counter_value_id := later_rdg.counter_value_id; -- source_counter_value_id
5053: l_derive_ctr_rec.counter_id := l_curr_ctr_rdg_rec.counter_id;
5054: l_derive_ctr_rec.value_timestamp := later_rdg.value_timestamp;
5055: --
5056: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Derive_Counters for Update...');
5057: Compute_Derive_Counters
5058: (
5059: p_api_version => 1.0
5060: ,p_commit => p_commit

Line 5078: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Derive_Counters API ');

5074: x_msg_data := FND_MSG_PUB.GET
5075: ( l_msg_index,
5076: FND_API.G_FALSE
5077: );
5078: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Derive_Counters API ');
5079: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
5080: l_msg_index := l_msg_index + 1;
5081: l_msg_count := l_msg_count - 1;
5082: END LOOP;

Line 5079: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

5075: ( l_msg_index,
5076: FND_API.G_FALSE
5077: );
5078: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Derive_Counters API ');
5079: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
5080: l_msg_index := l_msg_index + 1;
5081: l_msg_count := l_msg_count - 1;
5082: END LOOP;
5083: RAISE FND_API.G_EXC_ERROR;

Line 5104: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Derive_Counters for Update...');

5100: l_derive_ctr_rec.counter_value_id := later_rdg.counter_value_id; -- source_counter_value_id
5101: l_derive_ctr_rec.counter_id := l_curr_ctr_rdg_rec.counter_id;
5102: l_derive_ctr_rec.value_timestamp := later_rdg.value_timestamp;
5103: --
5104: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Derive_Counters for Update...');
5105: Compute_Derive_Counters
5106: (
5107: p_api_version => 1.0
5108: ,p_commit => p_commit

Line 5126: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Derive_Counters API ');

5122: x_msg_data := FND_MSG_PUB.GET
5123: ( l_msg_index,
5124: FND_API.G_FALSE
5125: );
5126: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Derive_Counters API ');
5127: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
5128: l_msg_index := l_msg_index + 1;
5129: l_msg_count := l_msg_count - 1;
5130: END LOOP;

Line 5127: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

5123: ( l_msg_index,
5124: FND_API.G_FALSE
5125: );
5126: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Derive_Counters API ');
5127: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
5128: l_msg_index := l_msg_index + 1;
5129: l_msg_count := l_msg_count - 1;
5130: END LOOP;
5131: RAISE FND_API.G_EXC_ERROR;

Line 5142: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Formula_Counters for Update...');

5138: l_upd_fl_rdg_rec.value_timestamp := l_curr_ctr_rdg_rec.value_timestamp;
5139: l_upd_fl_rdg_rec.disabled_flag := 'Y';
5140: --
5141: -- Call Compute Formula
5142: csi_ctr_gen_utility_pvt.put_line('Calling Compute_Formula_Counters for Update...');
5143: Compute_Formula_Counters
5144: (
5145: p_api_version => 1.0
5146: ,p_commit => p_commit

Line 5156: csi_ctr_gen_utility_pvt.put_line('Error from Compute_Formula_Counters API...');

5152: ,x_msg_count => x_msg_count
5153: ,x_msg_data => x_msg_data
5154: );
5155: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5156: csi_ctr_gen_utility_pvt.put_line('Error from Compute_Formula_Counters API...');
5157: l_msg_index := 1;
5158: l_msg_count := x_msg_count;
5159: WHILE l_msg_count > 0 LOOP
5160: x_msg_data := FND_MSG_PUB.GET

Line 5164: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Formula_Counters API ');

5160: x_msg_data := FND_MSG_PUB.GET
5161: ( l_msg_index,
5162: FND_API.G_FALSE
5163: );
5164: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Formula_Counters API ');
5165: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
5166: l_msg_index := l_msg_index + 1;
5167: l_msg_count := l_msg_count - 1;
5168: END LOOP;

Line 5165: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

5161: ( l_msg_index,
5162: FND_API.G_FALSE
5163: );
5164: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Compute_Formula_Counters API ');
5165: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
5166: l_msg_index := l_msg_index + 1;
5167: l_msg_count := l_msg_count - 1;
5168: END LOOP;
5169: RAISE FND_API.G_EXC_ERROR;

Line 5261: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

5257: x_return_status := FND_API.G_RET_STS_SUCCESS;
5258: --
5259:
5260: -- Read the debug profiles values in to global variable 7197402
5261: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
5262:
5263: csi_ctr_gen_utility_pvt.put_line( 'capture_ctr_property_reading' ||'-'||
5264: p_api_version ||'-'||
5265: nvl(p_commit,FND_API.G_FALSE) ||'-'||

Line 5263: csi_ctr_gen_utility_pvt.put_line( 'capture_ctr_property_reading' ||'-'||

5259:
5260: -- Read the debug profiles values in to global variable 7197402
5261: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
5262:
5263: csi_ctr_gen_utility_pvt.put_line( 'capture_ctr_property_reading' ||'-'||
5264: p_api_version ||'-'||
5265: nvl(p_commit,FND_API.G_FALSE) ||'-'||
5266: nvl(p_init_msg_list,FND_API.G_FALSE) ||'-'||
5267: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );

Line 5271: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_VALUE_ID_MISS');

5267: nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL) );
5268: --
5269: IF p_ctr_prop_rdg_rec.counter_value_id IS NULL OR
5270: p_ctr_prop_rdg_rec.counter_value_id = FND_API.G_MISS_NUM THEN
5271: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_VALUE_ID_MISS');
5272: END IF;
5273: --
5274: IF p_ctr_prop_rdg_rec.counter_property_id IS NULL OR
5275: p_ctr_prop_rdg_rec.counter_property_id = FND_API.G_MISS_NUM THEN

Line 5276: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_INVALID');

5272: END IF;
5273: --
5274: IF p_ctr_prop_rdg_rec.counter_property_id IS NULL OR
5275: p_ctr_prop_rdg_rec.counter_property_id = FND_API.G_MISS_NUM THEN
5276: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_INVALID');
5277: END IF;
5278: --
5279: IF p_ctr_prop_rdg_rec.value_timestamp IS NULL OR
5280: p_ctr_prop_rdg_rec.value_timestamp = FND_API.G_MISS_DATE THEN

Line 5281: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_RDG_DATE');

5277: END IF;
5278: --
5279: IF p_ctr_prop_rdg_rec.value_timestamp IS NULL OR
5280: p_ctr_prop_rdg_rec.value_timestamp = FND_API.G_MISS_DATE THEN
5281: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_RDG_DATE');
5282: END IF;
5283: --
5284: Begin
5285: select property_lov_type,property_data_type,is_nullable

Line 5292: csi_ctr_gen_utility_pvt.put_line('Counter Property is Invalid or Expired...');

5288: where counter_property_id = p_ctr_prop_rdg_rec.counter_property_id
5289: and nvl(end_date_active,(sysdate+1)) > sysdate;
5290: Exception
5291: when no_data_found then
5292: csi_ctr_gen_utility_pvt.put_line('Counter Property is Invalid or Expired...');
5293: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_INVALID');
5294: End;
5295: --
5296: IF l_is_nullable <> 'Y' THEN

Line 5293: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_INVALID');

5289: and nvl(end_date_active,(sysdate+1)) > sysdate;
5290: Exception
5291: when no_data_found then
5292: csi_ctr_gen_utility_pvt.put_line('Counter Property is Invalid or Expired...');
5293: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_INVALID');
5294: End;
5295: --
5296: IF l_is_nullable <> 'Y' THEN
5297: IF p_ctr_prop_rdg_rec.property_value IS NULL OR

Line 5299: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_VALUE_MISSING');

5295: --
5296: IF l_is_nullable <> 'Y' THEN
5297: IF p_ctr_prop_rdg_rec.property_value IS NULL OR
5298: p_ctr_prop_rdg_rec.property_value = FND_API.G_MISS_CHAR THEN
5299: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_VALUE_MISSING');
5300: END IF;
5301: END IF;
5302: --
5303: IF NOT Valid_Ctr_Property_ID

Line 5307: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_INVALID');

5303: IF NOT Valid_Ctr_Property_ID
5304: (p_ctr_value_id => p_ctr_prop_rdg_rec.counter_value_id
5305: ,p_ctr_prop_id => p_ctr_prop_rdg_rec.counter_property_id) THEN
5306: -- Property does not belong to the captured counter
5307: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_INVALID');
5308: END IF;
5309: --
5310: IF Has_Property_Value(p_counter_property_id => p_ctr_prop_rdg_rec.counter_property_id,
5311: p_counter_value_id => p_ctr_prop_rdg_rec.counter_value_id) = 'T' THEN

Line 5313: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_VALUE_EXISTS');

5309: --
5310: IF Has_Property_Value(p_counter_property_id => p_ctr_prop_rdg_rec.counter_property_id,
5311: p_counter_value_id => p_ctr_prop_rdg_rec.counter_value_id) = 'T' THEN
5312: -- Property value already exists
5313: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_VALUE_EXISTS');
5314: END IF;
5315: --
5316: IF l_is_nullable <> 'Y' THEN
5317: IF l_prop_lov_type IS NOT NULL THEN

Line 5329: csi_ctr_gen_utility_pvt.put_line('Property Value does not match with Property LOV Type...');

5325: l_pval := 'T';
5326: END IF;
5327: --
5328: IF l_pval = 'F' THEN
5329: csi_ctr_gen_utility_pvt.put_line('Property Value does not match with Property LOV Type...');
5330: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_LOV_MISMATCH');
5331: END IF;
5332: --
5333: /***********************************************

Line 5330: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_LOV_MISMATCH');

5326: END IF;
5327: --
5328: IF l_pval = 'F' THEN
5329: csi_ctr_gen_utility_pvt.put_line('Property Value does not match with Property LOV Type...');
5330: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_LOV_MISMATCH');
5331: END IF;
5332: --
5333: /***********************************************
5334: *Check if value is valid for property data type

Line 5342: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_DATA_MISMATCH');

5338: l_n_temp := TO_NUMBER(p_ctr_prop_rdg_rec.PROPERTY_VALUE);
5339: EXCEPTION
5340: WHEN OTHERS THEN
5341: IF (SQLCODE = -6502) THEN
5342: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_DATA_MISMATCH');
5343: ELSE
5344: RAISE;
5345: END IF;
5346: END;

Line 5355: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_DATA_MISMATCH');

5351: l_d_temp := to_date(p_ctr_prop_rdg_rec.PROPERTY_VALUE,'MM-DD-YYYY');
5352: EXCEPTION
5353: WHEN OTHERS THEN
5354: IF (SQLCODE BETWEEN -1899 AND -1800) THEN
5355: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_DATA_MISMATCH');
5356: ELSE
5357: RAISE;
5358: END IF;
5359: END;

Line 5361: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_DATA_MISMATCH');

5357: RAISE;
5358: END IF;
5359: END;
5360: ELSE
5361: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_DATA_MISMATCH');
5362: END IF;
5363:
5364: END IF;
5365: --

Line 5378: csi_ctr_gen_utility_pvt.ExitWithErrMsg

5374: END IF;
5375: END LOOP;
5376: ELSE
5377: IF Counter_Prop_Value_Exists(p_ctr_prop_rdg_rec.counter_prop_value_id) THEN
5378: csi_ctr_gen_utility_pvt.ExitWithErrMsg
5379: ( p_msg_name => 'CSI_API_CTR_PROP_VALUE_EXISTS',
5380: p_token1_name => 'PROP_VALUE_ID',
5381: p_token1_val => to_char(p_ctr_prop_rdg_rec.counter_prop_value_id)
5382: );

Line 5557: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

5553: x_return_status := FND_API.G_RET_STS_SUCCESS;
5554: --
5555:
5556: -- Read the debug profiles values in to global variable 7197402
5557: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
5558:
5559: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Start_Readings...');
5560: --
5561: -- fetch the reading of the passed avg calculation start date

Line 5559: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Start_Readings...');

5555:
5556: -- Read the debug profiles values in to global variable 7197402
5557: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
5558:
5559: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Start_Readings...');
5560: --
5561: -- fetch the reading of the passed avg calculation start date
5562: OPEN PASSED_DT_RDG_VALUES(p_counter_id, p_calculation_start_date);
5563: FETCH PASSED_DT_RDG_VALUES

Line 5591: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_DEF_VAL_NULL');

5587: CLOSE FIRST_RDG_VALUES;
5588: --
5589: IF (trunc(l_first_rdg_date) = trunc(l_prev_value_timestamp)) THEN
5590: IF p_default_Value IS NULL THEN
5591: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_DEF_VAL_NULL');
5592: END IF;
5593: --
5594: l_calc_start_rdg := (trunc(p_calculation_start_date) - trunc(l_first_rdg_date)) * p_default_Value;
5595: -- get the next reading after the period start date to check for erroneous readings

Line 5614: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_CAL_STDT');

5610: l_calc_start_rdg := l_prev_reading + l_calc_usage;
5611: END IF;
5612: END IF; --l_post_reading not null
5613: ELSE --prev reading is null
5614: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_CAL_STDT');
5615: END IF; --l_prev_reading not null
5616: --
5617: x_calc_start_reading := round(l_calc_start_rdg);
5618: --

Line 5757: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

5753: -- Initialize API return status to SUCCESS
5754: x_return_status := FND_API.G_RET_STS_SUCCESS;
5755: --
5756: -- Read the debug profiles values in to global variable 7197402
5757: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
5758:
5759: csi_ctr_gen_utility_pvt.put_line( 'Inside Est_Period_Start_Readings...');
5760: --
5761: IF FND_API.to_Boolean(nvl(p_commit,FND_API.G_FALSE)) THEN

Line 5759: csi_ctr_gen_utility_pvt.put_line( 'Inside Est_Period_Start_Readings...');

5755: --
5756: -- Read the debug profiles values in to global variable 7197402
5757: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
5758:
5759: csi_ctr_gen_utility_pvt.put_line( 'Inside Est_Period_Start_Readings...');
5760: --
5761: IF FND_API.to_Boolean(nvl(p_commit,FND_API.G_FALSE)) THEN
5762: COMMIT WORK;
5763: END IF;

Line 5794: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_DEF_VAL_NULL');

5790: CLOSE FIRST_RDG_VALUES;
5791: --
5792: IF (trunc(l_first_rdg_date) = trunc(l_prev_value_timestamp)) THEN
5793: IF p_default_Value IS NULL THEN
5794: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_DEF_VAL_NULL');
5795: END IF;
5796: l_calc_start_rdg := (trunc(p_calculation_start_date) - trunc(l_first_rdg_date)) * p_default_Value;
5797: OPEN CTR_DIRECTION(p_counter_id);
5798: FETCH CTR_DIRECTION

Line 5814: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_STDT');

5810: l_calc_start_rdg := l_prev_reading + l_calc_usage;
5811: END IF;
5812: END IF; --l_post_reading not null
5813: ELSE --prev reading is null
5814: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_STDT');
5815: END IF; --l_prev_reading not null
5816: ELSE --p avg calculation start date is not null
5817: -- get the avg calculation start reading.
5818: csi_ctr_gen_utility_pvt.put_line('Calling Estimate_Start_Readings...');

Line 5818: csi_ctr_gen_utility_pvt.put_line('Calling Estimate_Start_Readings...');

5814: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_STDT');
5815: END IF; --l_prev_reading not null
5816: ELSE --p avg calculation start date is not null
5817: -- get the avg calculation start reading.
5818: csi_ctr_gen_utility_pvt.put_line('Calling Estimate_Start_Readings...');
5819: ESTIMATE_START_READINGS(
5820: P_api_version => 1.0,
5821: P_Init_Msg_List => P_Init_Msg_List,
5822: P_Commit => P_Commit,

Line 5833: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_Start_Readings API ');

5829: X_Msg_Count => X_Msg_Count,
5830: X_Msg_Data => X_Msg_Data
5831: );
5832: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5833: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_Start_Readings API ');
5834: l_msg_index := 1;
5835: l_msg_count := x_msg_count;
5836: WHILE l_msg_count > 0 LOOP
5837: x_msg_data := FND_MSG_PUB.GET

Line 5841: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

5837: x_msg_data := FND_MSG_PUB.GET
5838: ( l_msg_index,
5839: FND_API.G_FALSE
5840: );
5841: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
5842: l_msg_index := l_msg_index + 1;
5843: l_msg_count := l_msg_count - 1;
5844: END LOOP;
5845: RAISE FND_API.G_EXC_ERROR;

Line 5870: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_DEF_VAL_NULL');

5866: l_calc_usage := (trunc(p_calculation_start_date) - trunc(l_prev_value_timestamp)) * l_calc_daily_avg;
5867: l_calc_start_rdg := l_prev_reading + l_calc_usage;
5868: ELSE
5869: IF p_default_Value IS NULL THEN
5870: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_DEF_VAL_NULL');
5871: END IF;
5872: l_calc_start_rdg := (trunc(p_calculation_start_date) - trunc(p_avg_calculation_start_date)) * p_default_Value;
5873: OPEN CTR_DIRECTION(p_counter_id);
5874: FETCH CTR_DIRECTION INTO l_ctr_direction;

Line 5885: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_STDT');

5881: END IF;
5882: END IF;
5883: END IF; --l_post_reading not null
5884: ELSE --prev reading is null
5885: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_STDT');
5886: END IF; --l_prev_reading not null
5887: END IF; -- p avg calculation start date is null
5888: --
5889: x_calc_start_reading := round(l_calc_start_rdg);

Line 6039: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

6035: x_return_status := FND_API.G_RET_STS_SUCCESS;
6036: --
6037:
6038: -- Read the debug profiles values in to global variable 7197402
6039: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
6040:
6041: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Usage...');
6042: --
6043: IF p_avg_calculation_start_date IS NOT NULL THEN

Line 6041: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Usage...');

6037:
6038: -- Read the debug profiles values in to global variable 7197402
6039: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
6040:
6041: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Usage...');
6042: --
6043: IF p_avg_calculation_start_date IS NOT NULL THEN
6044: csi_ctr_gen_utility_pvt.put_line('Calling Estimate_Start_Readings...');
6045: ESTIMATE_START_READINGS(

Line 6044: csi_ctr_gen_utility_pvt.put_line('Calling Estimate_Start_Readings...');

6040:
6041: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Usage...');
6042: --
6043: IF p_avg_calculation_start_date IS NOT NULL THEN
6044: csi_ctr_gen_utility_pvt.put_line('Calling Estimate_Start_Readings...');
6045: ESTIMATE_START_READINGS(
6046: P_api_version => 1.0,
6047: P_Init_Msg_List => P_Init_Msg_List,
6048: P_Commit => P_Commit,

Line 6066: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_Start_Readings API ');

6062: x_msg_data := FND_MSG_PUB.GET
6063: ( l_msg_index,
6064: FND_API.G_FALSE
6065: );
6066: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_Start_Readings API ');
6067: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
6068: l_msg_index := l_msg_index + 1;
6069: l_msg_count := l_msg_count - 1;
6070: END LOOP;

Line 6067: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

6063: ( l_msg_index,
6064: FND_API.G_FALSE
6065: );
6066: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_Start_Readings API ');
6067: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
6068: l_msg_index := l_msg_index + 1;
6069: l_msg_count := l_msg_count - 1;
6070: END LOOP;
6071: RAISE FND_API.G_EXC_ERROR;

Line 6076: csi_ctr_gen_utility_pvt.put_line('Calling Est_Period_Start_Readings...');

6072: END IF;
6073: END IF;
6074:
6075: IF p_estimation_period_start_date IS NOT NULL THEN
6076: csi_ctr_gen_utility_pvt.put_line('Calling Est_Period_Start_Readings...');
6077: EST_PERIOD_START_READINGS(
6078: P_api_version => 1.0,
6079: P_Init_Msg_List => P_Init_Msg_List,
6080: P_Commit => P_Commit,

Line 6099: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Est_Period_Start_Readings API ');

6095: x_msg_data := FND_MSG_PUB.GET
6096: ( l_msg_index,
6097: FND_API.G_FALSE
6098: );
6099: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Est_Period_Start_Readings API ');
6100: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
6101: l_msg_index := l_msg_index + 1;
6102: l_msg_count := l_msg_count - 1;
6103: END LOOP;

Line 6100: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

6096: ( l_msg_index,
6097: FND_API.G_FALSE
6098: );
6099: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Est_Period_Start_Readings API ');
6100: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
6101: l_msg_index := l_msg_index + 1;
6102: l_msg_count := l_msg_count - 1;
6103: END LOOP;
6104: RAISE FND_API.G_EXC_ERROR;

Line 6146: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_DEF_VAL_NULL');

6142: l_estimated_usage := l_estimated_meter_rdg - l_period_start_reading;
6143: END IF;
6144: ELSE
6145: IF p_default_Value IS NULL THEN
6146: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_DEF_VAL_NULL');
6147: END IF;
6148: l_estimated_meter_rdg := (trunc(p_estimation_period_end_date) - trunc(p_avg_calculation_start_date)) * p_default_Value;
6149: l_estimated_meter_rdg := l_estimated_meter_rdg + ((nvl(p_usage_markup,0)/100) * (l_estimated_meter_rdg));
6150: -- get the next reading after the period start date to check for erroneous readings

Line 6168: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_ENDT');

6164: END IF;
6165: END IF; --l_prev_value_timestamp>p_avg_calculation_start_date
6166: END IF; --l_post_reading not null
6167: ELSE --l_prev_reading is null
6168: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_ENDT');
6169: END IF; --l_prev_reading not null
6170: ELSIF P_number_of_readings is not null then -- p_number of rdgs not null
6171: Declare
6172: n number;

Line 6199: csi_ctr_gen_utility_pvt.ExitWithErrMsg

6195: END LOOP;
6196: --
6197: IF J1 < 2 THEN
6198: lprdst_num_ctr_rdg := null;
6199: csi_ctr_gen_utility_pvt.ExitWithErrMsg
6200: ( p_msg_name => 'CSI_API_CTR_INVD_NUM_OF_RDGS',
6201: p_token1_name => 'P_NUMBER_OF_READINGS',
6202: p_token1_val => to_char(p_number_of_readings)
6203: );

Line 6216: csi_ctr_gen_utility_pvt.ExitWithErrMsg

6212: l_usage_for_est := (trunc(p_estimation_period_start_date) - trunc(l_prev_value_timestamp)) * l_daily_avg_for_est;
6213: lp_period_start_reading := l_prev_reading + l_usage_for_est;
6214: l_period_start_reading := round(lp_period_start_reading);
6215: ELSE
6216: csi_ctr_gen_utility_pvt.ExitWithErrMsg
6217: ( p_msg_name => 'CSI_API_CTR_INVD_NUM_OF_RDGS',
6218: p_token1_name => 'P_NUMBER_OF_READINGS',
6219: p_token1_val => to_char(p_number_of_readings)
6220: );

Line 6241: csi_ctr_gen_utility_pvt.ExitWithErrMsg

6237: END LOOP;
6238: --
6239: IF J < 2 THEN --J <> p_number_of_readings then
6240: l_num_ctr_rdg := null;
6241: csi_ctr_gen_utility_pvt.ExitWithErrMsg
6242: ( p_msg_name => 'CSI_API_CTR_INVD_NUM_OF_RDGS',
6243: p_token1_name => 'P_NUMBER_OF_READINGS',
6244: p_token1_val => to_char(p_number_of_readings)
6245: );

Line 6261: csi_ctr_gen_utility_pvt.ExitWithErrMsg

6257: IF p_estimation_period_start_date IS NOT NULL THEN
6258: l_estimated_usage := l_estimated_meter_rdg - lp_period_start_reading;
6259: END IF;
6260: ELSE
6261: csi_ctr_gen_utility_pvt.ExitWithErrMsg
6262: ( p_msg_name => 'CSI_API_CTR_INVD_NUM_OF_RDGS',
6263: p_token1_name => 'P_NUMBER_OF_READINGS',
6264: p_token1_val => to_char(p_number_of_readings)
6265: );

Line 6295: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_DEF_VAL_NULL');

6291: CLOSE FIRST_RDG_VALUES;
6292: --
6293: IF trunc(l_prev_value_timestamp) = trunc(l_first_rdg_date) THEN
6294: IF p_default_Value IS NULL THEN
6295: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_DEF_VAL_NULL');
6296: END IF;
6297: l_estimated_meter_rdg := (trunc(p_estimation_period_end_date) - trunc(l_first_rdg_date)) * p_default_Value;
6298: l_estimated_meter_rdg := l_estimated_meter_rdg + ((nvl(p_usage_markup,0)/100) * (l_estimated_meter_rdg));
6299: OPEN CTR_DIRECTION(p_counter_id);

Line 6324: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_ENDT');

6320: END IF;
6321: END IF; --l_post_reading not null
6322: ELSE --l_prev_reading is null
6323: --error out - not enough readings to calculate the estimation
6324: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_ENDT');
6325: END IF;
6326: END IF; --p_avg_calculation_start_date not null
6327: ELSE --l_estimated_meter_rdg is NOT NULL
6328: IF p_estimation_period_start_date IS NOT NULL THEN

Line 6461: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

6457: -- Initialize API return status to SUCCESS
6458: x_return_status := FND_API.G_RET_STS_SUCCESS;
6459: --
6460: -- Read the debug profiles values in to global variable 7197402
6461: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
6462:
6463: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Counter_Reading...');
6464: --
6465: -- Standard call to check for call compatibility.

Line 6463: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Counter_Reading...');

6459: --
6460: -- Read the debug profiles values in to global variable 7197402
6461: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
6462:
6463: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Counter_Reading...');
6464: --
6465: -- Standard call to check for call compatibility.
6466: IF NOT FND_API.Compatible_API_Call (l_api_version,
6467: p_api_version,

Line 6474: csi_ctr_gen_utility_pvt.ExitWithErrMsg

6470: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6471: END IF;
6472: --
6473: IF p_counter_id IS NULL or p_estimation_period_end_date IS NULL THEN
6474: csi_ctr_gen_utility_pvt.ExitWithErrMsg
6475: ( p_msg_name => 'CSI_API_CTR_CTRID_PRD_ENDDT',
6476: p_token1_name => 'P_COUNTER_ID',
6477: p_token1_val => to_char(p_counter_id),
6478: p_token2_name => 'P_ESTIMATION_PERIOD_END_DATE',

Line 6483: csi_ctr_gen_utility_pvt.ExitWithErrMsg

6479: p_token2_val => to_char(p_estimation_period_end_date,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS'))
6480: );
6481: END IF;
6482: IF p_avg_calculation_start_date IS NOT NULL and p_number_of_readings IS NOT NULL THEN
6483: csi_ctr_gen_utility_pvt.ExitWithErrMsg
6484: ( p_msg_name => 'CSI_API_CTR_CAL_STDT_NUM_RDGS',
6485: p_token1_name => 'P_AVG_CALCULATION_START_DATE',
6486: p_token1_val => to_char(p_avg_calculation_start_date,nvl(fnd_profile.value('ICX_DATE_FORMAT_MASK'),'DD-MON-YYYY HH24:MI:SS')),
6487: p_token2_name => 'P_NUMBER_OF_READINGS',

Line 6493: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PRD_ST_END_DT');

6489: );
6490: END IF;
6491:
6492: IF NOT trunc(p_estimation_period_start_date) <= trunc(p_estimation_period_end_date) THEN
6493: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PRD_ST_END_DT');
6494: END IF;
6495:
6496: IF NOT trunc(p_avg_calculation_start_date) < trunc(p_estimation_period_start_date) THEN
6497: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_CAL_STDT_PRD_STDT');

Line 6497: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_CAL_STDT_PRD_STDT');

6493: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PRD_ST_END_DT');
6494: END IF;
6495:
6496: IF NOT trunc(p_avg_calculation_start_date) < trunc(p_estimation_period_start_date) THEN
6497: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_CAL_STDT_PRD_STDT');
6498: END IF;
6499:
6500: IF NOT trunc(p_avg_calculation_start_date) < trunc(p_estimation_period_end_date) THEN
6501: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_CAL_STDT_PRD_ENDDT');

Line 6501: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_CAL_STDT_PRD_ENDDT');

6497: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_CAL_STDT_PRD_STDT');
6498: END IF;
6499:
6500: IF NOT trunc(p_avg_calculation_start_date) < trunc(p_estimation_period_end_date) THEN
6501: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_CAL_STDT_PRD_ENDDT');
6502: END IF;
6503: --
6504: BEGIN
6505: select 'X' into l_dummy

Line 6510: csi_ctr_gen_utility_pvt.ExitWithErrMsg

6506: from CSI_COUNTERS_B
6507: where counter_id = p_Counter_id;
6508: EXCEPTION
6509: when no_data_found then
6510: csi_ctr_gen_utility_pvt.ExitWithErrMsg
6511: ( p_msg_name => 'CSI_API_CTR_INVALID',
6512: p_token1_name => 'MODE',
6513: p_token1_val => 'Counter'
6514: );

Line 6536: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDGS_EXIST');

6532: OPEN CTR_RDGS_EXIST(p_counter_id);
6533: FETCH CTR_RDGS_EXIST into l_ctr_val_id;
6534: CLOSE CTR_RDGS_EXIST;
6535: IF l_ctr_val_id IS NULL THEN
6536: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDGS_EXIST');
6537: END IF;
6538: END IF;
6539:
6540: IF l_est_rec.estimation_type = 'FIXED' THEN

Line 6544: csi_ctr_gen_utility_pvt.put_line('Calling Estimate_fixed_values...');

6540: IF l_est_rec.estimation_type = 'FIXED' THEN
6541: /********************
6542: Compute Fixed Value Estimation
6543: ********************/
6544: csi_ctr_gen_utility_pvt.put_line('Calling Estimate_fixed_values...');
6545: --
6546: Estimate_fixed_values(
6547: P_api_version => 1.0,
6548: P_Init_Msg_List => P_Init_Msg_List,

Line 6564: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_fixed_values API ');

6560: X_Msg_Count => X_Msg_Count,
6561: X_Msg_Data => X_Msg_Data
6562: );
6563: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6564: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_fixed_values API ');
6565: l_msg_index := 1;
6566: l_msg_count := x_msg_count;
6567: WHILE l_msg_count > 0 LOOP
6568: x_msg_data := FND_MSG_PUB.GET

Line 6572: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

6568: x_msg_data := FND_MSG_PUB.GET
6569: ( l_msg_index,
6570: FND_API.G_FALSE
6571: );
6572: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
6573: l_msg_index := l_msg_index + 1;
6574: l_msg_count := l_msg_count - 1;
6575: END LOOP;
6576: RAISE FND_API.G_EXC_ERROR;

Line 6583: csi_ctr_gen_utility_pvt.put_line('Calling Estimate_Usage...');

6579: ELSIF l_est_rec.estimation_type = 'USAGE' THEN
6580: /********************
6581: Compute Usage of direct counter Estimation
6582: *******************/
6583: csi_ctr_gen_utility_pvt.put_line('Calling Estimate_Usage...');
6584: Estimate_Usage(
6585: P_api_version => 1.0,
6586: P_Init_Msg_List => P_Init_Msg_List,
6587: P_Commit => P_Commit,

Line 6605: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_Usage API ');

6601: X_Msg_Count => X_Msg_Count,
6602: X_Msg_Data => X_Msg_Data
6603: );
6604: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6605: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_Usage API ');
6606: l_msg_index := 1;
6607: l_msg_count := x_msg_count;
6608: WHILE l_msg_count > 0 LOOP
6609: x_msg_data := FND_MSG_PUB.GET

Line 6613: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

6609: x_msg_data := FND_MSG_PUB.GET
6610: ( l_msg_index,
6611: FND_API.G_FALSE
6612: );
6613: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
6614: l_msg_index := l_msg_index + 1;
6615: l_msg_count := l_msg_count - 1;
6616: END LOOP;
6617: RAISE FND_API.G_EXC_ERROR;

Line 6633: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDGS_EXIST');

6629: FETCH CTR_RDGS_EXIST into l_ctr_val_id;
6630: close CTR_RDGS_EXIST;
6631: --
6632: IF l_ctr_val_id IS NULL THEN
6633: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDGS_EXIST');
6634: END IF;
6635:
6636: Estimate_Usage(
6637: P_api_version => 1.0,

Line 6657: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_Usage API ');

6653: X_Msg_Count => X_Msg_Count,
6654: X_Msg_Data => X_Msg_Data
6655: );
6656: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6657: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Estimate_Usage API ');
6658: l_msg_index := 1;
6659: l_msg_count := x_msg_count;
6660: WHILE l_msg_count > 0 LOOP
6661: x_msg_data := FND_MSG_PUB.GET

Line 6665: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

6661: x_msg_data := FND_MSG_PUB.GET
6662: ( l_msg_index,
6663: FND_API.G_FALSE
6664: );
6665: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
6666: l_msg_index := l_msg_index + 1;
6667: l_msg_count := l_msg_count - 1;
6668: END LOOP;
6669: RAISE FND_API.G_EXC_ERROR;

Line 6824: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Fixed_Values...');

6820: END IF;
6821: -- Initialize API return status to SUCCESS
6822: x_return_status := FND_API.G_RET_STS_SUCCESS;
6823: --
6824: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Fixed_Values...');
6825: --
6826:
6827: -- Read the debug profiles values in to global variable 7197402
6828: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

Line 6828: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

6824: csi_ctr_gen_utility_pvt.put_line( 'Inside Estimate_Fixed_Values...');
6825: --
6826:
6827: -- Read the debug profiles values in to global variable 7197402
6828: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
6829:
6830: -- Standard call to check for call compatibility.
6831: IF NOT FND_API.Compatible_API_Call (l_api_version,
6832: p_api_version,

Line 6839: csi_ctr_gen_utility_pvt.put_line('Calling Est_Period_Start_Readings...');

6835: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6836: END IF;
6837: --
6838: IF p_estimation_period_start_date IS NOT NULL THEN
6839: csi_ctr_gen_utility_pvt.put_line('Calling Est_Period_Start_Readings...');
6840: EST_PERIOD_START_READINGS(
6841: P_api_version => 1.0,
6842: P_Init_Msg_List => P_Init_Msg_List,
6843: P_Commit => P_Commit,

Line 6855: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Est_Period_Start_Readings API ');

6851: X_Msg_Count => X_Msg_Count,
6852: X_Msg_Data => X_Msg_Data
6853: );
6854: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6855: csi_ctr_gen_utility_pvt.put_line('ERROR FROM Est_Period_Start_Readings API ');
6856: l_msg_index := 1;
6857: l_msg_count := x_msg_count;
6858: WHILE l_msg_count > 0 LOOP
6859: x_msg_data := FND_MSG_PUB.GET

Line 6863: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);

6859: x_msg_data := FND_MSG_PUB.GET
6860: ( l_msg_index,
6861: FND_API.G_FALSE
6862: );
6863: csi_ctr_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
6864: l_msg_index := l_msg_index + 1;
6865: l_msg_count := l_msg_count - 1;
6866: END LOOP;
6867: RAISE FND_API.G_EXC_ERROR;

Line 6883: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_ENDT');

6879: close prior_rdg_values;
6880: --
6881: IF l_prev_reading IS NULL THEN
6882: -- raise error message - no readings to calculate
6883: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NO_RDG_PR_PRD_ENDT');
6884: ELSE -- l_prev_reading IS not null
6885: l_period_days := trunc(p_estimation_period_end_date) - trunc(l_prev_value_timestamp) ;
6886: l_estimated_meter_reading:=(l_prev_reading +(P_fixed_value*l_period_days)) ;
6887: END IF;