DBA Data[Home] [Help]

APPS.GME_COMPLETE_BATCH_PVT dependencies on GME_COMMON_PVT

Line 11: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

7:
8:
9: PROCEDURE complete_batch
10: (p_batch_header_rec IN gme_batch_header%ROWTYPE
11: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
12: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
13: ,x_return_status OUT NOCOPY VARCHAR2) IS
14:
15:

Line 28: AND step_status NOT IN (gme_common_pvt.g_step_completed, gme_common_pvt.g_step_closed);

24: CURSOR Cur_get_step_to_complete(v_batch_id NUMBER) IS
25: SELECT *
26: FROM gme_batch_steps
27: WHERE batch_id = v_batch_id
28: AND step_status NOT IN (gme_common_pvt.g_step_completed, gme_common_pvt.g_step_closed);
29:
30: CURSOR Cur_get_phantom_batch(v_batch_id NUMBER) IS
31: SELECT hdr.*
32: FROM gme_material_details dtl, gme_batch_header hdr

Line 34: AND dtl.line_type = gme_common_pvt.g_line_type_ing

30: CURSOR Cur_get_phantom_batch(v_batch_id NUMBER) IS
31: SELECT hdr.*
32: FROM gme_material_details dtl, gme_batch_header hdr
33: WHERE dtl.batch_id = v_batch_id
34: AND dtl.line_type = gme_common_pvt.g_line_type_ing
35: AND dtl.phantom_id IS NOT NULL
36: AND hdr.batch_id = dtl.phantom_id
37: AND hdr.batch_status NOT IN (gme_common_pvt.g_batch_completed, gme_common_pvt.g_batch_closed);
38:

Line 37: AND hdr.batch_status NOT IN (gme_common_pvt.g_batch_completed, gme_common_pvt.g_batch_closed);

33: WHERE dtl.batch_id = v_batch_id
34: AND dtl.line_type = gme_common_pvt.g_line_type_ing
35: AND dtl.phantom_id IS NOT NULL
36: AND hdr.batch_id = dtl.phantom_id
37: AND hdr.batch_status NOT IN (gme_common_pvt.g_batch_completed, gme_common_pvt.g_batch_closed);
38:
39: CURSOR cur_lock_batch_ingredients (v_batch_id NUMBER) IS
40: SELECT *
41: FROM gme_material_details

Line 43: AND (line_type = gme_common_pvt.g_line_type_ing OR

39: CURSOR cur_lock_batch_ingredients (v_batch_id NUMBER) IS
40: SELECT *
41: FROM gme_material_details
42: WHERE batch_id = v_batch_id
43: AND (line_type = gme_common_pvt.g_line_type_ing OR
44: (line_type = gme_common_pvt.g_line_type_prod AND phantom_line_id IS NOT NULL))
45: FOR UPDATE OF actual_qty NOWAIT;
46:
47: CURSOR Cur_lock_batch_products(v_batch_id NUMBER) IS

Line 44: (line_type = gme_common_pvt.g_line_type_prod AND phantom_line_id IS NOT NULL))

40: SELECT *
41: FROM gme_material_details
42: WHERE batch_id = v_batch_id
43: AND (line_type = gme_common_pvt.g_line_type_ing OR
44: (line_type = gme_common_pvt.g_line_type_prod AND phantom_line_id IS NOT NULL))
45: FOR UPDATE OF actual_qty NOWAIT;
46:
47: CURSOR Cur_lock_batch_products(v_batch_id NUMBER) IS
48: SELECT *

Line 51: AND line_type IN (gme_common_pvt.g_line_type_prod,gme_common_pvt.g_line_type_byprod)

47: CURSOR Cur_lock_batch_products(v_batch_id NUMBER) IS
48: SELECT *
49: FROM gme_material_details
50: WHERE batch_id = v_batch_id
51: AND line_type IN (gme_common_pvt.g_line_type_prod,gme_common_pvt.g_line_type_byprod)
52: AND phantom_line_id IS NULL -- no phantom products
53: FOR UPDATE OF actual_qty NOWAIT;
54:
55: l_api_name CONSTANT VARCHAR2 (30) := 'COMPLETE_BATCH';

Line 59: l_matl_dtl_tab_ing gme_common_pvt.material_details_tab;

55: l_api_name CONSTANT VARCHAR2 (30) := 'COMPLETE_BATCH';
56: l_table_name CONSTANT VARCHAR2 (30) := 'gme_material_details';
57:
58: l_step_status NUMBER;
59: l_matl_dtl_tab_ing gme_common_pvt.material_details_tab;
60: l_matl_dtl_tab gme_common_pvt.material_details_tab;
61: l_btch_hdr gme_batch_header%ROWTYPE;
62: l_btch_hdr_tab gme_common_pvt.batch_headers_tab;
63: l_matl_dtl gme_material_details%ROWTYPE;

Line 60: l_matl_dtl_tab gme_common_pvt.material_details_tab;

56: l_table_name CONSTANT VARCHAR2 (30) := 'gme_material_details';
57:
58: l_step_status NUMBER;
59: l_matl_dtl_tab_ing gme_common_pvt.material_details_tab;
60: l_matl_dtl_tab gme_common_pvt.material_details_tab;
61: l_btch_hdr gme_batch_header%ROWTYPE;
62: l_btch_hdr_tab gme_common_pvt.batch_headers_tab;
63: l_matl_dtl gme_material_details%ROWTYPE;
64: l_matl_dtl_rec gme_material_details%ROWTYPE;

