DBA Data[Home] [Help]

APPS.EAM_WORKORDERTRANSACTIONS_PUB dependencies on FND_API

Line 15: IF p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

11: p_x_return_status IN OUT NOCOPY VARCHAR2,
12: p_transaction_type IN NUMBER,
13: p_transaction_date IN DATE) IS
14: BEGIN
15: IF p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
16: IF (NOT p_transaction_type = G_TXN_TYPE_COMPLETE) AND (NOT p_transaction_type = G_TXN_TYPE_UNCOMPLETE) THEN
17: -- validate transaction type
18: FND_MESSAGE.set_name('EAM', 'EAM_INVALID_TXN_TYPE');
19: p_x_return_status := FND_API.G_RET_STS_ERROR;

Line 19: p_x_return_status := FND_API.G_RET_STS_ERROR;

15: IF p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
16: IF (NOT p_transaction_type = G_TXN_TYPE_COMPLETE) AND (NOT p_transaction_type = G_TXN_TYPE_UNCOMPLETE) THEN
17: -- validate transaction type
18: FND_MESSAGE.set_name('EAM', 'EAM_INVALID_TXN_TYPE');
19: p_x_return_status := FND_API.G_RET_STS_ERROR;
20: ELSIF p_transaction_date > sysdate THEN
21: -- validate transaction_date
22: FND_MESSAGE.set_name('EAM', 'EAM_TXN_LATER_THAN_TODAY');
23: p_x_return_status := FND_API.G_RET_STS_ERROR;

Line 23: p_x_return_status := FND_API.G_RET_STS_ERROR;

19: p_x_return_status := FND_API.G_RET_STS_ERROR;
20: ELSIF p_transaction_date > sysdate THEN
21: -- validate transaction_date
22: FND_MESSAGE.set_name('EAM', 'EAM_TXN_LATER_THAN_TODAY');
23: p_x_return_status := FND_API.G_RET_STS_ERROR;
24: END IF;
25: END IF;
26: END Validate_Transaction;
27:

Line 40: IF p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

36: p_x_actual_start_date IN OUT NOCOPY DATE,
37: p_x_actual_end_date IN OUT NOCOPY DATE,
38: p_x_actual_duration IN OUT NOCOPY NUMBER) IS
39: BEGIN
40: IF p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
41: IF p_x_actual_start_date is not null THEN
42: IF p_x_actual_end_date is not null THEN
43: -- Fix for the bug 7136230
44: p_x_actual_duration := round(24*(p_x_actual_end_date - p_x_actual_start_date),3);

Line 50: p_x_return_status := FND_API.G_RET_STS_ERROR;

46: p_x_actual_end_date := p_x_actual_start_date + p_x_actual_duration;
47: ELSE
48: -- missing both end_date and duration
49: FND_MESSAGE.set_name('EAM', 'EAM_MISSING_DATE_INFO');
50: p_x_return_status := FND_API.G_RET_STS_ERROR;
51: END IF;
52: ELSIF p_x_actual_end_date is not null THEN
53: IF p_x_actual_duration is not null THEN
54: p_x_actual_start_date := p_x_actual_end_date - p_x_actual_duration;

Line 58: p_x_return_status := FND_API.G_RET_STS_ERROR;

54: p_x_actual_start_date := p_x_actual_end_date - p_x_actual_duration;
55: ELSE
56: -- missing both start_date and duration
57: FND_MESSAGE.set_name('EAM', 'EAM_MISSING_DATE_INFO');
58: p_x_return_status := FND_API.G_RET_STS_ERROR;
59: END IF;
60: ELSE
61: -- missing both start and end dates
62: FND_MESSAGE.set_name('EAM', 'EAM_MISSING_DATE_INFO');

Line 63: p_x_return_status := FND_API.G_RET_STS_ERROR;

59: END IF;
60: ELSE
61: -- missing both start and end dates
62: FND_MESSAGE.set_name('EAM', 'EAM_MISSING_DATE_INFO');
63: p_x_return_status := FND_API.G_RET_STS_ERROR;
64: END IF;
65: END IF;
66: IF p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
67: IF p_x_actual_start_date > p_x_actual_end_date THEN

Line 66: IF p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

