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 275: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

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

Line 280: p_x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 287: p_x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 296: p_x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 306: p_x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 330: IF NOT p_x_return_status = FND_API.G_RET_STS_SUCCESS THEN

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

Line 354: p_x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 364: p_x_return_status := FND_API.G_RET_STS_ERROR;

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

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

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

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

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

Line 429: IF FND_API.to_Boolean(p_init_msg_list) THEN

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

Line 434: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 524: if x_return_status = FND_API.G_RET_STS_SUCCESS then

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

Line 598: x_return_status := FND_API.G_RET_STS_ERROR;

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

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

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

Line 610: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

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

Line 614: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

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

Line 623: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

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

Line 631: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

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

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

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

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

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

Line 704: IF FND_API.to_Boolean(p_init_msg_list) THEN

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

Line 708: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 719: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 770: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 777: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 819: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 837: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 856: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 863: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 892: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 911: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 922: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 941: x_return_status := FND_API.G_RET_STS_ERROR;

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

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

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

Line 998: x_return_status := FND_API.G_RET_STS_ERROR;

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

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

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

Line 1009: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

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

Line 1011: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

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

Line 1017: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

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