Line 62: l_btch_hdr_tab gme_common_pvt.batch_headers_tab;

58: l_step_status NUMBER;
59: l_matl_dtl_tab_ing gme_common_pvt.material_details_tab;
60: l_matl_dtl_tab gme_common_pvt.material_details_tab;
61: l_btch_hdr gme_batch_header%ROWTYPE;
62: l_btch_hdr_tab gme_common_pvt.batch_headers_tab;
63: l_matl_dtl gme_material_details%ROWTYPE;
64: l_matl_dtl_rec gme_material_details%ROWTYPE;
65: l_step_tab gme_common_pvt.steps_tab;
66: l_batch_step_rec gme_batch_steps%ROWTYPE;

Line 65: l_step_tab gme_common_pvt.steps_tab;

61: l_btch_hdr gme_batch_header%ROWTYPE;
62: l_btch_hdr_tab gme_common_pvt.batch_headers_tab;
63: l_matl_dtl gme_material_details%ROWTYPE;
64: l_matl_dtl_rec gme_material_details%ROWTYPE;
65: l_step_tab gme_common_pvt.steps_tab;
66: l_batch_step_rec gme_batch_steps%ROWTYPE;
67: l_yield_type NUMBER;
68: l_phantom_batch gme_batch_header%ROWTYPE;
69: l_phantom_batch_rec gme_batch_header%ROWTYPE;

Line 102: IF p_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN

98: -- set output structure
99: x_batch_header_rec := p_batch_header_rec;
100:
101: -- if the batch is pending, call release batch
102: IF p_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
103: -- call release batch
104: gme_release_batch_pvt.release_batch
105: (p_batch_header_rec => p_batch_header_rec
106: ,x_batch_header_rec => x_batch_header_rec

Line 109: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

105: (p_batch_header_rec => p_batch_header_rec
106: ,x_batch_header_rec => x_batch_header_rec
107: ,x_return_status => l_return_status
108: ,x_exception_material_tbl => x_exception_material_tbl);
109: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
110: x_return_status := l_return_status;
111: RAISE error_release_batch;
112: END IF;
113:

Line 114: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

110: x_return_status := l_return_status;
111: RAISE error_release_batch;
112: END IF;
113:
114: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
115: x_return_status := gme_common_pvt.g_exceptions_err;
116: END IF;
117: END IF;
118:

Line 115: x_return_status := gme_common_pvt.g_exceptions_err;

111: RAISE error_release_batch;
112: END IF;
113:
114: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
115: x_return_status := gme_common_pvt.g_exceptions_err;
116: END IF;
117: END IF;
118:
119: -- set batch status

Line 120: x_batch_header_rec.batch_status := gme_common_pvt.g_batch_completed;

116: END IF;
117: END IF;
118:
119: -- set batch status
120: x_batch_header_rec.batch_status := gme_common_pvt.g_batch_completed;
121:
122: -- no need to set the actual completion date because it is expected to have been in p_batch_header_rec
123:
124: -- Update the batch header

Line 130: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;

126: RAISE error_update_batch;
127: END IF;
128:
129: -- Update WHO columns for output structure
130: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
131: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
132: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
133:
134: -- Lock all the ingredents and phantom product lines associated with the batch

Line 131: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;

127: END IF;
128:
129: -- Update WHO columns for output structure
130: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
131: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
132: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
133:
134: -- Lock all the ingredents and phantom product lines associated with the batch
135: OPEN cur_lock_batch_ingredients (x_batch_header_rec.batch_id);

Line 132: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;

128:
129: -- Update WHO columns for output structure
130: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
131: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
132: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
133:
134: -- Lock all the ingredents and phantom product lines associated with the batch
135: OPEN cur_lock_batch_ingredients (x_batch_header_rec.batch_id);
136: FETCH cur_lock_batch_ingredients BULK COLLECT INTO l_matl_dtl_tab_ing;

Line 159: IF l_yield_type = gme_common_pvt.g_mtl_autobystep_release THEN

155: FOR i IN 1..l_matl_dtl_tab.COUNT LOOP
156: l_matl_dtl_rec := l_matl_dtl_tab(i);
157:
158: l_yield_type := l_matl_dtl_rec.release_type;
159: IF l_yield_type = gme_common_pvt.g_mtl_autobystep_release THEN
160: OPEN Cur_associated_step(l_matl_dtl_rec.material_detail_id);
161: FETCH Cur_associated_step INTO l_step_status;
162: IF Cur_associated_step%NOTFOUND THEN
163: l_yield_type := gme_common_pvt.g_mtl_auto_release;

Line 163: l_yield_type := gme_common_pvt.g_mtl_auto_release;

159: IF l_yield_type = gme_common_pvt.g_mtl_autobystep_release THEN
160: OPEN Cur_associated_step(l_matl_dtl_rec.material_detail_id);
161: FETCH Cur_associated_step INTO l_step_status;
162: IF Cur_associated_step%NOTFOUND THEN
163: l_yield_type := gme_common_pvt.g_mtl_auto_release;
164: END IF;
165: CLOSE Cur_associated_step;
166: END IF;
167:

Line 168: IF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod) THEN