62: FND_MESSAGE.set_name('EAM', 'EAM_MISSING_DATE_INFO');
63: p_x_return_status := FND_API.G_RET_STS_ERROR;
64: END IF;
65: END IF;
66: IF p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
67: IF p_x_actual_start_date > p_x_actual_end_date THEN
68: FND_MESSAGE.set_name('EAM', 'EAM_END_BEFORE_START');
69: p_x_return_status := FND_API.G_RET_STS_ERROR;
70: ELSIF p_x_actual_end_date > sysdate THEN

Line 69: p_x_return_status := FND_API.G_RET_STS_ERROR;

65: END IF;
66: IF p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
67: IF p_x_actual_start_date > p_x_actual_end_date THEN
68: FND_MESSAGE.set_name('EAM', 'EAM_END_BEFORE_START');
69: p_x_return_status := FND_API.G_RET_STS_ERROR;
70: ELSIF p_x_actual_end_date > sysdate THEN
71: FND_MESSAGE.set_name('EAM', 'EAM_END_LATER_THAN_TODAY');
72: p_x_return_status := FND_API.G_RET_STS_ERROR;
73: END IF;

Line 72: p_x_return_status := FND_API.G_RET_STS_ERROR;

68: FND_MESSAGE.set_name('EAM', 'EAM_END_BEFORE_START');
69: p_x_return_status := FND_API.G_RET_STS_ERROR;
70: ELSIF p_x_actual_end_date > sysdate THEN
71: FND_MESSAGE.set_name('EAM', 'EAM_END_LATER_THAN_TODAY');
72: p_x_return_status := FND_API.G_RET_STS_ERROR;
73: END IF;
74: END IF;
75: END Validate_Start_End_Dates;
76:

Line 96: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

92: l_rebuild_item_id NUMBER;
93: l_entity_type NUMBER;
94: l_status_type NUMBER;
95: BEGIN
96: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
97: return;
98: END IF;
99: IF (p_wip_entity_id is null or p_transaction_type is null or p_transaction_date is null) THEN
100: FND_MESSAGE.set_name('EAM', 'EAM_WORK_ORDER_MISSING_INFO');

Line 101: p_x_return_status := FND_API.G_RET_STS_ERROR;

97: return;
98: END IF;
99: IF (p_wip_entity_id is null or p_transaction_type is null or p_transaction_date is null) THEN
100: FND_MESSAGE.set_name('EAM', 'EAM_WORK_ORDER_MISSING_INFO');
101: p_x_return_status := FND_API.G_RET_STS_ERROR;
102: return;
103: END IF;
104:
105: -- check wip_entity_id points to a valid eam workorder

Line 112: p_x_return_status := FND_API.G_RET_STS_ERROR;

108: where wip_entity_id = p_wip_entity_id;
109: if (NOT l_entity_type = 6) then
110: -- not an open eam job
111: FND_MESSAGE.set_name('EAM', 'EAM_NOT_OPEN_EAM_JOB');
112: p_x_return_status := FND_API.G_RET_STS_ERROR;
113: return;
114: END IF;
115:
116: -- set out params by query wip_discrete_jobs table

Line 143: p_x_return_status := FND_API.G_RET_STS_ERROR;

139: end if;
140:
141: if p_transaction_type = G_TXN_TYPE_COMPLETE and (NOT l_status_type = 3) then
142: FND_MESSAGE.set_name('EAM', 'EAM_NOT_RELEASED_STATUS');
143: p_x_return_status := FND_API.G_RET_STS_ERROR;
144: elsif p_transaction_type = G_TXN_TYPE_UNCOMPLETE and (NOT l_status_type = 4) then
145: FND_MESSAGE.set_name('EAM', 'EAM_NOT_COMPLETED_STATUS');
146: p_x_return_status := FND_API.G_RET_STS_ERROR;
147: end if;

Line 146: p_x_return_status := FND_API.G_RET_STS_ERROR;

