DBA Data[Home] [Help]

APPS.CSI_COUNTER_PVT dependencies on CSI_CTR_GEN_UTILITY_PVT

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

59: into l_dummy
60: from mtl_units_of_measure
61: where uom_code = p_uom_code;
62: exception when no_data_found then
63: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_ALL_INVALID_UOM_CODE');
64: END;
65:
66: --|---------------------------------------------------
67: --| function name: counter_name_exists

Line 124: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_DUP_NAME','CTR_NAME',p_name);

120: WHERE name = p_name
121: AND counter_id <> nvl(p_ctr_id,-1);
122:
123: -- There already exists a counter with the same name. Raise error
124: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_DUP_NAME','CTR_NAME',p_name);
125: EXCEPTION WHEN NO_DATA_FOUND THEN
126: NULL;
127: END;
128:

Line 201: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM_CTR_NAME');

197: BEGIN
198:
199: -- validate counter name is not null
200: if p_name is null then
201: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM_CTR_NAME');
202: end if;
203:
204: -- validate uom code
205: validate_uom(p_uom_code);

Line 218: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_USAGE_ITEM');

214: and organization_id = l_inv_valdn_org_id
215: --and organization_id = cs_std.get_item_valdn_orgzn_id
216: and usage_item_flag = 'Y';
217: exception when no_data_found then
218: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_USAGE_ITEM');
219: end;
220:
221: if p_group_id is null then
222: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM_GRP_NAME');

Line 222: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM_GRP_NAME');

218: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_USAGE_ITEM');
219: end;
220:
221: if p_group_id is null then
222: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM_GRP_NAME');
223: end if;
224: end if;
225:
226: -- validate counter group id

Line 234: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_GRP_INVALID');

230: into l_dummy
231: from csi_counter_groups_v
232: where counter_group_id = p_group_id;
233: exception when no_data_found then
234: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_GRP_INVALID');
235: end;
236: end if;
237:
238: --validate estimation id not exist if direction is Bi-Direction

Line 240: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_NO_DIRECTION');

236: end if;
237:
238: --validate estimation id not exist if direction is Bi-Direction
239: if p_estimation_id is not null and p_direction not in ('A','D') then
240: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_EST_NO_DIRECTION');
241: end if;
242:
243: -- Validate that automatic rollover should not exist if direction is Bi-Direction
244: if nvl(p_automatic_rollover,'N') = 'Y' and p_direction not in ('A','D') then

Line 245: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_ARO_NO_DIRECTION');

241: end if;
242:
243: -- Validate that automatic rollover should not exist if direction is Bi-Direction
244: if nvl(p_automatic_rollover,'N') = 'Y' and p_direction not in ('A','D') then
245: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_ARO_NO_DIRECTION');
246: end if;
247:
248: --validate tolerance plus and tolerance minus for negative values
249: if p_tolerance_plus < 0 or p_tolerance_minus <0 then

Line 250: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_TOLERANCE');

246: end if;
247:
248: --validate tolerance plus and tolerance minus for negative values
249: if p_tolerance_plus < 0 or p_tolerance_minus <0 then
250: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_TOLERANCE');
251: end if;
252:
253: --validate counter type
254: if p_counter_type not in ('REGULAR','FORMULA') then

Line 255: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_CTR_TYPE');

251: end if;
252:
253: --validate counter type
254: if p_counter_type not in ('REGULAR','FORMULA') then
255: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID_CTR_TYPE');
256: end if;
257:
258: --validate counter type parameters
259: if p_counter_type = 'REGULAR' then

Line 274: csi_ctr_gen_utility_pvt.ExitWithErrMsg

270:
271: if l_time_uom = 'N' then
272: if p_reading_type not in (1,2) then
273: --ExitWithErrMsg('CSI_API_CTR_REQ_PARM_CTR_TYPE','PARAM','p_reading_type','CTR_TYPE',p_counter_type);
274: csi_ctr_gen_utility_pvt.ExitWithErrMsg
275: ( p_msg_name => 'CSI_API_CTR_REQ_PARM_CTR_TYPE',
276: p_token1_name => 'PARAM',
277: p_token1_val => 'p_reading_type',
278: p_token2_name => 'CTR_TYPE',

Line 289: csi_ctr_gen_utility_pvt.ExitWithErrMsg

285: p_filter_type is not null or
286: p_filter_reading_count is not null or
287: p_filter_time_uom is not null then
288: --ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);
289: csi_ctr_gen_utility_pvt.ExitWithErrMsg
290: ( p_msg_name => 'CSI_API_CTR_INV_PARM_CTR_TYPE',
291: p_token1_name => 'CTR_TYPE',
292: p_token1_val => p_counter_type
293: );

Line 300: csi_ctr_gen_utility_pvt.ExitWithErrMsg

296: --validate required parameter values exist for automatic rollover
297: if nvl(p_automatic_rollover,'N') = 'Y' then
298: if p_rollover_last_reading is null then
299: --ExitWithErrMsg('CSI_API_CTR_REQ_PARM_ROLLOVER','PARAM','p_rollover_last_reading');
300: csi_ctr_gen_utility_pvt.ExitWithErrMsg
301: ( p_msg_name => 'CSI_API_CTR_REQ_PARM',
302: p_token1_name => 'PARAM',
303: p_token1_val => 'p_rollover_last_reading'
304: );

Line 307: csi_ctr_gen_utility_pvt.ExitWithErrMsg

303: p_token1_val => 'p_rollover_last_reading'
304: );
305: elsif p_rollover_first_reading is null then
306: --ExitWithErrMsg('CSI_API_CTR_REQ_PARM_ROLLOVER','PARAM','p_rollover_first_reading');
307: csi_ctr_gen_utility_pvt.ExitWithErrMsg
308: ( p_msg_name => 'CSI_API_CTR_REQ_PARM',
309: p_token1_name => 'PARAM',
310: p_token1_val => 'p_rollover_first_reading'
311: );

Line 315: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RO_DATA');

311: );
312: end if;
313: --Rollover from must be greater than Rollover to for direction Ascending
314: if p_direction = 'A' and p_rollover_last_reading <= p_rollover_first_reading then
315: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RO_DATA');
316: end if;
317: --Rollover from must be less than Rollover to for direction Descending
318: if p_direction = 'D' and p_rollover_last_reading >= p_rollover_first_reading then
319: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RO_DATA');

Line 319: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RO_DATA');

315: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RO_DATA');
316: end if;
317: --Rollover from must be less than Rollover to for direction Descending
318: if p_direction = 'D' and p_rollover_last_reading >= p_rollover_first_reading then
319: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RO_DATA');
320: end if;
321: end if;
322: -- Rollover from and Rollover to field should not have values if automatic rollover is not checked.
323: if nvl(p_automatic_rollover,'N') = 'N' and (p_rollover_last_reading is NOT NULL or p_rollover_first_reading IS NOT NULL) then

Line 324: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RO_ARO');

320: end if;
321: end if;
322: -- Rollover from and Rollover to field should not have values if automatic rollover is not checked.
323: if nvl(p_automatic_rollover,'N') = 'N' and (p_rollover_last_reading is NOT NULL or p_rollover_first_reading IS NOT NULL) then
324: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RO_ARO');
325: end if;
326:
327: --validate if required parameter values exist for used in scheduling
328: if nvl(p_used_in_scheduling,'N') = 'Y' then

Line 331: csi_ctr_gen_utility_pvt.ExitWithErrMsg

327: --validate if required parameter values exist for used in scheduling
328: if nvl(p_used_in_scheduling,'N') = 'Y' then
329: if p_initial_reading is null then
330: --ExitWithErrMsg('CSI_API_CTR_REQ_PARM_USE_SCHD','PARAM','p_initial_reading');
331: csi_ctr_gen_utility_pvt.ExitWithErrMsg
332: ( p_msg_name => 'CSI_API_CTR_REQ_PARM',
333: p_token1_name => 'PARAM',
334: p_token1_val => 'p_initial_reading'
335: );

Line 338: csi_ctr_gen_utility_pvt.ExitWithErrMsg

334: p_token1_val => 'p_initial_reading'
335: );
336: elsif p_default_usage_rate is null then
337: --ExitWithErrMsg('CSI_API_CTR_REQ_PARM_USE_SCHD','PARAM','p_default_usage_rate');
338: csi_ctr_gen_utility_pvt.ExitWithErrMsg
339: ( p_msg_name => 'CSI_API_CTR_REQ_PARM',
340: p_token1_name => 'PARAM',
341: p_token1_val => 'p_default_usage_rate'
342: );