164: END IF;
165: CLOSE Cur_associated_step;
166: END IF;
167:
168: IF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod) THEN
169: IF l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN
170: IF l_yield_type = gme_common_pvt.g_mtl_auto_release THEN
171: l_yield := TRUE;
172: ELSE

Line 169: IF l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN

165: CLOSE Cur_associated_step;
166: END IF;
167:
168: IF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod) THEN
169: IF l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN
170: IF l_yield_type = gme_common_pvt.g_mtl_auto_release THEN
171: l_yield := TRUE;
172: ELSE
173: l_yield := FALSE;

Line 170: IF l_yield_type = gme_common_pvt.g_mtl_auto_release THEN

166: END IF;
167:
168: IF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod) THEN
169: IF l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN
170: IF l_yield_type = gme_common_pvt.g_mtl_auto_release THEN
171: l_yield := TRUE;
172: ELSE
173: l_yield := FALSE;
174: END IF;

Line 184: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

180: ,p_update_inv_ind => x_batch_header_rec.update_inventory_ind
181: ,x_exception_material_tbl => x_exception_material_tbl
182: ,x_return_status => l_return_status);
183:
184: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
185: x_return_status := l_return_status;
186: RAISE error_process_material;
187: END IF;
188:

Line 189: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

185: x_return_status := l_return_status;
186: RAISE error_process_material;
187: END IF;
188:
189: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
190: x_return_status := gme_common_pvt.g_exceptions_err;
191: END IF;
192: -- Pawan Kumar added this for bug 5109095
193: ELSE -- of l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN

Line 190: x_return_status := gme_common_pvt.g_exceptions_err;

186: RAISE error_process_material;
187: END IF;
188:
189: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
190: x_return_status := gme_common_pvt.g_exceptions_err;
191: END IF;
192: -- Pawan Kumar added this for bug 5109095
193: ELSE -- of l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN
194: -- This will insert exception all completed step products and byprodcuts.

Line 193: ELSE -- of l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN

189: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
190: x_return_status := gme_common_pvt.g_exceptions_err;
191: END IF;
192: -- Pawan Kumar added this for bug 5109095
193: ELSE -- of l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN
194: -- This will insert exception all completed step products and byprodcuts.
195: --Bug#5296812 Added the call to the item record.Added the condition to check the inv update ind,and transaction ind.Start
196: gme_material_detail_pvt.get_item_rec
197: (p_org_id => l_matl_dtl_rec.organization_id

Line 207: IF l_step_status = gme_common_pvt.g_step_completed THEN

203: RAISE error_get_item;
204: END IF;
205: IF p_batch_header_rec.update_inventory_ind = 'Y' AND l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
206: --Bug#5296812 End.
207: IF l_step_status = gme_common_pvt.g_step_completed THEN
208:
209: l_exception_qty := l_matl_dtl_rec.wip_plan_qty - l_matl_dtl_rec.actual_qty;
210:
211: IF l_exception_qty < 0 THEN

Line 232: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

228: ,p_force_unconsumed => fnd_api.g_false
229: ,x_exception_material_tbl => x_exception_material_tbl
230: ,x_return_status => l_return_status);
231:
232: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
233: x_return_status := l_return_status;
234: RAISE error_complete_batch;
235: END IF;
236:

Line 237: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

233: x_return_status := l_return_status;
234: RAISE error_complete_batch;
235: END IF;
236:
237: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
238: x_return_status := gme_common_pvt.g_exceptions_err;
239: END IF;
240:
241: END IF;-- IF l_step_status = gme_common_pvt.g_step_completed THEN

Line 238: x_return_status := gme_common_pvt.g_exceptions_err;

234: RAISE error_complete_batch;
235: END IF;
236:
237: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
238: x_return_status := gme_common_pvt.g_exceptions_err;
239: END IF;
240:
241: END IF;-- IF l_step_status = gme_common_pvt.g_step_completed THEN
242: END IF;--IF p_batch_header_rec.update_inventory_ind = 'Y'.....

Line 241: END IF;-- IF l_step_status = gme_common_pvt.g_step_completed THEN

237: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
238: x_return_status := gme_common_pvt.g_exceptions_err;
239: END IF;
240:
241: END IF;-- IF l_step_status = gme_common_pvt.g_step_completed THEN
242: END IF;--IF p_batch_header_rec.update_inventory_ind = 'Y'.....
243: -- Pawan Kumar added above for bug 5109095
244: END IF; -- IF l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN
245: END IF; -- IF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod)

Line 244: END IF; -- IF l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN

240:
241: END IF;-- IF l_step_status = gme_common_pvt.g_step_completed THEN
242: END IF;--IF p_batch_header_rec.update_inventory_ind = 'Y'.....
243: -- Pawan Kumar added above for bug 5109095
244: END IF; -- IF l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN
245: END IF; -- IF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod)
246: END LOOP;
247:
248: -- Complete any steps that are not complete or closed

Line 245: END IF; -- IF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod)

241: END IF;-- IF l_step_status = gme_common_pvt.g_step_completed THEN
242: END IF;--IF p_batch_header_rec.update_inventory_ind = 'Y'.....
243: -- Pawan Kumar added above for bug 5109095
244: END IF; -- IF l_yield_type <> gme_common_pvt.g_mtl_autobystep_release THEN
245: END IF; -- IF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod)
246: END LOOP;
247:
248: -- Complete any steps that are not complete or closed
249: OPEN Cur_get_step_to_complete(p_batch_header_rec.batch_id);

