1 PACKAGE INV_MGD_MVT_STATS_PROC AUTHID CURRENT_USER AS
2 /* $Header: INVSTATS.pls 120.0.12010000.2 2008/10/01 12:03:51 ajmittal ship $ */
3 --+=======================================================================+
4 --| Copyright (c) 1998 Oracle Corporation |
5 --| Redwood Shores, CA, USA |
6 --| All rights reserved. |
7 --+=======================================================================+
8 --| FILENAME |
9 --| INVSTATS.pls |
10 --| |
11 --| DESCRIPTION |
12 --| Spec. of INV_MGD_MVT_STATS_PROC |
13 --| |
14 --| HISTORY |
15 --+======================================================================*/
16
17
18 --========================================================================
19 -- PROCEDURE : Process_Transaction PRIVATE
20 -- PARAMETERS: p_api_version_number known api version
21 -- p_init_msg_list FND_API.G_TRUE to reset list
22 -- x_return_status return status
23 -- x_msg_count number of messages in the list
24 -- x_msg_data message text
25 -- p_legal_entity_id Legal Entity ID
26 -- p_start_date Transaction start date
27 -- p_end_date Transaction end date
28 -- p_source type Transaction type (SO,PO etc)
29 -- COMMENT :
30 -- This processes all the transaction for the specified legal
31 -- entity that have a transaction date within the specified
32 -- date range.
33 --| 02/08/2008 ajmittal Bug 7165989 - Movement Statistics RMA |
34 --| Triangulation uptake. |
35 --| Modified procs:Process_IO_Arrival_Txn, |
36 --| Process_RMA_Transaction |
37 --| New procedure : Process_RMA_Triangulation |
38 --========================================================================
39 /* 7165989 - New procedure added to process RMA Triangulation transactions */
40 --========================================================================
41 -- PROCEDURE : Process_RMA_Triangulation PRIVATE
42 -- PARAMETERS: x_return_status status flag
43 -- p_movement_transaction Movement Transaction record
44 -- p_stat_typ_transaction Parameter details
45 -- COMMENT : This processes all the RMA triangulation txn for the specified
46 -- legal entity where the RMA is booked
47 --========================================================================
48
49 PROCEDURE Process_RMA_Triangulation
50 ( p_movement_transaction IN INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
51 , p_stat_typ_transaction IN INV_MGD_MVT_DATA_STR.Movement_Stat_Usages_Rec_Type
52 , x_return_status OUT NOCOPY VARCHAR2
53 );
54 PROCEDURE Process_Transaction
55 ( p_api_version_number IN NUMBER
56 , p_init_msg_list IN VARCHAR2
57 , p_legal_entity_id IN NUMBER
58 , p_start_date IN DATE
59 , p_end_date IN DATE
60 , p_source_type IN VARCHAR2
61 , x_return_status OUT NOCOPY VARCHAR2
62 , x_msg_count OUT NOCOPY NUMBER
63 , x_msg_data OUT NOCOPY VARCHAR2
64 );
65
66 --========================================================================
67 -- PROCEDURE : Process_Transaction OVERLOADED
68 -- PARAMETERS:
69 -- x_return_status return status
70 -- p_movement_transaction Movement Transaction record
71 -- COMMENT :
72 -- This procedure is overloaded so that the form can use
73 -- this proceure to directly enter data in the mvt stats
74 -- table.
75 --========================================================================
76
77 PROCEDURE Process_Transaction
78 ( p_movement_transaction IN INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
79 );
80
81 --========================================================================
82 -- PROCEDURE : Process_INV_Transaction PRIVATE
83 -- PARAMETERS: x_return_status status flag
84 -- p_legal_entity_id Legal Entity ID
85 -- p_start_date Transaction start date
86 -- p_end_date Transaction end date
87 -- p_transaction type INV
88 -- COMMENT :
89 -- This processes all the INV transaction for the specified legal
90 -- entity that have a transaction date within the specified
91 -- date range.
92 --========================================================================
93
94 PROCEDURE Process_INV_Transaction
95 ( p_movement_transaction IN
96 INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
97 , p_start_date IN DATE
98 , p_end_date IN DATE
99 , p_transaction_type IN VARCHAR2
100 , x_return_status OUT NOCOPY VARCHAR2
101 );
102
103
104 --========================================================================
105 -- PROCEDURE : Process_SO_Transaction PRIVATE
106 -- PARAMETERS: x_return_status status flag
107 -- p_legal_entity_id Legal Entity ID
108 -- p_start_date Transaction start date
109 -- p_end_date Transaction end date
110 -- p_transaction type SO,RMA,drop shipments,IO
111 -- COMMENT :
112 -- This processes all the SO transaction for the specified legal
113 -- entity that have a transaction date within the specified
114 -- date range.
115 --========================================================================
116
117 PROCEDURE Process_SO_Transaction
118 ( p_movement_transaction IN
119 INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
120 , p_start_date IN DATE
121 , p_end_date IN DATE
122 , p_transaction_type IN VARCHAR2
123 , x_return_status OUT NOCOPY VARCHAR2
124 );
125
126 --========================================================================
127 -- PROCEDURE : Process_Triangulation_Txn PRIVATE
128 -- PARAMETERS: x_return_status status flag
129 -- p_legal_entity_id Legal Entity ID
130 -- p_start_date Transaction start date
131 -- p_end_date Transaction end date
132 -- p_transaction type SO,RMA,drop shipments,IO
133 -- COMMENT :
134 -- This processes all the triangulation transactions (create
135 -- transaction in one legal entity and pick release in another
136 -- legal entity of different country) for the specified legal
137 -- entity that have a transaction date within the specified
138 -- date range.
139 -- This procedure will create arrival record only for the
140 -- creation side of cross legal entity transactions for invoice
141 -- based triangulation mode. The pick release side will be taken
142 -- care of by the regular process_so_transaction.
143 --========================================================================
144
145 PROCEDURE Process_Triangulation_Txn
146 ( p_movement_transaction IN
147 INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
148 , p_start_date IN DATE
149 , p_end_date IN DATE
150 , p_transaction_type IN VARCHAR2
151 , x_return_status OUT NOCOPY VARCHAR2
152 );
153
154 --========================================================================
155 -- PROCEDURE : Process_IO_Arrival_Txn PRIVATE
156 -- PARAMETERS: x_return_status status flag
157 -- p_legal_entity_id Legal Entity ID
158 -- p_start_date Transaction start date
159 -- p_end_date Transaction end date
160 -- p_transaction type SO,RMA,drop shipments,IO
161 -- COMMENT :
162 -- This processes all the internal order arrival transactions
163 -- for the specified legal entity that have a transaction date
164 -- within the specified date range.
165 -- This procedure will create arrival record only for the
166 -- receiving side of internal order transactions. The dispatch
167 -- side will be taken care by the regular process_so_transaction.
168 --========================================================================
169
170 PROCEDURE Process_IO_Arrival_Txn
171 ( p_movement_transaction IN
172 INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
173 , p_start_date IN DATE
174 , p_end_date IN DATE
175 , p_transaction_type IN VARCHAR2
176 , x_return_status OUT NOCOPY VARCHAR2
177 );
178
179
180 --========================================================================
181 -- PROCEDURE : Process_PO_Transaction PRIVATE
182 -- PARAMETERS: x_return_status status flag
183 -- p_legal_entity_id Legal Entity ID
184 -- p_start_date Transaction start date
185 -- p_end_date Transaction end date
186 -- p_transaction type PO,RTV
187 -- COMMENT :
188 -- This processes all the PO transaction for the specified legal
189 -- entity that have a transaction date within the specified
190 -- date range.
191 --========================================================================
192
193 PROCEDURE Process_PO_Transaction
194 ( p_movement_transaction IN
195 INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
196 , p_start_date IN DATE
197 , p_end_date IN DATE
198 , p_transaction_type IN VARCHAR2
199 , x_return_status OUT NOCOPY VARCHAR2
200 );
201
202 --========================================================================
203 -- PROCEDURE : Process_RMA_Transaction PRIVATE
204 -- PARAMETERS: x_return_status status flag
205 -- p_legal_entity_id Legal Entity ID
206 -- p_start_date Transaction start date
207 -- p_end_date Transaction end date
208 -- p_transaction type RMA
209 -- COMMENT :
210 -- This processes all the RMA transaction for the specified legal
211 -- entity that have a transaction date within the specified
212 -- date range.
213 --========================================================================
214
215 PROCEDURE Process_RMA_Transaction
216 ( p_movement_transaction IN
217 INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
218 , p_start_date IN DATE
219 , p_end_date IN DATE
220 , p_transaction_type IN VARCHAR2
221 , x_return_status OUT NOCOPY VARCHAR2
222 );
223
224 --========================================================================
225 -- PROCEDURE : Update_Invoice_Info PRIVATE
226 -- PARAMETERS: x_return_status status flag
227 -- p_legal_entity_id Legal Entity ID
228 -- p_start_date Transaction start date
229 -- p_end_date Transaction end date
230 -- p_transaction type Transaction Type
231 -- COMMENT :
232 -- This updates the invoice information for the particular
233 -- transaction_type for the records that are Open and Verified
234 --========================================================================
235
236 PROCEDURE Update_Invoice_Info
237 ( p_movement_transaction IN
238 INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
239 , p_start_date IN DATE
240 , p_end_date IN DATE
241 , p_transaction_type IN VARCHAR2
242 , x_return_status OUT NOCOPY VARCHAR2
243 );
244
245 --========================================================================
246 -- PROCEDURE : Process_Pending_Transaction PRIVATE
247 -- PARAMETERS: x_return_status status flag
248 -- p_legal_entity_id Legal Entity ID
249 -- p_start_date Transaction start date
250 -- p_end_date Transaction end date
251 -- p_transaction type Transaction Type
252 -- COMMENT :
253 -- This processes the pending transactions
254 --========================================================================
255
256 PROCEDURE Process_Pending_Transaction
257 ( p_movement_transaction IN
258 INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
259 , p_start_date IN DATE
260 , p_end_date IN DATE
261 , p_transaction_type IN VARCHAR2
262 , x_return_status OUT NOCOPY VARCHAR2
263 );
264
265 --========================================================================
266 -- PROCEDURE : Update_PO_With_Correction PRIVATE
267 -- PARAMETERS: x_return_status status flag
268 -- p_legal_entity_id Legal Entity ID
269 -- p_start_date Transaction start date
270 -- p_end_date Transaction end date
271 -- p_transaction type Transaction Type
272 -- COMMENT :
273 -- This updates the PO or RTV transaction with correction if
274 -- the original PO or RTV is not closed yet
275 --========================================================================
276
277
278 PROCEDURE Update_PO_With_Correction
279 ( p_legal_entity_id IN NUMBER
280 , p_start_date IN DATE
281 , p_end_date IN DATE
282 , p_transaction_type IN VARCHAR2
283 , x_return_status OUT NOCOPY VARCHAR2
284 );
285
286
287 END INV_MGD_MVT_STATS_PROC;