142: FND_MESSAGE.set_name('EAM', 'EAM_NOT_RELEASED_STATUS');
143: p_x_return_status := FND_API.G_RET_STS_ERROR;
144: elsif p_transaction_type = G_TXN_TYPE_UNCOMPLETE and (NOT l_status_type = 4) then
145: FND_MESSAGE.set_name('EAM', 'EAM_NOT_COMPLETED_STATUS');
146: p_x_return_status := FND_API.G_RET_STS_ERROR;
147: end if;
148: END Validate_Required_Information;
149:
150: -- Validate:

Line 164: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

160: l_max_op_end_date DATE;
161: l_min_op_start_date DATE;
162:
163: BEGIN
164: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
165: return;
166: END IF;
167:
168: select max(actual_end_date) into l_max_op_end_date

Line 180: p_x_return_status := FND_API.G_RET_STS_ERROR;

176: IF (l_max_op_end_date is not null AND
177: p_actual_end_date is not null AND
178: l_max_op_end_date > p_actual_end_date) then
179: FND_MESSAGE.set_name('EAM', 'EAM_WO_ACTUAL_END_DATE');
180: p_x_return_status := FND_API.G_RET_STS_ERROR;
181: return;
182: end IF;
183:
184: IF (l_min_op_start_date is not null AND

Line 188: p_x_return_status := FND_API.G_RET_STS_ERROR;

184: IF (l_min_op_start_date is not null AND
185: p_actual_start_date is not null AND
186: l_min_op_start_date < p_actual_start_date) then
187: FND_MESSAGE.set_name('EAM', 'EAM_WO_ACTUAL_START_DATE');
188: p_x_return_status := FND_API.G_RET_STS_ERROR;
189: end IF;
190: END Validate_Actl_Dates_vs_Optns;
191:
192: -- Validate:

Line 203: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

199: p_organization_id IN NUMBER) IS
200:
201: l_min_open_period_start_date DATE;
202: BEGIN
203: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
204: return;
205: END IF;
206: select nvl(min(period_start_date),sysdate+2)
207: into l_min_open_period_start_date

Line 213: p_x_return_status := FND_API.G_RET_STS_ERROR;

209: where organization_id = p_organization_id
210: and open_flag = 'Y';
211: if (p_actual_start_date < l_min_open_period_start_date) then
212: FND_MESSAGE.set_name('EAM', 'EAM_MIN_WO_ACTUAL_START_DATE');
213: p_x_return_status := FND_API.G_RET_STS_ERROR;
214: end if;
215: END Validate_Date_vs_Acct_Periods;*/
216:
217:

Line 225: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

221: p_organization_id IN NUMBER) IS
222:
223: l_min_open_period_start_date DATE;
224: BEGIN
225: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
226: return;
227: END IF;
228: select nvl(min(period_start_date),sysdate+2)
229: into l_min_open_period_start_date

Line 235: p_x_return_status := FND_API.G_RET_STS_ERROR;

231: where organization_id = p_organization_id
232: and open_flag = 'Y';
233: if (p_transaction_date < l_min_open_period_start_date) then
234: FND_MESSAGE.set_name('EAM', 'EAM_TRANSACTION_DATE_INVALID');
235: p_x_return_status := FND_API.G_RET_STS_ERROR;
236: end if;
237: END Validate_Date_vs_Acct_Periods;
238:
239:

Line 252: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

248: x_actual_end_date OUT NOCOPY DATE) IS
249:
250: l_max_tran_date DATE;
251: BEGIN
252: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
253: return;
254: END IF;
255: select max(transaction_date) into l_max_tran_date
256: from eam_job_completion_txns where transaction_type = 1

Line 277: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

273:
274: l_asset_inventory NUMBER;
275: BEGIN
276: -- dbms_output.put_line('p_instance_id is '||p_instance_id);
277: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
278: return;
279: END IF;
280: IF (p_inventory_item_info.COUNT = 0) THEN
281: FND_MESSAGE.set_name('EAM', 'EAM_INVENTORY_NULL');

Line 282: p_x_return_status := FND_API.G_RET_STS_ERROR;

278: return;
279: END IF;
280: IF (p_inventory_item_info.COUNT = 0) THEN
281: FND_MESSAGE.set_name('EAM', 'EAM_INVENTORY_NULL');
282: p_x_return_status := FND_API.G_RET_STS_ERROR;
283: RETURN;
284: END IF;
285:
286: FOR i IN 1..p_inventory_item_info.COUNT LOOP