Line 267: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

263: ,x_batch_step_rec => l_batch_step_rec
264: ,x_exception_material_tbl => x_exception_material_tbl
265: ,x_return_status => l_return_status);
266:
267: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
268: x_return_status := l_return_status;
269: RAISE error_complete_step_rec;
270: END IF;
271:

Line 272: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

268: x_return_status := l_return_status;
269: RAISE error_complete_step_rec;
270: END IF;
271:
272: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
273: x_return_status := gme_common_pvt.g_exceptions_err;
274: END IF;
275: END LOOP;
276:

Line 273: x_return_status := gme_common_pvt.g_exceptions_err;

269: RAISE error_complete_step_rec;
270: END IF;
271:
272: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
273: x_return_status := gme_common_pvt.g_exceptions_err;
274: END IF;
275: END LOOP;
276:
277: -- Complete any phantom batches that are not complete or closed

Line 292: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

288: ,x_exception_material_tbl => x_exception_material_tbl
289: ,x_batch_header_rec => l_btch_hdr
290: ,x_return_status => l_return_status);
291:
292: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
293: x_return_status := l_return_status;
294: RAISE error_complete_batch;
295: END IF;
296:

Line 297: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

293: x_return_status := l_return_status;
294: RAISE error_complete_batch;
295: END IF;
296:
297: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
298: x_return_status := gme_common_pvt.g_exceptions_err;
299: END IF;
300:
301: END LOOP; -- FOR i IN 1..l_btch_hdr_tab.COUNT LOOP

Line 298: x_return_status := gme_common_pvt.g_exceptions_err;

294: RAISE error_complete_batch;
295: END IF;
296:
297: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
298: x_return_status := gme_common_pvt.g_exceptions_err;
299: END IF;
300:
301: END LOOP; -- FOR i IN 1..l_btch_hdr_tab.COUNT LOOP
302:

Line 308: IF l_matl_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN

304: -- phantom products are reported at the time of yield, so don't double report with phantom ingredient
305: -- all other products are reported in either process material (non auto yield) or yield_material (auto yield)
306: FOR i IN 1..l_matl_dtl_tab_ing.COUNT LOOP
307: l_matl_dtl_rec := l_matl_dtl_tab_ing(i);
308: IF l_matl_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
309: -- don't check for unconsumed first because even if it's fully consumed,
310: -- but has reservation or MO, want to report it
311: --Bug#5296812 Added the call to the item record.Added the condition to check the inv update ind,and transaction ind.Start.
312: gme_material_detail_pvt.get_item_rec

Line 347: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

343: ,p_force_unconsumed => fnd_api.g_false
344: ,x_exception_material_tbl => x_exception_material_tbl
345: ,x_return_status => l_return_status);
346:
347: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
348: x_return_status := l_return_status;
349: RAISE error_complete_batch;
350: END IF;
351:

Line 352: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

348: x_return_status := l_return_status;
349: RAISE error_complete_batch;
350: END IF;
351:
352: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
353: x_return_status := gme_common_pvt.g_exceptions_err;
354: END IF;
355: END IF; --IF p_batch_header_rec.update_inventory_ind = 'Y'...
356: END IF;

Line 353: x_return_status := gme_common_pvt.g_exceptions_err;

349: RAISE error_complete_batch;
350: END IF;
351:
352: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
353: x_return_status := gme_common_pvt.g_exceptions_err;
354: END IF;
355: END IF; --IF p_batch_header_rec.update_inventory_ind = 'Y'...
356: END IF;
357: END LOOP;

Line 360: IF NOT gme_common_pvt.create_history

356: END IF;
357: END LOOP;
358:
359: -- Bug 12571877 - Pass in correct batch record.
360: IF NOT gme_common_pvt.create_history
361: -- (p_batch_header_rec => p_batch_header_rec
362: (p_batch_header_rec => x_batch_header_rec
363: ,p_original_status => gme_common_pvt.g_batch_wip
364: ,p_event_id => NVL(gme_common_pvt.g_transaction_header_id,-9999)) THEN

Line 363: ,p_original_status => gme_common_pvt.g_batch_wip

359: -- Bug 12571877 - Pass in correct batch record.
360: IF NOT gme_common_pvt.create_history
361: -- (p_batch_header_rec => p_batch_header_rec
362: (p_batch_header_rec => x_batch_header_rec
363: ,p_original_status => gme_common_pvt.g_batch_wip
364: ,p_event_id => NVL(gme_common_pvt.g_transaction_header_id,-9999)) THEN
365: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
366: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' create history returned error');
367: END IF;

Line 364: ,p_event_id => NVL(gme_common_pvt.g_transaction_header_id,-9999)) THEN

360: IF NOT gme_common_pvt.create_history
361: -- (p_batch_header_rec => p_batch_header_rec
362: (p_batch_header_rec => x_batch_header_rec
363: ,p_original_status => gme_common_pvt.g_batch_wip
364: ,p_event_id => NVL(gme_common_pvt.g_transaction_header_id,-9999)) THEN
365: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
366: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' create history returned error');
367: END IF;
368: END IF;

Line 376: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);

