DBA Data[Home] [Help]

PACKAGE: APPS.EAM_WORKORDERTRANSACTIONS_PUB

Source


1 PACKAGE EAM_WorkOrderTransactions_PUB AS
2 /* $Header: EAMPWOTS.pls 120.1.12010000.2 2008/11/06 23:51:58 mashah ship $ */
3 
4      -- Version  Initial version    1.0    Alice Yang
5 
6 G_PKG_NAME		CONSTANT VARCHAR2(50) := 'EAM_WorkOrderTransactions_PUB';
7 
8 -- Transaction Type Constants
9 G_TXN_TYPE_COMPLETE 	CONSTANT NUMBER := 1;
10 G_TXN_TYPE_UNCOMPLETE	CONSTANT NUMBER := 2;
11 
12 -- For rebuild work order with material issue only
13 TYPE Inventory_Item_Rec_Type is RECORD
14 (
15 	subinventory		VARCHAR2(30),
16 	locator			VARCHAR2(30),
17 	lot_number		VARCHAR2(80),
18 	serial_number		VARCHAR2(30),
19 	quantity		NUMBER
20 );
21 
22 TYPE Inventory_Item_Tbl_Type is TABLE OF Inventory_Item_Rec_Type
23 	INDEX BY BINARY_INTEGER;
24 
25 TYPE Attributes_Rec_Type is RECORD
26 (
27           p_attribute_category   VARCHAR2(30)  := null,
28           p_attribute1           VARCHAR2(150) := null,
29           p_attribute2           VARCHAR2(150) := null,
30           p_attribute3           VARCHAR2(150) := null,
31           p_attribute4           VARCHAR2(150) := null,
32           p_attribute5           VARCHAR2(150) := null,
33           p_attribute6           VARCHAR2(150) := null,
34           p_attribute7           VARCHAR2(150) := null,
35           p_attribute8           VARCHAR2(150) := null,
36           p_attribute9           VARCHAR2(150) := null,
37           p_attribute10          VARCHAR2(150) := null,
38           p_attribute11          VARCHAR2(150) := null,
39           p_attribute12          VARCHAR2(150) := null,
40           p_attribute13          VARCHAR2(150) := null,
41           p_attribute14          VARCHAR2(150) := null,
42           p_attribute15          VARCHAR2(150) := null
43 );
44 
45 /***************************************************************************
46  *
47  * This package will be used to complete and uncomplete EAM work order and operations
48  *
49  * PARAMETERS:
50  *
51  * STANDARD API PARAMS:
52  * p_api_version          version number of incoming call
53  * p_commit               whether to commit the changes to DB
54  *                        can be FND_API.G_TRUE or FND_API.G_FALSE
55  * x_return_status        result of calling this API
56  *                        can be FND_API.G_RET_STS_SUCCESS, G_RET_STS_ERROR, or G_RET_STS_UNEXP_ERROR
57  * x_msg_count            message count
58  * x_msg_data             message data
59  *
60  * CUSTOM PARAMS:
61  * p_wip_entity_id        Work Order ID
62  * p_transaction_type     The type of transaction (Complete(1) / Uncomplete(2))
63  * p_transaction_date     The date of transaction
64  * p_transaction_quantity Number of items for inventory (Install Base Instance ID unit quantity)
65  * p_instance_id          Install Base Instance ID for this Work Order (for retreiving serial info)
66  * p_user_id              User ID
67  * p_request_id,          For concurrent processing
68  * p_application_id,      For concurrent processing
69  * p_program_id           For concurrent processing
70  * p_reconciliation_code  This parameter was predefined in FND_LOOKUP_VALUES
71  *                        where lookup_type = 'WIP_EAM_RECONCILIATION_CODE'
72  * p_actual_start_date    Actual Start Date of Work Order
73  * p_actual_end_date      Actual End Date of Work Order
74  * p_actual_duration      Actual Duration of Work Order
75  * p_subinventory         For rebuild work order with material issue only
76  * p_locator              For rebuild work order with material issue only
77  * p_lot_serial           Lot Serial information for rebuild work order only
78  * p_reference            For regular EAM work order only
79  * p_reason               For regular EAM work order only
80  * p_shutdown_start_date  Asset Shutdown information for regular EAM
81  * p_shutdown_end_date    Asset Shutdown information for regular EAM
82  * p_shutdown_duration    Asset Shutdown information for regular EAM
83  * p_meter_reading_tbl    For entering meter readings for this work order
84  * p_attibuites_rec       For descriptive flex field
85  *
86  * Required Arguments:
87  *
88  * p_api_version
89  *
90  * p_wip_entity_id
91  * p_rebuild_jobs
92  * p_transaction_type
93  * p_transaction_date
94  * p_meter_readings_tbl
95  * p_attributes
96  *
97  ***************************************************************************/
98 
99 PROCEDURE Complete_Work_Order(
100           p_api_version          IN NUMBER,
101           p_init_msg_list        IN VARCHAR2 := fnd_api.g_false,
102           p_commit               IN VARCHAR2 := fnd_api.g_false,
103           x_return_status        OUT NOCOPY VARCHAR2,
104           x_msg_count            OUT NOCOPY NUMBER,
105           x_msg_data             OUT NOCOPY VARCHAR2,
106           p_wip_entity_id        IN NUMBER,
107           p_transaction_type     IN NUMBER,
108           p_transaction_date     IN DATE,
109           p_instance_id          IN NUMBER   := null,
110           p_user_id              IN NUMBER   := fnd_global.user_id,
111           p_request_id           IN NUMBER   := null,
112           p_application_id       IN NUMBER   := null,
113           p_program_id           IN NUMBER   := null,
114           p_reconciliation_code  IN VARCHAR2 := null,
115           p_actual_start_date    IN DATE     := null,
116           p_actual_end_date      IN DATE     := null,
117           p_actual_duration      IN NUMBER   := null,
118           p_shutdown_start_date  IN DATE     := null,
119           p_shutdown_end_date    IN DATE     := null,
120           p_shutdown_duration    IN NUMBER   := null,
121           p_inventory_item_info  IN Inventory_Item_Tbl_Type,
122           p_reference            IN VARCHAR2 := null,
123           p_reason               IN VARCHAR2 := null,
124 	  p_attributes_rec       IN Attributes_Rec_Type
125 );
126 
127 procedure complete_operation(
128     p_api_version                  IN    NUMBER  :=1.0,
129     p_init_msg_list                IN    VARCHAR2 := FND_API.G_FALSE,
130     p_commit                       IN    VARCHAR2 := fnd_api.g_false,
131     x_return_status                OUT NOCOPY   VARCHAR2,
132     x_msg_count                    OUT NOCOPY   NUMBER,
133     x_msg_data                     OUT NOCOPY   VARCHAR2,
134     p_wip_entity_id                IN    NUMBER,
135     p_operation_seq_num            IN    NUMBER,
136     p_transaction_date             IN    DATE := SYSDATE,
137     p_transaction_type             IN    NUMBER,
138     p_actual_start_date            IN    DATE := null,
139     p_actual_end_date              IN    DATE := null,
140     p_actual_duration              IN    NUMBER := null,
141     p_shutdown_start_date          IN    DATE := null,
142     p_shutdown_end_date            IN    DATE := null,
143     p_shutdown_duration            IN    NUMBER := null,
144     p_reconciliation_code          IN    NUMBER := null,
145     p_attribute_rec                IN    Attributes_Rec_Type
146 );
147 
148 procedure SET_MANUAL_REB_FLAG(p_wip_entity_id        IN  NUMBER,
149                               p_organization_id      IN  NUMBER,
150                               p_manual_rebuild_flag  IN  VARCHAR2,
151                               x_return_status        OUT NOCOPY VARCHAR2);
152 
153 procedure SET_OWNING_DEPARTMENT(p_wip_entity_id      IN  NUMBER,
154                                 p_organization_id    IN  NUMBER,
155                                 p_owning_department  IN  NUMBER,
156                                 x_return_status      OUT NOCOPY VARCHAR2);
157 
158 /*********************************************************************
159   * Procedure     : Update_EWOD
160   * Parameters IN : group_id
161   *                 organization_id
162   *                 user_defined_status_id
163   * Parameters OUT NOCOPY:
164   *   errbuf         error messages
165   *   retcode        return status. 0 for success, 1 for warning and 2 for error.
166   * Purpose       : Procedure will update the EWOD table in database with the user_defined_status_id passed.
167   *                 This procedure was added for a WIP bug 6718091
168 ***********************************************************************/
169 
170 PROCEDURE Update_EWOD
171         ( p_group_id            IN  NUMBER,
172           p_organization_id     IN  NUMBER,
173 	  p_new_status          IN  NUMBER,
174           ERRBUF               OUT NOCOPY VARCHAR2,
175           RETCODE              OUT NOCOPY VARCHAR2
176          );
177 
178 
179 /*********************************************************************
180   * Procedure     : RAISE_WORKFLOW_STATUS_PEND_CLS
181   * Parameters IN : group_id
182   *                 user_defined_status_id
183   * Parameters OUT NOCOPY:
184   *   errbuf         error messages
185   *   retcode        return status. 0 for success, 1 for warning and 2 for error.
186   * Purpose       : Procedure will update workflow status to pending close for all wip_entity_ids provided in the group_id.
187   *                 This procedure was added for a WIP bug 6718091
188 ***********************************************************************/
189 PROCEDURE RAISE_WORKFLOW_STATUS_PEND_CLS
190 (  p_group_id            IN  NUMBER,
191    p_new_status          IN  NUMBER,
192    ERRBUF               OUT NOCOPY VARCHAR2 ,
193    RETCODE              OUT NOCOPY VARCHAR2
194   );
195 
196 
197 END EAM_WorkOrderTransactions_PUB;
198