1 PACKAGE BODY RCV_AccountHook_PUB AS
2 /* $Header: RCVPAHKB.pls 115.0 2003/09/11 22:48:04 nnayak noship $ */
3
4 G_PKG_NAME CONSTANT VARCHAR2(30) := 'RCV_AccountHook_PUB';
5
6 -- Start of comments
7 -- API name : Get_Account
8 -- Type : Public
9 -- Function : This function can be used to override the Retroactive
10 -- price adjustment account.
11 -- Pre-reqs :
12 -- Parameters :
13 -- IN : p_api_version IN NUMBER Required
14 -- p_init_msg_list IN VARCHAR2 Optional
15 -- Default = FND_API.G_FALSE
16 -- p_commit IN VARCHAR2 Optional
17 -- Default = FND_API.G_FALSE
18 -- p_validation_level IN NUMBER Optional
19 -- Default = FND_API.G_VALID_LEVEL_FULL
20 -- p_rcv_transaction_id IN NUMBER
21 -- p_accounting_line_type IN VARCHAR2
22 --
23 -- OUT : x_return_status OUT VARCHAR2(1)
24 -- x_msg_count OUT NUMBER
25 -- x_msg_data OUT VARCHAR2(2000)
26 -- x_distribution_acct_id OUT NUMBER
27 -- Version :
28 -- Initial version 1.0
29 --
30 -- Notes : This API can currently be used only to override the
31 -- Retroactive Price Adjustment Account. The parameter
32 -- p_rcv_transaction_id will contain the transaction_id
33 -- for the transaction being adjusted. Currently, the only
34 -- accounting line type supported is the 'Retroprice
35 -- Adjustment'. If the returned value in x_distribution_acct_id
36 -- is -1, the organization retroactive price adjustment account
37 -- will be used. Otherwise the returned account will be used.
38 --
39 -- End of comments
40 -------------------------------------------------------------------------------
41 PROCEDURE Get_Account(
42 p_api_version IN NUMBER,
43 x_return_status OUT NOCOPY VARCHAR2,
44 x_msg_count OUT NOCOPY NUMBER,
45 x_msg_data OUT NOCOPY VARCHAR2,
46 p_rcv_transaction_id IN NUMBER,
47 p_accounting_line_type IN VARCHAR2,
48 x_distribution_acct_id OUT NOCOPY NUMBER
49
50 )
51 IS
52 l_api_name CONSTANT VARCHAR2(30) := 'Create_AccountingEvents';
53 l_api_version CONSTANT NUMBER := 1.0;
54
55 l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
56 l_msg_count NUMBER := 0;
57 l_msg_data VARCHAR2(8000) := '';
58
59 BEGIN
60 -- Standard start of API savepoint
61 SAVEPOINT Get_Account_PUB;
62
63
64 -- Standard call to check for call compatibility
65 IF NOT FND_API.Compatible_API_Call (
66 l_api_version,
67 p_api_version,
68 l_api_name,
69 G_PKG_NAME ) THEN
70 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
71 END IF;
72
73 -- Initialize API return status to success
74 x_return_status := FND_API.G_RET_STS_SUCCESS;
75
76 x_distribution_acct_id := -1;
77
78 EXCEPTION
79 WHEN OTHERS THEN
80 ROLLBACK TO Get_Account_PUB;
81 x_return_status := fnd_api.g_ret_sts_unexp_error ;
82
83 END Get_Account;
84
85 END RCV_AccountHook_PUB;