Line 345: csi_ctr_gen_utility_pvt.ExitWithErrMsg

341: p_token1_val => 'p_default_usage_rate'
342: );
343: elsif p_use_past_reading is null then
344: --ExitWithErrMsg('CSI_API_CTR_REQ_PARM_USE_SCHD','PARAM','p_use_past_reading');
345: csi_ctr_gen_utility_pvt.ExitWithErrMsg
346: ( p_msg_name => 'CSI_API_CTR_REQ_PARM',
347: p_token1_name => 'PARAM',
348: p_token1_val => 'p_use_past_reading'
349: );

Line 371: csi_ctr_gen_utility_pvt.ExitWithErrMsg

367: p_tolerance_plus is not null or
368: p_tolerance_minus is not null or
369: p_estimation_id is not null then
370: --ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);
371: csi_ctr_gen_utility_pvt.ExitWithErrMsg
372: ( p_msg_name => 'CSI_API_CTR_INV_PARM_CTR_TYPE',
373: p_token1_name => 'CTR_TYPE',
374: p_token1_val => p_counter_type
375: );

Line 381: csi_ctr_gen_utility_pvt.ExitWithErrMsg

377: end if; --l_time_uom
378: elsif p_counter_type = 'FORMULA' then
379: if p_derive_function is null then
380: if p_formula_text is null then
381: csi_ctr_gen_utility_pvt.ExitWithErrMsg
382: ( p_msg_name => 'CSI_API_CTR_REQ_PARM',
383: p_token1_name => 'PARAM',
384: p_token1_val => 'p_formula_text'
385: );

Line 388: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_FORMULA_TEXT');

384: p_token1_val => 'p_formula_text'
385: );
386: end if;
387: IF NOT VALIDATE_FORMULA(p_formula_text) THEN
388: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_FORMULA_TEXT');
389: END IF;
390: if p_derive_counter_id is not null or
391: p_filter_type is not null or
392: p_filter_reading_count is not null or

Line 400: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);

396: p_rollover_first_reading is not null or
397: p_initial_reading is not null or
398: p_tolerance_plus is not null or
399: p_tolerance_minus is not null then
400: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);
401: end if;
402: elsif p_derive_function='AVERAGE' and p_filter_type='COUNT' then
403: if p_filter_reading_count < 0 then
404: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM','PARAM','p_filter_type');

Line 404: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM','PARAM','p_filter_type');

400: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);
401: end if;
402: elsif p_derive_function='AVERAGE' and p_filter_type='COUNT' then
403: if p_filter_reading_count < 0 then
404: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM','PARAM','p_filter_type');
405: end if;
406: if p_formula_text is not null or
407: p_filter_time_uom is not null or
408: nvl(p_automatic_rollover,'N') = 'Y' or

Line 418: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);

414: -- p_use_past_reading is not null or
415: p_estimation_id is not null or
416: p_tolerance_plus is not null or
417: p_tolerance_minus is not null then
418: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);
419: end if;
420: elsif p_derive_function='AVERAGE' and p_filter_type='TIME' then
421: if p_filter_time_uom is null then
422: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM','PARAM','p_filter_type');

Line 422: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM','PARAM','p_filter_type');

418: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);
419: end if;
420: elsif p_derive_function='AVERAGE' and p_filter_type='TIME' then
421: if p_filter_time_uom is null then
422: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM','PARAM','p_filter_type');
423: end if;
424: if p_formula_text is not null or
425: p_filter_reading_count is not null or
426: nvl(p_automatic_rollover,'N') = 'Y' or

Line 436: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);

432: -- p_use_past_reading is not null or
433: p_estimation_id is not null or
434: p_tolerance_plus is not null or
435: p_tolerance_minus is not null then
436: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);
437: end if;
438: elsif p_derive_function in ('SUM','COUNT') then
439: -- if p_derive_counter_id is null then
440: -- csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM','PARAM','p_derive_counter_id');

Line 440: -- csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM','PARAM','p_derive_counter_id');

436: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);
437: end if;
438: elsif p_derive_function in ('SUM','COUNT') then
439: -- if p_derive_counter_id is null then
440: -- csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_REQ_PARM','PARAM','p_derive_counter_id');
441: -- end if;
442: if p_formula_text is not null or
443: p_filter_time_uom is not null or
444: p_filter_reading_count is not null or

Line 455: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);

451: -- p_use_past_reading is not null or
452: p_estimation_id is not null or
453: p_tolerance_plus is not null or
454: p_tolerance_minus is not null then
455: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PARM_CTR_TYPE','CTR_TYPE',p_counter_type);
456: end if;
457: end if;
458: end if; -- p_counter_type
459:

Line 509: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PROP_DATA_TYPE');

505: l_date := l_default_value;
506: l_date := l_minimum_value;
507: l_date := l_maximum_value;
508: ELSE
509: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PROP_DATA_TYPE');
510: END IF;
511:
512: EXCEPTION WHEN OTHERS THEN
513: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_VAL_DATATYPE','DATA_TYPE',p_property_data_type);

Line 513: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_VAL_DATATYPE','DATA_TYPE',p_property_data_type);

509: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PROP_DATA_TYPE');
510: END IF;
511:
512: EXCEPTION WHEN OTHERS THEN
513: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_VAL_DATATYPE','DATA_TYPE',p_property_data_type);
514:
515: END Validate_Data_Type;
516:
517: --|---------------------------------------------------

Line 637: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

633: -- Initialize API return status to success
634: x_return_status := FND_API.G_RET_STS_SUCCESS;
635:
636: -- Read the debug profiles values in to global variable 7197402
637: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
638:
639: -- Check the profile option debug_level for debug message reporting
640: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
641:

Line 643: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN

639: -- Check the profile option debug_level for debug message reporting
640: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
641:
642: -- If debug_level = 1 then dump the procedure name
643: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
644: csi_ctr_gen_utility_pvt.put_line( 'create_counter');
645: END IF;
646:
647: -- If the debug level = 2 then dump all the parameters values.

Line 644: csi_ctr_gen_utility_pvt.put_line( 'create_counter');

640: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
641:
642: -- If debug_level = 1 then dump the procedure name
643: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
644: csi_ctr_gen_utility_pvt.put_line( 'create_counter');
645: END IF;
646:
647: -- If the debug level = 2 then dump all the parameters values.
648: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

Line 648: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

