DBA Data[Home] [Help]

APPS.AMW_CONTROL_PVT dependencies on FND_API

Line 21: ---G_FALSE VARCHAr2(1) := FND_API.G_FALSE;

17: g_user_id NUMBER := fnd_global.user_id;
18: g_login_id NUMBER := fnd_global.conc_login_id;
19: G_OBJ_TYPE CONSTANT VARCHAR2(80) := AMW_UTILITY_PVT.GET_LOOKUP_MEANING('AMW_OBJECT_TYPE','CTRL');
20:
21: ---G_FALSE VARCHAr2(1) := FND_API.G_FALSE;
22: ---G_TRUE VARCHAr2(1) := FND_API.G_TRUE;
23:
24: -- This procedure has been created by Developer to validate the Business level logic
25: -- before calling the table handlers to do the actual loading of rows

Line 22: ---G_TRUE VARCHAr2(1) := FND_API.G_TRUE;

18: g_login_id NUMBER := fnd_global.conc_login_id;
19: G_OBJ_TYPE CONSTANT VARCHAR2(80) := AMW_UTILITY_PVT.GET_LOOKUP_MEANING('AMW_OBJECT_TYPE','CTRL');
20:
21: ---G_FALSE VARCHAr2(1) := FND_API.G_FALSE;
22: ---G_TRUE VARCHAr2(1) := FND_API.G_TRUE;
23:
24: -- This procedure has been created by Developer to validate the Business level logic
25: -- before calling the table handlers to do the actual loading of rows
26: PROCEDURE load_control (

Line 30: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

26: PROCEDURE load_control (
27: p_api_version_number IN NUMBER,
28: p_init_msg_list IN VARCHAR2 := g_false,
29: p_commit IN VARCHAR2 := g_false,
30: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
31: x_return_status OUT nocopy VARCHAR2,
32: x_msg_count OUT nocopy NUMBER,
33: x_msg_data OUT nocopy VARCHAR2,
34: ---x_create_control_rev_id out number,

Line 140: IF NOT fnd_api.compatible_api_call (l_api_version_number,

136: -- Standard Start of API savepoint
137: SAVEPOINT load_control_pvt;
138: ---fnd_file.put_line (fnd_file.LOG,'Amw_Control_Pvt.Load_Control: Start');
139: -- Standard call to check for call compatibility.
140: IF NOT fnd_api.compatible_api_call (l_api_version_number,
141: p_api_version_number,
142: l_api_name,
143: g_pkg_name
144: ) THEN

Line 145: RAISE fnd_api.g_exc_unexpected_error;

141: p_api_version_number,
142: l_api_name,
143: g_pkg_name
144: ) THEN
145: RAISE fnd_api.g_exc_unexpected_error;
146: END IF;
147: -- Initialize message list if p_init_msg_list is set to TRUE.
148: IF fnd_api.to_boolean (p_init_msg_list) THEN
149: fnd_msg_pub.initialize;

Line 148: IF fnd_api.to_boolean (p_init_msg_list) THEN

144: ) THEN
145: RAISE fnd_api.g_exc_unexpected_error;
146: END IF;
147: -- Initialize message list if p_init_msg_list is set to TRUE.
148: IF fnd_api.to_boolean (p_init_msg_list) THEN
149: fnd_msg_pub.initialize;
150: END IF;
151: -- Debug Message
152: ---amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');

Line 155: x_return_status := fnd_api.g_ret_sts_success;

151: -- Debug Message
152: ---amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');
153: amw_utility_pvt.debug_message (l_api_name || ' start');
154: -- Initialize API return status to SUCCESS
155: x_return_status := fnd_api.g_ret_sts_success;
156: l_control_rec := p_control_rec;
157: ---l_control_rec.requestor_id := p_party_id;
158: ----check if this control that user is trying to upload
159: ----exists in the application or not.

Line 170: --RAISE FND_API.G_EXC_ERROR;

166: IF (l_get_name.NAME = p_control_rec.NAME) THEN
167: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
168: p_token_name => 'ITEM',
169: p_token_value => 'Control_Name');
170: --RAISE FND_API.G_EXC_ERROR;
171: l_control_exists := 1;
172: END IF;
173: END LOOP;
174: CLOSE get_name;

Line 185: x_return_status := fnd_api.g_ret_sts_error;

181: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_INVALID_STATUS',
182: p_token_name => 'OBJ_TYPE',
183: p_token_value => G_OBJ_TYPE);
184:
185: x_return_status := fnd_api.g_ret_sts_error;
186: RAISE fnd_api.g_exc_error;
187: ELSIF (l_control_rec.approval_status IS NULL) THEN
188: l_control_rec.approval_status := 'D';
189: END IF;

Line 186: RAISE fnd_api.g_exc_error;

182: p_token_name => 'OBJ_TYPE',
183: p_token_value => G_OBJ_TYPE);
184:
185: x_return_status := fnd_api.g_ret_sts_error;
186: RAISE fnd_api.g_exc_error;
187: ELSIF (l_control_rec.approval_status IS NULL) THEN
188: l_control_rec.approval_status := 'D';
189: END IF;
190:

Line 276: x_return_status := fnd_api.g_ret_sts_error;

272: amw_utility_pvt.error_message(p_message_name => 'AMW_UNEXPECT_ERROR',
273: p_token_name => 'OBJ_TYPE',
274: p_token_value => G_OBJ_TYPE);
275:
276: x_return_status := fnd_api.g_ret_sts_error;
277: RAISE fnd_api.g_exc_error;
278: ELSIF (l_revision_row_found = 1) THEN ----elsif for revision status
279: fnd_file.put_line (fnd_file.LOG,'>>>>>>>>>>> l_revision_row_found: '||l_revision_row_found);
280: --do an update for this row

Line 277: RAISE fnd_api.g_exc_error;

273: p_token_name => 'OBJ_TYPE',
274: p_token_value => G_OBJ_TYPE);
275:
276: x_return_status := fnd_api.g_ret_sts_error;
277: RAISE fnd_api.g_exc_error;
278: ELSIF (l_revision_row_found = 1) THEN ----elsif for revision status
279: fnd_file.put_line (fnd_file.LOG,'>>>>>>>>>>> l_revision_row_found: '||l_revision_row_found);
280: --do an update for this row
281: l_control_rec.latest_revision_flag := 'N';

Line 289: x_return_status := fnd_api.g_ret_sts_error;

285: amw_utility_pvt.error_message(p_message_name => 'AMW_INVALID_STATUS',
286: p_token_name => 'OBJ_TYPE',
287: p_token_value => G_OBJ_TYPE);
288:
289: x_return_status := fnd_api.g_ret_sts_error;
290: RAISE fnd_api.g_exc_error;
291: END IF;
292: IF (l_approval_status = 'P') THEN
293: amw_utility_pvt.error_message(p_message_name => 'AMW_PENDING_CHANGE_ERROR',

Line 290: RAISE fnd_api.g_exc_error;

286: p_token_name => 'OBJ_TYPE',
287: p_token_value => G_OBJ_TYPE);
288:
289: x_return_status := fnd_api.g_ret_sts_error;
290: RAISE fnd_api.g_exc_error;
291: END IF;
292: IF (l_approval_status = 'P') THEN
293: amw_utility_pvt.error_message(p_message_name => 'AMW_PENDING_CHANGE_ERROR',
294: p_token_name => 'OBJ_TYPE',

Line 297: x_return_status := fnd_api.g_ret_sts_error;

293: amw_utility_pvt.error_message(p_message_name => 'AMW_PENDING_CHANGE_ERROR',
294: p_token_name => 'OBJ_TYPE',
295: p_token_value => G_OBJ_TYPE);
296:
297: x_return_status := fnd_api.g_ret_sts_error;
298: RAISE fnd_api.g_exc_error;
299: END IF;
300: IF ((l_approval_status = 'R' OR l_approval_status = 'A')) THEN
301: fnd_file.put_line (fnd_file.LOG,'>>>>>>>>>>> l_approval_status: '||l_approval_status);

Line 298: RAISE fnd_api.g_exc_error;

294: p_token_name => 'OBJ_TYPE',
295: p_token_value => G_OBJ_TYPE);
296:
297: x_return_status := fnd_api.g_ret_sts_error;
298: RAISE fnd_api.g_exc_error;
299: END IF;
300: IF ((l_approval_status = 'R' OR l_approval_status = 'A')) THEN
301: fnd_file.put_line (fnd_file.LOG,'>>>>>>>>>>> l_approval_status: '||l_approval_status);
302: ---and l_control_rec.approval_status = 'D') then

Line 336: IF x_return_status = fnd_api.g_ret_sts_success THEN

332: x_msg_data => x_msg_data,
333: p_control_rec => update_control_rec,
334: x_object_version_number => l_object_version_number
335: );
336: IF x_return_status = fnd_api.g_ret_sts_success THEN
337: if(l_control_rec.approval_status = 'A')then
338: l_control_rec.curr_approved_flag := 'Y';
339: l_control_rec.approval_date := sysdate;
340: elsif(l_control_rec.approval_status = 'D')then

Line 380: RAISE fnd_api.g_exc_error;

376: amw_utility_pvt.error_message(p_message_name => 'AMW_UNEXPECT_ERROR',
377: p_token_name => 'OBJ_TYPE',
378: p_token_value => G_OBJ_TYPE);
379:
380: RAISE fnd_api.g_exc_error;
381: ELSIF (l_update_row_found = 1) THEN ----elsif for update status
382: fnd_file.put_line (fnd_file.LOG,'Inside L_Update_Row_Found = 1, l_control_rec.control_id: '||l_control_rec.control_id);
383: select count(*) into l_rev_count from amw_controls_b
384: where control_id=l_control_rec.control_id

Line 437: x_return_status := fnd_api.g_ret_sts_error;