Line 289: p_x_return_status := FND_API.G_RET_STS_ERROR;

285:
286: FOR i IN 1..p_inventory_item_info.COUNT LOOP
287: IF p_inventory_item_info(i).subinventory IS NULL THEN
288: FND_MESSAGE.set_name('EAM', 'EAM_INVENTORY_NULL');
289: p_x_return_status := FND_API.G_RET_STS_ERROR;
290: RETURN;
291: END IF;
292: END LOOP;
293:

Line 298: p_x_return_status := FND_API.G_RET_STS_ERROR;

294: -- p_inventory_item_info can have multi-lines only if if this is service work order
295: if (p_instance_id is null) then
296: if (p_inventory_item_info.COUNT > 1) then
297: FND_MESSAGE.set_name('EAM', 'EAM_MULTIPLE_INVENTORY');
298: p_x_return_status := FND_API.G_RET_STS_ERROR;
299: return;
300: else
301: -- check for expense inventory
302: select asset_inventory into l_asset_inventory

Line 308: p_x_return_status := FND_API.G_RET_STS_ERROR;

304: where secondary_inventory_name = p_inventory_item_info(1).subinventory
305: and organization_id = p_organization_id;
306: IF (NOT l_asset_inventory = 2) THEN
307: FND_MESSAGE.set_name('EAM', 'EAM_EXPENSE_SUBINVENTORY');
308: p_x_return_status := FND_API.G_RET_STS_ERROR;
309: return;
310: END IF;
311: end if;
312: end if;

Line 332: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

328: l_inventory_location_id NUMBER;
329: l_count NUMBER;
330: l_subinventory VARCHAR2(100);
331: BEGIN
332: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
333: return;
334: END IF;
335: if p_asset_group_id IS NOT NULL then
336: select location_control_code into l_location_control_code

Line 356: p_x_return_status := FND_API.G_RET_STS_ERROR;

352: if (l_location_control_code in (2,3) or l_locator_type in (2,3)
353: or l_stock_locator_control_code in (2,3)) then
354: if l_locator is null then
355: FND_MESSAGE.set_name('EAM', 'EAM_LOCATOR_ID_IS_NULL');
356: p_x_return_status := FND_API.G_RET_STS_ERROR;
357: return;
358: end if;
359: end if;
360: if l_locator is not null then

Line 366: p_x_return_status := FND_API.G_RET_STS_ERROR;

362: from mtl_item_locations
363: where organization_id = p_organization_id and inventory_location_id = l_locator and subinventory_code = l_subinventory;
364: if (l_count = 0) then
365: FND_MESSAGE.set_name('EAM', 'EAM_NOT_VALID_LOCATOR_ID');
366: p_x_return_status := FND_API.G_RET_STS_ERROR;
367: return;
368: end if;
369: end if;
370: end loop;

Line 376: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