644: csi_ctr_gen_utility_pvt.put_line( 'create_counter');
645: END IF;
646:
647: -- If the debug level = 2 then dump all the parameters values.
648: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
649: csi_ctr_gen_utility_pvt.put_line( 'create_counter' ||
650: p_api_version ||'-'||
651: p_commit ||'-'||
652: p_init_msg_list ||'-'||

Line 649: csi_ctr_gen_utility_pvt.put_line( 'create_counter' ||

645: END IF;
646:
647: -- If the debug level = 2 then dump all the parameters values.
648: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
649: csi_ctr_gen_utility_pvt.put_line( 'create_counter' ||
650: p_api_version ||'-'||
651: p_commit ||'-'||
652: p_init_msg_list ||'-'||
653: p_validation_level );

Line 654: csi_ctr_gen_utility_pvt.dump_counter_instance_rec(p_counter_instance_rec);

650: p_api_version ||'-'||
651: p_commit ||'-'||
652: p_init_msg_list ||'-'||
653: p_validation_level );
654: csi_ctr_gen_utility_pvt.dump_counter_instance_rec(p_counter_instance_rec);
655: END IF;
656:
657: -- Start of API Body
658: if p_counter_instance_rec.counter_id = FND_API.G_MISS_NUM then

Line 981: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');

977: --Validate_Unique_ctr(l_name, l_counter_id);
978: -- Validate start date
979: /*
980: IF l_start_date_active IS NULL THEN
981: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
982: ELS */
983: IF l_start_date_active > sysdate THEN
984: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
985: END IF;

Line 984: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');

980: IF l_start_date_active IS NULL THEN
981: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
982: ELS */
983: IF l_start_date_active > sysdate THEN
984: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
985: END IF;
986:
987: if nvl(p_counter_instance_rec.initial_reading_date, FND_API.G_MISS_DATE) = FND_API.G_MISS_DATE then
988: l_initial_reading_date := sysdate;

Line 1001: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_TMPL_INVALID');

997: into l_dummy
998: from csi_counter_template_b
999: where counter_id = l_created_from_counter_tmpl_id;
1000: exception when no_data_found then
1001: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_TMPL_INVALID');
1002: end;
1003: end if;
1004:
1005: --call validate counter to validate the counter instance

Line 1063: csi_ctr_gen_utility_pvt.put_line('Inserting Counter with Value ID '||to_char(l_counter_id));

1059: l_defaulted_group_id := l_group_id;
1060: END IF;
1061:
1062: --
1063: csi_ctr_gen_utility_pvt.put_line('Inserting Counter with Value ID '||to_char(l_counter_id));
1064: -- call table handler here
1065: CSI_COUNTERS_PKG.Insert_Row
1066: (
1067: px_COUNTER_ID => l_counter_id

Line 1276: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

1272: -- Initialize API return status to success
1273: x_return_status := FND_API.G_RET_STS_SUCCESS;
1274:
1275: -- Read the debug profiles values in to global variable 7197402
1276: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
1277:
1278: -- Check the profile option debug_level for debug message reporting
1279: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
1280:

Line 1282: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN

1278: -- Check the profile option debug_level for debug message reporting
1279: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
1280:
1281: -- If debug_level = 1 then dump the procedure name
1282: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
1283: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_property');
1284: END IF;
1285:
1286: -- If the debug level = 2 then dump all the parameters values.

Line 1283: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_property');

1279: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
1280:
1281: -- If debug_level = 1 then dump the procedure name
1282: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
1283: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_property');
1284: END IF;
1285:
1286: -- If the debug level = 2 then dump all the parameters values.
1287: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

Line 1287: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

1283: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_property');
1284: END IF;
1285:
1286: -- If the debug level = 2 then dump all the parameters values.
1287: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
1288: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_property' ||
1289: p_api_version ||'-'||
1290: p_commit ||'-'||
1291: p_init_msg_list ||'-'||

Line 1288: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_property' ||

1284: END IF;
1285:
1286: -- If the debug level = 2 then dump all the parameters values.
1287: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
1288: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_property' ||
1289: p_api_version ||'-'||
1290: p_commit ||'-'||
1291: p_init_msg_list ||'-'||
1292: p_validation_level );

Line 1293: csi_ctr_gen_utility_pvt.dump_ctr_properties_rec(p_ctr_properties_rec);

1289: p_api_version ||'-'||
1290: p_commit ||'-'||
1291: p_init_msg_list ||'-'||
1292: p_validation_level );
1293: csi_ctr_gen_utility_pvt.dump_ctr_properties_rec(p_ctr_properties_rec);
1294: END IF;
1295:
1296: -- Start of API Body
1297: if p_ctr_properties_rec.counter_id = FND_API.G_MISS_NUM then

Line 1453: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID');

1449: into l_dummy
1450: from csi_counters_b
1451: where counter_id = l_counter_id;
1452: exception when no_data_found then
1453: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID');
1454: end;
1455:
1456: -- validate unique property name within counter
1457: Validate_Unique_ctrprop( l_name, l_counter_id,p_ctr_properties_rec.counter_property_id);

Line 1461: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PROP_DATA_TYPE');

1457: Validate_Unique_ctrprop( l_name, l_counter_id,p_ctr_properties_rec.counter_property_id);
1458:
1459: -- validate property date type in char,number,date
1460: if l_property_data_type not in ('CHAR', 'NUMBER', 'DATE') then
1461: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PROP_DATA_TYPE');
1462: end if;
1463:
1464: -- Validate values for data type
1465: Validate_Data_Type(l_property_data_type, l_default_value,

Line 1476: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');

1472:
1473: -- Validate start date
1474: /*
1475: IF l_start_date_active IS NULL THEN
1476: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
1477: ELS */
1478: IF l_start_date_active > sysdate THEN
1479: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
1480: END IF;

Line 1479: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');

1475: IF l_start_date_active IS NULL THEN
1476: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
1477: ELS */
1478: IF l_start_date_active > sysdate THEN
1479: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
1480: END IF;
1481:
1482: if l_created_from_ctrprop_tmpl_id is not null then
1483: begin

Line 1490: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_TMPL_INVALID');

1486: from csi_counter_template_b c, csi_ctr_property_template_b p
1487: where p.counter_id = c.counter_id
1488: and p.counter_property_id = l_created_from_ctrprop_tmpl_id;
1489: exception when no_data_found then
1490: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_TMPL_INVALID');
1491: end;
1492: end if;
1493:
1494: -- call table handler here

Line 1670: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

1666: -- Initialize API return status to success
1667: x_return_status := FND_API.G_RET_STS_SUCCESS;
1668:
1669: -- Read the debug profiles values in to global variable 7197402
1670: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
1671:
1672: -- Check the profile option debug_level for debug message reporting
1673: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
1674:

Line 1676: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN

1672: -- Check the profile option debug_level for debug message reporting
1673: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
1674:
1675: -- If debug_level = 1 then dump the procedure name
1676: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
1677: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_associations');
1678: END IF;
1679:
1680: -- If the debug level = 2 then dump all the parameters values.

Line 1677: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_associations');

1673: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
1674:
1675: -- If debug_level = 1 then dump the procedure name
1676: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
1677: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_associations');
1678: END IF;
1679:
1680: -- If the debug level = 2 then dump all the parameters values.
1681: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

Line 1681: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

1677: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_associations');
1678: END IF;
1679:
1680: -- If the debug level = 2 then dump all the parameters values.
1681: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
1682: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_associations' ||
1683: p_api_version ||'-'||
1684: p_commit ||'-'||
1685: p_init_msg_list ||'-'||

Line 1682: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_associations' ||

1678: END IF;
1679:
1680: -- If the debug level = 2 then dump all the parameters values.
1681: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
1682: csi_ctr_gen_utility_pvt.put_line( 'create_ctr_associations' ||
1683: p_api_version ||'-'||
1684: p_commit ||'-'||
1685: p_init_msg_list ||'-'||
1686: p_validation_level );

Line 1687: csi_ctr_gen_utility_pvt.dump_counter_associations_rec(p_counter_associations_rec);

1683: p_api_version ||'-'||
1684: p_commit ||'-'||
1685: p_init_msg_list ||'-'||
1686: p_validation_level );
1687: csi_ctr_gen_utility_pvt.dump_counter_associations_rec(p_counter_associations_rec);
1688: END IF;
1689:
1690: -- Start of API Body
1691:

Line 1817: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID');

1813: into l_dummy
1814: from csi_counters_b
1815: where counter_id = l_counter_id;
1816: exception when no_data_found then
1817: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID');
1818: end;
1819:
1820: if l_source_object_code = 'CP' then
1821: begin

Line 1828: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_IB_CPID_INVALID', 'PARAM', to_char(l_source_object_id));

1824: from csi_item_instances
1825: where instance_id = l_source_object_id;
1826: exception
1827: when no_data_found then
1828: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_IB_CPID_INVALID', 'PARAM', to_char(l_source_object_id));
1829: end;
1830: elsif l_source_object_code = 'CONTRACT_LINE' then
1831: begin
1832: select 'x'

Line 1837: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_INV_CONTRACT_LINE', 'PARAM', to_char(l_source_object_id));

1833: into l_dummy
1834: from okc_k_lines_b
1835: where id = l_source_object_id;
1836: exception when no_data_found then
1837: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_INV_CONTRACT_LINE', 'PARAM', to_char(l_source_object_id));
1838: end;
1839: else
1840: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_SRC_OBJ_CD','SRC_OBJ_CODE',l_source_object_code);
1841: end if;

Line 1840: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_SRC_OBJ_CD','SRC_OBJ_CODE',l_source_object_code);

1836: exception when no_data_found then
1837: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_INV_CONTRACT_LINE', 'PARAM', to_char(l_source_object_id));
1838: end;
1839: else
1840: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_SRC_OBJ_CD','SRC_OBJ_CODE',l_source_object_code);
1841: end if;
1842:
1843: /* Check if it is an EAM item to get the maint_organization_id */
1844: BEGIN

Line 1869: csi_ctr_gen_utility_pvt.put_line( ' EAM Item Type = '||to_char(l_eam_item_type));

1865: NULL;
1866: END;
1867: END IF;
1868: /* End of checking*/
1869: csi_ctr_gen_utility_pvt.put_line( ' EAM Item Type = '||to_char(l_eam_item_type));
1870: csi_ctr_gen_utility_pvt.put_line( ' Maint organization id = '||to_char(l_maint_organization_id));
1871:
1872: -- Validate start date
1873: /*

Line 1870: csi_ctr_gen_utility_pvt.put_line( ' Maint organization id = '||to_char(l_maint_organization_id));

1866: END;
1867: END IF;
1868: /* End of checking*/
1869: csi_ctr_gen_utility_pvt.put_line( ' EAM Item Type = '||to_char(l_eam_item_type));
1870: csi_ctr_gen_utility_pvt.put_line( ' Maint organization id = '||to_char(l_maint_organization_id));
1871:
1872: -- Validate start date
1873: /*
1874: IF l_start_date_active IS NULL THEN

Line 1875: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');

1871:
1872: -- Validate start date
1873: /*
1874: IF l_start_date_active IS NULL THEN
1875: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
1876: ELS */
1877: IF l_start_date_active > sysdate THEN
1878: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
1879: END IF;