433: IF (l_control_rec.approval_status = 'R') THEN
434: amw_utility_pvt.error_message(p_message_name => 'AMW_INVALID_STATUS',
435: p_token_name => 'OBJ_TYPE',
436: p_token_value => G_OBJ_TYPE);
437: x_return_status := fnd_api.g_ret_sts_error;
438: RAISE fnd_api.g_exc_error;
439: END IF;
440: fnd_file.put_line (fnd_file.LOG,'2 --> $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$');
441: update_control (p_api_version_number => l_api_version_number,

Line 438: RAISE fnd_api.g_exc_error;

434: amw_utility_pvt.error_message(p_message_name => 'AMW_INVALID_STATUS',
435: p_token_name => 'OBJ_TYPE',
436: p_token_value => G_OBJ_TYPE);
437: x_return_status := fnd_api.g_ret_sts_error;
438: RAISE fnd_api.g_exc_error;
439: END IF;
440: fnd_file.put_line (fnd_file.LOG,'2 --> $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$');
441: update_control (p_api_version_number => l_api_version_number,
442: p_init_msg_list => p_init_msg_list,

Line 465: WHEN fnd_api.g_exc_error THEN

461: amw_utility_pvt.debug_message (l_api_name || ' end');
462: -- Standard call to get message count and if count is 1, get message info.
463: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
464: EXCEPTION
465: WHEN fnd_api.g_exc_error THEN
466: ROLLBACK TO load_control_pvt;
467: x_return_status := fnd_api.g_ret_sts_error;
468: -- Standard call to get message count and if count=1, get the message
469: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 467: x_return_status := fnd_api.g_ret_sts_error;

463: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
464: EXCEPTION
465: WHEN fnd_api.g_exc_error THEN
466: ROLLBACK TO load_control_pvt;
467: x_return_status := fnd_api.g_ret_sts_error;
468: -- Standard call to get message count and if count=1, get the message
469: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
470: p_count => x_msg_count,
471: p_data => x_msg_data

Line 469: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

465: WHEN fnd_api.g_exc_error THEN
466: ROLLBACK TO load_control_pvt;
467: x_return_status := fnd_api.g_ret_sts_error;
468: -- Standard call to get message count and if count=1, get the message
469: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
470: p_count => x_msg_count,
471: p_data => x_msg_data
472: );
473: WHEN fnd_api.g_exc_unexpected_error THEN

Line 473: WHEN fnd_api.g_exc_unexpected_error THEN

469: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
470: p_count => x_msg_count,
471: p_data => x_msg_data
472: );
473: WHEN fnd_api.g_exc_unexpected_error THEN
474: ROLLBACK TO load_control_pvt;
475: x_return_status := fnd_api.g_ret_sts_unexp_error;
476: -- Standard call to get message count and if count=1, get the message
477: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 475: x_return_status := fnd_api.g_ret_sts_unexp_error;

471: p_data => x_msg_data
472: );
473: WHEN fnd_api.g_exc_unexpected_error THEN
474: ROLLBACK TO load_control_pvt;
475: x_return_status := fnd_api.g_ret_sts_unexp_error;
476: -- Standard call to get message count and if count=1, get the message
477: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
478: p_count => x_msg_count,
479: p_data => x_msg_data

Line 477: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

473: WHEN fnd_api.g_exc_unexpected_error THEN
474: ROLLBACK TO load_control_pvt;
475: x_return_status := fnd_api.g_ret_sts_unexp_error;
476: -- Standard call to get message count and if count=1, get the message
477: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
478: p_count => x_msg_count,
479: p_data => x_msg_data
480: );
481: WHEN OTHERS THEN

Line 483: x_return_status := fnd_api.g_ret_sts_unexp_error;

479: p_data => x_msg_data
480: );
481: WHEN OTHERS THEN
482: ROLLBACK TO load_control_pvt;
483: x_return_status := fnd_api.g_ret_sts_unexp_error;
484: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
485: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
486: END IF;
487: -- Standard call to get message count and if count=1, get the message

Line 488: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

484: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
485: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
486: END IF;
487: -- Standard call to get message count and if count=1, get the message
488: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
489: p_count => x_msg_count,
490: p_data => x_msg_data
491: );
492: END load_control;

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

492: END load_control;
493: -- Hint: Primary key needs to be returned.
494: PROCEDURE create_control (
495: p_api_version_number IN NUMBER,
496: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
497: p_commit IN VARCHAR2 := fnd_api.g_false,
498: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
499: x_return_status OUT nocopy VARCHAR2,
500: x_msg_count OUT nocopy NUMBER,

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

493: -- Hint: Primary key needs to be returned.
494: PROCEDURE create_control (
495: p_api_version_number IN NUMBER,
496: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
497: p_commit IN VARCHAR2 := fnd_api.g_false,
498: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
499: x_return_status OUT nocopy VARCHAR2,
500: x_msg_count OUT nocopy NUMBER,
501: x_msg_data OUT nocopy VARCHAR2,

Line 498: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

494: PROCEDURE create_control (
495: p_api_version_number IN NUMBER,
496: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
497: p_commit IN VARCHAR2 := fnd_api.g_false,
498: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
499: x_return_status OUT nocopy VARCHAR2,
500: x_msg_count OUT nocopy NUMBER,
501: x_msg_data OUT nocopy VARCHAR2,
502: p_control_rec IN control_rec_type,

Line 538: IF NOT fnd_api.compatible_api_call (l_api_version_number,

534: BEGIN
535: -- Standard Start of API savepoint
536: SAVEPOINT create_control_pvt;
537: -- Standard call to check for call compatibility.
538: IF NOT fnd_api.compatible_api_call (l_api_version_number,
539: p_api_version_number,
540: l_api_name,
541: g_pkg_name
542: ) THEN

Line 543: RAISE fnd_api.g_exc_unexpected_error;

539: p_api_version_number,
540: l_api_name,
541: g_pkg_name
542: ) THEN
543: RAISE fnd_api.g_exc_unexpected_error;
544: END IF;
545: -- Initialize message list if p_init_msg_list is set to TRUE.
546: IF fnd_api.to_boolean (p_init_msg_list) THEN
547: fnd_msg_pub.initialize;

Line 546: IF fnd_api.to_boolean (p_init_msg_list) THEN

542: ) THEN
543: RAISE fnd_api.g_exc_unexpected_error;
544: END IF;
545: -- Initialize message list if p_init_msg_list is set to TRUE.
546: IF fnd_api.to_boolean (p_init_msg_list) THEN
547: fnd_msg_pub.initialize;
548: END IF;
549: -- Debug Message
550: ---amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');

Line 553: x_return_status := fnd_api.g_ret_sts_success;

549: -- Debug Message
550: ---amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');
551: amw_utility_pvt.debug_message (l_api_name || 'start');
552: -- Initialize API return status to SUCCESS
553: x_return_status := fnd_api.g_ret_sts_success;
554: -- Local variable initialization
555: l_control_rec := p_control_rec;
556: ---check and create control_rev_id
557: ---IF l_control_rec.CONTROL_REV_ID IS NULL then ---OR l_control_rec.CONTROL_REV_ID = FND_API.g_miss_num THEN

Line 557: ---IF l_control_rec.CONTROL_REV_ID IS NULL then ---OR l_control_rec.CONTROL_REV_ID = FND_API.g_miss_num THEN

553: x_return_status := fnd_api.g_ret_sts_success;
554: -- Local variable initialization
555: l_control_rec := p_control_rec;
556: ---check and create control_rev_id
557: ---IF l_control_rec.CONTROL_REV_ID IS NULL then ---OR l_control_rec.CONTROL_REV_ID = FND_API.g_miss_num THEN
558: IF l_control_rev_id IS NULL THEN
559: ---OR l_control_rec.CONTROL_REV_ID = FND_API.g_miss_num THEN
560: ---LOOP
561: l_dummy := NULL;

Line 559: ---OR l_control_rec.CONTROL_REV_ID = FND_API.g_miss_num THEN

555: l_control_rec := p_control_rec;
556: ---check and create control_rev_id
557: ---IF l_control_rec.CONTROL_REV_ID IS NULL then ---OR l_control_rec.CONTROL_REV_ID = FND_API.g_miss_num THEN
558: IF l_control_rev_id IS NULL THEN
559: ---OR l_control_rec.CONTROL_REV_ID = FND_API.g_miss_num THEN
560: ---LOOP
561: l_dummy := NULL;
562: OPEN c_rev_id;
563: FETCH c_rev_id

Line 576: OR l_control_rec.control_id = fnd_api.g_miss_num THEN

572: ---END LOOP;
573: END IF;
574: ---check and create control_id
575: IF l_control_rec.control_id IS NULL
576: OR l_control_rec.control_id = fnd_api.g_miss_num THEN
577: ---LOOP
578: l_dummy := NULL;
579: OPEN c_id;
580: FETCH c_id

Line 605: RAISE fnd_api.g_exc_error;

601: -- Validate Environment
602: -- =========================================================================
603: IF fnd_global.user_id IS NULL THEN
604: amw_utility_pvt.error_message(p_message_name => 'USER_PROFILE_MISSING');
605: RAISE fnd_api.g_exc_error;
606: END IF;
607: IF (p_validation_level >= fnd_api.g_valid_level_full) THEN
608: -- Debug message
609: amw_utility_pvt.debug_message ('Private API: Validate_Control');

Line 607: IF (p_validation_level >= fnd_api.g_valid_level_full) THEN

603: IF fnd_global.user_id IS NULL THEN
604: amw_utility_pvt.error_message(p_message_name => 'USER_PROFILE_MISSING');
605: RAISE fnd_api.g_exc_error;
606: END IF;
607: IF (p_validation_level >= fnd_api.g_valid_level_full) THEN
608: -- Debug message
609: amw_utility_pvt.debug_message ('Private API: Validate_Control');
610: -- Invoke validation procedures
611: validate_control (p_mode => 'CREATE',

Line 613: p_init_msg_list => fnd_api.g_false,

609: amw_utility_pvt.debug_message ('Private API: Validate_Control');
610: -- Invoke validation procedures
611: validate_control (p_mode => 'CREATE',
612: p_api_version_number => 1.0,
613: p_init_msg_list => fnd_api.g_false,
614: p_validation_level => p_validation_level,
615: p_control_rec => l_control_rec,
616: x_return_status => x_return_status,
617: x_msg_count => x_msg_count,

Line 621: IF x_return_status <> fnd_api.g_ret_sts_success THEN

617: x_msg_count => x_msg_count,
618: x_msg_data => x_msg_data
619: );
620: END IF;
621: IF x_return_status <> fnd_api.g_ret_sts_success THEN
622: RAISE fnd_api.g_exc_error;
623: END IF;
624: -- Debug Message
625: amw_utility_pvt.debug_message ('Calling Create handler');

Line 622: RAISE fnd_api.g_exc_error;

618: x_msg_data => x_msg_data
619: );
620: END IF;
621: IF x_return_status <> fnd_api.g_ret_sts_success THEN
622: RAISE fnd_api.g_exc_error;
623: END IF;
624: -- Debug Message
625: amw_utility_pvt.debug_message ('Calling Create handler');
626: IF (l_control_rec.control_id IS NULL) THEN

Line 692: IF x_return_status <> fnd_api.g_ret_sts_success THEN

688: ,X_CONTROL_FREQUENCY => L_CONTROL_REC.CONTROL_FREQUENCY
689: --- NPANANDI 12.10.2004: ADDED BELOW FOR CTRL CLASSIFICATION
690: ,X_CLASSIFICATION => L_CONTROL_REC.CLASSIFICATION
691: );
692: IF x_return_status <> fnd_api.g_ret_sts_success THEN
693: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_EXE_ERROR',
694: p_token_name => 'OBJ_TYPE',
695: p_token_value => G_OBJ_TYPE);
696: RAISE fnd_api.g_exc_error;

