DBA Data[Home] [Help]

APPS.EAM_ASSET_OPERATION_TXN_PVT dependencies on EAM_ASSET_OPERATION_TXN

Line 1: PACKAGE BODY EAM_ASSET_OPERATION_TXN_PVT AS

1: PACKAGE BODY EAM_ASSET_OPERATION_TXN_PVT AS
2: /* $Header: EAMVACHB.pls 120.13 2006/09/14 20:02:13 hkarmach noship $ */
3: /*#
4: * This package is used for the ASSET CHECKIN/CHECKOUT transaction logging AND validation .
5: * It defines procedures which take quality collection plans and meter readings as input

Line 25: FROM eam_asset_operation_txn

21:
22: SELECT
23: created_by
24: INTO l_created_by
25: FROM eam_asset_operation_txn
26: WHERE instance_id=p_instance_id
27: AND txn_date =
28: (
29: SELECT

Line 31: FROM eam_asset_operation_txn eaot

27: AND txn_date =
28: (
29: SELECT
30: max(txn_date)
31: FROM eam_asset_operation_txn eaot
32: WHERE eaot.instance_id=p_instance_id
33: );
34:
35:

Line 82: l_eam_ops_quality_tbl eam_asset_operation_txn_pub.eam_quality_tbl_type;

78: )
79:
80: IS
81:
82: l_eam_ops_quality_tbl eam_asset_operation_txn_pub.eam_quality_tbl_type;
83: l_eam_meter_reading_tbl eam_asset_operation_txn_pub.meter_reading_rec_tbl_type;
84: l_eam_counter_properties_tbl eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl;
85: g_pkg_name CONSTANT varchar2(30) := 'EAM_ASSET_OPERATION_TXN_PVT';
86: l_api_name constant varchar2(30) := 'process_checkinout_txn';

Line 83: l_eam_meter_reading_tbl eam_asset_operation_txn_pub.meter_reading_rec_tbl_type;

79:
80: IS
81:
82: l_eam_ops_quality_tbl eam_asset_operation_txn_pub.eam_quality_tbl_type;
83: l_eam_meter_reading_tbl eam_asset_operation_txn_pub.meter_reading_rec_tbl_type;
84: l_eam_counter_properties_tbl eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl;
85: g_pkg_name CONSTANT varchar2(30) := 'EAM_ASSET_OPERATION_TXN_PVT';
86: l_api_name constant varchar2(30) := 'process_checkinout_txn';
87: l_api_version constant number := 1.0;

Line 84: l_eam_counter_properties_tbl eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl;

80: IS
81:
82: l_eam_ops_quality_tbl eam_asset_operation_txn_pub.eam_quality_tbl_type;
83: l_eam_meter_reading_tbl eam_asset_operation_txn_pub.meter_reading_rec_tbl_type;
84: l_eam_counter_properties_tbl eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl;
85: g_pkg_name CONSTANT varchar2(30) := 'EAM_ASSET_OPERATION_TXN_PVT';
86: l_api_name constant varchar2(30) := 'process_checkinout_txn';
87: l_api_version constant number := 1.0;
88:

Line 85: g_pkg_name CONSTANT varchar2(30) := 'EAM_ASSET_OPERATION_TXN_PVT';

81:
82: l_eam_ops_quality_tbl eam_asset_operation_txn_pub.eam_quality_tbl_type;
83: l_eam_meter_reading_tbl eam_asset_operation_txn_pub.meter_reading_rec_tbl_type;
84: l_eam_counter_properties_tbl eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl;
85: g_pkg_name CONSTANT varchar2(30) := 'EAM_ASSET_OPERATION_TXN_PVT';
86: l_api_name constant varchar2(30) := 'process_checkinout_txn';
87: l_api_version constant number := 1.0;
88:
89:

Line 94: SAVEPOINT EAM_ASSET_OPERATION_TXN_PVT;

90:
91: BEGIN
92:
93: -- Standard Start of API savepoint
94: SAVEPOINT EAM_ASSET_OPERATION_TXN_PVT;
95:
96: -- Standard call to check for call compatibility.
97: IF NOT fnd_api.compatible_api_call(
98: l_api_version

Line 111: EAM_ASSET_OPERATION_TXN_PVT.insert_txn(

107: END IF;
108:
109: x_return_status := fnd_api.g_ret_sts_success;
110:
111: EAM_ASSET_OPERATION_TXN_PVT.insert_txn(
112: p_txn_date => p_txn_date,
113: p_txn_type => p_txn_type,
114: p_instance_id => p_instance_id,
115: p_comments => p_comments,

Line 144: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT;

140: x_msg_data => x_msg_data
141: );
142:
143: IF x_return_status <> fnd_api.g_ret_sts_success THEN
144: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT;
145: RETURN;
146: END IF;
147:
148: -- Standard check of p_commit.

Line 157: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT;

153: p_count => x_msg_count
154: ,p_data => x_msg_data);
155: EXCEPTION
156: WHEN fnd_api.g_exc_error THEN
157: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT;
158: x_return_status := fnd_api.g_ret_sts_error;
159: fnd_msg_pub.count_and_get(
160: p_count => x_msg_count
161: ,p_data => x_msg_data);

Line 163: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT;

159: fnd_msg_pub.count_and_get(
160: p_count => x_msg_count
161: ,p_data => x_msg_data);
162: WHEN fnd_api.g_exc_unexpected_error THEN
163: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT;
164: x_return_status := fnd_api.g_ret_sts_unexp_error;
165: fnd_msg_pub.count_and_get(
166: p_count => x_msg_count
167: ,p_data => x_msg_data);

Line 169: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT;

165: fnd_msg_pub.count_and_get(
166: p_count => x_msg_count
167: ,p_data => x_msg_data);
168: WHEN OTHERS THEN
169: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT;
170: x_return_status := fnd_api.g_ret_sts_unexp_error;
171:
172: IF fnd_msg_pub.check_msg_level(
173: fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 190: p_eam_ops_quality_tbl IN eam_asset_operation_txn_pub.eam_quality_tbl_type,

186:
187: PROCEDURE insert_quality_plans
188: (
189:
190: p_eam_ops_quality_tbl IN eam_asset_operation_txn_pub.eam_quality_tbl_type,
191: p_instance_id IN number,
192: p_txn_date IN date,
193: p_comments IN varchar2,
194: p_operable_flag IN number,

Line 216: l_eam_ops_quality_rec EAM_ASSET_OPERATION_TXN_PUB.eam_quality_tbl_type;

212:
213: l_header_plan_id_tbl header_plan_id_tbl_type;
214: l_flag boolean;
215: l_header_counter NUMBER :=0;
216: l_eam_ops_quality_rec EAM_ASSET_OPERATION_TXN_PUB.eam_quality_tbl_type;
217: l_elements qa_validation_api.ElementsArray;
218: l_org_id NUMBER;
219: l_collection_id NUMBER;
220: l_temp_occurence NUMBER;

Line 459: p_eam_meter_reading_tbl IN eam_asset_operation_txn_pub.meter_reading_rec_tbl_type,

455: -- This Procedure calls the meter reading api to insert meter readings
456:
457: PROCEDURE insert_meter_readings
458: (
459: p_eam_meter_reading_tbl IN eam_asset_operation_txn_pub.meter_reading_rec_tbl_type,
460: p_counter_properties_tbl IN eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl,
461: p_instance_id IN number,
462: p_txn_id IN number,
463: x_return_status OUT NOCOPY varchar2,

Line 460: p_counter_properties_tbl IN eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl,

456:
457: PROCEDURE insert_meter_readings
458: (
459: p_eam_meter_reading_tbl IN eam_asset_operation_txn_pub.meter_reading_rec_tbl_type,
460: p_counter_properties_tbl IN eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl,
461: p_instance_id IN number,
462: p_txn_id IN number,
463: x_return_status OUT NOCOPY varchar2,
464: x_msg_count OUT NOCOPY number,

Line 620: g_pkg_name CONSTANT varchar2(30) := 'EAM_ASSET_OPERATION_TXN_PVT';

616: l_api_version constant number := 1.0;
617: l_last_txn_date date;
618: l_txn_type number;
619: l_count number;
620: g_pkg_name CONSTANT varchar2(30) := 'EAM_ASSET_OPERATION_TXN_PVT';
621:
622:
623: BEGIN
624:

Line 627: SAVEPOINT EAM_ASSET_OPERATION_TXN_PVT_SV;

623: BEGIN
624:
625:
626: -- Standard Start of API savepoint
627: SAVEPOINT EAM_ASSET_OPERATION_TXN_PVT_SV;
628: -- Standard call to check for call compatibility.
629:
630: IF NOT fnd_api.compatible_api_call(
631: l_api_version

Line 656: FROM eam_asset_operation_txn

652:
653:
654: SELECT MAX(txn_date)
655: INTO l_last_txn_date
656: FROM eam_asset_operation_txn
657: WHERE instance_id=p_instance_id;
658:
659: IF ((l_last_txn_date is not null AND (p_txn_date <= l_last_txn_date)) OR p_txn_date>sysdate)
660: THEN

Line 740: FROM eam_asset_operation_txn

736: IF l_last_txn_date IS NOT NULL THEN
737: SELECT
738: txn_type
739: INTO l_txn_type
740: FROM eam_asset_operation_txn
741: WHERE instance_id=p_instance_id
742: AND txn_date=l_last_txn_date;
743: END IF;
744:

Line 823: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT_SV;

819:
820: EXCEPTION
821:
822: WHEN fnd_api.g_exc_error THEN
823: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT_SV;
824: x_return_status := fnd_api.g_ret_sts_error;
825: fnd_msg_pub.count_and_get(
826: p_count => x_msg_count
827: ,p_data => x_msg_data);

Line 830: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT_SV;

826: p_count => x_msg_count
827: ,p_data => x_msg_data);
828:
829: WHEN fnd_api.g_exc_unexpected_error THEN
830: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT_SV;
831: x_return_status := fnd_api.g_ret_sts_unexp_error;
832: fnd_msg_pub.count_and_get(
833: p_count => x_msg_count
834: ,p_data => x_msg_data);

Line 838: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT_SV;

834: ,p_data => x_msg_data);
835:
836: WHEN OTHERS THEN
837:
838: ROLLBACK TO EAM_ASSET_OPERATION_TXN_PVT_SV;
839: x_return_status := fnd_api.g_ret_sts_unexp_error;
840: IF fnd_msg_pub.check_msg_level(
841: fnd_msg_pub.g_msg_lvl_unexp_error) THEN
842: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);

Line 850: -- This procedure commits the transaction details into eam_asset_operation_txn

846: ,p_data => x_msg_data);
847:
848: END validate_txn;
849:
850: -- This procedure commits the transaction details into eam_asset_operation_txn
851:
852: PROCEDURE insert_txn(
853:
854: p_api_version IN number := 1.0,

Line 865: p_eam_ops_quality_tbl IN eam_asset_operation_txn_pub.eam_quality_tbl_type,

861: p_comments IN varchar2 := NULL,
862: p_qa_collection_id IN number := NULL,
863: p_operable_flag IN number,
864: p_employee_id IN number,
865: p_eam_ops_quality_tbl IN eam_asset_operation_txn_pub.eam_quality_tbl_type,
866: p_meter_reading_rec_tbl IN eam_asset_operation_txn_pub.meter_reading_rec_tbl_type,
867: p_counter_properties_tbl IN eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl,
868: p_attribute_category IN varchar2 := NULL,
869: p_attribute1 IN varchar2 := NULL,

Line 866: p_meter_reading_rec_tbl IN eam_asset_operation_txn_pub.meter_reading_rec_tbl_type,

862: p_qa_collection_id IN number := NULL,
863: p_operable_flag IN number,
864: p_employee_id IN number,
865: p_eam_ops_quality_tbl IN eam_asset_operation_txn_pub.eam_quality_tbl_type,
866: p_meter_reading_rec_tbl IN eam_asset_operation_txn_pub.meter_reading_rec_tbl_type,
867: p_counter_properties_tbl IN eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl,
868: p_attribute_category IN varchar2 := NULL,
869: p_attribute1 IN varchar2 := NULL,
870: p_attribute2 IN varchar2 := NULL,

Line 867: p_counter_properties_tbl IN eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl,

863: p_operable_flag IN number,
864: p_employee_id IN number,
865: p_eam_ops_quality_tbl IN eam_asset_operation_txn_pub.eam_quality_tbl_type,
866: p_meter_reading_rec_tbl IN eam_asset_operation_txn_pub.meter_reading_rec_tbl_type,
867: p_counter_properties_tbl IN eam_asset_operation_txn_pub.Ctr_Property_readings_Tbl,
868: p_attribute_category IN varchar2 := NULL,
869: p_attribute1 IN varchar2 := NULL,
870: p_attribute2 IN varchar2 := NULL,
871: p_attribute3 IN varchar2 := NULL,

Line 923: g_pkg_name CONSTANT varchar2(30) := 'EAM_ASSET_OPERATION_TXN_PVT';

919: l_count number :=1;
920: l_list_of_plans varchar2(1000);
921: l_validate boolean;
922: l_mandatory_qua_plan varchar2(1);
923: g_pkg_name CONSTANT varchar2(30) := 'EAM_ASSET_OPERATION_TXN_PVT';
924: l_object_version_number number;
925: eaot_api_call_error EXCEPTION;
926: eaot_api_desc_error EXCEPTION;
927: TYPE num_table is TABLE OF NUMBER INDEX BY BINARY_INTEGER;

Line 973: eam_asset_operation_txn_s.nextval

969:
970: --api body
971: --generate txnid from sequence
972: SELECT
973: eam_asset_operation_txn_s.nextval
974: INTO l_txn_id
975: FROM dual;
976:
977:

Line 1016: EAM_ASSET_OPERATION_TXN_PVT.validate_txn(

1012: END;
1013:
1014: --call validate_txn to validate txn_details
1015:
1016: EAM_ASSET_OPERATION_TXN_PVT.validate_txn(
1017: p_api_version => 1.0,
1018: p_init_msg_list => p_init_msg_list,
1019: p_validation_level => p_validation_level,
1020: p_txn_date => p_txn_date,

Line 1127: --insert record in eam_asset_operation_txn table

1123: ,p_data => x_msg_data
1124: );
1125: raise eaot_api_desc_error;
1126: END IF;
1127: --insert record in eam_asset_operation_txn table
1128:
1129:
1130: SELECT DISTINCT nvl(ppf.full_name,fu.user_name)
1131: INTO l_reference

Line 1137: insert into eam_asset_operation_txn(

1133: WHERE fu.employee_id=ppf.person_id(+)
1134: AND fu.user_id=p_employee_id;
1135:
1136:
1137: insert into eam_asset_operation_txn(
1138: txn_id,
1139: txn_date,
1140: txn_type,
1141: instance_id,

Line 1493: END EAM_ASSET_OPERATION_TXN_PVT;

1489: p_data => x_msg_data);
1490:
1491: END insert_txn;
1492:
1493: END EAM_ASSET_OPERATION_TXN_PVT;