Line 1878: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');

1874: IF l_start_date_active IS NULL THEN
1875: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
1876: ELS */
1877: IF l_start_date_active > sysdate THEN
1878: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
1879: END IF;
1880:
1881: -- Check for duplicate assocition
1882: OPEN association_exist(l_counter_id, l_source_object_id );

Line 1887: csi_ctr_gen_utility_pvt.put_line('Association exist for this counter. Duplicate error...');

1883: FETCH association_exist INTO l_is_association_exist;
1884: CLOSE association_exist;
1885: IF l_is_association_exist is not null then
1886: -- Association exist for this counter. Raise error
1887: csi_ctr_gen_utility_pvt.put_line('Association exist for this counter. Duplicate error...');
1888: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_ASSOCIATION_EXIST','INSTANCE_ID',l_instance_number);
1889: END IF;
1890:
1891: -- call table handler here

Line 1888: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_ASSOCIATION_EXIST','INSTANCE_ID',l_instance_number);

1884: CLOSE association_exist;
1885: IF l_is_association_exist is not null then
1886: -- Association exist for this counter. Raise error
1887: csi_ctr_gen_utility_pvt.put_line('Association exist for this counter. Duplicate error...');
1888: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_ASSOCIATION_EXIST','INSTANCE_ID',l_instance_number);
1889: END IF;
1890:
1891: -- call table handler here
1892:

Line 2049: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

2045: -- Initialize API return status to success
2046: x_return_status := FND_API.G_RET_STS_SUCCESS;
2047:
2048: -- Read the debug profiles values in to global variable 7197402
2049: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
2050:
2051: -- Check the profile option debug_level for debug message reporting
2052: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
2053:

Line 2055: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN

2051: -- Check the profile option debug_level for debug message reporting
2052: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
2053:
2054: -- If debug_level = 1 then dump the procedure name
2055: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
2056: csi_ctr_gen_utility_pvt.put_line( 'create_reading_lock');
2057: END IF;
2058:
2059: -- If the debug level = 2 then dump all the parameters values.

Line 2056: csi_ctr_gen_utility_pvt.put_line( 'create_reading_lock');

2052: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
2053:
2054: -- If debug_level = 1 then dump the procedure name
2055: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
2056: csi_ctr_gen_utility_pvt.put_line( 'create_reading_lock');
2057: END IF;
2058:
2059: -- If the debug level = 2 then dump all the parameters values.
2060: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

Line 2060: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

2056: csi_ctr_gen_utility_pvt.put_line( 'create_reading_lock');
2057: END IF;
2058:
2059: -- If the debug level = 2 then dump all the parameters values.
2060: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
2061: csi_ctr_gen_utility_pvt.put_line( 'create_reading_lock' ||
2062: p_api_version ||'-'||
2063: p_commit ||'-'||
2064: p_init_msg_list ||'-'||

Line 2061: csi_ctr_gen_utility_pvt.put_line( 'create_reading_lock' ||

2057: END IF;
2058:
2059: -- If the debug level = 2 then dump all the parameters values.
2060: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
2061: csi_ctr_gen_utility_pvt.put_line( 'create_reading_lock' ||
2062: p_api_version ||'-'||
2063: p_commit ||'-'||
2064: p_init_msg_list ||'-'||
2065: p_validation_level );

Line 2066: csi_ctr_gen_utility_pvt.dump_ctr_reading_lock_rec(p_ctr_reading_lock_rec);

2062: p_api_version ||'-'||
2063: p_commit ||'-'||
2064: p_init_msg_list ||'-'||
2065: p_validation_level );
2066: csi_ctr_gen_utility_pvt.dump_ctr_reading_lock_rec(p_ctr_reading_lock_rec);
2067: END IF;
2068:
2069: -- Start of API Body
2070:

Line 2141: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID');

2137: into l_dummy
2138: from csi_counters_b
2139: where counter_id = l_counter_id;
2140: exception when no_data_found then
2141: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID');
2142: end;
2143:
2144: --validate reading lock date for null
2145: if l_reading_lock_date is null then

Line 2146: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RDG_LOCK_DT','RDG_LOCK_DATE',l_reading_lock_date);

2142: end;
2143:
2144: --validate reading lock date for null
2145: if l_reading_lock_date is null then
2146: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RDG_LOCK_DT','RDG_LOCK_DATE',l_reading_lock_date);
2147: end if;
2148: --validate reading lock date is not future date
2149: if l_reading_lock_date > sysdate then
2150: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RDG_LOCK_DT','RDG_LOCK_DATE',l_reading_lock_date);

Line 2150: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RDG_LOCK_DT','RDG_LOCK_DATE',l_reading_lock_date);

2146: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RDG_LOCK_DT','RDG_LOCK_DATE',l_reading_lock_date);
2147: end if;
2148: --validate reading lock date is not future date
2149: if l_reading_lock_date > sysdate then
2150: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_RDG_LOCK_DT','RDG_LOCK_DATE',l_reading_lock_date);
2151: end if;
2152:
2153: -- Get the last reading for this counter
2154: OPEN LAST_CTR_READING_CUR(l_counter_id, l_reading_lock_date);

Line 2294: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

2290: -- Initialize API return status to success
2291: x_return_status := FND_API.G_RET_STS_SUCCESS;
2292:
2293: -- Read the debug profiles values in to global variable 7197402
2294: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
2295:
2296: -- Check the profile option debug_level for debug message reporting
2297: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
2298:

Line 2300: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN

2296: -- Check the profile option debug_level for debug message reporting
2297: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
2298:
2299: -- If debug_level = 1 then dump the procedure name
2300: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
2301: csi_ctr_gen_utility_pvt.put_line( 'create_daily_usage');
2302: END IF;
2303:
2304: -- If the debug level = 2 then dump all the parameters values.

Line 2301: csi_ctr_gen_utility_pvt.put_line( 'create_daily_usage');

2297: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
2298:
2299: -- If debug_level = 1 then dump the procedure name
2300: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
2301: csi_ctr_gen_utility_pvt.put_line( 'create_daily_usage');
2302: END IF;
2303:
2304: -- If the debug level = 2 then dump all the parameters values.
2305: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

Line 2305: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

2301: csi_ctr_gen_utility_pvt.put_line( 'create_daily_usage');
2302: END IF;
2303:
2304: -- If the debug level = 2 then dump all the parameters values.
2305: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
2306: csi_ctr_gen_utility_pvt.put_line( 'create_daily_usage' ||
2307: p_api_version ||'-'||
2308: p_commit ||'-'||
2309: p_init_msg_list ||'-'||

Line 2306: csi_ctr_gen_utility_pvt.put_line( 'create_daily_usage' ||

2302: END IF;
2303:
2304: -- If the debug level = 2 then dump all the parameters values.
2305: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
2306: csi_ctr_gen_utility_pvt.put_line( 'create_daily_usage' ||
2307: p_api_version ||'-'||
2308: p_commit ||'-'||
2309: p_init_msg_list ||'-'||
2310: p_validation_level );

Line 2311: csi_ctr_gen_utility_pvt.dump_ctr_usage_forecast_rec(p_ctr_usage_forecast_rec);

2307: p_api_version ||'-'||
2308: p_commit ||'-'||
2309: p_init_msg_list ||'-'||
2310: p_validation_level );
2311: csi_ctr_gen_utility_pvt.dump_ctr_usage_forecast_rec(p_ctr_usage_forecast_rec);
2312: END IF;
2313:
2314: -- Start of API Body
2315:

Line 2341: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');

2337: IF l_active_start_date IS NULL THEN
2338: l_active_start_date := sysdate;
2339: ELSE
2340: IF l_active_start_date > sysdate THEN
2341: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
2342: END IF;
2343: END IF;
2344:
2345: /* Validate start date */

Line 2355: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_USAGE_STDATE_INV');

2351: WHERE counter_id = l_counter_id;
2352:
2353: IF l_max_start_date IS NOT NULL THEN
2354: IF l_active_start_date < l_max_start_date THEN
2355: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_USAGE_STDATE_INV');
2356: END IF;
2357: END IF;
2358: END;
2359: END IF;

Line 2374: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID');

2370: into l_dummy
2371: from csi_counters_b
2372: where counter_id = l_counter_id;
2373: exception when no_data_found then
2374: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID');
2375: end;
2376:
2377: -- Validate usage rate is not negative
2378: if l_usage_rate < 0 or l_usage_rate is null then

Line 2379: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_USAGE_RATE');

2375: end;
2376:
2377: -- Validate usage rate is not negative
2378: if l_usage_rate < 0 or l_usage_rate is null then
2379: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_USAGE_RATE');
2380: end if;
2381:
2382: -- Validate use past reading is not negative
2383: if l_use_past_reading < 0 or l_use_past_reading is null then

Line 2384: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_USE_PAST_RDG');

2380: end if;
2381:
2382: -- Validate use past reading is not negative
2383: if l_use_past_reading < 0 or l_use_past_reading is null then
2384: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_USE_PAST_RDG');
2385: end if;
2386:
2387: -- update to end date existing active usage rate
2388: UPDATE CSI_COUNTER_USAGE_FORECAST

Line 2535: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

2531: -- Initialize API return status to success
2532: x_return_status := FND_API.G_RET_STS_SUCCESS;
2533:
2534: -- Read the debug profiles values in to global variable 7197402
2535: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
2536:
2537: -- Check the profile option debug_level for debug message reporting
2538: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
2539:

Line 2541: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN

2537: -- Check the profile option debug_level for debug message reporting
2538: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
2539:
2540: -- If debug_level = 1 then dump the procedure name
2541: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
2542: csi_ctr_gen_utility_pvt.put_line( 'update_counter');
2543: END IF;
2544:
2545: -- If the debug level = 2 then dump all the parameters values.

Line 2542: csi_ctr_gen_utility_pvt.put_line( 'update_counter');

2538: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
2539:
2540: -- If debug_level = 1 then dump the procedure name
2541: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
2542: csi_ctr_gen_utility_pvt.put_line( 'update_counter');
2543: END IF;
2544:
2545: -- If the debug level = 2 then dump all the parameters values.
2546: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

Line 2546: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

2542: csi_ctr_gen_utility_pvt.put_line( 'update_counter');
2543: END IF;
2544:
2545: -- If the debug level = 2 then dump all the parameters values.
2546: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
2547: csi_ctr_gen_utility_pvt.put_line( 'update_counter' ||
2548: p_api_version ||'-'||
2549: p_commit ||'-'||
2550: p_init_msg_list ||'-'||

Line 2547: csi_ctr_gen_utility_pvt.put_line( 'update_counter' ||

2543: END IF;
2544:
2545: -- If the debug level = 2 then dump all the parameters values.
2546: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
2547: csi_ctr_gen_utility_pvt.put_line( 'update_counter' ||
2548: p_api_version ||'-'||
2549: p_commit ||'-'||
2550: p_init_msg_list ||'-'||
2551: p_validation_level );

Line 2552: csi_ctr_gen_utility_pvt.dump_counter_instance_rec(p_counter_instance_rec);

2548: p_api_version ||'-'||
2549: p_commit ||'-'||
2550: p_init_msg_list ||'-'||
2551: p_validation_level );
2552: csi_ctr_gen_utility_pvt.dump_counter_instance_rec(p_counter_instance_rec);
2553: END IF;
2554:
2555: -- Start of API Body
2556:

Line 2699: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID');

2695: FROM csi_counters_vl
2696: WHERE counter_id = p_counter_instance_rec.counter_id
2697: FOR UPDATE OF OBJECT_VERSION_NUMBER;
2698: IF SQL%NOTFOUND THEN
2699: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INVALID');
2700: END IF;
2701:
2702: l_counter_instance_rec := p_counter_instance_rec;
2703:

Line 3044: csi_ctr_gen_utility_pvt.put_line('Object version mismatch in update counter');

3040: END IF;
3041:
3042: -- compare object version number
3043: IF l_old_counter_instance_rec.object_version_number <> nvl(l_counter_instance_rec.object_version_number,0) THEN
3044: csi_ctr_gen_utility_pvt.put_line('Object version mismatch in update counter');
3045: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_OBJ_VER_MISMATCH');
3046: END IF;
3047:
3048: IF p_counter_instance_rec.eam_required_flag = FND_API.G_MISS_CHAR THEN

Line 3045: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_OBJ_VER_MISMATCH');

3041:
3042: -- compare object version number
3043: IF l_old_counter_instance_rec.object_version_number <> nvl(l_counter_instance_rec.object_version_number,0) THEN
3044: csi_ctr_gen_utility_pvt.put_line('Object version mismatch in update counter');
3045: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_OBJ_VER_MISMATCH');
3046: END IF;
3047:
3048: IF p_counter_instance_rec.eam_required_flag = FND_API.G_MISS_CHAR THEN
3049: l_counter_instance_rec.eam_required_flag := NULL;

Line 3064: csi_ctr_gen_utility_pvt.put_line('used in scheduling cannot be updated');

3060: X_msg_count => l_msg_count,
3061: X_msg_data => l_msg_data
3062: );
3063: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS ) THEN
3064: csi_ctr_gen_utility_pvt.put_line('used in scheduling cannot be updated');
3065: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_USEDINSCHED_NOT_UPDT');
3066: END IF;
3067:
3068: END IF;

Line 3065: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_USEDINSCHED_NOT_UPDT');

3061: X_msg_data => l_msg_data
3062: );
3063: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS ) THEN
3064: csi_ctr_gen_utility_pvt.put_line('used in scheduling cannot be updated');
3065: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_USEDINSCHED_NOT_UPDT');
3066: END IF;
3067:
3068: END IF;
3069:

