DBA Data[Home] [Help]

APPS.AHL_UC_UTILIZATION_PVT dependencies on FND_MSG_PUB

Line 137: FND_MSG_PUB.initialize;

133: END IF;
134:
135: -- Initialize message list if p_init_msg_list is set to TRUE
136: IF FND_API.to_boolean(p_init_msg_list) THEN
137: FND_MSG_PUB.initialize;
138: END IF;
139:
140: FOR i IN l_utilization_tbl.FIRST..l_utilization_tbl.LAST LOOP
141: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN

Line 155: x_msg_count := FND_MSG_PUB.count_msg;

151: l_utilization_tbl(i) := l_utilization_rec;
152: END LOOP;
153:
154: -- Check Error Message stack.
155: x_msg_count := FND_MSG_PUB.count_msg;
156: IF x_msg_count > 0 THEN
157: RAISE FND_API.G_EXC_ERROR;
158: END IF;
159:

Line 184: x_msg_count := FND_MSG_PUB.count_msg;

180: 'After successful completion of update_reading_all calls for all records in table.');
181: END IF;
182:
183: -- Check Error Message stack.
184: x_msg_count := FND_MSG_PUB.count_msg;
185: IF x_msg_count > 0 THEN
186: RAISE FND_API.G_EXC_ERROR;
187: END IF;
188:

