DBA Data[Home] [Help]

PACKAGE: APPS.GME_SUPPLY_RES_PVT

Source


1 PACKAGE GME_SUPPLY_RES_PVT AUTHID CURRENT_USER AS
2 /*  $Header: GMEORESS.pls 120.1 2007/12/24 19:38:45 srpuri ship $
3  +=========================================================================+
4  |                Copyright (c) 2000 Oracle Corporation                    |
5  |                        TVP, Reading, England                            |
6  |                         All rights reserved                             |
7  +=========================================================================+
8  | FILENAME                                                                |
9  |    GMIURSVS.pls                                                         |
10  |                                                                         |
11  | DESCRIPTION                                                             |
12  |     This package contains private utilities relating to Reservations    |
13  |     against GME Production as a supply source                           |
14  |                                                                         |
15  |                                                                         |
16  | HISTORY                                                                 |
17  |     Aug-18-2003  Liping Gao Created                                     |
18  +=========================================================================+
19   API Name  : GME_SUPPLY_RES_PVT
20   Type      : Private
21   Function  : This package contains Private Utilities procedures used to
22               support change management for Reservations against GME
23               Production as a supply source
24   Pre-reqs  : N/A
25   Parameters: Per function
26 
27   Current Vers  : 1.0
28 
29 */
30 TYPE Batch_OM_change_rec is RECORD
31    ( Batch_line_id        Number
32    , Batch_id             Number
33    , fpo_Batch_id         Number
34    , Batch_type           Number(5)
35    , old_planned_qty      Number
36    , new_planned_qty      Number
37    , old_trans_qty        Number
38    , new_trans_qty        Number
39    , old_planned_uom      Varchar2(5)
40    , new_planned_uom      Varchar2(5)
41    , Actual_qty           Number
42    , Batch_status         Number
43    , Release_type         Number
44    , Cmplt_date           Date
45   );
46 
47    /*================================================================================
48      Procedure
49        create_reservation_from_FPO
50      Description
51        This procedure is invoked during FPO to Batch conversion.  It moves reservations
52        from the FPO supply source to the newly generated batches (as a supply source).
53    ================================================================================*/
54  PROCEDURE create_reservation_from_FPO
55  (
56     P_FPO_batch_id           IN    NUMBER
57   , P_New_batch_id           IN    NUMBER
58   , X_return_status          OUT   NOCOPY VARCHAR2
59   , X_msg_count              OUT   NOCOPY NUMBER
60   , X_msg_data               OUT   NOCOPY VARCHAR2
61  );
62 
63 
64    /*================================================================================
65      Procedure
66        notify_CSR
67      Description
68        This procedure verifies that a reservation relationship exists between sales demand
69        and production supply and then initiates issue of workflow notifications to advise
70        the customer sales representative that sales reservations are impacted by actions
71        to the production supply
72    ================================================================================*/
73   PROCEDURE notify_CSR
74  (
75     P_Batch_id               IN    NUMBER default null
76   , P_FPO_id                 IN    NUMBER default null
77   , P_Batch_line_id          IN    NUMBER default null
78   , P_So_line_id             IN    NUMBER default null
79   , P_batch_trans_id         IN    NUMBER default null
80   , P_organization_id        IN    NUMBER default null
81   , P_action_code            IN    VARCHAR2
82   , X_return_status          OUT   NOCOPY VARCHAR2
83   , X_msg_cont               OUT   NOCOPY NUMBER
84   , X_msg_data               OUT   NOCOPY VARCHAR2
85  );
86 
87 
88 
89    /*================================================================================
90      Procedure
91        transfer_reservation_to_inv
92      Description
93        This procedure is invoked during Production Yield.  It transfers reservations
94        made against PROD supply to the newly generated INV supply.  The detailing on
95        the reservations mirrors the detailing on the WIP Completion yield transactions.
96    ================================================================================*/
97   PROCEDURE transfer_reservation_to_inv
98  (
99     p_matl_dtl_rec           IN              gme_material_details%ROWTYPE
100   , p_transaction_id         IN              NUMBER
101   , x_message_count          OUT NOCOPY      NUMBER
102   , x_message_list           OUT NOCOPY      VARCHAR2
103   , x_return_status          OUT NOCOPY      VARCHAR2
104  );
105 
106    /*================================================================================
107      Procedure
108        query_prod_supply_reservations
109      Description
110        Retrieve reservations placed against Production as a source of supply.  If
111        material_detail_id is supplied, retrieve all the reservations against this supply
112        line.   If batch_id only is supplied, retrieve all the reservations against this
113        batch/FPO as a source of supply.
114    ================================================================================*/
115   PROCEDURE query_prod_supply_reservations
116  (
117     p_matl_dtl_rec               IN              gme_material_details%ROWTYPE
118   , x_mtl_reservation_tbl        OUT NOCOPY      inv_reservation_global.mtl_reservation_tbl_type
119   , x_mtl_reservation_tbl_count  OUT NOCOPY      NUMBER
120   , x_msg_count                  OUT NOCOPY      NUMBER
121   , x_msg_data                   OUT NOCOPY      VARCHAR2
122   , x_return_status              OUT NOCOPY      VARCHAR2
123  );
124 
125    /*================================================================================
126      Procedure
127        relieve_prod_supply_resv
128      Description
129        This procedure is invoked when there is a decrease in anticipated production
130        supply.  It reduces any reservations associated to the supply accordingly.
131    ================================================================================*/
132   PROCEDURE relieve_prod_supply_resv
133 (
134     p_matl_dtl_rec               IN              gme_material_details%ROWTYPE
135   , x_msg_count                  OUT NOCOPY      NUMBER
136   , x_msg_data                   OUT NOCOPY      VARCHAR2
137   , x_return_status              OUT NOCOPY      VARCHAR2
138  );
139 
140    /*================================================================================
141      Procedure
142        delete_prod_supply_resv
143      Description
144        This procedure is invoked when there is a loss of anticipated production
145        supply. This may be as a result of deletion, cancellation or termination.
146        The processing deletes any reservations associated to the supply line accordingly.
147    ================================================================================*/
148   PROCEDURE delete_prod_supply_resv
149 (
150     p_matl_dtl_rec               IN              gme_material_details%ROWTYPE
151   , x_msg_count                  OUT NOCOPY      NUMBER
152   , x_msg_data                   OUT NOCOPY      VARCHAR2
153   , x_return_status              OUT NOCOPY      VARCHAR2
154  );
155 
156    /*================================================================================
157      Procedure
158        delete_batch_prod_supply_resv
159      Description
160        This procedure is invoked when there is a loss of anticipated production
161        supply. This may be as a result of cancellation or termination.
162        The processing deletes any reservations associated to the batch/FPO accordingly.
163    ================================================================================*/
164   PROCEDURE delete_batch_prod_supply_resv
165 (
166     p_batch_header_rec           IN              gme_batch_header%ROWTYPE
167   , x_msg_count                  OUT NOCOPY      NUMBER
168   , x_msg_data                   OUT NOCOPY      VARCHAR2
169   , x_return_status              OUT NOCOPY      VARCHAR2
170 );
171 END GME_SUPPLY_RES_PVT;