Line 696: RAISE fnd_api.g_exc_error;

692: IF x_return_status <> fnd_api.g_ret_sts_success THEN
693: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_EXE_ERROR',
694: p_token_name => 'OBJ_TYPE',
695: p_token_value => G_OBJ_TYPE);
696: RAISE fnd_api.g_exc_error;
697: END IF;
698: --
699: -- End of API body
700: --

Line 702: IF fnd_api.to_boolean (p_commit) THEN

698: --
699: -- End of API body
700: --
701: -- Standard check for p_commit
702: IF fnd_api.to_boolean (p_commit) THEN
703: COMMIT WORK;
704: END IF;
705: x_control_rev_id := l_control_rec.control_rev_id;
706: -- Debug Message

Line 712: x_return_status := fnd_api.g_ret_sts_error;

708: -- Standard call to get message count and if count is 1, get message info.
709: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
710: EXCEPTION
711: WHEN amw_utility_pvt.resource_locked THEN
712: x_return_status := fnd_api.g_ret_sts_error;
713: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
714: WHEN fnd_api.g_exc_error THEN
715: ROLLBACK TO create_control_pvt;
716: x_return_status := fnd_api.g_ret_sts_error;

Line 714: WHEN fnd_api.g_exc_error THEN

710: EXCEPTION
711: WHEN amw_utility_pvt.resource_locked THEN
712: x_return_status := fnd_api.g_ret_sts_error;
713: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
714: WHEN fnd_api.g_exc_error THEN
715: ROLLBACK TO create_control_pvt;
716: x_return_status := fnd_api.g_ret_sts_error;
717: -- Standard call to get message count and if count=1, get the message
718: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 716: x_return_status := fnd_api.g_ret_sts_error;

712: x_return_status := fnd_api.g_ret_sts_error;
713: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
714: WHEN fnd_api.g_exc_error THEN
715: ROLLBACK TO create_control_pvt;
716: x_return_status := fnd_api.g_ret_sts_error;
717: -- Standard call to get message count and if count=1, get the message
718: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
719: p_count => x_msg_count,
720: p_data => x_msg_data

Line 718: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

714: WHEN fnd_api.g_exc_error THEN
715: ROLLBACK TO create_control_pvt;
716: x_return_status := fnd_api.g_ret_sts_error;
717: -- Standard call to get message count and if count=1, get the message
718: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
719: p_count => x_msg_count,
720: p_data => x_msg_data
721: );
722: WHEN fnd_api.g_exc_unexpected_error THEN

Line 722: WHEN fnd_api.g_exc_unexpected_error THEN

718: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
719: p_count => x_msg_count,
720: p_data => x_msg_data
721: );
722: WHEN fnd_api.g_exc_unexpected_error THEN
723: ROLLBACK TO create_control_pvt;
724: x_return_status := fnd_api.g_ret_sts_unexp_error;
725: -- Standard call to get message count and if count=1, get the message
726: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 724: x_return_status := fnd_api.g_ret_sts_unexp_error;

720: p_data => x_msg_data
721: );
722: WHEN fnd_api.g_exc_unexpected_error THEN
723: ROLLBACK TO create_control_pvt;
724: x_return_status := fnd_api.g_ret_sts_unexp_error;
725: -- Standard call to get message count and if count=1, get the message
726: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
727: p_count => x_msg_count,
728: p_data => x_msg_data

Line 726: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

722: WHEN fnd_api.g_exc_unexpected_error THEN
723: ROLLBACK TO create_control_pvt;
724: x_return_status := fnd_api.g_ret_sts_unexp_error;
725: -- Standard call to get message count and if count=1, get the message
726: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
727: p_count => x_msg_count,
728: p_data => x_msg_data
729: );
730: WHEN OTHERS THEN

Line 732: x_return_status := fnd_api.g_ret_sts_unexp_error;

728: p_data => x_msg_data
729: );
730: WHEN OTHERS THEN
731: ROLLBACK TO create_control_pvt;
732: x_return_status := fnd_api.g_ret_sts_unexp_error;
733: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
734: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
735: END IF;
736: -- Standard call to get message count and if count=1, get the message

Line 737: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

733: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
734: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
735: END IF;
736: -- Standard call to get message count and if count=1, get the message
737: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
738: p_count => x_msg_count,
739: p_data => x_msg_data
740: );
741: END create_control;

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

740: );
741: END create_control;
742: PROCEDURE update_control (
743: p_api_version_number IN NUMBER,
744: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
745: p_commit IN VARCHAR2 := fnd_api.g_false,
746: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
747: x_return_status OUT nocopy VARCHAR2,
748: x_msg_count OUT nocopy NUMBER,

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

741: END create_control;
742: PROCEDURE update_control (
743: p_api_version_number IN NUMBER,
744: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
745: p_commit IN VARCHAR2 := fnd_api.g_false,
746: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
747: x_return_status OUT nocopy VARCHAR2,
748: x_msg_count OUT nocopy NUMBER,
749: x_msg_data OUT nocopy VARCHAR2,

Line 746: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

742: PROCEDURE update_control (
743: p_api_version_number IN NUMBER,
744: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
745: p_commit IN VARCHAR2 := fnd_api.g_false,
746: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
747: x_return_status OUT nocopy VARCHAR2,
748: x_msg_count OUT nocopy NUMBER,
749: x_msg_data OUT nocopy VARCHAR2,
750: p_control_rec IN control_rec_type,

Line 773: IF NOT fnd_api.compatible_api_call (l_api_version_number,

769: BEGIN
770: -- Standard Start of API savepoint
771: SAVEPOINT update_control_pvt;
772: -- Standard call to check for call compatibility.
773: IF NOT fnd_api.compatible_api_call (l_api_version_number,
774: p_api_version_number,
775: l_api_name,
776: g_pkg_name
777: ) THEN

Line 778: RAISE fnd_api.g_exc_unexpected_error;

774: p_api_version_number,
775: l_api_name,
776: g_pkg_name
777: ) THEN
778: RAISE fnd_api.g_exc_unexpected_error;
779: END IF;
780: -- Initialize message list if p_init_msg_list is set to TRUE.
781: IF fnd_api.to_boolean (p_init_msg_list) THEN
782: fnd_msg_pub.initialize;

Line 781: IF fnd_api.to_boolean (p_init_msg_list) THEN

777: ) THEN
778: RAISE fnd_api.g_exc_unexpected_error;
779: END IF;
780: -- Initialize message list if p_init_msg_list is set to TRUE.
781: IF fnd_api.to_boolean (p_init_msg_list) THEN
782: fnd_msg_pub.initialize;
783: END IF;
784: -- Debug Message
785: ----amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');

Line 788: x_return_status := fnd_api.g_ret_sts_success;

784: -- Debug Message
785: ----amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');
786: amw_utility_pvt.debug_message (l_api_name || 'start');
787: -- Initialize API return status to SUCCESS
788: x_return_status := fnd_api.g_ret_sts_success;
789: -- Debug Message
790:
791: /*
792: OPEN c_get_Control( l_tar_control_rec.control_id);

Line 800: RAISE FND_API.G_EXC_ERROR;

796: If ( c_get_Control%NOTFOUND) THEN
797: AMW_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
798: p_token_name => 'INFO',
799: p_token_value => 'Control') ;
800: RAISE FND_API.G_EXC_ERROR;
801: END IF;
802: -- Debug Message
803: AMW_UTILITY_PVT.debug_message('Private API: - Close Cursor');
804: CLOSE c_get_Control;

Line 809: l_tar_control_rec.object_version_number = FND_API.G_MISS_NUM ) Then

805: */
806: --mpande comm
807: /*
808: If (l_tar_control_rec.object_version_number is NULL or
809: l_tar_control_rec.object_version_number = FND_API.G_MISS_NUM ) Then
810: AMW_Utility_PVT.Error_Message(p_message_name => 'API_VERSION_MISSING',
811: p_token_name => 'COLUMN',
812: p_token_value => 'Last_Update_Date') ;
813: raise FND_API.G_EXC_ERROR;

Line 813: raise FND_API.G_EXC_ERROR;

809: l_tar_control_rec.object_version_number = FND_API.G_MISS_NUM ) Then
810: AMW_Utility_PVT.Error_Message(p_message_name => 'API_VERSION_MISSING',
811: p_token_name => 'COLUMN',
812: p_token_value => 'Last_Update_Date') ;
813: raise FND_API.G_EXC_ERROR;
814: End if;
815: -- Check Whether record has been changed by someone else
816: If (l_tar_control_rec.object_version_number <> l_ref_control_rec.object_version_number) Then
817: AMW_Utility_PVT.Error_Message(p_message_name => 'API_RECORD_CHANGED',

Line 820: raise FND_API.G_EXC_ERROR;

816: If (l_tar_control_rec.object_version_number <> l_ref_control_rec.object_version_number) Then
817: AMW_Utility_PVT.Error_Message(p_message_name => 'API_RECORD_CHANGED',
818: p_token_name => 'INFO',
819: p_token_value => 'Control') ;
820: raise FND_API.G_EXC_ERROR;
821: End if;
822: */
823: l_control_rec.last_update_date := SYSDATE;
824: l_control_rec.last_updated_by := g_user_id;

Line 826: IF (p_validation_level >= fnd_api.g_valid_level_full) THEN

822: */
823: l_control_rec.last_update_date := SYSDATE;
824: l_control_rec.last_updated_by := g_user_id;
825: l_control_rec.last_update_login := g_login_id;
826: IF (p_validation_level >= fnd_api.g_valid_level_full) THEN
827: -- Debug message
828: amw_utility_pvt.debug_message ('Calling Validate_Control');
829: fnd_file.put_line (fnd_file.LOG,'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$');
830: fnd_file.put_line (fnd_file.LOG,'l_control_rec.control_classification: '||l_control_rec.classification);

Line 834: p_init_msg_list => fnd_api.g_false,

830: fnd_file.put_line (fnd_file.LOG,'l_control_rec.control_classification: '||l_control_rec.classification);
831: -- Invoke validation procedures
832: validate_control (p_mode => 'UPDATE',
833: p_api_version_number => 1,
834: p_init_msg_list => fnd_api.g_false,
835: p_validation_level => p_validation_level,
836: ----p_control_rec => p_control_rec,
837: p_control_rec => l_control_rec,
838: x_return_status => x_return_status,

Line 843: IF x_return_status <> fnd_api.g_ret_sts_success THEN

839: x_msg_count => x_msg_count,
840: x_msg_data => x_msg_data
841: );
842: END IF;
843: IF x_return_status <> fnd_api.g_ret_sts_success THEN
844: RAISE fnd_api.g_exc_error;
845: END IF;
846: -- Debug Message
847: amw_utility_pvt.debug_message ('Calling Update handler');

Line 844: RAISE fnd_api.g_exc_error;

840: x_msg_data => x_msg_data
841: );
842: END IF;
843: IF x_return_status <> fnd_api.g_ret_sts_success THEN
844: RAISE fnd_api.g_exc_error;
845: END IF;
846: -- Debug Message
847: amw_utility_pvt.debug_message ('Calling Update handler');
848: amw_controls_pkg.update_row

Line 910: IF fnd_api.to_boolean (p_commit) THEN

906: -- End of API body.
907: --
908:
909: -- Standard check for p_commit
910: IF fnd_api.to_boolean (p_commit) THEN
911: COMMIT WORK;
912: END IF;
913: -- Debug Message
914: --amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'end');

