DBA Data[Home] [Help]

PACKAGE BODY: APPS.EAM_BUSINESSOBJECT_APITYPE

Source


1 PACKAGE BODY eam_businessobject_apitype AS
2 /* $Header: EAMTMPLB.pls 115.5 2002/11/20 22:32:53 aan ship $*/
3    -- Start of comments
4    -- API name    : APIname
5    -- Type     : Public or Group or Private.
6    -- Function :
7    -- Pre-reqs : None.
8    -- Parameters  :
9    -- IN       p_api_version              IN NUMBER   Required
10    --          p_init_msg_list    IN VARCHAR2    Optional
11    --                                                  Default = FND_API.G_FALSE
12    --          p_commit          IN VARCHAR2 Optional
13    --             Default = FND_API.G_FALSE
14    --          p_validation_level      IN NUMBER   Optional
15    --             Default = FND_API.G_VALID_LEVEL_FULL
16    --          parameter1
17    --          parameter2
18    --          .
19    --          .
20    -- OUT      x_return_status      OUT   VARCHAR2(1)
21    --          x_msg_count       OUT   NUMBER
22    --          x_msg_data        OUT   VARCHAR2(2000)
23    --          parameter1
24    --          parameter2
25    --          .
26    --          .
27    -- Version  Current version x.x
28    --          Changed....
29    --          previous version   y.y
30    --          Changed....
31    --         .
32    --         .
33    --         previous version   2.0
34    --         Changed....
35    --         Initial version    1.0
36    --
37    -- Notes   Note text
38    --
39    -- End of comments
40 
41    g_pkg_name    CONSTANT VARCHAR2(30):= 'product_businessobject_apitype';
42 
43    PROCEDURE apiname(
44       p_api_version        IN       NUMBER
45      ,p_init_msg_list      IN       VARCHAR2 := fnd_api.g_false
46      ,p_commit             IN       VARCHAR2 := fnd_api.g_false
47      ,p_validation_level   IN       NUMBER
48             := fnd_api.g_valid_level_full
49      ,x_return_status      OUT NOCOPY      VARCHAR2
50      ,x_msg_count          OUT NOCOPY      NUMBER
51      ,x_msg_data           OUT NOCOPY      VARCHAR2)
52    IS
53       l_api_name       CONSTANT VARCHAR2(30) := 'apiname';
54       l_api_version    CONSTANT NUMBER       := 1.0;
55       l_full_name      CONSTANT VARCHAR2(60)   := g_pkg_name || '.' || l_api_name;
56    BEGIN
57       -- Standard Start of API savepoint
58       SAVEPOINT apiname_apitype;
59 
60       -- Standard call to check for call compatibility.
61       IF NOT fnd_api.compatible_api_call(
62             l_api_version
63            ,p_api_version
64            ,l_api_name
65            ,g_pkg_name) THEN
66          RAISE fnd_api.g_exc_unexpected_error;
67       END IF;
68 
69       -- Initialize message list if p_init_msg_list is set to TRUE.
70       IF fnd_api.to_boolean(p_init_msg_list) THEN
71          fnd_msg_pub.initialize;
72       END IF;
73 
74       --  Initialize API return status to success
75       x_return_status := fnd_api.g_ret_sts_success;
76 
77       -- API body
78 
79       -- End of API body.
80       -- Standard check of p_commit.
81       IF fnd_api.to_boolean(p_commit) THEN
82          COMMIT WORK;
83       END IF;
84 
85       -- Standard call to get message count and if count is 1, get message info.
86       fnd_msg_pub.count_and_get(
87          p_count => x_msg_count
88         ,p_data => x_msg_data);
89    EXCEPTION
90       WHEN fnd_api.g_exc_error THEN
91          ROLLBACK TO apiname_apitype;
92          x_return_status := fnd_api.g_ret_sts_error;
93          fnd_msg_pub.count_and_get(
94             p_count => x_msg_count
95            ,p_data => x_msg_data);
96       WHEN fnd_api.g_exc_unexpected_error THEN
97          ROLLBACK TO apiname_apitype;
98          x_return_status := fnd_api.g_ret_sts_unexp_error;
99          fnd_msg_pub.count_and_get(
100             p_count => x_msg_count
101            ,p_data => x_msg_data);
102       WHEN OTHERS THEN
103          ROLLBACK TO apiname_apitype;
104          x_return_status := fnd_api.g_ret_sts_unexp_error;
105 
106          IF fnd_msg_pub.check_msg_level(
107                fnd_msg_pub.g_msg_lvl_unexp_error) THEN
108             fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
109          END IF;
110 
111          fnd_msg_pub.count_and_get(
112             p_count => x_msg_count
113            ,p_data => x_msg_data);
114    END apiname;
115 
116 
117 END eam_businessobject_apitype;