Line 3073: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_GRP_NOT_UPDATABLE');

3069:
3070: -- Counter group is not updateable
3071: /*
3072: IF l_counter_instance_rec.group_id <> l_old_counter_instance_rec.group_id THEN
3073: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_GRP_NOT_UPDATABLE');
3074: END IF;
3075: */
3076: IF l_counter_instance_rec.counter_type <> l_old_counter_instance_rec.counter_type THEN
3077: IF l_old_counter_instance_rec.counter_type = 'FORMULA'

Line 3085: csi_ctr_gen_utility_pvt.put_line('Formula References exist for this counter. Cannot change counter type...');

3081: CLOSE formula_ref_cur;
3082: IF l_formula_ref_count is not null then
3083: -- Formula references exist for this counter. You cannot
3084: -- change the type to something different.
3085: csi_ctr_gen_utility_pvt.put_line('Formula References exist for this counter. Cannot change counter type...');
3086: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_FMLA_REF_EXIST','CTR_NAME',l_counter_instance_rec.name);
3087: END IF;
3088: ELSIF l_old_counter_instance_rec.counter_type = 'FORMULA'
3089: and l_old_counter_instance_rec.derive_function in ('SUM','COUNT') THEN

Line 3086: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_FMLA_REF_EXIST','CTR_NAME',l_counter_instance_rec.name);

3082: IF l_formula_ref_count is not null then
3083: -- Formula references exist for this counter. You cannot
3084: -- change the type to something different.
3085: csi_ctr_gen_utility_pvt.put_line('Formula References exist for this counter. Cannot change counter type...');
3086: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_FMLA_REF_EXIST','CTR_NAME',l_counter_instance_rec.name);
3087: END IF;
3088: ELSIF l_old_counter_instance_rec.counter_type = 'FORMULA'
3089: and l_old_counter_instance_rec.derive_function in ('SUM','COUNT') THEN
3090: OPEN derived_filters_cur(p_counter_instance_rec.counter_id);

Line 3096: csi_ctr_gen_utility_pvt.put_line('Derived Filters exist for this counter. Cannot change counter type...');

3092: CLOSE derived_filters_cur;
3093: IF l_der_filter_count is not null then
3094: -- Derived filters exist for this counter. You cannot
3095: -- change the type to something different.
3096: csi_ctr_gen_utility_pvt.put_line('Derived Filters exist for this counter. Cannot change counter type...');
3097: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_DER_FILTER_EXIST','CTR_NAME',l_counter_instance_rec.name);
3098: END IF;
3099: ELSIF l_old_counter_instance_rec.counter_type = 'REGULAR' THEN
3100: OPEN target_counter_cur(p_counter_instance_rec.counter_id);

Line 3097: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_DER_FILTER_EXIST','CTR_NAME',l_counter_instance_rec.name);