Line 920: x_return_status := fnd_api.g_ret_sts_error;

916: -- Standard call to get message count and if count is 1, get message info.
917: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
918: EXCEPTION
919: WHEN amw_utility_pvt.resource_locked THEN
920: x_return_status := fnd_api.g_ret_sts_error;
921: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
922: WHEN fnd_api.g_exc_error THEN
923: ROLLBACK TO update_control_pvt;
924: x_return_status := fnd_api.g_ret_sts_error;

Line 922: WHEN fnd_api.g_exc_error THEN

918: EXCEPTION
919: WHEN amw_utility_pvt.resource_locked THEN
920: x_return_status := fnd_api.g_ret_sts_error;
921: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
922: WHEN fnd_api.g_exc_error THEN
923: ROLLBACK TO update_control_pvt;
924: x_return_status := fnd_api.g_ret_sts_error;
925: -- Standard call to get message count and if count=1, get the message
926: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 924: x_return_status := fnd_api.g_ret_sts_error;

920: x_return_status := fnd_api.g_ret_sts_error;
921: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
922: WHEN fnd_api.g_exc_error THEN
923: ROLLBACK TO update_control_pvt;
924: x_return_status := fnd_api.g_ret_sts_error;
925: -- Standard call to get message count and if count=1, get the message
926: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
927: p_count => x_msg_count,
928: p_data => x_msg_data

Line 926: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

922: WHEN fnd_api.g_exc_error THEN
923: ROLLBACK TO update_control_pvt;
924: x_return_status := fnd_api.g_ret_sts_error;
925: -- Standard call to get message count and if count=1, get the message
926: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
927: p_count => x_msg_count,
928: p_data => x_msg_data
929: );
930: WHEN fnd_api.g_exc_unexpected_error THEN

Line 930: WHEN fnd_api.g_exc_unexpected_error THEN

926: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
927: p_count => x_msg_count,
928: p_data => x_msg_data
929: );
930: WHEN fnd_api.g_exc_unexpected_error THEN
931: ROLLBACK TO update_control_pvt;
932: x_return_status := fnd_api.g_ret_sts_unexp_error;
933: -- Standard call to get message count and if count=1, get the message
934: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 932: x_return_status := fnd_api.g_ret_sts_unexp_error;

928: p_data => x_msg_data
929: );
930: WHEN fnd_api.g_exc_unexpected_error THEN
931: ROLLBACK TO update_control_pvt;
932: x_return_status := fnd_api.g_ret_sts_unexp_error;
933: -- Standard call to get message count and if count=1, get the message
934: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
935: p_count => x_msg_count,
936: p_data => x_msg_data

Line 934: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

930: WHEN fnd_api.g_exc_unexpected_error THEN
931: ROLLBACK TO update_control_pvt;
932: x_return_status := fnd_api.g_ret_sts_unexp_error;
933: -- Standard call to get message count and if count=1, get the message
934: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
935: p_count => x_msg_count,
936: p_data => x_msg_data
937: );
938: WHEN OTHERS THEN

Line 940: x_return_status := fnd_api.g_ret_sts_unexp_error;

936: p_data => x_msg_data
937: );
938: WHEN OTHERS THEN
939: ROLLBACK TO update_control_pvt;
940: x_return_status := fnd_api.g_ret_sts_unexp_error;
941: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
942: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
943: END IF;
944: -- Standard call to get message count and if count=1, get the message

Line 945: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

941: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
942: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
943: END IF;
944: -- Standard call to get message count and if count=1, get the message
945: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
946: p_count => x_msg_count,
947: p_data => x_msg_data
948: );
949: END update_control;

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

948: );
949: END update_control;
950: PROCEDURE delete_control (
951: p_api_version_number IN NUMBER,
952: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
953: p_commit IN VARCHAR2 := fnd_api.g_false,
954: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
955: x_return_status OUT nocopy VARCHAR2,
956: x_msg_count OUT nocopy NUMBER,

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

949: END update_control;
950: PROCEDURE delete_control (
951: p_api_version_number IN NUMBER,
952: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
953: p_commit IN VARCHAR2 := fnd_api.g_false,
954: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
955: x_return_status OUT nocopy VARCHAR2,
956: x_msg_count OUT nocopy NUMBER,
957: x_msg_data OUT nocopy VARCHAR2,

Line 954: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

950: PROCEDURE delete_control (
951: p_api_version_number IN NUMBER,
952: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
953: p_commit IN VARCHAR2 := fnd_api.g_false,
954: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
955: x_return_status OUT nocopy VARCHAR2,
956: x_msg_count OUT nocopy NUMBER,
957: x_msg_data OUT nocopy VARCHAR2,
958: p_control_rev_id IN NUMBER,

Line 968: IF NOT fnd_api.compatible_api_call (l_api_version_number,

964: BEGIN
965: -- Standard Start of API savepoint
966: SAVEPOINT delete_control_pvt;
967: -- Standard call to check for call compatibility.
968: IF NOT fnd_api.compatible_api_call (l_api_version_number,
969: p_api_version_number,
970: l_api_name,
971: g_pkg_name
972: ) THEN

Line 973: RAISE fnd_api.g_exc_unexpected_error;

969: p_api_version_number,
970: l_api_name,
971: g_pkg_name
972: ) THEN
973: RAISE fnd_api.g_exc_unexpected_error;
974: END IF;
975: -- Initialize message list if p_init_msg_list is set to TRUE.
976: IF fnd_api.to_boolean (p_init_msg_list) THEN
977: fnd_msg_pub.initialize;

Line 976: IF fnd_api.to_boolean (p_init_msg_list) THEN

972: ) THEN
973: RAISE fnd_api.g_exc_unexpected_error;
974: END IF;
975: -- Initialize message list if p_init_msg_list is set to TRUE.
976: IF fnd_api.to_boolean (p_init_msg_list) THEN
977: fnd_msg_pub.initialize;
978: END IF;
979: -- Debug Message
980: ----amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');

Line 983: x_return_status := fnd_api.g_ret_sts_success;

979: -- Debug Message
980: ----amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');
981: amw_utility_pvt.debug_message (l_api_name || 'start');
982: -- Initialize API return status to SUCCESS
983: x_return_status := fnd_api.g_ret_sts_success;
984: --
985: -- Api body
986: --
987: -- Debug Message

Line 997: IF fnd_api.to_boolean (p_commit) THEN

993: -- End of API body
994: --
995:
996: -- Standard check for p_commit
997: IF fnd_api.to_boolean (p_commit) THEN
998: COMMIT WORK;
999: END IF;
1000: -- Debug Message
1001: ---amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'end');

Line 1007: x_return_status := fnd_api.g_ret_sts_error;

1003: -- Standard call to get message count and if count is 1, get message info.
1004: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1005: EXCEPTION
1006: WHEN amw_utility_pvt.resource_locked THEN
1007: x_return_status := fnd_api.g_ret_sts_error;
1008: -----amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1009: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1010: WHEN fnd_api.g_exc_error THEN
1011: ROLLBACK TO delete_control_pvt;

Line 1010: WHEN fnd_api.g_exc_error THEN

1006: WHEN amw_utility_pvt.resource_locked THEN
1007: x_return_status := fnd_api.g_ret_sts_error;
1008: -----amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1009: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1010: WHEN fnd_api.g_exc_error THEN
1011: ROLLBACK TO delete_control_pvt;
1012: x_return_status := fnd_api.g_ret_sts_error;
1013: -- Standard call to get message count and if count=1, get the message
1014: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 1012: x_return_status := fnd_api.g_ret_sts_error;

1008: -----amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1009: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1010: WHEN fnd_api.g_exc_error THEN
1011: ROLLBACK TO delete_control_pvt;
1012: x_return_status := fnd_api.g_ret_sts_error;
1013: -- Standard call to get message count and if count=1, get the message
1014: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1015: p_count => x_msg_count,
1016: p_data => x_msg_data

Line 1014: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

1010: WHEN fnd_api.g_exc_error THEN
1011: ROLLBACK TO delete_control_pvt;
1012: x_return_status := fnd_api.g_ret_sts_error;
1013: -- Standard call to get message count and if count=1, get the message
1014: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1015: p_count => x_msg_count,
1016: p_data => x_msg_data
1017: );
1018: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1018: WHEN fnd_api.g_exc_unexpected_error THEN

