1 PACKAGE BODY pa_event_rc_client_extn AS
2 /* $Header: PAEVTRCB.pls 120.2 2005/08/19 16:22:41 mwasowic noship $ */
3
4
5 PROCEDURE override_rsob_event_amount(
6 p_calling_mode IN VARCHAR2,
7 p_event_rec_old IN event_record,
8 p_event_rec_new IN event_record,
9 p_primary_set_of_books_id IN NUMBER,
10 p_primary_currency_code IN VARCHAR2,
11 p_reporting_set_of_books_id IN NUMBER,
12 p_reporting_currency_code IN VARCHAR2,
13 p_event_currency_code IN VARCHAR2,
14 p_rev_conversion_type IN VARCHAR2,
15 p_rev_conversion_date IN DATE,
16 p_rev_exchange_rate IN NUMBER,
17 p_bill_conversion_type IN VARCHAR2,
18 p_bill_conversion_date IN DATE,
19 p_bill_exchange_rate IN NUMBER,
20 p_rc_reval_revenue_amount IN NUMBER,
21 x_override_rev_amt_flag OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
22 x_rev_amt_rate_type OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
23 x_rev_amt_rate_date OUT NOCOPY DATE, --File.Sql.39 bug 4440895
24 x_rev_amt_exchange_rate OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
25 x_rc_revenue_amount OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
26 x_override_bill_amt_flag OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
27 x_bill_amt_rate_type OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
28 x_bill_amt_rate_date OUT NOCOPY DATE, --File.Sql.39 bug 4440895
29 x_bill_amt_exchange_rate OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
30 x_rc_bill_amount OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
31 x_event_description OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
32 x_error_message OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
33 x_status OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
34 )
35 IS
36
37
38 BEGIN
39
40
41 x_status := 0;
42
43
44 /*
45
46 -- Don't Write any COMMIT or ROLLBACK inside the Client Extension.
47
48 -----------------------------------------------------
49 -- Possible Status Code Values(x_status_code)
50 ------------------------------------------------------
51 -- x_status = 0 or NULL - For Success
52 -- x_status > 0 - For Application Error like Validation error
53 -- In this case transaction will be marked as error
54 x_error_message will be populated with error text
55 -- x_status< 0 - For Oracle Error
56 In this case the calling API will raise an exception
57 and will not proceed further.
58 -- x_error_message will be populated with error text
59 -- If x_status <> 0 then the transaction will be marked as error
60
61
62
63 -----------------------------------------------------------------------------------------
64 -- Override the Event Revenue amount
65 -----------------------------------------------------------------------------------------
66 -- Setting the x_override_rev_amt_flag.
67 -- If you set flag is 'Y' then set the following revenue amount conversion attributes.
68 -- x_rev_amt_rate_type, x_rev_amt_rate_date
69 -- If the flag is 'N' then Ignore the revenue amount conversion attributes.
70
71 -- If you set a x_rev_amt_rate_type = 'USER' then set the rate for x_rev_amt_exchange_rate
72
73 -- If you override the revenue amount 'x_rc_revenue_amount' then Ignore the revenue amount
74 -- conversion attributes
75
76
77
78 -----------------------------------------------------------------------------------------
79 -- Override the Event Bill amount
80 -----------------------------------------------------------------------------------------
81 -- Setting the x_override_rev_amt_flag.
82 -- Set the x_override_bill_amt_flag.
83 -- If you set flag is 'Y' then set the bill amount conversion attributes.
84 -- If the flag is 'N' then Ignore the bill amount conversion attributes.
85
86 -- If you set a x_bill_amt_rate_type = 'USER' then set the rate for x_rev_bill_exchange_rate
87
88 -- If you override the bill amount 'x_rc_bill_amount' then Ignore the bill amount
89 -- conversion attributes
90
91
92 -----------------------------------------------------------------------------------------
93 -- Override the Event description
94 -----------------------------------------------------------------------------------------
95 -- Set the x_event_description. If you pass not null event description then
96 -- this value will be stamp into the pa_mc_events */
97
98
99
100 EXCEPTION
101 WHEN OTHERS THEN
102 x_override_rev_amt_flag := NULL; --NOCOPY
103 x_rev_amt_rate_type := NULL; --NOCOPY
104 x_rev_amt_rate_date := NULL; --NOCOPY
105 x_rev_amt_exchange_rate := NULL; --NOCOPY
106 x_rc_revenue_amount := NULL; --NOCOPY
107 x_override_bill_amt_flag := NULL; --NOCOPY
108 x_bill_amt_rate_type := NULL; --NOCOPY
109 x_bill_amt_rate_date := NULL; --NOCOPY
110 x_bill_amt_exchange_rate := NULL; --NOCOPY
111 x_rc_bill_amount := NULL; --NOCOPY
112 x_event_description := NULL; --NOCOPY
113 -- Add your exception handler here.
114 -- To raise an application error, assign a positive number to x_status.
115 -- To raise an ORACLE error, assign SQLCODE to x_status.
116 null;
117
118
119 END override_rsob_event_amount;
120
121 END pa_event_rc_client_extn;