372: end Validate_Locator_Control;
373:
374: PROCEDURE Complete_Work_Order(
375: p_api_version IN NUMBER,
376: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
377: p_commit IN VARCHAR2 := fnd_api.g_false,
378: x_return_status OUT NOCOPY VARCHAR2,
379: x_msg_count OUT NOCOPY NUMBER,
380: x_msg_data OUT NOCOPY VARCHAR2,

Line 377: p_commit IN VARCHAR2 := fnd_api.g_false,

373:
374: PROCEDURE Complete_Work_Order(
375: p_api_version IN NUMBER,
376: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
377: p_commit IN VARCHAR2 := fnd_api.g_false,
378: x_return_status OUT NOCOPY VARCHAR2,
379: x_msg_count OUT NOCOPY NUMBER,
380: x_msg_data OUT NOCOPY VARCHAR2,
381: p_wip_entity_id IN NUMBER,

Line 431: IF FND_API.to_Boolean(p_init_msg_list) THEN

427:
428: -- Standard begin of API savepoint
429: SAVEPOINT Complete_Work_Order_PVT;
430: -- Check p_init_msg_list
431: IF FND_API.to_Boolean(p_init_msg_list) THEN
432: FND_MSG_PUB.initialize;
433: END IF;
434:
435: -- Initialize API return status to success

Line 436: x_return_status := FND_API.G_RET_STS_SUCCESS;

432: FND_MSG_PUB.initialize;
433: END IF;
434:
435: -- Initialize API return status to success
436: x_return_status := FND_API.G_RET_STS_SUCCESS;
437:
438: -- Initialize local date variables
439: l_actual_start_date := p_actual_start_date;
440: l_actual_end_date := p_actual_end_date;

Line 526: if x_return_status = FND_API.G_RET_STS_SUCCESS then

522: l_actual_start_date,
523: l_actual_end_date);
524: END IF;
525:
526: if x_return_status = FND_API.G_RET_STS_SUCCESS then
527:
528:
529: -- Bug 3676937 . For CMRO work orders need not check completion subinventory
530: select maintenance_object_source, rebuild_item_id

Line 600: x_return_status := FND_API.G_RET_STS_ERROR;

596: if l_errCode <> 0 then -- there was an error
597:
598: -- dbms_output.put_line('caught error in call to eam_completion.complete_work_order');
599: -- dbms_output.put_line('errMsg: '||l_errMsg);
600: x_return_status := FND_API.G_RET_STS_ERROR;
601: FND_MESSAGE.set_name('EAM', 'EAM_INTERNAL_ERROR');
602: end if;
603: end if;
604:

Line 605: if (x_return_status = FND_API.G_RET_STS_ERROR) then

601: FND_MESSAGE.set_name('EAM', 'EAM_INTERNAL_ERROR');
602: end if;
603: end if;
604:
605: if (x_return_status = FND_API.G_RET_STS_ERROR) then
606: FND_MSG_PUB.Add;
607: FND_MSG_PUB.Count_And_Get(
608: p_count => x_msg_count,
609: p_data => x_msg_data);

Line 612: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

608: p_count => x_msg_count,
609: p_data => x_msg_data);
610: end if;
611: EXCEPTION
612: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
613: -- dbms_output.put_line('unexpected error :'||FND_MSG_PUB.Get);
614: -- dbms_output.put_line('unexpected error :'||FND_MESSAGE.get);
615: ROLLBACK TO Complete_Work_Order_PVT;
616: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 616: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

612: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
613: -- dbms_output.put_line('unexpected error :'||FND_MSG_PUB.Get);
614: -- dbms_output.put_line('unexpected error :'||FND_MESSAGE.get);
615: ROLLBACK TO Complete_Work_Order_PVT;
616: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
617: FND_MSG_PUB.Count_And_Get(
618: p_count => x_msg_count,
619: p_data => x_msg_data);
620: WHEN NO_DATA_FOUND THEN

Line 625: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

621: -- dbms_output.put_line('unexpected error :'||FND_MSG_PUB.Get);
622: -- dbms_output.put_line('unexpected error :'||FND_MESSAGE.get);
623: -- dbms_output.put_line('no data found');
624: ROLLBACK TO Complete_Work_Order_PVT;
625: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
626: FND_MSG_PUB.Count_And_Get(
627: p_count => x_msg_count,
628: p_data => x_msg_data);
629: WHEN OTHERS THEN

Line 633: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

