1 PACKAGE jmf_shikyu_rpt_cur_pvt AS
2 --$Header: JMFVCURS.pls 120.5 2005/12/05 20:14:57 vchu noship $
3 --+===========================================================================+
4 --| Copyright (c) 2005 Oracle Corporation |
5 --| Redwood Shores, California, USA |
6 --| All rights reserved. |
7 --+===========================================================================+
8 --| |
9 --| FILENAME : JMFVCURS.pls |
10 --| |
11 --| DESCRIPTION: Specification file of the package for creating |
12 --| temporary data for the Shikyu Cost Update |
13 --| Analysis report. |
14 --| |
15 --| HISTORY: |
16 --| 28-MAY-2005 fwang Created. |
17 --| 30-NOV-2005 Sherly added a new function FUNCTION |
18 --| is_current_period |
19 --| 05-DEC-2005 Sherly added a new parameter p_rate_not_found |
20 --+===========================================================================+
21
22 --========================================================================
23 -- PROCEDURE : cuar_get_cost_data PUBLIC
24 -- PARAMETERS: p_cost_type_id cost type id
25 -- : p_ou_id operating unit id
26 -- : p_inv_org_name_from oem inventory org name from
27 -- : p_inv_org_name_to oem inventory org name to
28 -- : p_run report run type
29 -- : p_currency_cnv_type currency conversion type
30 -- : p_currency_cnv_date currency conversion date
31 -- : p_function_currency Functional Currency
32 -- : p_rate_not_found Currency conversion Rate not found flag
33 -- COMMENT : used as portal to choose process according to run type
34 -- PRE-COND :
35 -- EXCEPTIONS:
36 --========================================================================
37 PROCEDURE cuar_get_cost_data
38 (
39 p_cost_type_id IN NUMBER
40 ,p_org_id IN NUMBER
41 ,p_inv_org_name_from IN VARCHAR2
42 ,p_inv_org_name_to IN VARCHAR2
43 ,p_run IN VARCHAR2
44 ,p_currency_cnv_type IN VARCHAR2
45 ,p_currency_cnv_date IN VARCHAR2
46 ,p_function_currency IN VARCHAR2
47 ,p_rate_not_found OUT NOCOPY VARCHAR2
48 );
49
50 --========================================================================
51 -- PROCEDURE : cuar_get_unreceived_po PUBLIC
52 -- PARAMETERS: p_cost_type_id cost type id
53 -- : p_ou_id operating unit id
54 -- : p_inv_org_name_from oem inventory org name from
55 -- : p_inv_org_name_to oem inventory org name to
56 -- : p_currency_cnv_type currency conversion type
57 -- : p_currency_cnv_date currency conversion date
58 -- : p_func_currency_code functional currency code
59 -- COMMENT : collect appropriate unreceived po qty data and insert into
60 -- the temporary table
61 -- PRE-COND :
62 -- EXCEPTIONS:
63 --========================================================================
64 PROCEDURE cuar_get_unreceived_po
65 (
66 p_cost_type_id IN NUMBER
67 ,p_org_id IN NUMBER
68 ,p_inv_org_name_from IN VARCHAR2
69 ,p_inv_org_name_to IN VARCHAR2
70 ,p_currency_cnv_type IN VARCHAR2
71 ,p_currency_cnv_date IN DATE
72 ,p_func_currency_code IN VARCHAR2
73 );
74
75 --========================================================================
76 -- PROCEDURE : cuar_get_unshipped_so PUBLIC
77 -- PARAMETERS: p_cost_type_id cost type id
78 -- : p_ou_id operating unit id
79 -- : p_inv_org_name_from oem inventory org name from
80 -- : p_inv_org_name_to oem inventory org name to
81 -- : p_currency_cnv_type currency conversion type
82 -- : p_currency_cnv_date currency conversion date
83 -- : p_func_currency_code functional currency code
84 -- COMMENT : collect appropriate unshipped so qty data and insert into
85 -- the temporary table
86 -- PRE-COND :
87 -- EXCEPTIONS:
88 --========================================================================
89 PROCEDURE cuar_get_unshipped_so
90 (
91 p_cost_type_id IN NUMBER
92 ,p_org_id IN NUMBER
93 ,p_inv_org_name_from IN VARCHAR2
94 ,p_inv_org_name_to IN VARCHAR2
95 ,p_currency_cnv_type IN VARCHAR2
96 ,p_currency_cnv_date IN DATE
97 ,p_func_currency_code IN VARCHAR2
98 );
99
100 --========================================================================
101 -- PROCEDURE : cuar_get_rma_so PUBLIC
102 -- PARAMETERS: p_cost_type_id cost type id
103 -- : p_ou_id operating unit id
104 -- : p_inv_org_name_from oem inventory org name from
105 -- : p_inv_org_name_to oem inventory org name to
106 -- : p_currency_cnv_type currency conversion type
107 -- : p_currency_cnv_date currency conversion date
108 -- : p_func_currency_code functional currency code
109 -- COMMENT : collect appropriate rma so qty data and insert into
110 -- the temporary table
111 -- PRE-COND :
112 -- EXCEPTIONS:
113 --========================================================================
114 PROCEDURE cuar_get_rma_so
115 (
116 p_org_id IN NUMBER
117 ,p_inv_org_name_from IN VARCHAR2
118 ,p_inv_org_name_to IN VARCHAR2
119 ,p_func_currency_code IN VARCHAR2
120 );
121
122 --========================================================================
123 -- FUNCTION : cuar_get_item_cost PUBLIC
124 -- PARAMETERS: p_ou_id operating unit id
125 -- : p_item_id item id
126 -- : p_cst_type_id item cost type id
127 -- RETURN : will return the item cost
128 -- COMMENT : get item cost for specific item
129 -- PRE-COND :
130 -- EXCEPTIONS:
131 --========================================================================
132 FUNCTION cuar_get_item_cost
133 (
134 p_org_id IN NUMBER
135 ,p_item_id IN NUMBER
136 ,p_cst_type_id IN NUMBER
137 ) RETURN NUMBER;
138
139 --========================================================================
140 -- FUNCTION : get_uom_primary PUBLIC
141 -- PARAMETERS: p_inventory_item_id inventory item id
142 -- : p_org_id organization id
143 -- RETURN : will return the primary uom
144 -- COMMENT : getting the primary UOM
145 -- PRE-COND :
146 -- EXCEPTIONS:
147 --========================================================================
148 FUNCTION get_uom_primary
149 (
150 p_inventory_item_id IN NUMBER
151 ,p_org_id IN NUMBER
152 ) RETURN VARCHAR2;
153
154 --========================================================================
155 -- FUNCTION : get_uom_primary_code PUBLIC
156 -- PARAMETERS: p_inventory_item_id inventory item id
157 -- : p_org_id organization id
158 -- RETURN : will return the primary uom code
159 -- COMMENT : getting the primary UOM code
160 -- PRE-COND :
161 -- EXCEPTIONS:
162 --========================================================================
163 FUNCTION get_uom_primary_code
164 (
165 p_inventory_item_id IN NUMBER
166 ,p_org_id IN NUMBER
167 ) RETURN VARCHAR2;
168
169 --========================================================================
170 -- FUNCTION : get_uom_primary_qty PUBLIC
171 -- PARAMETERS: p_inventory_item_id inventory item id
172 -- : p_org_id organization id
173 -- : p_precision precision
174 -- : p_from_quantity quantity of from UOM
175 -- : p_from_unit from UOM
176 -- RETURN : will return the quantity with primary uom
177 -- COMMENT : getting the quantity with primary uom
178 -- PRE-COND :
179 -- EXCEPTIONS:
180 --========================================================================
181 FUNCTION get_uom_primary_qty
182 (
183 p_inventory_item_id IN NUMBER
184 ,p_org_id IN NUMBER
185 ,p_precision IN NUMBER
186 ,p_from_quantity IN NUMBER
187 ,p_from_unit IN VARCHAR2
188 ) RETURN NUMBER;
189
190 --========================================================================
191 -- FUNCTION : get_uom_primary_qty_from_code PUBLIC
192 -- PARAMETERS: p_inventory_item_id inventory item id
193 -- : p_org_id organization id
194 -- : p_precision precision
195 -- : p_from_quantity quantity of from UOM
196 -- : p_from_unit from UOM code
197 -- RETURN : will return the quantity with primary uom code
198 -- COMMENT : getting the quantity with primary uom code
199 -- PRE-COND :
200 -- EXCEPTIONS:
201 --========================================================================
202 FUNCTION get_uom_primary_qty_from_code
203 (
204 p_inventory_item_id IN NUMBER
205 ,p_org_id IN NUMBER
206 ,p_precision IN NUMBER
207 ,p_from_quantity IN NUMBER
208 ,p_from_unit IN VARCHAR2
209 ) RETURN NUMBER;
210
211 --========================================================================
212 -- FUNCTION : IS_CURRENT_PERIOD PUBLIC
213 -- PARAMETERS: p_date DATE
214 -- : p_org_id Inventory org id
215 --
216 -- RETURN : will return if input date is in current inventory accounting period
217 -- COMMENT :
218 -- PRE-COND :
219 -- EXCEPTIONS:
220 --========================================================================
221 FUNCTION is_current_period
222 ( p_date IN DATE
223 ,p_org_id IN NUMBER
224 ) RETURN BOOLEAN ;
225
226 END jmf_shikyu_rpt_cur_pvt;