1014: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1015: p_count => x_msg_count,
1016: p_data => x_msg_data
1017: );
1018: WHEN fnd_api.g_exc_unexpected_error THEN
1019: ROLLBACK TO delete_control_pvt;
1020: x_return_status := fnd_api.g_ret_sts_unexp_error;
1021: -- Standard call to get message count and if count=1, get the message
1022: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 1020: x_return_status := fnd_api.g_ret_sts_unexp_error;

1016: p_data => x_msg_data
1017: );
1018: WHEN fnd_api.g_exc_unexpected_error THEN
1019: ROLLBACK TO delete_control_pvt;
1020: x_return_status := fnd_api.g_ret_sts_unexp_error;
1021: -- Standard call to get message count and if count=1, get the message
1022: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1023: p_count => x_msg_count,
1024: p_data => x_msg_data

Line 1022: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

1018: WHEN fnd_api.g_exc_unexpected_error THEN
1019: ROLLBACK TO delete_control_pvt;
1020: x_return_status := fnd_api.g_ret_sts_unexp_error;
1021: -- Standard call to get message count and if count=1, get the message
1022: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1023: p_count => x_msg_count,
1024: p_data => x_msg_data
1025: );
1026: WHEN OTHERS THEN

Line 1028: x_return_status := fnd_api.g_ret_sts_unexp_error;

1024: p_data => x_msg_data
1025: );
1026: WHEN OTHERS THEN
1027: ROLLBACK TO delete_control_pvt;
1028: x_return_status := fnd_api.g_ret_sts_unexp_error;
1029: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1030: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1031: END IF;
1032: -- Standard call to get message count and if count=1, get the message

Line 1033: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

1029: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1030: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1031: END IF;
1032: -- Standard call to get message count and if count=1, get the message
1033: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1034: p_count => x_msg_count,
1035: p_data => x_msg_data
1036: );
1037: END delete_control;

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

1037: END delete_control;
1038: -- Hint: Primary key needs to be returned.
1039: PROCEDURE lock_control (
1040: p_api_version_number IN NUMBER,
1041: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1042: x_return_status OUT nocopy VARCHAR2,
1043: x_msg_count OUT nocopy NUMBER,
1044: x_msg_data OUT nocopy VARCHAR2,
1045: p_control_rev_id IN NUMBER,

Line 1064: IF fnd_api.to_boolean (p_init_msg_list) THEN

1060: -- Debug Message
1061: ----amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');
1062: amw_utility_pvt.debug_message (l_api_name || 'start');
1063: -- Initialize message list if p_init_msg_list is set to TRUE.
1064: IF fnd_api.to_boolean (p_init_msg_list) THEN
1065: fnd_msg_pub.initialize;
1066: END IF;
1067: -- Standard call to check for call compatibility.
1068: IF NOT fnd_api.compatible_api_call (l_api_version_number,

Line 1068: IF NOT fnd_api.compatible_api_call (l_api_version_number,

1064: IF fnd_api.to_boolean (p_init_msg_list) THEN
1065: fnd_msg_pub.initialize;
1066: END IF;
1067: -- Standard call to check for call compatibility.
1068: IF NOT fnd_api.compatible_api_call (l_api_version_number,
1069: p_api_version_number,
1070: l_api_name,
1071: g_pkg_name
1072: ) THEN

Line 1073: RAISE fnd_api.g_exc_unexpected_error;

1069: p_api_version_number,
1070: l_api_name,
1071: g_pkg_name
1072: ) THEN
1073: RAISE fnd_api.g_exc_unexpected_error;
1074: END IF;
1075: -- Initialize API return status to SUCCESS
1076: x_return_status := fnd_api.g_ret_sts_success;
1077: ------------------------ lock -------------------------

Line 1076: x_return_status := fnd_api.g_ret_sts_success;

1072: ) THEN
1073: RAISE fnd_api.g_exc_unexpected_error;
1074: END IF;
1075: -- Initialize API return status to SUCCESS
1076: x_return_status := fnd_api.g_ret_sts_success;
1077: ------------------------ lock -------------------------
1078: amw_utility_pvt.debug_message (l_full_name || ': start');
1079: OPEN c_control;
1080: FETCH c_control

Line 1088: RAISE fnd_api.g_exc_error;

1084: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
1085: fnd_message.set_name ('AMS', 'AMW_API_RECORD_NOT_FOUND');
1086: fnd_msg_pub.ADD;
1087: END IF;
1088: RAISE fnd_api.g_exc_error;
1089: END IF;
1090: CLOSE c_control;
1091: -------------------- finish --------------------------
1092: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 1092: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

1088: RAISE fnd_api.g_exc_error;
1089: END IF;
1090: CLOSE c_control;
1091: -------------------- finish --------------------------
1092: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1093: p_count => x_msg_count,
1094: p_data => x_msg_data
1095: );
1096: amw_utility_pvt.debug_message (l_full_name || ': end');

Line 1099: x_return_status := fnd_api.g_ret_sts_error;

1095: );
1096: amw_utility_pvt.debug_message (l_full_name || ': end');
1097: EXCEPTION
1098: WHEN amw_utility_pvt.resource_locked THEN
1099: x_return_status := fnd_api.g_ret_sts_error;
1100: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1101: WHEN fnd_api.g_exc_error THEN
1102: ROLLBACK TO lock_control_pvt;
1103: x_return_status := fnd_api.g_ret_sts_error;

Line 1101: WHEN fnd_api.g_exc_error THEN

1097: EXCEPTION
1098: WHEN amw_utility_pvt.resource_locked THEN
1099: x_return_status := fnd_api.g_ret_sts_error;
1100: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1101: WHEN fnd_api.g_exc_error THEN
1102: ROLLBACK TO lock_control_pvt;
1103: x_return_status := fnd_api.g_ret_sts_error;
1104: -- Standard call to get message count and if count=1, get the message
1105: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 1103: x_return_status := fnd_api.g_ret_sts_error;

1099: x_return_status := fnd_api.g_ret_sts_error;
1100: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1101: WHEN fnd_api.g_exc_error THEN
1102: ROLLBACK TO lock_control_pvt;
1103: x_return_status := fnd_api.g_ret_sts_error;
1104: -- Standard call to get message count and if count=1, get the message
1105: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1106: p_count => x_msg_count,
1107: p_data => x_msg_data

Line 1105: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

1101: WHEN fnd_api.g_exc_error THEN
1102: ROLLBACK TO lock_control_pvt;
1103: x_return_status := fnd_api.g_ret_sts_error;
1104: -- Standard call to get message count and if count=1, get the message
1105: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1106: p_count => x_msg_count,
1107: p_data => x_msg_data
1108: );
1109: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1109: WHEN fnd_api.g_exc_unexpected_error THEN

1105: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1106: p_count => x_msg_count,
1107: p_data => x_msg_data
1108: );
1109: WHEN fnd_api.g_exc_unexpected_error THEN
1110: ROLLBACK TO lock_control_pvt;
1111: x_return_status := fnd_api.g_ret_sts_unexp_error;
1112: -- Standard call to get message count and if count=1, get the message
1113: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 1111: x_return_status := fnd_api.g_ret_sts_unexp_error;

1107: p_data => x_msg_data
1108: );
1109: WHEN fnd_api.g_exc_unexpected_error THEN
1110: ROLLBACK TO lock_control_pvt;
1111: x_return_status := fnd_api.g_ret_sts_unexp_error;
1112: -- Standard call to get message count and if count=1, get the message
1113: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1114: p_count => x_msg_count,
1115: p_data => x_msg_data

Line 1113: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

1109: WHEN fnd_api.g_exc_unexpected_error THEN
1110: ROLLBACK TO lock_control_pvt;
1111: x_return_status := fnd_api.g_ret_sts_unexp_error;
1112: -- Standard call to get message count and if count=1, get the message
1113: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1114: p_count => x_msg_count,
1115: p_data => x_msg_data
1116: );
1117: WHEN OTHERS THEN

Line 1119: x_return_status := fnd_api.g_ret_sts_unexp_error;

1115: p_data => x_msg_data
1116: );
1117: WHEN OTHERS THEN
1118: ROLLBACK TO lock_control_pvt;
1119: x_return_status := fnd_api.g_ret_sts_unexp_error;
1120: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1121: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1122: END IF;
1123: -- Standard call to get message count and if count=1, get the message

