DBA Data[Home] [Help]

PACKAGE BODY: APPS.CST_PERIODCLOSEOPTION_PUB

Source


1 PACKAGE BODY cst_periodCloseOption_pub AS
2 /* $Header: CSTINVRB.pls 120.1 2005/08/09 01:53:53 cmuthu noship $ */
3 
4 G_PKG_NAME  CONSTANT VARCHAR2(30) := 'CST_periodCloseOption_PUB';
5 
6 procedure shipping_txn_hook(
7   P_API_VERSION         IN      NUMBER,
8   I_ORG_ID              IN      NUMBER,
9   I_ACCT_PERIOD_ID      IN      NUMBER,
10   X_CLOSE_OPTION        OUT NOCOPY     NUMBER,
11   X_RETURN_STATUS       OUT NOCOPY  NUMBER,
12   X_MSG_COUNT           OUT NOCOPY  NUMBER,
13   X_MSG_DATA            OUT NOCOPY  VARCHAR2
14 ) IS
15 
16           l_api_name    CONSTANT       VARCHAR2(30) := 'shipping_txn_hook';
17           l_api_version CONSTANT       NUMBER       := 1.0;
18 
19 BEGIN
20 
21     -- standard call to check for call compatibility
22     if not fnd_api.compatible_api_call (
23                               l_api_version,
24                               p_api_version,
25                               l_api_name,
26                               G_PKG_NAME ) then
27          raise fnd_api.g_exc_unexpected_error;
28     end if;
29 
30     -------------------------------------------------------------------------
31     -- initialize api return status to success
32     -------------------------------------------------------------------------
33     x_return_status :=0;
34     x_msg_count := 0;
35     x_close_option := 0;
36 
37 
38 EXCEPTION
39 
40   when others then
41     x_return_status := 1;
42     x_close_option := -1;
43     x_msg_count := 1;
44 
45 
46 END shipping_txn_hook;
47 
48 FUNCTION get_shippingtxnhook_value (p_org_id          IN     NUMBER,
49                                     p_acct_period_id  IN     NUMBER)
50 return NUMBER
51 IS
52  l_close_option NUMBER;
53  l_return_status NUMBER;
54  l_msg_count NUMBER;
55  l_msg_data  VARCHAR2(240);
56 BEGIN
57  CST_PERIODCLOSEOPTION_PUB.shipping_txn_hook
58                        (p_api_version   => 1.0,
59                        i_org_id         => p_org_id,
60                        i_acct_period_id => p_acct_period_id,
61                        x_close_option   => l_close_option,
62                        x_return_status  => l_return_status,
63                        x_msg_count      => l_msg_count,
64                        x_msg_data       => l_msg_data);
65 
66  IF (l_return_status <> 0) THEN
67     RETURN -1;
68  ELSE
69     RETURN l_close_option;
70  END IF;
71 EXCEPTION
72 WHEN OTHERS THEN
73    RETURN -1;
74 END get_shippingtxnhook_value;
75 
76 END cst_periodCloseOption_pub;
77 
78