629: WHEN OTHERS THEN
630: -- dbms_output.put_line('unexpected error :'||FND_MSG_PUB.Get);
631: -- dbms_output.put_line('unexpected error :'||FND_MESSAGE.get);
632: ROLLBACK TO Complete_Work_Order_PVT;
633: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
634: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
635: FND_MSG_PUB.Add_Exc_Msg(
636: G_PKG_NAME,
637: l_api_name

Line 647: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

643: END Complete_Work_Order;
644:
645: procedure complete_operation(
646: p_api_version IN NUMBER :=1.0,
647: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
648: p_commit IN VARCHAR2 := fnd_api.g_false,
649: x_return_status OUT NOCOPY VARCHAR2,
650: x_msg_count OUT NOCOPY NUMBER,
651: x_msg_data OUT NOCOPY VARCHAR2,

Line 648: p_commit IN VARCHAR2 := fnd_api.g_false,

644:
645: procedure complete_operation(
646: p_api_version IN NUMBER :=1.0,
647: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
648: p_commit IN VARCHAR2 := fnd_api.g_false,
649: x_return_status OUT NOCOPY VARCHAR2,
650: x_msg_count OUT NOCOPY NUMBER,
651: x_msg_data OUT NOCOPY VARCHAR2,
652: p_wip_entity_id IN NUMBER,

Line 706: IF FND_API.to_Boolean(p_init_msg_list) THEN

702: BEGIN
703: SAVEPOINT Complete_Operation_PVT;
704:
705: -- Check p_init_msg_list
706: IF FND_API.to_Boolean(p_init_msg_list) THEN
707: FND_MSG_PUB.initialize;
708: END IF;
709:
710: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 710: x_return_status := FND_API.G_RET_STS_SUCCESS;

706: IF FND_API.to_Boolean(p_init_msg_list) THEN
707: FND_MSG_PUB.initialize;
708: END IF;
709:
710: x_return_status := FND_API.G_RET_STS_SUCCESS;
711:
712: ----Begining of Transaction type and transaction date validation
713:
714: if (p_transaction_date is not null) then

Line 721: x_return_status := FND_API.G_RET_STS_ERROR;

717:
718: FND_MESSAGE.set_name('EAM', 'EAM_TXN_LATER_THAN_TODAY');
719: FND_MSG_PUB.Add;
720: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_TXN_LATER_THAN_TODAY');
721: x_return_status := FND_API.G_RET_STS_ERROR;
722: end if;
723: end if;
724: -- dbms_output.put_line ('past txn type ...');
725:

Line 772: x_return_status := FND_API.G_RET_STS_ERROR;

768:
769: FND_MESSAGE.set_name('EAM', 'EAM_INVALID_TXN_TYPE');
770: FND_MSG_PUB.Add;
771: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_INVALID_TXN_TYPE') ;
772: x_return_status := FND_API.G_RET_STS_ERROR;
773:
774: elsif ((l_operation_completed <> 'Y') and (p_transaction_type =2)) then
775:
776: FND_MESSAGE.set_name('EAM', 'EAM_INVALID_TXN_TYPE');

Line 779: x_return_status := FND_API.G_RET_STS_ERROR;

775:
776: FND_MESSAGE.set_name('EAM', 'EAM_INVALID_TXN_TYPE');
777: FND_MSG_PUB.Add;
778: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_INVALID_TXN_TYPE') ;
779: x_return_status := FND_API.G_RET_STS_ERROR;
780:
781: end if;
782:
783: end if;

Line 821: x_return_status := FND_API.G_RET_STS_ERROR;

817: if (p_actual_duration is not null) and (p_actual_duration <> l_actual_duration ) then
818: FND_MESSAGE.set_name('EAM', 'EAM_INCORRECT_DURATION');
819: FND_MSG_PUB.Add;
820: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_INCORRECT_DURATION') ;
821: x_return_status := FND_API.G_RET_STS_ERROR;
822:
823: end if;
824: elsif ((l_actual_duration is not null) and (l_actual_start_date is not null)) then
825: l_actual_end_date := ((p_actual_start_date) + (p_actual_duration / 24));

Line 839: x_return_status := FND_API.G_RET_STS_ERROR;

835: if l_actual_duration < 0 then
836: FND_MESSAGE.set_name('EAM', 'EAM_NEGATIVE_DURATION');
837: FND_MSG_PUB.Add;
838: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_NEGATIVE_DURATION') ;
839: x_return_status := FND_API.G_RET_STS_ERROR;
840:
841: end if;
842: end if;
843:

Line 858: x_return_status := FND_API.G_RET_STS_ERROR;

854: if l_actual_end_date > sysdate then
855: FND_MESSAGE.set_name('EAM', 'EAM_END_LATER_THAN_TODAY');
856: FND_MSG_PUB.Add;
857: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_END_LATER_THAN_TODAY ') ;
858: x_return_status := FND_API.G_RET_STS_ERROR;
859: end if;
860:
861: if (p_transaction_date < l_open_acct_per_date) then
862: FND_MESSAGE.set_name('EAM', 'EAM_MIN_OP_ACTUAL_START_DATE');

Line 865: x_return_status := FND_API.G_RET_STS_ERROR;

861: if (p_transaction_date < l_open_acct_per_date) then
862: FND_MESSAGE.set_name('EAM', 'EAM_MIN_OP_ACTUAL_START_DATE');
863: FND_MSG_PUB.Add;
864: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_MIN_OP_ACTUAL_START_DATE') ;
865: x_return_status := FND_API.G_RET_STS_ERROR;
866:
867: end if;
868:
869: end if;

Line 894: x_return_status := FND_API.G_RET_STS_ERROR;

890: if (p_shutdown_duration is not null) and (p_shutdown_duration <> l_shutdown_duration ) then
891: FND_MESSAGE.set_name('EAM', 'EAM_INCORRECT_SHUT_DUR');
892: FND_MSG_PUB.Add;
893: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_INCORRECT_SHUT_DUR') ;
894: x_return_status := FND_API.G_RET_STS_ERROR;
895:
896: end if;
897: elsif ((l_shutdown_duration is not null) and (l_shutdown_start_date is not null)) then
898: l_shutdown_end_date := ((p_shutdown_start_date) + (p_shutdown_duration / 24));

Line 913: x_return_status := FND_API.G_RET_STS_ERROR;

909: if l_shutdown_duration < 0 then
910: FND_MESSAGE.set_name('EAM', 'EAM_SHUTDOWN_DUR_NEGATIVE');
911: FND_MSG_PUB.Add;
912: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_SHUTDOWN_DUR_NEGATIVE') ;
913: x_return_status := FND_API.G_RET_STS_ERROR;
914:
915: end if;
916: end if;
917:

Line 924: x_return_status := FND_API.G_RET_STS_ERROR;

920: if l_shutdown_end_date > sysdate then
921: FND_MESSAGE.set_name('EAM', 'EAM_SHUT_GREATER_SYSDATE');
922: FND_MSG_PUB.Add;
923: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_SHUT_GREATER_SYSDATE ') ;
924: x_return_status := FND_API.G_RET_STS_ERROR;
925: end if;
926:
927:
928: end if;

Line 943: x_return_status := FND_API.G_RET_STS_ERROR;

939: FND_MSG_PUB.Add;
940: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_SHUT_END_BEFORE_START ') ;
941:
942:
943: x_return_status := FND_API.G_RET_STS_ERROR;
944:
945: end if;
946:
947: /*

Line 963: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

959:
960: */
961:
962:
963: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
964: eam_op_comp.op_comp(
965: x_err_code => l_err_code,
966: x_err_msg => l_err_msg,
967:

Line 1000: x_return_status := FND_API.G_RET_STS_ERROR;

996: -- call eam_op_comp.op_comp to
997: -- insert into eam_op_completion_txns, update wip_operations
998:
999: if l_err_code = 1 then -- there was an error
1000: x_return_status := FND_API.G_RET_STS_ERROR;
1001: FND_MSG_PUB.Add;
1002: end if;
1003: end if;
1004:

Line 1005: if (x_return_status = FND_API.G_RET_STS_ERROR) then

1001: FND_MSG_PUB.Add;
1002: end if;
1003: end if;
1004:
1005: if (x_return_status = FND_API.G_RET_STS_ERROR) then
1006: FND_MSG_PUB.Count_And_Get(
1007: p_count => x_msg_count,
1008: p_data => x_msg_data);
1009: end if;

Line 1011: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1007: p_count => x_msg_count,
1008: p_data => x_msg_data);
1009: end if;
1010: EXCEPTION
1011: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1012: ROLLBACK TO Complete_Operation_PVT;
1013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1014: FND_MSG_PUB.Count_And_Get(
1015: p_count => x_msg_count,

Line 1013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1009: end if;
1010: EXCEPTION
1011: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1012: ROLLBACK TO Complete_Operation_PVT;
1013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1014: FND_MSG_PUB.Count_And_Get(
1015: p_count => x_msg_count,
1016: p_data => x_msg_data);
1017: WHEN OTHERS THEN

Line 1019: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1015: p_count => x_msg_count,
1016: p_data => x_msg_data);
1017: WHEN OTHERS THEN
1018: ROLLBACK TO Complete_Operation_PVT;
1019: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1020: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1021: FND_MSG_PUB.Add_Exc_Msg(
1022: G_PKG_NAME,
1023: l_api_name