DBA Data[Home] [Help]

PACKAGE BODY: APPS.QA_PERFORMANCE_PUB

Source


1 PACKAGE BODY qa_performance_pub AS
2 /* $Header: qapindb.pls 120.0.12020000.2 2012/07/03 14:39:37 ntungare ship $ */
3 
4     -- Global variables.
5     g_pkg_name    CONSTANT VARCHAR2(30) := 'qa_performance_pub';
6 
7     PROCEDURE get_predicate(
8         p_api_version               IN  NUMBER,
9         p_init_msg_list             IN  VARCHAR2,
10         p_char_id                   IN  NUMBER,
11         p_alias                     IN  VARCHAR2,
12         x_predicate                 OUT NOCOPY VARCHAR2,
13         x_msg_count                 OUT NOCOPY NUMBER,
14         x_msg_data                  OUT NOCOPY VARCHAR2,
15         x_return_status             OUT NOCOPY VARCHAR2) IS
16 
17         l_api_name    CONSTANT VARCHAR2(30)   := 'get_predicate';
18         l_api_version CONSTANT NUMBER         := 1.0;
19 
20     BEGIN
21 
22         -- Standard Start of API savepoint is not required as this
23         -- API does not make any database changes. Its just queries
24         -- for the predicate.
25 
26         -- Standard call to check for call compatibility.
27         IF NOT fnd_api.compatible_api_call(
28                    l_api_version,
29                    p_api_version,
30                    l_api_name,
31                    g_pkg_name) THEN
32             RAISE fnd_api.g_exc_unexpected_error;
33         END IF;
34 
35         -- Initialize message list if p_init_msg_list is set to TRUE.
36         -- Even though we do not have any messages, the framework for
37         -- Message support is provided.
38 
39         -- For GSCC std File.Sql.35, we have not initialized p_init_msg_list.
40         -- So, check whether the value is NULL.
41 
42         IF fnd_api.to_boolean(NVL(p_init_msg_list, fnd_api.g_false)) THEN
43             fnd_msg_pub.initialize;
44         END IF;
45 
46         --  Initialize API return status to success
47         x_return_status := fnd_api.g_ret_sts_success;
48 
49         /* Call the get_predicate procedure in qa_char_indexes_pkg */
50         qa_char_indexes_pkg.get_predicate(
51             p_char_id   => p_char_id,
52             p_alias     => p_alias,
53             x_predicate => x_predicate);
54 
55 
56     EXCEPTION
57 
58         WHEN fnd_api.g_exc_error THEN
59             x_return_status := fnd_api.g_ret_sts_error;
60             fnd_msg_pub.count_and_get(
61                 p_count => x_msg_count,
62                 p_data  => x_msg_data
63             );
64 
65         WHEN fnd_api.g_exc_unexpected_error THEN
66             x_return_status := fnd_api.g_ret_sts_unexp_error;
67             fnd_msg_pub.count_and_get(
68                 p_count => x_msg_count,
69                 p_data  => x_msg_data
70             );
71 
72         WHEN OTHERS THEN
73             x_return_status := fnd_api.g_ret_sts_unexp_error;
74             IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
75                 fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
76             END IF;
77             fnd_msg_pub.count_and_get(
78                 p_count => x_msg_count,
79                 p_data  => x_msg_data
80             );
81 
82     END get_predicate;
83 
84 END qa_performance_pub;