372: END IF;
373:
374: EXCEPTION
375: WHEN error_update_batch THEN
376: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
377: x_return_status := FND_API.g_ret_sts_unexp_error;
378: --Bug#5296812 Handling the raised exception error_get_item.
379: WHEN error_process_material OR error_complete_batch OR
380: error_complete_step_rec OR error_release_batch OR error_get_item THEN

Line 383: gme_common_pvt.log_message (

379: WHEN error_process_material OR error_complete_batch OR
380: error_complete_step_rec OR error_release_batch OR error_get_item THEN
381: NULL;
382: WHEN locked_by_other_user or batch_lines_locked THEN
383: gme_common_pvt.log_message (
384: 'GME_RECORD_LOCKED',
385: 'TABLE_NAME',
386: l_table_name
387: );

Line 403: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

399: (p_material_detail_rec IN gme_material_details%ROWTYPE
400: ,p_yield IN BOOLEAN
401: ,p_trans_date IN DATE
402: ,p_update_inv_ind IN VARCHAR2
403: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
404: ,x_return_status OUT NOCOPY VARCHAR2) IS
405:
406:
407: l_api_name CONSTANT VARCHAR2 (30) := 'process_material';

Line 447: IF l_matl_dtl_rec.line_type = gme_common_pvt.g_line_type_ing AND l_matl_dtl_rec.phantom_id IS NOT NULL THEN -- phantom ingredient -> complete the phantom batch

443: -- if it's a phantom ingredient, then complete the phantom batch
444: -- which will cause the phantom product to be yielded (the passed in ingredient will be consumed in trxm mgr
445:
446: -- complete phantom batch
447: IF l_matl_dtl_rec.line_type = gme_common_pvt.g_line_type_ing AND l_matl_dtl_rec.phantom_id IS NOT NULL THEN -- phantom ingredient -> complete the phantom batch
448: l_phantom_batch_rec.batch_id := l_matl_dtl_rec.phantom_id;
449: IF NOT gme_batch_header_dbl.fetch_row(l_phantom_batch_rec, l_phantom_batch_rec) THEN
450: RAISE error_fetch_batch;
451: END IF;

Line 453: IF l_phantom_batch_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN

449: IF NOT gme_batch_header_dbl.fetch_row(l_phantom_batch_rec, l_phantom_batch_rec) THEN
450: RAISE error_fetch_batch;
451: END IF;
452:
453: IF l_phantom_batch_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
454: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
455: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' processing phantom ingredient material_detail_id='||l_matl_dtl_rec.material_detail_id);
456: END IF;
457: -- pass in the phantom line id so that release batch will know to yield that product

Line 469: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

465: ,x_exception_material_tbl => x_exception_material_tbl
466: ,x_batch_header_rec => l_phantom_batch_rec
467: ,x_return_status => l_return_status);
468:
469: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
470: x_return_status := l_return_status;
471: RAISE error_complete_batch;
472: END IF;
473:

Line 474: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

470: x_return_status := l_return_status;
471: RAISE error_complete_batch;
472: END IF;
473:
474: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
475: x_return_status := gme_common_pvt.g_exceptions_err;
476: END IF;
477: END IF; -- IF l_phantom_batch_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip)
478: ELSIF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod) AND p_yield THEN

Line 475: x_return_status := gme_common_pvt.g_exceptions_err;

471: RAISE error_complete_batch;
472: END IF;
473:
474: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
475: x_return_status := gme_common_pvt.g_exceptions_err;
476: END IF;
477: END IF; -- IF l_phantom_batch_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip)
478: ELSIF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod) AND p_yield THEN
479: gme_material_detail_pvt.get_item_rec

Line 477: END IF; -- IF l_phantom_batch_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip)

473:
474: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
475: x_return_status := gme_common_pvt.g_exceptions_err;
476: END IF;
477: END IF; -- IF l_phantom_batch_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip)
478: ELSIF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod) AND p_yield THEN
479: gme_material_detail_pvt.get_item_rec
480: (p_org_id => l_matl_dtl_rec.organization_id
481: ,p_item_id => l_matl_dtl_rec.inventory_item_id

Line 478: ELSIF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod) AND p_yield THEN

474: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
475: x_return_status := gme_common_pvt.g_exceptions_err;
476: END IF;
477: END IF; -- IF l_phantom_batch_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip)
478: ELSIF l_matl_dtl_rec.line_type IN (gme_common_pvt.g_line_type_prod, gme_common_pvt.g_line_type_byprod) AND p_yield THEN
479: gme_material_detail_pvt.get_item_rec
480: (p_org_id => l_matl_dtl_rec.organization_id
481: ,p_item_id => l_matl_dtl_rec.inventory_item_id
482: ,x_item_rec => l_item_rec

Line 502: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

498: ,x_exception_material_tbl => x_exception_material_tbl
499: ,x_actual_qty => l_actual_qty
500: ,x_return_status => l_return_status);
501:
502: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
503: x_return_status := l_return_status;
504: RAISE error_yield_material;
505: END IF;
506:

Line 507: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

503: x_return_status := l_return_status;
504: RAISE error_yield_material;
505: END IF;
506:
507: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
508: x_return_status := gme_common_pvt.g_exceptions_err;
509: END IF;
510:
511: l_matl_dtl_rec.actual_qty := l_actual_qty;

Line 508: x_return_status := gme_common_pvt.g_exceptions_err;