Line 1124: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

1120: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1121: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1122: END IF;
1123: -- Standard call to get message count and if count=1, get the message
1124: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1125: p_count => x_msg_count,
1126: p_data => x_msg_data
1127: );
1128: END lock_control;

Line 1136: x_return_status := fnd_api.g_ret_sts_success;

1132: x_return_status OUT nocopy VARCHAR2
1133: ) IS
1134: l_valid_flag VARCHAR2 (1);
1135: BEGIN
1136: x_return_status := fnd_api.g_ret_sts_success;
1137: IF p_validation_mode = 'CREATE' THEN
1138: l_valid_flag :=
1139: amw_utility_pvt.check_uniqueness ('AMW_CONTROLS_B','CONTROL_REV_ID = '''|| p_control_rec.control_rev_id|| '''');
1140: ELSE

Line 1144: IF l_valid_flag = fnd_api.g_false THEN

1140: ELSE
1141: l_valid_flag :=
1142: amw_utility_pvt.check_uniqueness ('AMW_CONTROLS_B','CONTROL_REV_ID = '''|| p_control_rec.control_rev_id|| ''' AND CONTROL_REV_ID <> '|| p_control_rec.control_rev_id);
1143: END IF;
1144: IF l_valid_flag = fnd_api.g_false THEN
1145: ---amw_utility_pvt.error_message(p_message_name => 'AMW_CONTROL_REV_ID_DUPLICATE');
1146: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_UNIQUE_ITEM_ERROR',
1147: p_token_name => 'ITEM',
1148: p_token_value => 'Control_Rev_Id');

Line 1150: x_return_status := fnd_api.g_ret_sts_error;

1146: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_UNIQUE_ITEM_ERROR',
1147: p_token_name => 'ITEM',
1148: p_token_value => 'Control_Rev_Id');
1149:
1150: x_return_status := fnd_api.g_ret_sts_error;
1151: RETURN;
1152: END IF;
1153: END check_control_uk_items;
1154: PROCEDURE check_control_req_items (

Line 1160: x_return_status := fnd_api.g_ret_sts_success;

1156: p_validation_mode IN VARCHAR2 := 'CREATE',
1157: x_return_status OUT nocopy VARCHAR2
1158: ) IS
1159: BEGIN
1160: x_return_status := fnd_api.g_ret_sts_success;
1161: IF p_validation_mode = 'CREATE' THEN
1162: IF p_control_rec.control_id = fnd_api.g_miss_num
1163: OR p_control_rec.control_id IS NULL THEN
1164: ---amw_utility_pvt.error_message(p_message_name => 'AMW_control_NO_control_id');

Line 1162: IF p_control_rec.control_id = fnd_api.g_miss_num

1158: ) IS
1159: BEGIN
1160: x_return_status := fnd_api.g_ret_sts_success;
1161: IF p_validation_mode = 'CREATE' THEN
1162: IF p_control_rec.control_id = fnd_api.g_miss_num
1163: OR p_control_rec.control_id IS NULL THEN
1164: ---amw_utility_pvt.error_message(p_message_name => 'AMW_control_NO_control_id');
1165: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
1166: p_token_name => 'ITEM',

Line 1169: x_return_status := fnd_api.g_ret_sts_error;

1165: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
1166: p_token_name => 'ITEM',
1167: p_token_value => 'Control_Id');
1168:
1169: x_return_status := fnd_api.g_ret_sts_error;
1170: RETURN;
1171: END IF;
1172: IF p_control_rec.last_update_date = fnd_api.g_miss_date
1173: OR p_control_rec.last_update_date IS NULL THEN

Line 1172: IF p_control_rec.last_update_date = fnd_api.g_miss_date

1168:
1169: x_return_status := fnd_api.g_ret_sts_error;
1170: RETURN;
1171: END IF;
1172: IF p_control_rec.last_update_date = fnd_api.g_miss_date
1173: OR p_control_rec.last_update_date IS NULL THEN
1174: ----amw_utility_pvt.error_message(p_message_name => 'AMW_ctrl_NO_last_update_date');
1175: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
1176: p_token_name => 'ITEM',

Line 1178: x_return_status := fnd_api.g_ret_sts_error;

1174: ----amw_utility_pvt.error_message(p_message_name => 'AMW_ctrl_NO_last_update_date');
1175: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
1176: p_token_name => 'ITEM',
1177: p_token_value => 'Last_Update_Date');
1178: x_return_status := fnd_api.g_ret_sts_error;
1179: RETURN;
1180: END IF;
1181:
1182: /*

Line 1183: IF p_control_rec.last_updated_by = FND_API.g_miss_num OR p_control_rec.last_updated_by IS NULL THEN

1179: RETURN;
1180: END IF;
1181:
1182: /*
1183: IF p_control_rec.last_updated_by = FND_API.g_miss_num OR p_control_rec.last_updated_by IS NULL THEN
1184: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_control_NO_last_updated_by');
1185: x_return_status := FND_API.g_ret_sts_error;
1186: RETURN;
1187: END IF;

Line 1185: x_return_status := FND_API.g_ret_sts_error;

1181:
1182: /*
1183: IF p_control_rec.last_updated_by = FND_API.g_miss_num OR p_control_rec.last_updated_by IS NULL THEN
1184: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_control_NO_last_updated_by');
1185: x_return_status := FND_API.g_ret_sts_error;
1186: RETURN;
1187: END IF;
1188:
1189:

Line 1190: IF p_control_rec.creation_date = FND_API.g_miss_date OR p_control_rec.creation_date IS NULL THEN

1186: RETURN;
1187: END IF;
1188:
1189:
1190: IF p_control_rec.creation_date = FND_API.g_miss_date OR p_control_rec.creation_date IS NULL THEN
1191: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_control_NO_creation_date');
1192: x_return_status := FND_API.g_ret_sts_error;
1193: RETURN;
1194: END IF;

Line 1192: x_return_status := FND_API.g_ret_sts_error;

1188:
1189:
1190: IF p_control_rec.creation_date = FND_API.g_miss_date OR p_control_rec.creation_date IS NULL THEN
1191: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_control_NO_creation_date');
1192: x_return_status := FND_API.g_ret_sts_error;
1193: RETURN;
1194: END IF;
1195:
1196:

Line 1197: IF p_control_rec.created_by = FND_API.g_miss_num OR p_control_rec.created_by IS NULL THEN

1193: RETURN;
1194: END IF;
1195:
1196:
1197: IF p_control_rec.created_by = FND_API.g_miss_num OR p_control_rec.created_by IS NULL THEN
1198: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_control_NO_created_by');
1199: x_return_status := FND_API.g_ret_sts_error;
1200: RETURN;
1201: END IF;

Line 1199: x_return_status := FND_API.g_ret_sts_error;

1195:
1196:
1197: IF p_control_rec.created_by = FND_API.g_miss_num OR p_control_rec.created_by IS NULL THEN
1198: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_control_NO_created_by');
1199: x_return_status := FND_API.g_ret_sts_error;
1200: RETURN;
1201: END IF;
1202:
1203: */

Line 1204: IF p_control_rec.control_rev_id = fnd_api.g_miss_num

1200: RETURN;
1201: END IF;
1202:
1203: */
1204: IF p_control_rec.control_rev_id = fnd_api.g_miss_num
1205: OR p_control_rec.control_rev_id IS NULL THEN
1206: ----amw_utility_pvt.error_message(p_message_name => 'AMW_control_NO_control_rev_id');
1207: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
1208: p_token_name => 'ITEM',

Line 1210: x_return_status := fnd_api.g_ret_sts_error;

1206: ----amw_utility_pvt.error_message(p_message_name => 'AMW_control_NO_control_rev_id');
1207: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
1208: p_token_name => 'ITEM',
1209: p_token_value => 'Control_Rev_Id');
1210: x_return_status := fnd_api.g_ret_sts_error;
1211: RETURN;
1212: END IF;
1213: IF p_control_rec.rev_num = fnd_api.g_miss_num
1214: OR p_control_rec.rev_num IS NULL THEN

Line 1213: IF p_control_rec.rev_num = fnd_api.g_miss_num

1209: p_token_value => 'Control_Rev_Id');
1210: x_return_status := fnd_api.g_ret_sts_error;
1211: RETURN;
1212: END IF;
1213: IF p_control_rec.rev_num = fnd_api.g_miss_num
1214: OR p_control_rec.rev_num IS NULL THEN
1215: ---amw_utility_pvt.error_message(p_message_name => 'AMW_control_NO_rev_num');
1216: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
1217: p_token_name => 'ITEM',

Line 1219: x_return_status := fnd_api.g_ret_sts_error;

1215: ---amw_utility_pvt.error_message(p_message_name => 'AMW_control_NO_rev_num');
1216: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
1217: p_token_name => 'ITEM',
1218: p_token_value => 'Rev_Num');
1219: x_return_status := fnd_api.g_ret_sts_error;
1220: RETURN;
1221: END IF;
1222: ELSE ----Update mode checks
1223:

Line 1228: x_return_status := fnd_api.g_ret_sts_error;

1224: IF p_control_rec.last_update_date IS NULL THEN
1225: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
1226: p_token_name => 'ITEM',
1227: p_token_value => 'Last_Update_Date');
1228: x_return_status := fnd_api.g_ret_sts_error;
1229: RETURN;
1230: END IF;
1231: IF p_control_rec.control_rev_id IS NULL THEN
1232: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',

Line 1235: x_return_status := fnd_api.g_ret_sts_error;

1231: IF p_control_rec.control_rev_id IS NULL THEN
1232: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_REQUIRE_ITEM_ERROR',
1233: p_token_name => 'ITEM',
1234: p_token_value => 'Control_Rev_Id');
1235: x_return_status := fnd_api.g_ret_sts_error;
1236: RETURN;
1237: END IF;
1238:
1239:

Line 1247: x_return_status := fnd_api.g_ret_sts_success;

1243: p_control_rec IN control_rec_type,
1244: x_return_status OUT nocopy VARCHAR2
1245: ) IS
1246: BEGIN
1247: x_return_status := fnd_api.g_ret_sts_success;
1248: -- Enter custom code here
1249: END check_control_fk_items;
1250: PROCEDURE check_control_lookup_items (
1251: p_control_rec IN control_rec_type,

Line 1255: x_return_status := fnd_api.g_ret_sts_success;

1251: p_control_rec IN control_rec_type,
1252: x_return_status OUT nocopy VARCHAR2
1253: ) IS
1254: BEGIN
1255: x_return_status := fnd_api.g_ret_sts_success;
1256: -- Enter custom code here
1257: ---amw_utility_pvt.CHECK_LOOKUP_EXISTS();
1258: END check_control_lookup_items;
1259:

Line 1271: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1267: check_control_uk_items (p_control_rec => p_control_rec,
1268: p_validation_mode => p_validation_mode,
1269: x_return_status => x_return_status
1270: );
1271: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1272: RETURN;
1273: END IF;
1274: -- Check Items Required/NOT NULL API calls
1275: check_control_req_items (p_control_rec => p_control_rec,

Line 1279: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1275: check_control_req_items (p_control_rec => p_control_rec,
1276: p_validation_mode => p_validation_mode,
1277: x_return_status => x_return_status
1278: );
1279: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1280: RETURN;
1281: END IF;
1282: -- Check Items Foreign Keys API calls
1283: check_control_fk_items (p_control_rec => p_control_rec,

Line 1286: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1282: -- Check Items Foreign Keys API calls
1283: check_control_fk_items (p_control_rec => p_control_rec,
1284: x_return_status => x_return_status
1285: );
1286: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1287: RETURN;
1288: END IF;
1289: -- Check Items Lookups
1290: check_control_lookup_items (p_control_rec => p_control_rec,

Line 1293: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1289: -- Check Items Lookups
1290: check_control_lookup_items (p_control_rec => p_control_rec,
1291: x_return_status => x_return_status
1292: );
1293: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1294: RETURN;
1295: END IF;
1296: END check_control_items;
1297:

Line 1338: --IF p_control_rec.control_id = FND_API.g_miss_num THEN

1334: if(p_control_rec.verification_instruction is null) then
1335: x_complete_rec.verification_instruction := l_desc.verification_instruction;
1336: end if;
1337: -- control_id
1338: --IF p_control_rec.control_id = FND_API.g_miss_num THEN
1339: IF p_control_rec.control_id IS NULL THEN
1340: x_complete_rec.control_id := l_control_rec.control_id;
1341: END IF;
1342: -- last_update_date

Line 1348: --IF p_control_rec.last_updated_by = FND_API.g_miss_num THEN

1344: IF p_control_rec.last_update_date IS NULL THEN
1345: x_complete_rec.last_update_date := l_control_rec.last_update_date;
1346: END IF;
1347: -- last_updated_by
1348: --IF p_control_rec.last_updated_by = FND_API.g_miss_num THEN
1349: IF p_control_rec.last_updated_by IS NULL THEN
1350: x_complete_rec.last_updated_by := l_control_rec.last_updated_by;
1351: END IF;
1352: -- creation_date

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

1596: PROCEDURE validate_control (
1597: p_mode IN VARCHAR2,
1598: ---p_validation_mode in varchar2,
1599: p_api_version_number IN NUMBER,
1600: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1601: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1602: p_control_rec IN OUT nocopy control_rec_type,
1603: x_return_status OUT nocopy VARCHAR2,
1604: x_msg_count OUT nocopy NUMBER,

Line 1601: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

1597: p_mode IN VARCHAR2,
1598: ---p_validation_mode in varchar2,
1599: p_api_version_number IN NUMBER,
1600: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1601: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1602: p_control_rec IN OUT nocopy control_rec_type,
1603: x_return_status OUT nocopy VARCHAR2,
1604: x_msg_count OUT nocopy NUMBER,
1605: x_msg_data OUT nocopy VARCHAR2

Line 1615: IF NOT fnd_api.compatible_api_call (l_api_version_number,

1611: BEGIN
1612: -- Standard Start of API savepoint
1613: SAVEPOINT validate_control;
1614: -- Standard call to check for call compatibility.
1615: IF NOT fnd_api.compatible_api_call (l_api_version_number,
1616: p_api_version_number,
1617: l_api_name,
1618: g_pkg_name
1619: ) THEN

Line 1620: RAISE fnd_api.g_exc_unexpected_error;

1616: p_api_version_number,
1617: l_api_name,
1618: g_pkg_name
1619: ) THEN
1620: RAISE fnd_api.g_exc_unexpected_error;
1621: END IF;
1622: -- Initialize message list if p_init_msg_list is set to TRUE.
1623: IF fnd_api.to_boolean (p_init_msg_list) THEN
1624: fnd_msg_pub.initialize;

Line 1623: IF fnd_api.to_boolean (p_init_msg_list) THEN

1619: ) THEN
1620: RAISE fnd_api.g_exc_unexpected_error;
1621: END IF;
1622: -- Initialize message list if p_init_msg_list is set to TRUE.
1623: IF fnd_api.to_boolean (p_init_msg_list) THEN
1624: fnd_msg_pub.initialize;
1625: END IF;
1626: IF p_validation_level >= jtf_plsql_api.g_valid_level_item THEN
1627: check_control_items (p_control_rec => p_control_rec,

Line 1631: IF x_return_status = fnd_api.g_ret_sts_error THEN

1627: check_control_items (p_control_rec => p_control_rec,
1628: p_validation_mode => p_mode,
1629: x_return_status => x_return_status
1630: );
1631: IF x_return_status = fnd_api.g_ret_sts_error THEN
1632: RAISE fnd_api.g_exc_error;
1633: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1634: RAISE fnd_api.g_exc_unexpected_error;
1635: END IF;

Line 1632: RAISE fnd_api.g_exc_error;

1628: p_validation_mode => p_mode,
1629: x_return_status => x_return_status
1630: );
1631: IF x_return_status = fnd_api.g_ret_sts_error THEN
1632: RAISE fnd_api.g_exc_error;
1633: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1634: RAISE fnd_api.g_exc_unexpected_error;
1635: END IF;
1636: END IF;

Line 1633: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

1629: x_return_status => x_return_status
1630: );
1631: IF x_return_status = fnd_api.g_ret_sts_error THEN
1632: RAISE fnd_api.g_exc_error;
1633: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1634: RAISE fnd_api.g_exc_unexpected_error;
1635: END IF;
1636: END IF;
1637: complete_control_rec (p_control_rec => p_control_rec,

Line 1634: RAISE fnd_api.g_exc_unexpected_error;

1630: );
1631: IF x_return_status = fnd_api.g_ret_sts_error THEN
1632: RAISE fnd_api.g_exc_error;
1633: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1634: RAISE fnd_api.g_exc_unexpected_error;
1635: END IF;
1636: END IF;
1637: complete_control_rec (p_control_rec => p_control_rec,
1638: x_complete_rec => l_control_rec

Line 1644: p_init_msg_list => fnd_api.g_false,

1640: p_control_rec := l_control_rec;
1641: IF p_validation_level >= jtf_plsql_api.g_valid_level_item THEN
1642: validate_control_rec (p_mode => p_mode,
1643: p_api_version_number => 1.0,
1644: p_init_msg_list => fnd_api.g_false,
1645: x_return_status => x_return_status,
1646: x_msg_count => x_msg_count,
1647: x_msg_data => x_msg_data,
1648: p_control_rec => l_control_rec

Line 1650: IF x_return_status = fnd_api.g_ret_sts_error THEN

1646: x_msg_count => x_msg_count,
1647: x_msg_data => x_msg_data,
1648: p_control_rec => l_control_rec
1649: );
1650: IF x_return_status = fnd_api.g_ret_sts_error THEN
1651: RAISE fnd_api.g_exc_error;
1652: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1653: RAISE fnd_api.g_exc_unexpected_error;
1654: END IF;

Line 1651: RAISE fnd_api.g_exc_error;

1647: x_msg_data => x_msg_data,
1648: p_control_rec => l_control_rec
1649: );
1650: IF x_return_status = fnd_api.g_ret_sts_error THEN
1651: RAISE fnd_api.g_exc_error;
1652: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1653: RAISE fnd_api.g_exc_unexpected_error;
1654: END IF;
1655: END IF;

Line 1652: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

1648: p_control_rec => l_control_rec
1649: );
1650: IF x_return_status = fnd_api.g_ret_sts_error THEN
1651: RAISE fnd_api.g_exc_error;
1652: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1653: RAISE fnd_api.g_exc_unexpected_error;
1654: END IF;
1655: END IF;
1656: -- Debug Message

Line 1653: RAISE fnd_api.g_exc_unexpected_error;

1649: );
1650: IF x_return_status = fnd_api.g_ret_sts_error THEN
1651: RAISE fnd_api.g_exc_error;
1652: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1653: RAISE fnd_api.g_exc_unexpected_error;
1654: END IF;
1655: END IF;
1656: -- Debug Message
1657: ---amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');

Line 1660: x_return_status := fnd_api.g_ret_sts_success;

1656: -- Debug Message
1657: ---amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');
1658: amw_utility_pvt.debug_message (l_api_name || 'start');
1659: -- Initialize API return status to SUCCESS
1660: x_return_status := fnd_api.g_ret_sts_success;
1661: -- Debug Message
1662: ---amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'end');
1663: amw_utility_pvt.debug_message (l_api_name || 'end');
1664: -- Standard call to get message count and if count is 1, get message info.

Line 1668: x_return_status := fnd_api.g_ret_sts_error;

1664: -- Standard call to get message count and if count is 1, get message info.
1665: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1666: EXCEPTION
1667: WHEN amw_utility_pvt.resource_locked THEN
1668: x_return_status := fnd_api.g_ret_sts_error;
1669: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1670: WHEN fnd_api.g_exc_error THEN
1671: ROLLBACK TO validate_control;
1672: x_return_status := fnd_api.g_ret_sts_error;

Line 1670: WHEN fnd_api.g_exc_error THEN

1666: EXCEPTION
1667: WHEN amw_utility_pvt.resource_locked THEN
1668: x_return_status := fnd_api.g_ret_sts_error;
1669: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1670: WHEN fnd_api.g_exc_error THEN
1671: ROLLBACK TO validate_control;
1672: x_return_status := fnd_api.g_ret_sts_error;
1673: -- Standard call to get message count and if count=1, get the message
1674: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 1672: x_return_status := fnd_api.g_ret_sts_error;

1668: x_return_status := fnd_api.g_ret_sts_error;
1669: amw_utility_pvt.error_message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1670: WHEN fnd_api.g_exc_error THEN
1671: ROLLBACK TO validate_control;
1672: x_return_status := fnd_api.g_ret_sts_error;
1673: -- Standard call to get message count and if count=1, get the message
1674: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1675: p_count => x_msg_count,
1676: p_data => x_msg_data

Line 1674: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

1670: WHEN fnd_api.g_exc_error THEN
1671: ROLLBACK TO validate_control;
1672: x_return_status := fnd_api.g_ret_sts_error;
1673: -- Standard call to get message count and if count=1, get the message
1674: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1675: p_count => x_msg_count,
1676: p_data => x_msg_data
1677: );
1678: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1678: WHEN fnd_api.g_exc_unexpected_error THEN

1674: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1675: p_count => x_msg_count,
1676: p_data => x_msg_data
1677: );
1678: WHEN fnd_api.g_exc_unexpected_error THEN
1679: ROLLBACK TO validate_control;
1680: x_return_status := fnd_api.g_ret_sts_unexp_error;
1681: -- Standard call to get message count and if count=1, get the message
1682: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

Line 1680: x_return_status := fnd_api.g_ret_sts_unexp_error;

1676: p_data => x_msg_data
1677: );
1678: WHEN fnd_api.g_exc_unexpected_error THEN
1679: ROLLBACK TO validate_control;
1680: x_return_status := fnd_api.g_ret_sts_unexp_error;
1681: -- Standard call to get message count and if count=1, get the message
1682: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1683: p_count => x_msg_count,
1684: p_data => x_msg_data

Line 1682: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

1678: WHEN fnd_api.g_exc_unexpected_error THEN
1679: ROLLBACK TO validate_control;
1680: x_return_status := fnd_api.g_ret_sts_unexp_error;
1681: -- Standard call to get message count and if count=1, get the message
1682: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1683: p_count => x_msg_count,
1684: p_data => x_msg_data
1685: );
1686: WHEN OTHERS THEN

Line 1688: x_return_status := fnd_api.g_ret_sts_unexp_error;

1684: p_data => x_msg_data
1685: );
1686: WHEN OTHERS THEN
1687: ROLLBACK TO validate_control;
1688: x_return_status := fnd_api.g_ret_sts_unexp_error;
1689: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1690: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1691: END IF;
1692: -- Standard call to get message count and if count=1, get the message

Line 1693: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,

1689: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1690: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1691: END IF;
1692: -- Standard call to get message count and if count=1, get the message
1693: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
1694: p_count => x_msg_count,
1695: p_data => x_msg_data
1696: );
1697: END validate_control;

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

1697: END validate_control;
1698: PROCEDURE validate_control_rec (
1699: p_mode IN VARCHAR2 := 'CREATE',
1700: p_api_version_number IN NUMBER,
1701: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1702: x_return_status OUT nocopy VARCHAR2,
1703: x_msg_count OUT nocopy NUMBER,
1704: x_msg_data OUT nocopy VARCHAR2,
1705: p_control_rec IN control_rec_type

Line 1709: IF fnd_api.to_boolean (p_init_msg_list) THEN

1705: p_control_rec IN control_rec_type
1706: ) IS
1707: BEGIN
1708: -- Initialize message list if p_init_msg_list is set to TRUE.
1709: IF fnd_api.to_boolean (p_init_msg_list) THEN
1710: fnd_msg_pub.initialize;
1711: END IF;
1712: -- Initialize API return status to SUCCESS
1713: x_return_status := fnd_api.g_ret_sts_success;

Line 1713: x_return_status := fnd_api.g_ret_sts_success;

1709: IF fnd_api.to_boolean (p_init_msg_list) THEN
1710: fnd_msg_pub.initialize;
1711: END IF;
1712: -- Initialize API return status to SUCCESS
1713: x_return_status := fnd_api.g_ret_sts_success;
1714: -- Hint: Validate data
1715: -- If data not valid
1716: -- THEN
1717: -- x_return_status := FND_API.G_RET_STS_ERROR;

Line 1717: -- x_return_status := FND_API.G_RET_STS_ERROR;

1713: x_return_status := fnd_api.g_ret_sts_success;
1714: -- Hint: Validate data
1715: -- If data not valid
1716: -- THEN
1717: -- x_return_status := FND_API.G_RET_STS_ERROR;
1718: -- Debug Message
1719: amw_utility_pvt.debug_message ('Validate_conrol_rec starts');
1720: IF (p_control_rec.NAME IS NULL OR p_control_rec.NAME = '') THEN
1721: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_WEBADI_REQUIRED_ERROR',

Line 1724: x_return_status := fnd_api.g_ret_sts_error;

1720: IF (p_control_rec.NAME IS NULL OR p_control_rec.NAME = '') THEN
1721: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_WEBADI_REQUIRED_ERROR',
1722: p_token_name => 'ITEM',
1723: p_token_value => 'Control Name');
1724: x_return_status := fnd_api.g_ret_sts_error;
1725: END IF;
1726: IF ( p_control_rec.description IS NULL
1727: OR TRIM (p_control_rec.description) = ''
1728: ) THEN

Line 1732: x_return_status := fnd_api.g_ret_sts_error;

1728: ) THEN
1729: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_WEBADI_REQUIRED_ERROR',
1730: p_token_name => 'ITEM',
1731: p_token_value => 'Control Description');
1732: x_return_status := fnd_api.g_ret_sts_error;
1733: END IF;
1734: IF ( p_control_rec.control_type IS NULL
1735: OR TRIM (p_control_rec.control_type) = ''
1736: ) THEN

Line 1740: x_return_status := fnd_api.g_ret_sts_error;

1736: ) THEN
1737: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_WEBADI_REQUIRED_ERROR',
1738: p_token_name => 'ITEM',
1739: p_token_value => 'Control Type');
1740: x_return_status := fnd_api.g_ret_sts_error;
1741: ELSE
1742: IF fnd_api.to_boolean(amw_utility_pvt.check_lookup_exists ('AMW_LOOKUPS','AMW_CONTROL_TYPE',p_control_rec.control_type)) THEN
1743: amw_utility_pvt.debug_message('AMW_Valid_Control_Type');
1744: ELSE

Line 1742: IF fnd_api.to_boolean(amw_utility_pvt.check_lookup_exists ('AMW_LOOKUPS','AMW_CONTROL_TYPE',p_control_rec.control_type)) THEN

1738: p_token_name => 'ITEM',
1739: p_token_value => 'Control Type');
1740: x_return_status := fnd_api.g_ret_sts_error;
1741: ELSE
1742: IF fnd_api.to_boolean(amw_utility_pvt.check_lookup_exists ('AMW_LOOKUPS','AMW_CONTROL_TYPE',p_control_rec.control_type)) THEN
1743: amw_utility_pvt.debug_message('AMW_Valid_Control_Type');
1744: ELSE
1745: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_WEBADI_VALID_ERROR',
1746: p_token_name => 'ITEM',

Line 1748: x_return_status := fnd_api.g_ret_sts_error;

1744: ELSE
1745: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_WEBADI_VALID_ERROR',
1746: p_token_name => 'ITEM',
1747: p_token_value => 'Control Type');
1748: x_return_status := fnd_api.g_ret_sts_error;
1749: END IF;
1750: END IF;
1751: IF ( p_control_rec.control_location IS NOT NULL
1752: OR p_control_rec.control_location <> ''

Line 1754: IF (amw_utility_pvt.check_lookup_exists ('AMW_LOOKUPS','AMW_CONTROL_LOCATION',p_control_rec.control_location) = fnd_api.g_false

1750: END IF;
1751: IF ( p_control_rec.control_location IS NOT NULL
1752: OR p_control_rec.control_location <> ''
1753: ) THEN
1754: IF (amw_utility_pvt.check_lookup_exists ('AMW_LOOKUPS','AMW_CONTROL_LOCATION',p_control_rec.control_location) = fnd_api.g_false
1755: ) THEN
1756: amw_utility_pvt.debug_message('AMW_Control_Location_Invalid');
1757: x_return_status := fnd_api.g_ret_sts_error;
1758: END IF;

Line 1757: x_return_status := fnd_api.g_ret_sts_error;

1753: ) THEN
1754: IF (amw_utility_pvt.check_lookup_exists ('AMW_LOOKUPS','AMW_CONTROL_LOCATION',p_control_rec.control_location) = fnd_api.g_false
1755: ) THEN
1756: amw_utility_pvt.debug_message('AMW_Control_Location_Invalid');
1757: x_return_status := fnd_api.g_ret_sts_error;
1758: END IF;
1759: END IF;
1760:
1761: --12.22.2004 npanandi: added check for mandatory Classification attribute

Line 1769: x_return_status := fnd_api.g_ret_sts_error;

1765: ) THEN
1766: AMW_UTILITY_PVT.Error_Message(p_message_name => 'AMW_WEBADI_REQUIRED_ERROR',
1767: p_token_name => 'ITEM',
1768: p_token_value => 'Control Classification');
1769: x_return_status := fnd_api.g_ret_sts_error;
1770: END IF;
1771: */
1772: -- Debug Message
1773: amw_utility_pvt.debug_message ('Validate_dm_model_rec ends');