1 PACKAGE BODY CSTPPAHK AS
2 /* $Header: CSTPAHKB.pls 115.8 2002/11/09 00:26:49 awwang ship $ */
3
4 -- FUNCTION
5 -- acq_cost_hook Cover routine to allow users to add
6 -- customization. This would let users circumvent
7 -- our acquisition cost processing. This function
8 -- is called by both CSTPPACQ .
9 --
10 --
11 -- RETURN VALUES
12 -- integer 1 Hook has been used.
13 -- 0 Continue cost processing for this transaction
14 -- as usual.
15 --
16 /* Added I_START_DATE and I_END_DATE input parameters
17 * to provide the hook with the process_upto_date information
18 */
19 function acq_cost_hook(
20 I_PERIOD_ID IN NUMBER,
21 I_START_DATE IN DATE,
22 I_END_DATE IN DATE,
23 I_COST_TYPE_ID IN NUMBER,
24 I_COST_GROUP_ID IN NUMBER,
25 I_USER_ID IN NUMBER,
26 I_LOGIN_ID IN NUMBER,
27 I_REQ_ID IN NUMBER,
28 I_PROG_ID IN NUMBER,
29 I_PROG_APPL_ID IN NUMBER,
30 O_Err_Num OUT NOCOPY NUMBER,
31 O_Err_Code OUT NOCOPY VARCHAR2,
32 O_Err_Msg OUT NOCOPY VARCHAR2
33 )
34 return integer IS
35 BEGIN
36 o_err_num := 0;
37 o_err_code := '';
38 o_err_msg := '';
39
40 return 0;
41
42 EXCEPTION
43
44 when others then
45 o_err_num := SQLCODE;
46 o_err_msg := 'CSTPPAQH.ACQ_COST_HOOK:' || substrb(SQLERRM,1,150);
47 return 0;
48
49 END acq_cost_hook;
50
51 -- PROCEDURE
52 -- acq_receipt_cost_hook Cover routine to allow users to provide
53 -- cost for the receipt transaction that have
54 -- been done in periods prior to the first
55 -- period of Acquisition Cost. This function
56 -- is called by both CSTPPACQ .
57 --
58 --
59 -- OUT VALUES
60 -- o_error_num <0 Error has occured.
61 -- 0 No error has occured.
62 --
63 -- o_hook_cost Cost of the transaction.
64 --
65 -- When returning cost in the o_hook_cost set the o_error_num to zero.
66 -- If the o_error_num is less than zero then returned cost will not be used.
67 --
68 --
69 procedure acq_receipt_cost_hook(
70 I_COST_TYPE_ID IN NUMBER,
71 I_COST_GROUP_ID in NUMBER,
72 I_PAR_TXN IN NUMBER,
73 O_HOOK_COST OUT NOCOPY NUMBER,
74 O_ERROR_NUM OUT NOCOPY NUMBER,
75 O_ERROR_MSG OUT NOCOPY VARCHAR2)
76 IS
77 BEGIN
78
79 o_error_num := -1;
80 o_hook_cost := 0;
81 o_error_msg := 'CSTPPAQH.ACQ_RECEIPT_COST_HOOK-No_Receipt_cost error';
82 return;
83
84 EXCEPTION
85
86 when others then
87 o_error_num := -1;
88 o_error_msg := 'CSTPPAQH.ACQ_RECEIPT_COST_HOOK:' ||to_char(SQLCODE) ||
89 substrb(SQLERRM,1,150);
90 return;
91
92 END acq_receipt_cost_hook;
93
94
95 END CSTPPAHK;