504: RAISE error_yield_material;
505: END IF;
506:
507: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
508: x_return_status := gme_common_pvt.g_exceptions_err;
509: END IF;
510:
511: l_matl_dtl_rec.actual_qty := l_actual_qty;
512:

Line 533: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

529: ,p_force_unconsumed => fnd_api.g_false
530: ,x_exception_material_tbl => x_exception_material_tbl
531: ,x_return_status => l_return_status);
532:
533: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
534: x_return_status := l_return_status;
535: RAISE error_yield_material;
536: END IF;
537:

Line 538: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

534: x_return_status := l_return_status;
535: RAISE error_yield_material;
536: END IF;
537:
538: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
539: x_return_status := gme_common_pvt.g_exceptions_err;
540: END IF;
541: END IF;
542:

Line 539: x_return_status := gme_common_pvt.g_exceptions_err;

535: RAISE error_yield_material;
536: END IF;
537:
538: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
539: x_return_status := gme_common_pvt.g_exceptions_err;
540: END IF;
541: END IF;
542:
543: ELSE

Line 582: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

578: ,p_force_unconsumed => fnd_api.g_false
579: ,x_exception_material_tbl => x_exception_material_tbl
580: ,x_return_status => l_return_status);
581:
582: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
583: x_return_status := l_return_status;
584: RAISE error_batch_exception;
585: END IF;
586:

Line 587: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

583: x_return_status := l_return_status;
584: RAISE error_batch_exception;
585: END IF;
586:
587: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
588: x_return_status := gme_common_pvt.g_exceptions_err;
589: END IF;
590: END IF;--IF p_update_inv_ind = 'Y' AND...
591: END IF; -- IF l_matl_dtl_rec.phantom_id IS NOT NULL...

Line 588: x_return_status := gme_common_pvt.g_exceptions_err;

584: RAISE error_batch_exception;
585: END IF;
586:
587: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
588: x_return_status := gme_common_pvt.g_exceptions_err;
589: END IF;
590: END IF;--IF p_update_inv_ind = 'Y' AND...
591: END IF; -- IF l_matl_dtl_rec.phantom_id IS NOT NULL...
592:

Line 607: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);

603: END IF;
604:
605: EXCEPTION
606: WHEN error_fetch_batch OR error_update_row THEN
607: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
608: x_return_status := FND_API.g_ret_sts_unexp_error;
609: WHEN error_complete_batch OR error_yield_material OR error_get_item OR error_batch_exception THEN
610: NULL;
611: WHEN OTHERS THEN

Line 626: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

622: ,p_yield_qty IN NUMBER
623: ,p_trans_date IN DATE
624: ,p_item_rec IN mtl_system_items_b%ROWTYPE
625: ,p_force_unconsumed IN VARCHAR2
626: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
627: ,x_actual_qty OUT NOCOPY NUMBER
628: ,x_return_status OUT NOCOPY VARCHAR2) IS
629:
630: l_api_name CONSTANT VARCHAR2 (30) := 'YIELD_MATERIAL';

Line 632: l_pending_product_lot_tab gme_common_pvt.pending_lots_tab;

628: ,x_return_status OUT NOCOPY VARCHAR2) IS
629:
630: l_api_name CONSTANT VARCHAR2 (30) := 'YIELD_MATERIAL';
631:
632: l_pending_product_lot_tab gme_common_pvt.pending_lots_tab;
633: l_pp_lot_rec gme_pending_product_lots%ROWTYPE;
634: i NUMBER;
635:
636: l_yield_qty NUMBER;

Line 650: AND effectivity_date <= gme_common_pvt.g_timestamp

646: SELECT revision
647: FROM mtl_item_revisions_b
648: WHERE inventory_item_id = v_item_id
649: AND organization_id = v_org_id
650: AND effectivity_date <= gme_common_pvt.g_timestamp
651: ORDER BY effectivity_date desc;
652:
653: error_build_trxn EXCEPTION;
654: error_get_exception EXCEPTION;

Line 689: l_trans_date := NVL(p_trans_date, gme_common_pvt.g_timestamp);

685: So this was not getting caught in l_yield_qty <= x_actual_qty and this was
686: sending transaction quantity as null to transactions where it was failing*/
687:
688: l_yield_qty := NVL(p_yield_qty, nvl(p_material_dtl_rec.wip_plan_qty,p_material_dtl_rec.plan_qty));
689: l_trans_date := NVL(p_trans_date, gme_common_pvt.g_timestamp);
690:
691: l_start_actual_qty := x_actual_qty;
692:
693: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

Line 716: gme_common_pvt.eff_locator_control

712: IF p_material_dtl_rec.locator_id IS NULL THEN
713: -- check if it's locator control, we need a locator...
714: /* Bug 5441643 Added NVL condition for location control code*/
715: l_eff_locator_control :=
716: gme_common_pvt.eff_locator_control
717: (p_organization_id => p_material_dtl_rec.organization_id
718: ,p_org_control => gme_common_pvt.g_org_locator_control
719: ,p_subinventory => p_material_dtl_rec.subinventory
720: ,p_item_control => NVL(p_item_rec.location_control_code,1)

Line 718: ,p_org_control => gme_common_pvt.g_org_locator_control

714: /* Bug 5441643 Added NVL condition for location control code*/
715: l_eff_locator_control :=
716: gme_common_pvt.eff_locator_control
717: (p_organization_id => p_material_dtl_rec.organization_id
718: ,p_org_control => gme_common_pvt.g_org_locator_control
719: ,p_subinventory => p_material_dtl_rec.subinventory
720: ,p_item_control => NVL(p_item_rec.location_control_code,1)
721: ,p_item_loc_restrict => p_item_rec.restrict_locators_code
722: ,p_action => gme_common_pvt.g_prod_comp_txn_action);

Line 722: ,p_action => gme_common_pvt.g_prod_comp_txn_action);