3093: IF l_der_filter_count is not null then
3094: -- Derived filters exist for this counter. You cannot
3095: -- change the type to something different.
3096: csi_ctr_gen_utility_pvt.put_line('Derived Filters exist for this counter. Cannot change counter type...');
3097: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_DER_FILTER_EXIST','CTR_NAME',l_counter_instance_rec.name);
3098: END IF;
3099: ELSIF l_old_counter_instance_rec.counter_type = 'REGULAR' THEN
3100: OPEN target_counter_cur(p_counter_instance_rec.counter_id);
3101: FETCH target_counter_cur INTO l_target_ctr_exist;

Line 3106: csi_ctr_gen_utility_pvt.put_line('Target Counters exist for this counter. Cannot change counter type...');

3102: CLOSE target_counter_cur;
3103: IF l_target_ctr_exist is not null then
3104: -- Target counters exist for this counter. You cannot
3105: -- change the type to something different.
3106: csi_ctr_gen_utility_pvt.put_line('Target Counters exist for this counter. Cannot change counter type...');
3107: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_CONFIG_CTR_EXIST','CTR_NAME',l_counter_instance_rec.name);
3108: END IF;
3109: END IF;
3110: END IF;

Line 3107: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_CONFIG_CTR_EXIST','CTR_NAME',l_counter_instance_rec.name);

3103: IF l_target_ctr_exist is not null then
3104: -- Target counters exist for this counter. You cannot
3105: -- change the type to something different.
3106: csi_ctr_gen_utility_pvt.put_line('Target Counters exist for this counter. Cannot change counter type...');
3107: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_CONFIG_CTR_EXIST','CTR_NAME',l_counter_instance_rec.name);
3108: END IF;
3109: END IF;
3110: END IF;
3111:

Line 3120: csi_ctr_gen_utility_pvt.put_line('Counter readings exist for this counter. Cannot change reading type...');

3116: CLOSE counter_readings_cur;
3117: IF l_rdg_exists is not null then
3118: -- Counter readings exist for this counter. You cannot
3119: -- change the reading type to something different.counter.
3120: csi_ctr_gen_utility_pvt.put_line('Counter readings exist for this counter. Cannot change reading type...');
3121: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_RDGS_EXIST','CTR_NAME',l_counter_instance_rec.name);
3122: END IF;
3123: END IF;
3124:

Line 3121: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_RDGS_EXIST','CTR_NAME',l_counter_instance_rec.name);

3117: IF l_rdg_exists is not null then
3118: -- Counter readings exist for this counter. You cannot
3119: -- change the reading type to something different.counter.
3120: csi_ctr_gen_utility_pvt.put_line('Counter readings exist for this counter. Cannot change reading type...');
3121: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_RDGS_EXIST','CTR_NAME',l_counter_instance_rec.name);
3122: END IF;
3123: END IF;
3124:
3125: --bug 9009809.Below check not needed during update.

Line 3144: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');

3140: END IF;
3141: */
3142: -- Validate start date
3143: IF l_counter_instance_rec.start_date_active IS NULL THEN
3144: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
3145: ELSIF l_counter_instance_rec.start_date_active > sysdate THEN
3146: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
3147: END IF;
3148:

Line 3146: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');

3142: -- Validate start date
3143: IF l_counter_instance_rec.start_date_active IS NULL THEN
3144: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
3145: ELSIF l_counter_instance_rec.start_date_active > sysdate THEN
3146: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
3147: END IF;
3148:
3149: -- Validate counter name is unique
3150: Validate_Unique_ctr(l_counter_instance_rec.name, p_counter_instance_rec.counter_id);

Line 3354: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

3350: -- Initialize API return status to success
3351: x_return_status := FND_API.G_RET_STS_SUCCESS;
3352:
3353: -- Read the debug profiles values in to global variable 7197402
3354: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
3355:
3356: -- Check the profile option debug_level for debug message reporting
3357: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
3358:

Line 3360: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN

3356: -- Check the profile option debug_level for debug message reporting
3357: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
3358:
3359: -- If debug_level = 1 then dump the procedure name
3360: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
3361: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_property');
3362: END IF;
3363:
3364: -- If the debug level = 2 then dump all the parameters values.

Line 3361: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_property');

3357: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
3358:
3359: -- If debug_level = 1 then dump the procedure name
3360: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
3361: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_property');
3362: END IF;
3363:
3364: -- If the debug level = 2 then dump all the parameters values.
3365: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

Line 3365: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

3361: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_property');
3362: END IF;
3363:
3364: -- If the debug level = 2 then dump all the parameters values.
3365: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
3366: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_property' ||
3367: p_api_version ||'-'||
3368: p_commit ||'-'||
3369: p_init_msg_list ||'-'||

Line 3366: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_property' ||

3362: END IF;
3363:
3364: -- If the debug level = 2 then dump all the parameters values.
3365: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
3366: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_property' ||
3367: p_api_version ||'-'||
3368: p_commit ||'-'||
3369: p_init_msg_list ||'-'||
3370: p_validation_level );

Line 3371: csi_ctr_gen_utility_pvt.dump_ctr_properties_rec(p_ctr_properties_rec);

3367: p_api_version ||'-'||
3368: p_commit ||'-'||
3369: p_init_msg_list ||'-'||
3370: p_validation_level );
3371: csi_ctr_gen_utility_pvt.dump_ctr_properties_rec(p_ctr_properties_rec);
3372: END IF;
3373:
3374: -- Start of API Body
3375:

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

3436: FROM csi_counter_properties_vl
3437: WHERE counter_property_id = p_ctr_properties_rec.counter_property_id
3438: FOR UPDATE OF OBJECT_VERSION_NUMBER;
3439: IF SQL%NOTFOUND THEN
3440: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_INVALID');
3441: END IF;
3442:
3443: l_ctr_properties_rec := p_ctr_properties_rec;
3444:

Line 3597: csi_ctr_gen_utility_pvt.put_line('Object version mismatch in update counter');

3593: l_ctr_properties_rec.object_version_number := l_old_ctr_properties_rec.object_version_number;
3594: END IF;
3595:
3596: IF l_old_ctr_properties_rec.object_version_number <> nvl(l_ctr_properties_rec.object_version_number,0) THEN
3597: csi_ctr_gen_utility_pvt.put_line('Object version mismatch in update counter');
3598: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_OBJ_VER_MISMATCH');
3599: END IF;
3600:
3601: -- do validation here

Line 3598: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_OBJ_VER_MISMATCH');

3594: END IF;
3595:
3596: IF l_old_ctr_properties_rec.object_version_number <> nvl(l_ctr_properties_rec.object_version_number,0) THEN
3597: csi_ctr_gen_utility_pvt.put_line('Object version mismatch in update counter');
3598: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_OBJ_VER_MISMATCH');
3599: END IF;
3600:
3601: -- do validation here
3602:

Line 3604: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NOT_UPDATABLE');

3600:
3601: -- do validation here
3602:
3603: IF l_ctr_properties_rec.counter_id <> l_old_ctr_properties_rec.counter_id THEN
3604: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_NOT_UPDATABLE');
3605: END IF;
3606:
3607: -- validate unique property name within counter
3608: Validate_Unique_ctrprop(l_ctr_properties_rec.NAME,l_ctr_properties_rec.COUNTER_ID,p_ctr_properties_rec.counter_property_id);

Line 3617: csi_ctr_gen_utility_pvt.put_line('Ctr prop rdgs exist for this ctr prop. Cannot change property datatype...');

3613: CLOSE prop_rdgs_cur;
3614: IF l_prop_rdgs_exist is not null then
3615: -- Counter property readings exist for this counter property. You cannot
3616: -- change the property datatype to something different.
3617: csi_ctr_gen_utility_pvt.put_line('Ctr prop rdgs exist for this ctr prop. Cannot change property datatype...');
3618: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_DTYP_NOT_UPD');
3619: END IF;
3620: END IF;
3621:

Line 3618: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_DTYP_NOT_UPD');

3614: IF l_prop_rdgs_exist is not null then
3615: -- Counter property readings exist for this counter property. You cannot
3616: -- change the property datatype to something different.
3617: csi_ctr_gen_utility_pvt.put_line('Ctr prop rdgs exist for this ctr prop. Cannot change property datatype...');
3618: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_PROP_DTYP_NOT_UPD');
3619: END IF;
3620: END IF;
3621:
3622: -- validate property date type in char,number,date

Line 3624: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PROP_DATA_TYPE');

3620: END IF;
3621:
3622: -- validate property date type in char,number,date
3623: if l_ctr_properties_rec.PROPERTY_DATA_TYPE not in ('CHAR', 'NUMBER', 'DATE') then
3624: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_INV_PROP_DATA_TYPE');
3625: end if;
3626:
3627: -- Validate start date
3628: IF l_ctr_properties_rec.START_DATE_ACTIVE IS NULL THEN

