[Home] [Help]
PACKAGE: APPS.WIP_OVERCOMPLETION
Source
1 PACKAGE WIP_OVERCOMPLETION AUTHID CURRENT_USER AS
2 /* $Header: wipocmps.pls 120.0.12010000.1 2008/07/24 05:24:28 appldev ship $ */
3
4 /*=====================================================================+
5 | PROCEDURE
6 | update_wip_req_operations_mmtt
7 |
8 | PURPOSE
9 | It updates the required quantity columns in WRO. This procedure is for
10 | assemblies with Bill but no routing. Otherwise WRO will be updated as
11 | part of the Move.
12 |
13 | ARGUMENTS
14 |
15 | EXCEPTIONS
16 |
17 | NOTES
18 |
19 +=====================================================================*/
20
21 procedure update_wip_req_operations_mmtt
22 (
23 P_CPL_TXN_ID IN NUMBER,
24 P_USER_ID IN NUMBER default -1,
25 P_LOGIN_ID IN NUMBER default -1,
26 P_REQ_ID IN NUMBER default -1,
27 P_APPL_ID IN NUMBER default -1,
28 P_PROG_ID IN NUMBER default -1
29 ) ;
30
31 /*=====================================================================+
32 | PROCEDURE
33 | update_wip_req_operations
34 |
35 | PURPOSE
36 | It updates the required quantity columns in WRO.
37 |
38 | ARGUMENTS
39 | P_GROUP_ID : Group Id.
40 | P_TRANSACTION_DATE
41 |
42 | EXCEPTIONS
43 |
44 | NOTES
45 |
46 +=====================================================================*/
47
48 procedure update_wip_req_operations
49 ( P_GROUP_ID IN NUMBER,
50 P_TXN_DATE IN VARCHAR2,
51 P_USER_ID IN NUMBER default -1,
52 P_LOGIN_ID IN NUMBER default -1,
53 P_REQ_ID IN NUMBER default -1,
54 P_APPL_ID IN NUMBER default -1,
55 P_PROG_ID IN NUMBER default -1
56 );
57
58 /*=====================================================================+
59 | PROCEDURE
60 | update_wip_operations
61 |
62 | PURPOSE
63 | Updates the quantity in the queue step of the from operation for
64 | the child move transactions
65 |
66 | ARGUMENTS
67 |
68 | EXCEPTIONS
69 |
70 | NOTES
71 |
72 +=====================================================================*/
73 procedure update_wip_operations
74 (
75 p_txn_id IN NUMBER, -- must be of the CHILD
76 P_GROUP_ID IN NUMBER,
77 P_TXN_DATE IN VARCHAR2,
78 P_USER_ID IN NUMBER default -1,
79 P_LOGIN_ID IN NUMBER default -1,
80 P_REQ_ID IN NUMBER default -1,
81 P_APPL_ID IN NUMBER default -1,
82 P_PROG_ID IN NUMBER default -1
83 );
84
85 /*=====================================================================+
86 | PROCEDURE
87 | insert_child_move_txn
88 |
89 | PURPOSE
90 | Inserts the child WIP Move transaction for an Overcompletion
91 | transaction.
92 |
93 | ARGUMENTS
94 |
95 | EXCEPTIONS
96 |
97 | NOTES
98 |
99 +=====================================================================*/
100
101 PROCEDURE insert_child_move_txn
102 (
103 p_primary_quantity IN NUMBER,
104 p_parent_txn_id IN NUMBER,
105 p_move_profile IN NUMBER,
106 p_sched_id IN NUMBER,
107 p_user_id IN NUMBER default -1,
108 p_login_id IN NUMBER default -1,
109 p_req_id IN NUMBER default -1,
110 p_appl_id IN NUMBER default -1,
111 p_prog_id IN NUMBER default -1,
112 p_child_txn_id IN OUT NOCOPY NUMBER,
113 p_oc_txn_id OUT NOCOPY NUMBER,
114 p_first_operation_seq_num OUT NOCOPY NUMBER,
115 p_first_operation_code OUT NOCOPY VARCHAR2,
116 p_first_department_id OUT NOCOPY NUMBER,
117 p_first_department_code OUT NOCOPY VARCHAR2,
118 p_err_mesg OUT NOCOPY VARCHAR2
119 );
120
121
122 /*=====================================================================+
123 | PROCEDURE
124 | undo_overcompletion
125 |
126 | PURPOSE
127 | Resets the "Required quantity" field of wip_requirement_operations
128 | during Unrelease of a Job since Overcompletions would have updated it
129 | if there were any overcompletions.
130 |
131 | ARGUMENTS
132 |
133 | EXCEPTIONS
134 |
135 | NOTES
136 |
137 +=====================================================================*/
138
139 PROCEDURE undo_overcompletion
140 (p_org_id IN NUMBER,
141 p_wip_entity_id IN NUMBER,
142 p_rep_id IN NUMBER DEFAULT NULL);
143
144
145
146 /*=====================================================================+
147 | PROCEDURE
148 | delete_child_rows
149 |
150 | PURPOSE
151 | This call would delete the child rows that have the fm_op &
152 | to_op to be the first operation and the step types to be
153 | 'Queue'.
154 |
155 |
156 | ARGUMENTS
157 |
158 | EXCEPTIONS
159 |
160 | NOTES
161 |
162 +=====================================================================*/
163
164 PROCEDURE delete_child_records
165 (
166 p_group_id IN NUMBER,
167 p_txn_date IN VARCHAR2,
168 p_outcome OUT NOCOPY NUMBER
169 );
170
171 /*=====================================================================+
172 | PROCEDURE
173 | check_tolerance
174 |
175 | PURPOSE
176 | This procedure would check if the transaciton primary quantity +
177 | total quantity already in the job would still be less than the tolerance.
178 |
179 | ARGUMENTS
180 |
181 | EXCEPTIONS
182 |
183 | NOTES
184 | p_quantity_left = -1 ==> Infinity
185 | = 0 ==> Not enough
186 |
187 +=====================================================================*/
188
189 PROCEDURE check_tolerance
190 (
191 p_organization_id IN NUMBER,
192 p_wip_entity_id IN NUMBER,
193 p_repetitive_schedule_id IN NUMBER DEFAULT NULL,
194 p_primary_quantity IN NUMBER,
195 p_result OUT NOCOPY NUMBER -- 1 = yes, 2 = No
196 );
197
198 /*=====================================================================+
199 | PROCEDURE
200 | get_tolerance_default
201 |
202 | PURPOSE
203 | This procedure takes as input the assembly item id and returns the
204 | tolerance column values.
205 |
206 | ARGUMENTS
207 |
208 | EXCEPTIONS
209 |
210 | NOTES
211 |
212 +=====================================================================*/
213
214 PROCEDURE get_tolerance_default
215 (
216 p_primary_item_id IN NUMBER,
217 p_org_id IN NUMBER,
218 p_tolerance_type OUT NOCOPY NUMBER,
219 p_tolerance_value OUT NOCOPY NUMBER
220 );
221
222 /*=====================================================================+
223 | PROCEDURE
224 | insert_oc_move_txn
225 |
226 | PURPOSE
227 | Inserts the child WIP Move transaction for an Overcomplete transaction.
228 | This is used for Assembly Completion
229 | ARGUMENTS
230 |
231 |
232 | EXCEPTIONS
233 |
234 | NOTES
235 |
236 +=====================================================================*/
237
238 PROCEDURE insert_oc_move_txn
239 (
240 p_primary_quantity IN NUMBER,
241 p_cpl_profile IN NUMBER,
242 p_oc_txn_id IN NUMBER,
243 p_parent_cpl_txn_id IN NUMBER,
244 p_first_schedule_id IN NUMBER,
245 p_user_id IN NUMBER default -1,
246 p_login_id IN NUMBER default -1,
247 p_req_id IN NUMBER default -1,
248 p_appl_id IN NUMBER default -1,
249 p_prog_id IN NUMBER default -1,
250 p_child_txn_id IN OUT NOCOPY NUMBER,
251 p_first_operation_seq_num OUT NOCOPY NUMBER,
252 p_err_mesg OUT NOCOPY VARCHAR2
253 );
254
255 END WIP_OVERCOMPLETION;