718: ,p_org_control => gme_common_pvt.g_org_locator_control
719: ,p_subinventory => p_material_dtl_rec.subinventory
720: ,p_item_control => NVL(p_item_rec.location_control_code,1)
721: ,p_item_loc_restrict => p_item_rec.restrict_locators_code
722: ,p_action => gme_common_pvt.g_prod_comp_txn_action);
723: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
724: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' l_eff_locator_control='||l_eff_locator_control);
725: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' organization_id='||p_material_dtl_rec.organization_id);
726: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' g_org_locator_control='||gme_common_pvt.g_org_locator_control);

Line 726: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' g_org_locator_control='||gme_common_pvt.g_org_locator_control);

722: ,p_action => gme_common_pvt.g_prod_comp_txn_action);
723: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
724: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' l_eff_locator_control='||l_eff_locator_control);
725: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' organization_id='||p_material_dtl_rec.organization_id);
726: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' g_org_locator_control='||gme_common_pvt.g_org_locator_control);
727: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' subinventory='||p_material_dtl_rec.subinventory);
728: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' inventory_item_id='||p_item_rec.inventory_item_id);
729: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' location_control_code='||p_item_rec.location_control_code);
730: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' restrict_locators_code='||p_item_rec.restrict_locators_code);

Line 731: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_action='||gme_common_pvt.g_prod_comp_txn_action);

727: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' subinventory='||p_material_dtl_rec.subinventory);
728: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' inventory_item_id='||p_item_rec.inventory_item_id);
729: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' location_control_code='||p_item_rec.location_control_code);
730: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' restrict_locators_code='||p_item_rec.restrict_locators_code);
731: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_action='||gme_common_pvt.g_prod_comp_txn_action);
732: END IF;
733: IF l_eff_locator_control <> 1 THEN
734: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
735: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' locator on material is NULL and material is eff locator control; cant yield anything; get exceptions');

Line 772: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN

768: ,p_sec_uom_code => p_item_rec.secondary_uom_code
769: ,x_actual_qty => x_actual_qty
770: ,x_return_status => l_return_status);
771:
772: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
773: x_return_status := l_return_status;
774: RAISE error_build_trxn;
775: END IF;
776: ELSE -- lot control... go to pending product lots

Line 814: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN

810: ,p_revision => l_revision
811: ,p_sec_uom_code => p_item_rec.secondary_uom_code
812: ,x_actual_qty => x_actual_qty
813: ,x_return_status => l_return_status);
814: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
815: x_return_status := l_return_status;
816: RAISE error_build_trxn;
817: END IF;
818:

Line 882: l_lot_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

878:
879: l_api_name CONSTANT VARCHAR2 (30) := 'build_and_create_transaction';
880:
881: l_transaction_rec mtl_transactions_interface%ROWTYPE;
882: l_lot_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
883: l_trxn_qty NUMBER;
884: l_dtl_qty NUMBER;
885: l_sec_qty NUMBER;
886:

Line 959: ,PRECISION => gme_common_pvt.g_precision