Line 3629: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');

3625: end if;
3626:
3627: -- Validate start date
3628: IF l_ctr_properties_rec.START_DATE_ACTIVE IS NULL THEN
3629: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
3630: ELSIF l_ctr_properties_rec.START_DATE_ACTIVE > sysdate THEN
3631: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
3632: END IF;
3633:

Line 3631: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');

3627: -- Validate start date
3628: IF l_ctr_properties_rec.START_DATE_ACTIVE IS NULL THEN
3629: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
3630: ELSIF l_ctr_properties_rec.START_DATE_ACTIVE > sysdate THEN
3631: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
3632: END IF;
3633:
3634: -- Validate values for data type
3635: Validate_Data_Type(l_ctr_properties_rec.PROPERTY_DATA_TYPE, l_ctr_properties_rec.default_value,

Line 3783: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;

3779: -- Initialize API return status to success
3780: x_return_status := FND_API.G_RET_STS_SUCCESS;
3781:
3782: -- Read the debug profiles values in to global variable 7197402
3783: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
3784:
3785: -- Check the profile option debug_level for debug message reporting
3786: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
3787:

Line 3789: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN

3785: -- Check the profile option debug_level for debug message reporting
3786: -- l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
3787:
3788: -- If debug_level = 1 then dump the procedure name
3789: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 0) THEN
3790: csi_gen_utility_pvt.put_line( 'update_ctr_associations');
3791: END IF;
3792:
3793: -- If the debug level = 2 then dump all the parameters values.

Line 3794: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN

3790: csi_gen_utility_pvt.put_line( 'update_ctr_associations');
3791: END IF;
3792:
3793: -- If the debug level = 2 then dump all the parameters values.
3794: IF (CSI_CTR_GEN_UTILITY_PVT.g_debug_level > 1) THEN
3795: csi_gen_utility_pvt.put_line( 'update_ctr_associations' ||
3796: p_api_version ||'-'||
3797: p_commit ||'-'||
3798: p_init_msg_list ||'-'||

Line 3800: csi_ctr_gen_utility_pvt.dump_counter_associations_rec(p_counter_associations_rec);

3796: p_api_version ||'-'||
3797: p_commit ||'-'||
3798: p_init_msg_list ||'-'||
3799: p_validation_level );
3800: csi_ctr_gen_utility_pvt.dump_counter_associations_rec(p_counter_associations_rec);
3801: END IF;
3802:
3803: -- Start of API Body
3804: SELECT SOURCE_OBJECT_CODE

Line 3856: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_ASSOC_INVALID');

3852: FROM CSI_COUNTER_ASSOCIATIONS
3853: WHERE INSTANCE_ASSOCIATION_ID = P_counter_associations_rec.INSTANCE_ASSOCIATION_ID
3854: FOR UPDATE OF OBJECT_VERSION_NUMBER;
3855: IF SQL%NOTFOUND THEN
3856: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_ASSOC_INVALID');
3857: END IF;
3858:
3859: l_counter_associations_rec := p_counter_associations_rec;
3860:

Line 3979: csi_ctr_gen_utility_pvt.put_line('Object version mismatch in update counter');

3975: l_counter_associations_rec.maint_organization_id := l_old_counter_associations_rec.maint_organization_id;
3976: END IF;
3977:
3978: IF l_old_counter_associations_rec.object_version_number <> nvl(l_counter_associations_rec.object_version_number,0) THEN
3979: csi_ctr_gen_utility_pvt.put_line('Object version mismatch in update counter');
3980: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_OBJ_VER_MISMATCH');
3981: END IF;
3982:
3983: IF p_counter_associations_rec.primary_failure_flag = FND_API.G_MISS_CHAR THEN

Line 3980: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_OBJ_VER_MISMATCH');

3976: END IF;
3977:
3978: IF l_old_counter_associations_rec.object_version_number <> nvl(l_counter_associations_rec.object_version_number,0) THEN
3979: csi_ctr_gen_utility_pvt.put_line('Object version mismatch in update counter');
3980: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_OBJ_VER_MISMATCH');
3981: END IF;
3982:
3983: IF p_counter_associations_rec.primary_failure_flag = FND_API.G_MISS_CHAR THEN
3984: l_counter_associations_rec.primary_failure_flag := NULL;

Line 3991: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_ASC_NOT_UPDATABLE');

3987: END IF;
3988:
3989: -- do validation here
3990: IF l_counter_associations_rec.counter_id <> l_old_counter_associations_rec.counter_id THEN
3991: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_ASC_NOT_UPDATABLE');
3992: END IF;
3993:
3994: IF l_counter_associations_rec.SOURCE_OBJECT_CODE <> l_old_counter_associations_rec.SOURCE_OBJECT_CODE THEN
3995: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_SOC_ASC_NOT_UPDATABLE');

Line 3995: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_SOC_ASC_NOT_UPDATABLE');

3991: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_CTR_ASC_NOT_UPDATABLE');
3992: END IF;
3993:
3994: IF l_counter_associations_rec.SOURCE_OBJECT_CODE <> l_old_counter_associations_rec.SOURCE_OBJECT_CODE THEN
3995: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_SOC_ASC_NOT_UPDATABLE');
3996: END IF;
3997:
3998: IF l_counter_associations_rec.SOURCE_OBJECT_ID <> l_old_counter_associations_rec.SOURCE_OBJECT_ID THEN
3999: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_SOI_ASC_NOT_UPDATABLE');

Line 3999: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_SOI_ASC_NOT_UPDATABLE');

3995: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_SOC_ASC_NOT_UPDATABLE');
3996: END IF;
3997:
3998: IF l_counter_associations_rec.SOURCE_OBJECT_ID <> l_old_counter_associations_rec.SOURCE_OBJECT_ID THEN
3999: csi_ctr_gen_utility_pvt.ExitWithErrMsg('CSI_API_SOI_ASC_NOT_UPDATABLE');
4000: END IF;
4001:
4002: -- Validate start date
4003: IF l_counter_associations_rec.START_DATE_ACTIVE IS NULL THEN

Line 4004: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');

4000: END IF;
4001:
4002: -- Validate start date
4003: IF l_counter_associations_rec.START_DATE_ACTIVE IS NULL THEN
4004: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
4005: ELSIF l_counter_associations_rec.START_DATE_ACTIVE > sysdate THEN
4006: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
4007: END IF;
4008:

Line 4006: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');

4002: -- Validate start date
4003: IF l_counter_associations_rec.START_DATE_ACTIVE IS NULL THEN
4004: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_STDATE_INVALID');
4005: ELSIF l_counter_associations_rec.START_DATE_ACTIVE > sysdate THEN
4006: CSI_CTR_GEN_UTILITY_PVT.ExitWithErrMsg('CSI_API_CTR_INVALID_START_DATE');
4007: END IF;
4008:
4009: -- call table handler here
4010: CSI_COUNTER_ASSOCIATIONS_PKG.UPDATE_ROW

Line 4137: csi_ctr_gen_utility_pvt.read_debug_profiles;

4133:
4134: -- Initialize API return status to success
4135: x_return_status := FND_API.G_RET_STS_SUCCESS;
4136:
4137: csi_ctr_gen_utility_pvt.read_debug_profiles;
4138:
4139: -- If debug_level = 1 then dump the procedure name
4140: IF (csi_ctr_gen_utility_pvt.g_debug_level > 0) THEN
4141: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_val_max_seq_no');

Line 4140: IF (csi_ctr_gen_utility_pvt.g_debug_level > 0) THEN

4136:
4137: csi_ctr_gen_utility_pvt.read_debug_profiles;
4138:
4139: -- If debug_level = 1 then dump the procedure name
4140: IF (csi_ctr_gen_utility_pvt.g_debug_level > 0) THEN
4141: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_val_max_seq_no');
4142: END IF;
4143:
4144: -- If the debug level = 2 then dump all the parameters values.

Line 4141: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_val_max_seq_no');

4137: csi_ctr_gen_utility_pvt.read_debug_profiles;
4138:
4139: -- If debug_level = 1 then dump the procedure name
4140: IF (csi_ctr_gen_utility_pvt.g_debug_level > 0) THEN
4141: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_val_max_seq_no');
4142: END IF;
4143:
4144: -- If the debug level = 2 then dump all the parameters values.
4145: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN

Line 4145: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN

4141: csi_ctr_gen_utility_pvt.put_line( 'update_ctr_val_max_seq_no');
4142: END IF;
4143:
4144: -- If the debug level = 2 then dump all the parameters values.
4145: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN
4146: csi_ctr_gen_utility_pvt.put_line('update_ctr_val_max_seq_no' ||
4147: p_api_version ||'-'||
4148: p_commit ||'-'||
4149: p_init_msg_list ||'-'||

Line 4146: csi_ctr_gen_utility_pvt.put_line('update_ctr_val_max_seq_no' ||

4142: END IF;
4143:
4144: -- If the debug level = 2 then dump all the parameters values.
4145: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN
4146: csi_ctr_gen_utility_pvt.put_line('update_ctr_val_max_seq_no' ||
4147: p_api_version ||'-'||
4148: p_commit ||'-'||
4149: p_init_msg_list ||'-'||
4150: p_validation_level);

Line 4151: csi_ctr_gen_utility_pvt.put_line('p_counter_id : ' || p_counter_id);

4147: p_api_version ||'-'||
4148: p_commit ||'-'||
4149: p_init_msg_list ||'-'||
4150: p_validation_level);
4151: csi_ctr_gen_utility_pvt.put_line('p_counter_id : ' || p_counter_id);
4152: csi_ctr_gen_utility_pvt.put_line('px_ctr_val_max_seq_no : ' || px_ctr_val_max_seq_no);
4153: END IF;
4154:
4155: -- Start of API Body

Line 4152: csi_ctr_gen_utility_pvt.put_line('px_ctr_val_max_seq_no : ' || px_ctr_val_max_seq_no);

4148: p_commit ||'-'||
4149: p_init_msg_list ||'-'||
4150: p_validation_level);
4151: csi_ctr_gen_utility_pvt.put_line('p_counter_id : ' || p_counter_id);
4152: csi_ctr_gen_utility_pvt.put_line('px_ctr_val_max_seq_no : ' || px_ctr_val_max_seq_no);
4153: END IF;
4154:
4155: -- Start of API Body
4156:

Line 4169: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN

4165: INTO l_old_ctr_val_max_seq_no, l_old_object_version_number
4166: FROM csi_counters_b
4167: WHERE counter_id = p_counter_id;
4168:
4169: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN
4170: csi_ctr_gen_utility_pvt.put_line('l_old_ctr_val_max_seq_no : ' || l_old_ctr_val_max_seq_no);
4171: csi_ctr_gen_utility_pvt.put_line('l_old_object_version_number : ' || l_old_object_version_number);
4172: END IF;
4173:

Line 4170: csi_ctr_gen_utility_pvt.put_line('l_old_ctr_val_max_seq_no : ' || l_old_ctr_val_max_seq_no);

4166: FROM csi_counters_b
4167: WHERE counter_id = p_counter_id;
4168:
4169: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN
4170: csi_ctr_gen_utility_pvt.put_line('l_old_ctr_val_max_seq_no : ' || l_old_ctr_val_max_seq_no);
4171: csi_ctr_gen_utility_pvt.put_line('l_old_object_version_number : ' || l_old_object_version_number);
4172: END IF;
4173:
4174: IF (px_ctr_val_max_seq_no IS NOT NULL) AND

Line 4171: csi_ctr_gen_utility_pvt.put_line('l_old_object_version_number : ' || l_old_object_version_number);

4167: WHERE counter_id = p_counter_id;
4168:
4169: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN
4170: csi_ctr_gen_utility_pvt.put_line('l_old_ctr_val_max_seq_no : ' || l_old_ctr_val_max_seq_no);
4171: csi_ctr_gen_utility_pvt.put_line('l_old_object_version_number : ' || l_old_object_version_number);
4172: END IF;
4173:
4174: IF (px_ctr_val_max_seq_no IS NOT NULL) AND
4175: (px_ctr_val_max_seq_no <> FND_API.G_MISS_NUM) THEN

Line 4185: csi_ctr_gen_utility_pvt.put_line('Invalid parameter px_ctr_val_max_seq_no : '||px_ctr_val_max_seq_no);

4181: AND counter_value_id = px_ctr_val_max_seq_no
4182: AND NVL(disabled_flag, 'N') = 'N';
4183: EXCEPTION
4184: WHEN NO_DATA_FOUND THEN
4185: csi_ctr_gen_utility_pvt.put_line('Invalid parameter px_ctr_val_max_seq_no : '||px_ctr_val_max_seq_no);
4186: RAISE FND_API.G_EXC_ERROR;
4187: END;
4188:
4189: IF (l_ctr_val_id_exist = 'Y') AND (px_ctr_val_max_seq_no <> l_old_ctr_val_max_seq_no) THEN

Line 4239: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN

4235: l_new_reading_is_latest := 'N';
4236: END;
4237: END IF;
4238:
4239: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN
4240: csi_ctr_gen_utility_pvt.put_line('l_ctr_val_id_exist : ' || l_ctr_val_id_exist);
4241: csi_ctr_gen_utility_pvt.put_line('l_new_reading_is_latest : ' || l_new_reading_is_latest);
4242: csi_ctr_gen_utility_pvt.put_line('px_ctr_val_max_seq_no : ' || px_ctr_val_max_seq_no);
4243: csi_ctr_gen_utility_pvt.put_line('l_new_value_timestamp : ' || l_new_value_timestamp);

Line 4240: csi_ctr_gen_utility_pvt.put_line('l_ctr_val_id_exist : ' || l_ctr_val_id_exist);

4236: END;
4237: END IF;
4238:
4239: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN
4240: csi_ctr_gen_utility_pvt.put_line('l_ctr_val_id_exist : ' || l_ctr_val_id_exist);
4241: csi_ctr_gen_utility_pvt.put_line('l_new_reading_is_latest : ' || l_new_reading_is_latest);
4242: csi_ctr_gen_utility_pvt.put_line('px_ctr_val_max_seq_no : ' || px_ctr_val_max_seq_no);
4243: csi_ctr_gen_utility_pvt.put_line('l_new_value_timestamp : ' || l_new_value_timestamp);
4244: END IF;

Line 4241: csi_ctr_gen_utility_pvt.put_line('l_new_reading_is_latest : ' || l_new_reading_is_latest);

4237: END IF;
4238:
4239: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN
4240: csi_ctr_gen_utility_pvt.put_line('l_ctr_val_id_exist : ' || l_ctr_val_id_exist);
4241: csi_ctr_gen_utility_pvt.put_line('l_new_reading_is_latest : ' || l_new_reading_is_latest);
4242: csi_ctr_gen_utility_pvt.put_line('px_ctr_val_max_seq_no : ' || px_ctr_val_max_seq_no);
4243: csi_ctr_gen_utility_pvt.put_line('l_new_value_timestamp : ' || l_new_value_timestamp);
4244: END IF;
4245:

Line 4242: csi_ctr_gen_utility_pvt.put_line('px_ctr_val_max_seq_no : ' || px_ctr_val_max_seq_no);

4238:
4239: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN
4240: csi_ctr_gen_utility_pvt.put_line('l_ctr_val_id_exist : ' || l_ctr_val_id_exist);
4241: csi_ctr_gen_utility_pvt.put_line('l_new_reading_is_latest : ' || l_new_reading_is_latest);
4242: csi_ctr_gen_utility_pvt.put_line('px_ctr_val_max_seq_no : ' || px_ctr_val_max_seq_no);
4243: csi_ctr_gen_utility_pvt.put_line('l_new_value_timestamp : ' || l_new_value_timestamp);
4244: END IF;
4245:
4246: IF ((l_ctr_val_id_exist = 'Y') AND (l_new_reading_is_latest = 'Y') AND

Line 4243: csi_ctr_gen_utility_pvt.put_line('l_new_value_timestamp : ' || l_new_value_timestamp);

4239: IF (csi_ctr_gen_utility_pvt.g_debug_level > 1) THEN
4240: csi_ctr_gen_utility_pvt.put_line('l_ctr_val_id_exist : ' || l_ctr_val_id_exist);
4241: csi_ctr_gen_utility_pvt.put_line('l_new_reading_is_latest : ' || l_new_reading_is_latest);
4242: csi_ctr_gen_utility_pvt.put_line('px_ctr_val_max_seq_no : ' || px_ctr_val_max_seq_no);
4243: csi_ctr_gen_utility_pvt.put_line('l_new_value_timestamp : ' || l_new_value_timestamp);
4244: END IF;
4245:
4246: IF ((l_ctr_val_id_exist = 'Y') AND (l_new_reading_is_latest = 'Y') AND
4247: (l_old_ctr_val_max_seq_no <> px_ctr_val_max_seq_no)) OR