DBA Data[Home] [Help]

PACKAGE: APPS.INV_MGD_MVT_STATS_PVT

Source


1 PACKAGE INV_MGD_MVT_STATS_PVT AUTHID CURRENT_USER AS
2 -- $Header: INVVMVTS.pls 115.13 2002/12/11 01:05:38 yawang ship $
3 --+=======================================================================+
4 --|               Copyright (c) 1998 Oracle Corporation                   |
5 --|                       Redwood Shores, CA, USA                         |
6 --|                         All rights reserved.                          |
7 --+=======================================================================+
8 --| FILENAME                                                              |
9 --|     INVVMVTS.pls                                                      |
10 --|                                                                       |
11 --| DESCRIPTION                                                           |
12 --|    Spec of INV_MGD_MVT_STATS_PVT                                      |
13 --|                                                                       |
14 --| HISTORY                                                               |
15 --|     04/01/00 pseshadr        Created                                  |
16 --|     06/15/00 ksaini          Added Procedures                         |
17 --|     07/18/00 ksaini          Added Validate_Rules procedure           |
18 --|     04/01/02 pseshadr        Added Get Pending Txns procedure         |
19 --+======================================================================*/
20 
21 
22 --===================
23 -- PROCEDURES AND FUNCTIONS
24 --===================
25 
26 --========================================================================
27 -- PROCEDURE : Create_Movement_Statistics PUBLIC
28 -- PARAMETERS: p_api_version_number    known api version
29 --             p_init_msg_list         FND_API.G_FALSE not to reset list
30 --             p_transaction_type      transaction type(inv,rec.,PO etc)
31 --             x_return_status         return status
32 --             x_msg_count             number of messages in the list
33 --             x_msg_data              message text
34 --             p_material_transaction  material transaction data record
35 --             p_shipment_transaction  shipment transaction data record
36 --             p_receipt_transaction   receipt transaction data record
37 --             p_movement_transaction  movement transaction data record
38 -- VERSION   : current version         1.0
39 --             initial version         1.0
40 -- COMMENT   : Called by the Process Transaction after all the
41 --             processing is done to insert the transaction/record
42 --             into the movement statistics table.
43 --             This procedure does the insert into the table.
44 --=======================================================================
45 
46 PROCEDURE Create_Movement_Statistics
47 ( p_api_version_number   IN  NUMBER
48 , p_init_msg_list        IN  VARCHAR2 := FND_API.G_FALSE
49 , x_movement_transaction IN OUT NOCOPY
50     INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
51 , x_return_status        OUT NOCOPY VARCHAR2
52 , x_msg_count            OUT NOCOPY NUMBER
53 , x_msg_data             OUT NOCOPY VARCHAR2
54 );
55 
56 
57 --========================================================================
58 -- PROCEDURE : Init_Movement_Record    PUBLIC
59 -- PARAMETERS:
60 --             x_movement_transaction  in  movement transaction data record
61 -- VERSION   : current version         1.0
62 --             initial version         1.0
63 -- COMMENT   : This procedure defaults values for certain attributes which
64 --             are common for all the transactions.
65 --             Eg: statistical_procedure_code,creation_method etc.
66 --=======================================================================
67 
68 PROCEDURE Init_Movement_Record
69 ( x_movement_transaction IN OUT NOCOPY
70     INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
71 );
72 
73 --========================================================================
74 -- PROCEDURE : Get_Open_Mvmt_Stats_Txns    PRIVATE
75 -- PARAMETERS: val_crsr                    REF cursor
76 --             x_return_status             return status
77 --             p_start_date                Transaction start date
78 --             p_end_date              Transaction end date
79 -- COMMENT   :
80 --             This opens the cursor for INV and returns the cursor.
81 --========================================================================
82 
83 PROCEDURE Get_Open_Mvmt_Stats_Txns (
84    val_crsr                     IN OUT NOCOPY  INV_MGD_MVT_DATA_STR.valCurTyp
85  , p_movement_statistics        IN
86                   INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
87  , p_legal_entity_id            IN  NUMBER
88  , p_economic_zone_code         IN  VARCHAR2
89  , p_usage_type                 IN  VARCHAR2
90  , p_stat_type                  IN  VARCHAR2
91  , p_period_name                IN  VARCHAR2
92  , p_document_source_type       IN  VARCHAR2
93  , x_return_status              OUT NOCOPY VARCHAR2
94 );
95 
96 --========================================================================
97 -- PROCEDURE : Get_Pending_Txns    PRIVATE
98 -- PARAMETERS:
99 --             val_crsr                    cursor that returns the selection
100 --             p_movement_Transaction      Movement Transaction record
101 --             p_transaction_type          Transaction Type (SO,PO etc)
102 --             x_return_status             return status
103 -- COMMENT   :
104 --             This gets  all the pending transactions
105 --========================================================================
106 
107 PROCEDURE Get_Pending_Txns (
108    val_crsr                     IN OUT NOCOPY  INV_MGD_MVT_DATA_STR.valCurTyp
109  , p_movement_transaction        IN
110                   INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
111  , p_document_source_type       IN  VARCHAR2
112  , x_return_status              OUT NOCOPY VARCHAR2
113 );
114 
115 --========================================================================
116 -- PROCEDURE : Get_Invoice_Transactions    PRIVATE
117 -- PARAMETERS: inv_crsr                    REF cursor
118 --             x_return_status             return status
119 --             p_start_date                Transaction start date
120 --             p_end_date                  Transaction end date
121 --             p_transaction_type          Transaction Type
122 -- COMMENT   :
123 --========================================================================
124 PROCEDURE Get_Invoice_Transactions (
125    inv_crsr                     IN OUT NOCOPY  INV_MGD_MVT_DATA_STR.valCurTyp
126  , p_movement_transaction       IN
127                   INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
128  , p_start_date                 IN  DATE
129  , p_end_date                   IN  DATE
130  , p_transaction_type           IN  VARCHAR2
131  , x_return_status              OUT NOCOPY VARCHAR2
132 );
133 
134 
135 --========================================================================
136 -- PROCEDURE : Get_PO_Trans_With_Correction    PRIVATE
137 -- PARAMETERS: inv_crsr                        REF cursor
138 --             x_return_status                 return status
139 --             p_legal_entity_id               Legal entity id
140 --             p_start_date                    Transaction start date
141 --             p_end_date                      Transaction end date
142 --             p_transaction_type              Transaction Type
143 -- COMMENT   :
144 --========================================================================
145 PROCEDURE Get_PO_Trans_With_Correction
146 ( inv_crsr                     IN OUT NOCOPY  INV_MGD_MVT_DATA_STR.valCurTyp
147 , p_legal_entity_id            IN  NUMBER
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 : Update_Movement_Statistics   PRIVATE
156 --
157 -- PARAMETERS: x_return_status      Procedure return status
158 --             x_msg_count          Number of messages in the list
159 --             x_msg_data           Message text
160 --             P_MOVEMENT_STATISTICS    Material Movement Statistics transaction
161 --                                  Input data record
162 --
163 -- COMMENT   : Procedure body to Update the Movement
164 --             Statistics record with the
165 --             calculated values ( EX: Invoice information, Status etc ).
166 -- Updated   : 09/Jul/1999
167 --=======================================================================--
168 PROCEDURE Update_Movement_Statistics (
169   p_movement_statistics  IN
170   INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
171 , x_return_status                OUT NOCOPY    VARCHAR2
172 , x_msg_count                    OUT NOCOPY    NUMBER
173 , x_msg_data                     OUT NOCOPY    VARCHAR2
174 );
175 
176 
177  --=========================================================================
178 
179 -- PROCEDURE : Validate_Movement_Statistics  PRIVATE
180 --
181 -- PARAMETERS:
182 --             p_movement_statistics     Material Movement Statistics transaction
183 --                                       Input data record
184 --             p_movement_stat_usages_rec usage record
185 --             x_excp_list               PL/SQL Table type list for storing
186 --                                       and returning the Exception messages
187 --             x_return_status           Procedure return status
188 --             x_msg_count               Number of messages in the list
189 --             x_msg_data                Message text
190 --             x_movement_statistics     Material Movement Statistics transaction
191 --                                       Output data record
192 --
193 -- VERSION   : current version           1.0
194 --             initial version           1.0
195 --
196 -- COMMENT   :  Procedure specification to Perform the
197 --              Validation for the Movement
198 --             Statistics Record FOR Exceptions
199 --
200 -- CREATED  : 10/20/1999
201 --=============================================================================-
202 PROCEDURE Validate_Movement_Statistics
203  ( p_movement_statistics     IN
204      INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
205  , p_movement_stat_usages_rec IN
206      INV_MGD_MVT_DATA_STR.Movement_Stat_Usages_Rec_Type
207  , x_excp_list                OUT NOCOPY
208      INV_MGD_MVT_DATA_STR.excp_list
209  , x_updated_flag             OUT NOCOPY VARCHAR2
210  , x_return_status            OUT NOCOPY VARCHAR2
211  , x_msg_count                OUT NOCOPY NUMBER
212  , x_msg_data                 OUT NOCOPY VARCHAR2
213  , x_movement_statistics      OUT NOCOPY
214      INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
215  );
216 
217 --========================================================================
218 -- PROCEDURE : Delete_Movement_Statistics PUBLIC
219 -- PARAMETERS:
220 --             p_movement_transaction  movement transaction data record
221 -- VERSION   : current version         1.0
222 --             initial version         1.0
223 -- COMMENT   : Called by the Form to delete a movement record
224 --=======================================================================
225 PROCEDURE Delete_Movement_Statistics
226 ( p_movement_transaction IN
227     INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
228 , x_return_status        OUT NOCOPY VARCHAR2
229 );
230 
231 --========================================================================
232 -- PROCEDURE : Validate_Rules            PRIVATE
233 -- PARAMETERS: p_mtl_transaction          IN  movement transaction record
234 --             x_mtl_transaction          OUT movement transaction record
235 --             x_return_status            OUT standard output
236 --             x_record_status            OUT 'Y' if corrected, 'N' otherwise
237 --
238 -- VERSION   : current version         1.0
239 --             initial_version          1.0
240 -- COMMENT   : Validate the transaction record for its DELIVERY_TERMS,
244 ( p_movement_stat_usages_rec      IN
241 --             UNIT_WEIGHT/TOTAL_WEIGHT and COMMODITY_CODE.
242 --=======================================================================
243 PROCEDURE Validate_Rules
245     INV_MGD_MVT_DATA_STR.Movement_Stat_Usages_Rec_Type
246 , x_movement_transaction          IN OUT NOCOPY
247     INV_MGD_MVT_DATA_STR.Movement_Transaction_Rec_Type
248 , x_return_status                 OUT NOCOPY VARCHAR2
249 , x_Uom_status                    OUT NOCOPY VARCHAR2
250 , x_msg_count                     OUT NOCOPY NUMBER
251 , x_msg_data                      OUT NOCOPY VARCHAR2
252 );
253 
254 
255 END INV_MGD_MVT_STATS_PVT;