955: l_sec_qty := INV_CONVERT.inv_um_convert
956: (item_id => p_mtl_dtl_rec.inventory_item_id
957: ,lot_number => p_pp_lot_rec.lot_number
958: ,organization_id => p_mtl_dtl_rec.organization_id
959: ,PRECISION => gme_common_pvt.g_precision
960: ,from_quantity => l_trxn_qty
961: ,from_unit => p_mtl_dtl_rec.dtl_um
962: ,to_unit => p_sec_uom_code
963: ,from_name => NULL

Line 982: IF p_mtl_dtl_rec.line_type = gme_common_pvt.g_line_type_prod THEN

978: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calculated l_trxn_qty := '||l_trxn_qty);
979: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calculated l_sec_qty := '||l_sec_qty);
980: END IF;
981:
982: IF p_mtl_dtl_rec.line_type = gme_common_pvt.g_line_type_prod THEN
983: l_transaction_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
984: ELSE
985: l_transaction_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
986: END IF;

Line 983: l_transaction_rec.transaction_type_id := gme_common_pvt.g_prod_completion;

979: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calculated l_sec_qty := '||l_sec_qty);
980: END IF;
981:
982: IF p_mtl_dtl_rec.line_type = gme_common_pvt.g_line_type_prod THEN
983: l_transaction_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
984: ELSE
985: l_transaction_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
986: END IF;
987:

Line 985: l_transaction_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;

981:
982: IF p_mtl_dtl_rec.line_type = gme_common_pvt.g_line_type_prod THEN
983: l_transaction_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
984: ELSE
985: l_transaction_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
986: END IF;
987:
988: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
989: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_transaction_rec.transaction_type_id := '||l_transaction_rec.transaction_type_id);

Line 1015: ,PRECISION => gme_common_pvt.g_precision

1011: l_prim_qty := INV_CONVERT.inv_um_convert
1012: (item_id => p_mtl_dtl_rec.inventory_item_id
1013: ,lot_number => p_pp_lot_rec.lot_number
1014: ,organization_id => p_mtl_dtl_rec.organization_id
1015: ,PRECISION => gme_common_pvt.g_precision
1016: ,from_quantity => l_trxn_qty
1017: ,from_unit => p_mtl_dtl_rec.dtl_um
1018: ,to_unit => l_prim_uom
1019: ,from_name => NULL

Line 1107: ,x_mmli_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_inter_tbl

1103: ,p_locator_id IN NUMBER
1104: ,p_revision IN VARCHAR2
1105: ,p_pp_lot_rec IN gme_pending_product_lots%ROWTYPE
1106: ,x_mmti_rec OUT NOCOPY mtl_transactions_interface%ROWTYPE
1107: ,x_mmli_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_inter_tbl
1108: ,x_sec_qty OUT NOCOPY NUMBER
1109: ,x_dtl_qty OUT NOCOPY NUMBER
1110: ,x_return_status OUT NOCOPY VARCHAR2) IS
1111:

Line 1167: WHERE step_status NOT IN (gme_common_pvt.g_step_completed, gme_common_pvt.g_step_closed)

1163:
1164: CURSOR Cur_gme_batch_steps (v_batch_id NUMBER) IS
1165: SELECT count(1)
1166: FROM gme_batch_steps
1167: WHERE step_status NOT IN (gme_common_pvt.g_step_completed, gme_common_pvt.g_step_closed)
1168: AND batch_id = v_batch_id
1169: AND rownum = 1;
1170:
1171: l_is_step NUMBER;

Line 1213: IF p_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

1209: IF p_batch_header_rec.actual_cmplt_date IS NULL THEN
1210: x_batch_header_rec.actual_cmplt_date := SYSDATE;
1211: END IF;
1212:
1213: IF p_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
1214: RAISE error_batch_type;
1215: END IF;
1216:
1217: IF p_batch_header_rec.batch_status NOT IN

Line 1218: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN

1214: RAISE error_batch_type;
1215: END IF;
1216:
1217: IF p_batch_header_rec.batch_status NOT IN
1218: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
1219: RAISE error_batch_status;
1220: END IF;
1221:
1222: IF p_batch_header_rec.parentline_id IS NOT NULL THEN

Line 1268: IF NOT gme_common_pvt.check_validity_rule_dates (

1264: RAISE error_vr_dates;
1265: END IF;*/
1266: -- sunitha ch. Bug 5336007 aded call to check_validity_rule_dates and passed p_validate_plan_dates_ind = 1
1267: -- to validate planned start date against validate rule dates
1268: IF NOT gme_common_pvt.check_validity_rule_dates (
1269: p_validity_rule_id => p_batch_header_rec.recipe_validity_rule_id
1270: ,p_start_date => p_batch_header_rec.actual_start_date
1271: ,p_cmplt_date => p_batch_header_rec.actual_cmplt_date
1272: ,p_batch_header_rec => p_batch_header_rec

Line 1295: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');

1291: END IF;
1292:
1293: EXCEPTION
1294: WHEN error_phantom THEN
1295: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
1296: x_return_status := FND_API.G_RET_STS_ERROR;
1297: WHEN error_batch_type OR error_batch_status THEN
1298: gme_common_pvt.log_message('GME_API_INVALID_BATCH_COMPL');
1299: x_return_status := fnd_api.g_ret_sts_error;

Line 1298: gme_common_pvt.log_message('GME_API_INVALID_BATCH_COMPL');

1294: WHEN error_phantom THEN
1295: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
1296: x_return_status := FND_API.G_RET_STS_ERROR;
1297: WHEN error_batch_type OR error_batch_status THEN
1298: gme_common_pvt.log_message('GME_API_INVALID_BATCH_COMPL');
1299: x_return_status := fnd_api.g_ret_sts_error;
1300: WHEN error_steps_not_complete THEN
1301: gme_common_pvt.log_message('GME_STEPS_NOT_COMPLETE');
1302: x_return_status := fnd_api.g_ret_sts_error;

Line 1301: gme_common_pvt.log_message('GME_STEPS_NOT_COMPLETE');

1297: WHEN error_batch_type OR error_batch_status THEN
1298: gme_common_pvt.log_message('GME_API_INVALID_BATCH_COMPL');
1299: x_return_status := fnd_api.g_ret_sts_error;
1300: WHEN error_steps_not_complete THEN
1301: gme_common_pvt.log_message('GME_STEPS_NOT_COMPLETE');
1302: x_return_status := fnd_api.g_ret_sts_error;
1303: WHEN error_cmplt_date THEN
1304: gme_common_pvt.log_message('GME_INVALID_DATE_RANGE'
1305: ,'DATE1','Completion date'

Line 1304: gme_common_pvt.log_message('GME_INVALID_DATE_RANGE'

1300: WHEN error_steps_not_complete THEN
1301: gme_common_pvt.log_message('GME_STEPS_NOT_COMPLETE');
1302: x_return_status := fnd_api.g_ret_sts_error;
1303: WHEN error_cmplt_date THEN
1304: gme_common_pvt.log_message('GME_INVALID_DATE_RANGE'
1305: ,'DATE1','Completion date'
1306: ,'DATE2','Start date');
1307: x_return_status := fnd_api.g_ret_sts_error;
1308: WHEN error_future_date THEN