Line 195: FND_MSG_PUB.count_and_get(

191: COMMIT WORK;
192: END IF;
193:
194: -- Standard call to get message count and if count is 1, get message info
195: FND_MSG_PUB.count_and_get(
196: p_count => x_msg_count,
197: p_data => x_msg_data,
198: p_encoded => fnd_api.g_false);
199:

Line 208: FND_MSG_PUB.count_and_get(p_count => x_msg_count,

204: EXCEPTION
205: WHEN FND_API.G_EXC_ERROR THEN
206: x_return_status := FND_API.G_RET_STS_ERROR;
207: ROLLBACK to update_utilization;
208: FND_MSG_PUB.count_and_get(p_count => x_msg_count,
209: p_data => x_msg_data,
210: p_encoded => fnd_api.g_false);
211: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
212: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 214: FND_MSG_PUB.count_and_get(p_count => x_msg_count,

210: p_encoded => fnd_api.g_false);
211: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
212: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
213: ROLLBACK to update_utilization;
214: FND_MSG_PUB.count_and_get(p_count => x_msg_count,
215: p_data => x_msg_data,
216: p_encoded => fnd_api.g_false);
217: WHEN OTHERS THEN
218: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 220: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

216: p_encoded => fnd_api.g_false);
217: WHEN OTHERS THEN
218: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
219: ROLLBACK to update_utilization;
220: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
221: fnd_msg_pub.add_exc_msg(p_pkg_name => G_PKG_NAME,
222: p_procedure_name => 'update_utilization',
223: p_error_text => SQLERRM);
224: END IF;

Line 221: fnd_msg_pub.add_exc_msg(p_pkg_name => G_PKG_NAME,

217: WHEN OTHERS THEN
218: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
219: ROLLBACK to update_utilization;
220: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
221: fnd_msg_pub.add_exc_msg(p_pkg_name => G_PKG_NAME,
222: p_procedure_name => 'update_utilization',
223: p_error_text => SQLERRM);
224: END IF;
225: FND_MSG_PUB.count_and_get(p_count => x_msg_count,

Line 225: FND_MSG_PUB.count_and_get(p_count => x_msg_count,

221: fnd_msg_pub.add_exc_msg(p_pkg_name => G_PKG_NAME,
222: p_procedure_name => 'update_utilization',
223: p_error_text => SQLERRM);
224: END IF;
225: FND_MSG_PUB.count_and_get(p_count => x_msg_count,
226: p_data => x_msg_data,
227: p_encoded => fnd_api.g_false);
228: END update_utilization;
229:

Line 280: FND_MSG_PUB.add;

276: p_utilization_rec.organization_id := l_organization_id;
277: ELSE
278: FND_MESSAGE.set_name('AHL','AHL_UC_ORG_INVALID');
279: FND_MESSAGE.set_token('ORG',p_utilization_rec.organization_code);
280: FND_MSG_PUB.add;
281: END IF;
282: CLOSE mtl_parameters_csr;
283: END IF;
284: END IF;

Line 306: FND_MSG_PUB.add;

302: p_utilization_rec.rule_code := l_lookup_code;
303: ELSE
304: FND_MESSAGE.set_name('AHL','AHL_UC_RCODE_INVALID');
305: FND_MESSAGE.set_token('CODE',p_utilization_rec.Rule_meaning);
306: FND_MSG_PUB.add;
307: END IF;
308: END IF;
309: END IF;
310: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN

Line 330: FND_MSG_PUB.add;

326: p_utilization_rec.inventory_item_id := l_inventory_id;
327: ELSE
328: FND_MESSAGE.set_name('AHL','AHL_MC_INV_INVALID');
329: FND_MESSAGE.set_token('INV_ITEM',p_utilization_rec.item_number);
330: FND_MSG_PUB.add;
331: END IF;
332: CLOSE mtl_system_items_csr;
333: END IF;
334: END IF;

Line 354: FND_MSG_PUB.add;

350: p_utilization_rec.csi_item_instance_id := l_instance_id;
351: ELSE
352: FND_MESSAGE.set_name('AHL','AHL_UC_INSTANCE_INVALID');
353: FND_MESSAGE.set_token('INSTANCE',p_utilization_rec.csi_item_instance_number);
354: FND_MSG_PUB.add;
355: END IF;
356: CLOSE csi_item_instance_csr;
357: END IF;
358: END IF;

Line 468: FND_MSG_PUB.add;

464: FETCH cs_counters_csr INTO l_csi_item_instance_id;
465: IF (cs_counters_csr%NOTFOUND) THEN
466: FND_MESSAGE.set_name('AHL','AHL_UC_CSCTR_INVALID');
467: FND_MESSAGE.set_token('CTRID',p_utilization_rec.counter_id);
468: FND_MSG_PUB.add;
469: --dbms_output.put_line('Counter ID not found');
470: ELSE
471: l_based_on := l_based_on || ':' || 'COUNTERID';
472: l_found := l_found || ':' || 'COUNTER';

Line 480: FND_MSG_PUB.add;

476: FETCH csi_item_instances_csr INTO l_location_type_code;
477: IF (csi_item_instances_csr%NOTFOUND) THEN
478: FND_MESSAGE.set_name('AHL','AHL_UC_CSII_INVALID');
479: FND_MESSAGE.set_token('CSII',p_utilization_rec.csi_item_instance_id);
480: FND_MSG_PUB.add;
481: --dbms_output.put_line('CSI Item Instance not found');
482: ELSE
483: l_tmp_instance_id := l_csi_item_instance_id;
484: END IF; -- csi not found.

Line 507: FND_MSG_PUB.add;

503: IF (csi_item_serial_csr%NOTFOUND) THEN
504: FND_MESSAGE.set_name('AHL','AHL_UC_INV_SERIAL_INVALID');
505: FND_MESSAGE.set_token('INV_ITEM',p_utilization_rec.inventory_item_id);
506: FND_MESSAGE.set_token('SERIAL',p_utilization_rec.serial_number);
507: FND_MSG_PUB.add;
508: --dbms_output.put_line('Inventory item not found');
509: ELSIF (trunc(sysdate)) < trunc(nvl(l_active_end_date, sysdate+1)) THEN
510: l_found := l_found || ':' || 'INVENTORY';
511: l_tmp_instance_id := l_csi_item_instance_id;

Line 517: FND_MSG_PUB.add;

513: -- Item expired.
514: FND_MESSAGE.set_name('AHL','AHL_UC_INVITEM_INVALID');
515: FND_MESSAGE.set_token('INV_ITEM',p_utilization_rec.inventory_item_id);
516: FND_MESSAGE.set_token('SERIAL',p_utilization_rec.serial_number);
517: FND_MSG_PUB.add;
518: --dbms_output.put_line('Inventory item not found');
519: END IF;
520: CLOSE csi_item_serial_csr;
521: END IF;

Line 536: FND_MSG_PUB.add;

532: FETCH csi_item_instances_csr INTO l_location_type_code;
533: IF (csi_item_instances_csr%NOTFOUND) THEN
534: FND_MESSAGE.set_name('AHL','AHL_UC_CSII_INVALID');
535: FND_MESSAGE.set_token('CSII',p_utilization_rec.csi_item_instance_id);
536: FND_MSG_PUB.add;
537: --dbms_output.put_line('CSI Item Instance not found');
538: ELSIF (l_location_type_code IN ('PO','INVENTORY','PROJECT','IN-TRANSIT')) THEN
539: FND_MESSAGE.set_name('AHL','AHL_UC_CSII_INVALID');
540: FND_MESSAGE.set_token('CSII',p_utilization_rec.csi_item_instance_id);

Line 541: FND_MSG_PUB.add;

537: --dbms_output.put_line('CSI Item Instance not found');
538: ELSIF (l_location_type_code IN ('PO','INVENTORY','PROJECT','IN-TRANSIT')) THEN
539: FND_MESSAGE.set_name('AHL','AHL_UC_CSII_INVALID');
540: FND_MESSAGE.set_token('CSII',p_utilization_rec.csi_item_instance_id);
541: FND_MSG_PUB.add;
542: --dbms_output.put_line('CSI Item Instance location invalid');
543: ELSE
544: l_found := l_found || ':' || 'INSTANCE';
545: END IF; /* csi item_instance */

Line 562: IF FND_MSG_PUB.count_msg > 0 THEN

558: 'Setting p_utilization_rec.csi_item_instance_id to ' || p_utilization_rec.csi_item_instance_id);
559: END IF;
560:
561: -- Check Error Message stack.
562: IF FND_MSG_PUB.count_msg > 0 THEN
563: RAISE FND_API.G_EXC_ERROR;
564: END IF;
565:
566: -- Raise error if no or too many parameters.

Line 569: FND_MSG_PUB.add;

565:
566: -- Raise error if no or too many parameters.
567: IF (l_found IS NULL) THEN
568: FND_MESSAGE.set_name('AHL','AHL_UC_UPARAM_NULL');
569: FND_MSG_PUB.add;
570: --dbms_output.put_line('Part number information is null');
571: RAISE FND_API.G_EXC_ERROR;
572: ELSIF l_found <> ':INVENTORY' AND
573: l_found <> ':INSTANCE' AND

Line 577: FND_MSG_PUB.add;

573: l_found <> ':INSTANCE' AND
574: l_found <> ':COUNTER'
575: THEN
576: FND_MESSAGE.set_name('AHL','AHL_UC_UPARAM_INVALID');
577: FND_MSG_PUB.add;
578: --dbms_output.put_line('Too many parameters for part number.');
579: RAISE FND_API.G_EXC_ERROR;
580: END IF;
581:

Line 595: FND_MSG_PUB.add;

591: IF ahl_unit_config_csr%NOTFOUND THEN
592: --Means this instance is definately not in a UC
593: FND_MESSAGE.set_name('AHL','AHL_UC_INSTANCE_NOT_IN_UC');
594: FND_MESSAGE.set_token('INSTANCE', p_utilization_rec.csi_item_instance_id);
595: FND_MSG_PUB.add;
596: END IF;
597: CLOSE ahl_unit_config_csr;
598: --dbms_output.put_line('CSI Item Instance not found');
599: ELSE

Line 612: FND_MSG_PUB.add;

608: IF (l_root_uc_status_code NOT IN ('COMPLETE', 'INCOMPLETE', 'DRAFT')) THEN
609: -- 'DRAFT' needs to be removed after testing
610: FND_MESSAGE.set_name('AHL','AHL_UC_STATUS_INVALID');
611: FND_MESSAGE.set_token('STATUS',l_root_uc_status_code);
612: FND_MSG_PUB.add;
613: --dbms_output.put_line('UC Status invalid');
614: END IF;
615: END IF;
616: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN

Line 628: FND_MSG_PUB.add;

624: p_utilization_rec.cascade_flag NOT IN ('Y','N'))
625: THEN
626: FND_MESSAGE.set_name('AHL','AHL_UC_CASCADE_INVALID');
627: FND_MESSAGE.set_token('FLAG',p_utilization_rec.cascade_flag);
628: FND_MSG_PUB.add;
629: --dbms_output.put_line('Cascade flag is invalid.');
630: END IF;
631: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
632: FND_LOG.STRING(G_LEVEL_STATEMENT,

Line 643: FND_MSG_PUB.add;

639: p_utilization_rec.delta_flag NOT IN ('Y','N'))
640: THEN
641: FND_MESSAGE.set_name('AHL','AHL_UC_DELTA_FLAG_INVALID');
642: FND_MESSAGE.set_token('FLAG',p_utilization_rec.delta_flag);
643: FND_MSG_PUB.add;
644: --dbms_output.put_line('Delta flag is invalid.');
645: END IF;
646: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
647: FND_LOG.STRING(G_LEVEL_STATEMENT,

Line 653: IF FND_MSG_PUB.count_msg > 0 THEN

649: 'Validated p_utilization_rec.delta_flag: ' || p_utilization_rec.delta_flag);
650: END IF;
651:
652: -- Check Error Message stack.
653: IF FND_MSG_PUB.count_msg > 0 THEN
654: RAISE FND_API.G_EXC_ERROR;
655: END IF;
656:
657: -- Check UOM_CODE.

Line 665: FND_MSG_PUB.add;

661: FETCH mtl_units_of_measure_csr INTO l_junk;
662: IF (mtl_units_of_measure_csr%NOTFOUND) THEN
663: FND_MESSAGE.set_name('AHL','AHL_UC_UZ_UOM_INVALID');
664: FND_MESSAGE.set_token('UOM_CODE',p_utilization_rec.uom_code);
665: FND_MSG_PUB.add;
666: --dbms_output.put_line('UOM CODE not found');
667: ELSE
668: l_based_on := l_based_on || ':' || 'UOM';
669: END IF;

Line 687: FND_MSG_PUB.add;

683: FETCH cs_counter_name_csr INTO l_junk;
684: IF (cs_counter_name_csr%NOTFOUND) THEN
685: FND_MESSAGE.set_name('AHL','AHL_UC_CTRNAME_INVALID');
686: FND_MESSAGE.set_token('CTR_NAME',p_utilization_rec.counter_name);
687: FND_MSG_PUB.add;
688: --dbms_output.put_line('Counter Name not found');
689: ELSE
690: l_based_on := l_based_on || ':' || 'COUNTER';
691: END IF;

Line 705: FND_MSG_PUB.add;

701: IF (p_utilization_rec.rule_code IS NOT NULL AND
702: NOT(AHL_UTIL_MC_PKG.validate_lookup_code('AHL_COUNTER_RULE_TYPE', p_utilization_rec.rule_code))) THEN
703: FND_MESSAGE.set_name('AHL','AHL_UC_RCODE_INVALID');
704: FND_MESSAGE.set_token('CODE',p_utilization_rec.rule_code);
705: FND_MSG_PUB.add;
706: --dbms_output.put_line('Invalid Rule code');
707: END IF;
708: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
709: FND_LOG.STRING(G_LEVEL_STATEMENT,

Line 732: FND_MSG_PUB.add;

728: --the specific counter name provided or counter names with the speicific UOMs provided exist
729: --for the start instance itself.
730: IF (p_utilization_rec.reading_value IS NULL OR p_utilization_rec.reading_value = FND_API.G_MISS_NUM) THEN
731: FND_MESSAGE.set_name('AHL','AHL_UC_READING_INVALID');
732: FND_MSG_PUB.add;
733: END IF;
734: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
735: FND_LOG.STRING(G_LEVEL_STATEMENT,
736: L_DEBUG_KEY,

Line 741: IF FND_MSG_PUB.count_msg > 0 THEN

737: 'Validated p_utilization_rec.reading_value: ' || p_utilization_rec.reading_value);
738: END IF;
739:
740: -- Check Error Message stack.
741: IF FND_MSG_PUB.count_msg > 0 THEN
742: RAISE FND_API.G_EXC_ERROR;
743: END IF;
744:
745: -- Raise error if no or too many parameters.

Line 748: FND_MSG_PUB.add;

744:
745: -- Raise error if no or too many parameters.
746: IF (l_based_on IS NULL) THEN
747: FND_MESSAGE.set_name('AHL','AHL_UC_UBASED_ON_NULL');
748: FND_MSG_PUB.add;
749: --dbms_output.put_line('Part number information is null');
750: RAISE FND_API.G_EXC_ERROR;
751: ELSIF (l_based_on <> ':UOM' AND
752: l_based_on <> ':COUNTER' AND

Line 755: FND_MSG_PUB.add;

751: ELSIF (l_based_on <> ':UOM' AND
752: l_based_on <> ':COUNTER' AND
753: l_based_on <> ':COUNTERID' ) THEN
754: FND_MESSAGE.set_name('AHL','AHL_UC_UBASED_ON_INVALID');
755: FND_MSG_PUB.add;
756: --dbms_output.put_line('Input parameters contain both UOM Code and Counter Name');
757: RAISE FND_API.G_EXC_ERROR;
758: END IF;
759: x_found := l_found;

Line 838: FND_MSG_PUB.add;

834: OPEN get_current_value_id(p_utilization_rec.counter_id);
835: FETCH get_current_value_id INTO l_start_current_value, l_counter_grp_id;
836: IF get_current_value_id%NOTFOUND THEN
837: FND_MESSAGE.set_name('AHL','AHL_UC_INST_NO_CTR_FOUND');
838: FND_MSG_PUB.add;
839: CLOSE get_current_value_id;
840: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
841: ELSE
842: CLOSE get_current_value_id;

Line 859: FND_MSG_PUB.add;

855: IF (l_change_type_flag = 'Y') THEN
856: -- For Change type counters, delta_flag should always be Y
857: FND_MESSAGE.set_name('AHL', 'AHL_UC_DELTA_FLAG_INVALID');
858: FND_MESSAGE.set_token('FLAG', p_utilization_rec.delta_flag);
859: FND_MSG_PUB.add;
860: RAISE FND_API.G_EXC_ERROR;
861: END IF;
862: -- End changes by jaramana on Feb 20, 2008 for Bug 6782765
863: l_reading_value := p_utilization_rec.reading_value;

Line 1024: FND_MSG_PUB.add;

1020: IF get_current_value_name%NOTFOUND THEN
1021: FND_MESSAGE.set_name('AHL','AHL_UC_CTR_INST_INVALID');
1022: FND_MESSAGE.set_token('COUNTER', l_utilization_rec.counter_name);
1023: FND_MESSAGE.set_token('INSTANCE', l_utilization_rec.csi_item_instance_id);
1024: FND_MSG_PUB.add;
1025: CLOSE get_current_value_name;
1026: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1027: ELSE
1028: CLOSE get_current_value_name;

Line 1111: FND_MSG_PUB.add;

1107: FND_MESSAGE.set_name('AHL','AHL_UC_CTR_UOM_INVALID');
1108: FND_MESSAGE.set_token('COUNTER', l_utilization_rec.counter_name);
1109: FND_MESSAGE.set_token('INSTANCE', child_rec.csi_item_instance_id);
1110: FND_MESSAGE.set_token('UOM', l_get_current_value_name.uom_code);
1111: FND_MSG_PUB.add;
1112: CLOSE get_current_value_name;
1113: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1114: ELSE
1115: CLOSE get_current_value_name;

Line 1137: FND_MSG_PUB.add;

1133: IF (l_change_type_flag = 'Y') THEN
1134: -- For Change type counters, delta_flag should always be Y
1135: FND_MESSAGE.set_name('AHL', 'AHL_UC_DELTA_FLAG_INVALID');
1136: FND_MESSAGE.set_token('FLAG', l_utilization_rec.delta_flag);
1137: FND_MSG_PUB.add;
1138: RAISE FND_API.G_EXC_ERROR;
1139: END IF;
1140: -- End changes by jaramana on Feb 20, 2008 for Bug 6782765
1141: l_reading_value := l_get_current_value_name.counter_reading+

Line 1337: FND_MSG_PUB.add;

1333: --The start instance doesn't have the given counter associated, reading value is
1334: --net reading but the counter doesn't exists for the start instance
1335: --So raise error and return, no need to go further down.
1336: FND_MESSAGE.set_name('AHL','AHL_UC_INST_NO_CTR_FOUND');
1337: FND_MSG_PUB.add;
1338: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1339: ELSE
1340: IF (NVL(l_utilization_rec.cascade_flag,'N') = 'Y') THEN
1341: --The start instance doesn't have the given counter associated, reading value is delta

Line 1418: FND_MSG_PUB.add;

1414: ELSE
1415: --The start instance doesn't have the given counter associated, reading value is delta
1416: --reading and cascade_flag = 'N', then raise error and stop.
1417: FND_MESSAGE.set_name('AHL','AHL_UC_INST_NO_CTR_FOUND');
1418: FND_MSG_PUB.add;
1419: RAISE FND_API.G_EXC_ERROR;
1420: END IF;
1421: END IF;
1422: END IF;

Line 1568: FND_MSG_PUB.add;

1564: END LOOP;
1565: END IF;
1566: IF i=0 THEN
1567: FND_MESSAGE.set_name('AHL','AHL_UC_INST_NO_CTR_FOUND');
1568: FND_MSG_PUB.add;
1569: RAISE FND_API.G_EXC_ERROR;
1570: END IF;
1571: END IF;
1572: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) THEN

Line 1654: FND_MSG_PUB.add;

1650:
1651: EXCEPTION
1652: WHEN INVALID_NUMBER THEN
1653: FND_MESSAGE.set_name('AHL','AHL_UC_INST_POSITION_INVALID');
1654: FND_MSG_PUB.add;
1655: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1656: END get_counter_ratio;
1657:
1658: END AHL_UC_UTILIZATION_PVT;