DBA Data[Home] [Help]

APPS.GME_FPL_PVT dependencies on GME_DEBUG

Line 82: IF g_debug <= gme_debug.g_log_procedure THEN

78: WHERE a.routing_id = v_routing_id
79: AND a.routing_class = b.routing_class (+);
80:
81: BEGIN
82: IF g_debug <= gme_debug.g_log_procedure THEN
83: gme_debug.put_line ('Entering1 api ' || g_pkg_name || '.'
84: || l_api_name);
85: END IF;
86:

Line 83: gme_debug.put_line ('Entering1 api ' || g_pkg_name || '.'

79: AND a.routing_class = b.routing_class (+);
80:
81: BEGIN
82: IF g_debug <= gme_debug.g_log_procedure THEN
83: gme_debug.put_line ('Entering1 api ' || g_pkg_name || '.'
84: || l_api_name);
85: END IF;
86:
87: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

Line 87: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

83: gme_debug.put_line ('Entering1 api ' || g_pkg_name || '.'
84: || l_api_name);
85: END IF;
86:
87: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
88: gme_debug.put_line (l_api_name || ': Parameters');
89: gme_debug.put_line ('p_batch_id:' || p_batch_id);
90: gme_debug.put_line ('p_validity_rule_id:' || p_validity_rule_id);
91: gme_debug.put_line ('p_organization_id:' || p_organization_id);

Line 88: gme_debug.put_line (l_api_name || ': Parameters');

84: || l_api_name);
85: END IF;
86:
87: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
88: gme_debug.put_line (l_api_name || ': Parameters');
89: gme_debug.put_line ('p_batch_id:' || p_batch_id);
90: gme_debug.put_line ('p_validity_rule_id:' || p_validity_rule_id);
91: gme_debug.put_line ('p_organization_id:' || p_organization_id);
92: END IF;

Line 89: gme_debug.put_line ('p_batch_id:' || p_batch_id);

85: END IF;
86:
87: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
88: gme_debug.put_line (l_api_name || ': Parameters');
89: gme_debug.put_line ('p_batch_id:' || p_batch_id);
90: gme_debug.put_line ('p_validity_rule_id:' || p_validity_rule_id);
91: gme_debug.put_line ('p_organization_id:' || p_organization_id);
92: END IF;
93: l_organization_id := p_organization_id;

Line 90: gme_debug.put_line ('p_validity_rule_id:' || p_validity_rule_id);

86:
87: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
88: gme_debug.put_line (l_api_name || ': Parameters');
89: gme_debug.put_line ('p_batch_id:' || p_batch_id);
90: gme_debug.put_line ('p_validity_rule_id:' || p_validity_rule_id);
91: gme_debug.put_line ('p_organization_id:' || p_organization_id);
92: END IF;
93: l_organization_id := p_organization_id;
94: -- Use and validate the batch id if it is passed in.

Line 91: gme_debug.put_line ('p_organization_id:' || p_organization_id);

87: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
88: gme_debug.put_line (l_api_name || ': Parameters');
89: gme_debug.put_line ('p_batch_id:' || p_batch_id);
90: gme_debug.put_line ('p_validity_rule_id:' || p_validity_rule_id);
91: gme_debug.put_line ('p_organization_id:' || p_organization_id);
92: END IF;
93: l_organization_id := p_organization_id;
94: -- Use and validate the batch id if it is passed in.
95: IF (p_batch_id IS NOT NULL) THEN

Line 131: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

127: CLOSE validity_process_loss_cursor;
128:
129: IF x_fixed_process_loss IS NOT NULL THEN
130: RETURN;
131: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
132: gme_debug.put_line ( l_api_name || ': No process_loss at validity level');
133: END IF;
134:
135: -- Determine FPL at recipe Org level

Line 132: gme_debug.put_line ( l_api_name || ': No process_loss at validity level');

128:
129: IF x_fixed_process_loss IS NOT NULL THEN
130: RETURN;
131: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
132: gme_debug.put_line ( l_api_name || ': No process_loss at validity level');
133: END IF;
134:
135: -- Determine FPL at recipe Org level
136: OPEN orgn_process_loss_cursor (l_recipe_id, l_organization_id);

Line 142: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

138: CLOSE orgn_process_loss_cursor;
139:
140: IF x_fixed_process_loss IS NOT NULL THEN
141: return;
142: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
143: gme_debug.put_line ( l_api_name || ': No fixed process_loss at orgn level');
144: END IF;
145:
146: -- Determin FPL at Recipe level.

Line 143: gme_debug.put_line ( l_api_name || ': No fixed process_loss at orgn level');

139:
140: IF x_fixed_process_loss IS NOT NULL THEN
141: return;
142: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
143: gme_debug.put_line ( l_api_name || ': No fixed process_loss at orgn level');
144: END IF;
145:
146: -- Determin FPL at Recipe level.
147: OPEN recipe_process_loss_cursor (l_recipe_id);

Line 152: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

148: FETCH recipe_process_loss_cursor INTO x_fixed_process_loss, x_fixed_process_loss_uom;
149: CLOSE recipe_process_loss_cursor;
150: IF x_fixed_process_loss IS NOT NULL THEN
151: return;
152: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
153: gme_debug.put_line ( l_api_name || 'No fixed process_loss at recipe level');
154: END IF;
155:
156: -- Determine FPL at routing level.

Line 153: gme_debug.put_line ( l_api_name || 'No fixed process_loss at recipe level');

149: CLOSE recipe_process_loss_cursor;
150: IF x_fixed_process_loss IS NOT NULL THEN
151: return;
152: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
153: gme_debug.put_line ( l_api_name || 'No fixed process_loss at recipe level');
154: END IF;
155:
156: -- Determine FPL at routing level.
157: IF (l_routing_id IS NOT NULL ) THEN

Line 163: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

159: FETCH routing_process_loss_cursor INTO l_routing_class, x_fixed_process_loss,x_fixed_process_loss_uom ;
160: CLOSE routing_process_loss_cursor;
161: IF x_fixed_process_loss IS NOT NULL THEN
162: return;
163: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
164: gme_debug.put_line ( l_api_name || 'No fixed process_loss at routing level');
165: END IF;
166: END IF;
167:

Line 164: gme_debug.put_line ( l_api_name || 'No fixed process_loss at routing level');

160: CLOSE routing_process_loss_cursor;
161: IF x_fixed_process_loss IS NOT NULL THEN
162: return;
163: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
164: gme_debug.put_line ( l_api_name || 'No fixed process_loss at routing level');
165: END IF;
166: END IF;
167:
168: -- Determine FPL at routing class level.

Line 175: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

171: FETCH routing_cls_process_loss INTO x_fixed_process_loss,x_fixed_process_loss_uom;
172: CLOSE routing_cls_process_loss;
173: IF x_fixed_process_loss IS NOT NULL THEN
174: return;
175: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
176: gme_debug.put_line (l_api_name || ': No FPL at routing class ');
177: END IF;
178: END IF;
179:

Line 176: gme_debug.put_line (l_api_name || ': No FPL at routing class ');

172: CLOSE routing_cls_process_loss;
173: IF x_fixed_process_loss IS NOT NULL THEN
174: return;
175: ELSIF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
176: gme_debug.put_line (l_api_name || ': No FPL at routing class ');
177: END IF;
178: END IF;
179:
180: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

Line 180: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

176: gme_debug.put_line (l_api_name || ': No FPL at routing class ');
177: END IF;
178: END IF;
179:
180: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
181: gme_debug.put_line (l_api_name || 'No Fixed Process Loss defined ');
182: END IF;
183:
184: IF g_debug <= gme_debug.g_log_procedure THEN

Line 181: gme_debug.put_line (l_api_name || 'No Fixed Process Loss defined ');

177: END IF;
178: END IF;
179:
180: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
181: gme_debug.put_line (l_api_name || 'No Fixed Process Loss defined ');
182: END IF;
183:
184: IF g_debug <= gme_debug.g_log_procedure THEN
185: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

Line 184: IF g_debug <= gme_debug.g_log_procedure THEN

180: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
181: gme_debug.put_line (l_api_name || 'No Fixed Process Loss defined ');
182: END IF;
183:
184: IF g_debug <= gme_debug.g_log_procedure THEN
185: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
186: END IF;
187:
188: EXCEPTION

Line 185: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

181: gme_debug.put_line (l_api_name || 'No Fixed Process Loss defined ');
182: END IF;
183:
184: IF g_debug <= gme_debug.g_log_procedure THEN
185: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
186: END IF;
187:
188: EXCEPTION
189: WHEN expected_error THEN

Line 190: IF g_debug <= gme_debug.g_log_procedure THEN

186: END IF;
187:
188: EXCEPTION
189: WHEN expected_error THEN
190: IF g_debug <= gme_debug.g_log_procedure THEN
191: gme_debug.put_line('expected ERROR in gme_fpl_pvt.get_fixed_process_loss');
192: END IF;
193: RETURN;
194: WHEN OTHERS THEN

Line 191: gme_debug.put_line('expected ERROR in gme_fpl_pvt.get_fixed_process_loss');

187:
188: EXCEPTION
189: WHEN expected_error THEN
190: IF g_debug <= gme_debug.g_log_procedure THEN
191: gme_debug.put_line('expected ERROR in gme_fpl_pvt.get_fixed_process_loss');
192: END IF;
193: RETURN;
194: WHEN OTHERS THEN
195: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 197: IF g_debug <= gme_debug.g_log_unexpected THEN

193: RETURN;
194: WHEN OTHERS THEN
195: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
196:
197: IF g_debug <= gme_debug.g_log_unexpected THEN
198: gme_debug.put_line ( 'When others exception in '
199: || g_pkg_name
200: || '.'
201: || l_api_name

Line 198: gme_debug.put_line ( 'When others exception in '

194: WHEN OTHERS THEN
195: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
196:
197: IF g_debug <= gme_debug.g_log_unexpected THEN
198: gme_debug.put_line ( 'When others exception in '
199: || g_pkg_name
200: || '.'
201: || l_api_name
202: || ' Error is '

Line 260: IF g_debug <= gme_debug.g_log_procedure THEN

256: WHERE organization_id = v_org_id
257: AND inventory_item_id = v_inventory_item_id;
258:
259: BEGIN
260: IF g_debug <= gme_debug.g_log_procedure THEN
261: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
262: END IF;
263:
264: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

Line 261: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);

257: AND inventory_item_id = v_inventory_item_id;
258:
259: BEGIN
260: IF g_debug <= gme_debug.g_log_procedure THEN
261: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
262: END IF;
263:
264: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
265: gme_debug.put_line (l_api_name || ': Parameters');

Line 264: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

260: IF g_debug <= gme_debug.g_log_procedure THEN
261: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
262: END IF;
263:
264: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
265: gme_debug.put_line (l_api_name || ': Parameters');
266: gme_debug.put_line ('p_batch_id:' || p_batch_header_rec.batch_id);
267: gme_debug.put_line ('p_organization_id :' || p_organization_id);
268: END IF;

Line 265: gme_debug.put_line (l_api_name || ': Parameters');

261: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
262: END IF;
263:
264: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
265: gme_debug.put_line (l_api_name || ': Parameters');
266: gme_debug.put_line ('p_batch_id:' || p_batch_header_rec.batch_id);
267: gme_debug.put_line ('p_organization_id :' || p_organization_id);
268: END IF;
269:

Line 266: gme_debug.put_line ('p_batch_id:' || p_batch_header_rec.batch_id);

262: END IF;
263:
264: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
265: gme_debug.put_line (l_api_name || ': Parameters');
266: gme_debug.put_line ('p_batch_id:' || p_batch_header_rec.batch_id);
267: gme_debug.put_line ('p_organization_id :' || p_organization_id);
268: END IF;
269:
270: x_return_status := fnd_api.g_ret_sts_success;

Line 267: gme_debug.put_line ('p_organization_id :' || p_organization_id);

263:
264: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
265: gme_debug.put_line (l_api_name || ': Parameters');
266: gme_debug.put_line ('p_batch_id:' || p_batch_header_rec.batch_id);
267: gme_debug.put_line ('p_organization_id :' || p_organization_id);
268: END IF;
269:
270: x_return_status := fnd_api.g_ret_sts_success;
271:

Line 288: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

284: IF l_fixed_process_loss IS NULL OR l_fixed_process_loss_uom IS NULL THEN
285: RETURN;
286: END IF;
287:
288: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
289: gme_debug.put_line ('Fixed Process Loss :' || l_fixed_process_loss);
290: gme_debug.put_line ('Fixed Process Loss UOM :'||l_fixed_process_loss_uom);
291: gme_debug.put_line ('p material table count is :'||p_material_tbl.COUNT);
292: END IF;

Line 289: gme_debug.put_line ('Fixed Process Loss :' || l_fixed_process_loss);

285: RETURN;
286: END IF;
287:
288: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
289: gme_debug.put_line ('Fixed Process Loss :' || l_fixed_process_loss);
290: gme_debug.put_line ('Fixed Process Loss UOM :'||l_fixed_process_loss_uom);
291: gme_debug.put_line ('p material table count is :'||p_material_tbl.COUNT);
292: END IF;
293:

Line 290: gme_debug.put_line ('Fixed Process Loss UOM :'||l_fixed_process_loss_uom);

286: END IF;
287:
288: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
289: gme_debug.put_line ('Fixed Process Loss :' || l_fixed_process_loss);
290: gme_debug.put_line ('Fixed Process Loss UOM :'||l_fixed_process_loss_uom);
291: gme_debug.put_line ('p material table count is :'||p_material_tbl.COUNT);
292: END IF;
293:
294: --- Get Total of product qty's

Line 291: gme_debug.put_line ('p material table count is :'||p_material_tbl.COUNT);

287:
288: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
289: gme_debug.put_line ('Fixed Process Loss :' || l_fixed_process_loss);
290: gme_debug.put_line ('Fixed Process Loss UOM :'||l_fixed_process_loss_uom);
291: gme_debug.put_line ('p material table count is :'||p_material_tbl.COUNT);
292: END IF;
293:
294: --- Get Total of product qty's
295: total_output_qty :=0;

Line 302: IF (g_debug = gme_debug.g_log_statement) THEN

298: IF ( p_material_tbl (i).line_type <> -1) THEN
299: l_new_dtl_qty := p_material_tbl(i).plan_qty;
300: -- IF detail uom is not same as Fixed Process Loss type uom then convert it to Fixed Process Loss uom
301: IF p_material_tbl(i).dtl_um <> l_fixed_process_loss_uom THEN
302: IF (g_debug = gme_debug.g_log_statement) THEN
303: gme_debug.put_line(' product dtl uom is ' || p_material_tbl(i).dtl_um);
304: gme_debug.put_line(' product plan qty is ' || p_material_tbl(i).plan_qty);
305: END IF;
306: l_new_dtl_qty := inv_convert.inv_um_convert

Line 303: gme_debug.put_line(' product dtl uom is ' || p_material_tbl(i).dtl_um);

299: l_new_dtl_qty := p_material_tbl(i).plan_qty;
300: -- IF detail uom is not same as Fixed Process Loss type uom then convert it to Fixed Process Loss uom
301: IF p_material_tbl(i).dtl_um <> l_fixed_process_loss_uom THEN
302: IF (g_debug = gme_debug.g_log_statement) THEN
303: gme_debug.put_line(' product dtl uom is ' || p_material_tbl(i).dtl_um);
304: gme_debug.put_line(' product plan qty is ' || p_material_tbl(i).plan_qty);
305: END IF;
306: l_new_dtl_qty := inv_convert.inv_um_convert
307: (item_id => p_material_tbl(i).inventory_item_id

Line 304: gme_debug.put_line(' product plan qty is ' || p_material_tbl(i).plan_qty);

300: -- IF detail uom is not same as Fixed Process Loss type uom then convert it to Fixed Process Loss uom
301: IF p_material_tbl(i).dtl_um <> l_fixed_process_loss_uom THEN
302: IF (g_debug = gme_debug.g_log_statement) THEN
303: gme_debug.put_line(' product dtl uom is ' || p_material_tbl(i).dtl_um);
304: gme_debug.put_line(' product plan qty is ' || p_material_tbl(i).plan_qty);
305: END IF;
306: l_new_dtl_qty := inv_convert.inv_um_convert
307: (item_id => p_material_tbl(i).inventory_item_id
308: ,PRECISION => gme_common_pvt.g_precision

Line 315: IF (g_debug = gme_debug.g_log_statement) THEN

311: ,to_unit => l_fixed_process_loss_uom
312: ,from_name => NULL
313: ,to_name => NULL);
314: IF l_new_dtl_qty < 0 THEN
315: IF (g_debug = gme_debug.g_log_statement) THEN
316: gme_debug.put_line('Failed in UOM Conv from dtl_um to fixed process loss UOM ');
317: END IF;
318: l_item_id := p_material_tbl(i).inventory_item_id;
319: l_from_uom := p_material_tbl(i).dtl_um;

Line 316: gme_debug.put_line('Failed in UOM Conv from dtl_um to fixed process loss UOM ');

312: ,from_name => NULL
313: ,to_name => NULL);
314: IF l_new_dtl_qty < 0 THEN
315: IF (g_debug = gme_debug.g_log_statement) THEN
316: gme_debug.put_line('Failed in UOM Conv from dtl_um to fixed process loss UOM ');
317: END IF;
318: l_item_id := p_material_tbl(i).inventory_item_id;
319: l_from_uom := p_material_tbl(i).dtl_um;
320: l_to_uom := l_fixed_process_loss_uom;

Line 324: IF (g_debug = gme_debug.g_log_statement) THEN

320: l_to_uom := l_fixed_process_loss_uom;
321: RAISE conversion_failure;
322: END IF;
323: END IF;
324: IF (g_debug = gme_debug.g_log_statement) THEN
325: gme_debug.put_line(' converted `product dtl uom is ' || l_new_dtl_qty);
326: END IF;
327: total_output_qty := NVL(total_output_qty,0) + l_new_dtl_qty;
328: END IF;

Line 325: gme_debug.put_line(' converted `product dtl uom is ' || l_new_dtl_qty);

321: RAISE conversion_failure;
322: END IF;
323: END IF;
324: IF (g_debug = gme_debug.g_log_statement) THEN
325: gme_debug.put_line(' converted `product dtl uom is ' || l_new_dtl_qty);
326: END IF;
327: total_output_qty := NVL(total_output_qty,0) + l_new_dtl_qty;
328: END IF;
329: END LOOP;

Line 331: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

327: total_output_qty := NVL(total_output_qty,0) + l_new_dtl_qty;
328: END IF;
329: END LOOP;
330:
331: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
332: gme_debug.put_line ('Total product qty :' || total_output_qty);
333: END IF;
334:
335: --- Get Total of ingredient qty's that contribute to yield and scale type is not fixed

Line 332: gme_debug.put_line ('Total product qty :' || total_output_qty);

328: END IF;
329: END LOOP;
330:
331: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
332: gme_debug.put_line ('Total product qty :' || total_output_qty);
333: END IF;
334:
335: --- Get Total of ingredient qty's that contribute to yield and scale type is not fixed
336: total_input_qty :=0;

Line 354: IF (g_debug = gme_debug.g_log_statement) THEN

350: ,to_unit => l_fixed_process_loss_uom
351: ,from_name => NULL
352: ,to_name => NULL);
353: IF l_new_dtl_qty < 0 THEN
354: IF (g_debug = gme_debug.g_log_statement) THEN
355: gme_debug.put_line('Failed in UOM Conv from dtl_um to fixed process loss UOM ');
356: END IF;
357: l_item_id := p_material_tbl(i).inventory_item_id;
358: l_from_uom := p_material_tbl(i).dtl_um;

Line 355: gme_debug.put_line('Failed in UOM Conv from dtl_um to fixed process loss UOM ');

351: ,from_name => NULL
352: ,to_name => NULL);
353: IF l_new_dtl_qty < 0 THEN
354: IF (g_debug = gme_debug.g_log_statement) THEN
355: gme_debug.put_line('Failed in UOM Conv from dtl_um to fixed process loss UOM ');
356: END IF;
357: l_item_id := p_material_tbl(i).inventory_item_id;
358: l_from_uom := p_material_tbl(i).dtl_um;
359: l_to_uom := l_fixed_process_loss_uom;

Line 367: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

363: total_input_qty := NVL(total_input_qty,0) + l_new_dtl_qty;
364: END IF;
365: END LOOP;
366:
367: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
368: gme_debug.put_line ('Total ingredient qty contributing to yield :' || total_input_qty);
369: END IF;
370:
371: IF (p_called_from = 1 AND p_creation_mode = 'INPUT') THEN

Line 368: gme_debug.put_line ('Total ingredient qty contributing to yield :' || total_input_qty);

364: END IF;
365: END LOOP;
366:
367: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
368: gme_debug.put_line ('Total ingredient qty contributing to yield :' || total_input_qty);
369: END IF;
370:
371: IF (p_called_from = 1 AND p_creation_mode = 'INPUT') THEN
372: -- Calculate new total input qty after accounting for fixed process loss

Line 379: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

375: Actual_output_total := (total_output_qty * new_input_qty)/total_input_qty;
376: -- Bug 6908375
377: -- Raise error if new_input_qty is <=0
378: IF NVL(New_input_qty,0) <= 0 THEN
379: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
380: gme_debug.put_line ('New total input :' || new_input_qty);
381: gme_debug.put_line ('returning');
382: END IF;
383: RAISE fpl_setup_error;

Line 380: gme_debug.put_line ('New total input :' || new_input_qty);

376: -- Bug 6908375
377: -- Raise error if new_input_qty is <=0
378: IF NVL(New_input_qty,0) <= 0 THEN
379: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
380: gme_debug.put_line ('New total input :' || new_input_qty);
381: gme_debug.put_line ('returning');
382: END IF;
383: RAISE fpl_setup_error;
384: END IF;

Line 381: gme_debug.put_line ('returning');

377: -- Raise error if new_input_qty is <=0
378: IF NVL(New_input_qty,0) <= 0 THEN
379: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
380: gme_debug.put_line ('New total input :' || new_input_qty);
381: gme_debug.put_line ('returning');
382: END IF;
383: RAISE fpl_setup_error;
384: END IF;
385:

Line 386: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

382: END IF;
383: RAISE fpl_setup_error;
384: END IF;
385:
386: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
387: gme_debug.put_line ('New total input after accounting for Fixed process loss :' || new_input_qty);
388: gme_debug.put_line ('Actual total output qty based on new input qty :' || Actual_output_total);
389: END IF;
390: END IF;

Line 387: gme_debug.put_line ('New total input after accounting for Fixed process loss :' || new_input_qty);

383: RAISE fpl_setup_error;
384: END IF;
385:
386: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
387: gme_debug.put_line ('New total input after accounting for Fixed process loss :' || new_input_qty);
388: gme_debug.put_line ('Actual total output qty based on new input qty :' || Actual_output_total);
389: END IF;
390: END IF;
391:

Line 388: gme_debug.put_line ('Actual total output qty based on new input qty :' || Actual_output_total);

384: END IF;
385:
386: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
387: gme_debug.put_line ('New total input after accounting for Fixed process loss :' || new_input_qty);
388: gme_debug.put_line ('Actual total output qty based on new input qty :' || Actual_output_total);
389: END IF;
390: END IF;
391:
392: X_material_tbl := p_material_tbl;

Line 415: IF (g_debug = gme_debug.g_log_statement) THEN

411: ,to_unit => l_fixed_process_loss_uom
412: ,from_name => NULL
413: ,to_name => NULL);
414: IF l_new_dtl_qty < 0 THEN
415: IF (g_debug = gme_debug.g_log_statement) THEN
416: gme_debug.put_line('Failed in UOM Conv from dtl_um to fixed process loss UOM ');
417: END IF;
418: l_item_id := p_material_tbl(i).inventory_item_id;
419: l_from_uom := p_material_tbl(i).dtl_um;

Line 416: gme_debug.put_line('Failed in UOM Conv from dtl_um to fixed process loss UOM ');

412: ,from_name => NULL
413: ,to_name => NULL);
414: IF l_new_dtl_qty < 0 THEN
415: IF (g_debug = gme_debug.g_log_statement) THEN
416: gme_debug.put_line('Failed in UOM Conv from dtl_um to fixed process loss UOM ');
417: END IF;
418: l_item_id := p_material_tbl(i).inventory_item_id;
419: l_from_uom := p_material_tbl(i).dtl_um;
420: l_to_uom := l_fixed_process_loss_uom;

Line 453: IF (g_debug = gme_debug.g_log_statement) THEN

449: ,to_unit => p_material_tbl(i).dtl_um
450: ,from_name => NULL
451: ,to_name => NULL);
452: IF l_plan_qty < 0 THEN
453: IF (g_debug = gme_debug.g_log_statement) THEN
454: gme_debug.put_line('Failed in UOM Conv from fixed process loss UOM to detail uom ');
455: END IF;
456: l_item_id := p_material_tbl(i).inventory_item_id;
457: l_from_uom := l_fixed_process_loss_uom;

Line 454: gme_debug.put_line('Failed in UOM Conv from fixed process loss UOM to detail uom ');

450: ,from_name => NULL
451: ,to_name => NULL);
452: IF l_plan_qty < 0 THEN
453: IF (g_debug = gme_debug.g_log_statement) THEN
454: gme_debug.put_line('Failed in UOM Conv from fixed process loss UOM to detail uom ');
455: END IF;
456: l_item_id := p_material_tbl(i).inventory_item_id;
457: l_from_uom := l_fixed_process_loss_uom;
458: l_to_uom := p_material_tbl(i).dtl_um;

Line 489: IF (g_debug = gme_debug.g_log_statement) THEN

485: ,to_unit => l_item_uom
486: ,from_name => NULL
487: ,to_name => NULL);
488: IF l_original_primary_qty < 0 THEN
489: IF (g_debug = gme_debug.g_log_statement) THEN
490: gme_debug.put_line('Failed in UOM Conv from detail uom to item uom ');
491: END IF;
492: l_item_id := p_material_tbl(i).inventory_item_id;
493: l_from_uom := p_material_tbl(i).dtl_um;

Line 490: gme_debug.put_line('Failed in UOM Conv from detail uom to item uom ');

486: ,from_name => NULL
487: ,to_name => NULL);
488: IF l_original_primary_qty < 0 THEN
489: IF (g_debug = gme_debug.g_log_statement) THEN
490: gme_debug.put_line('Failed in UOM Conv from detail uom to item uom ');
491: END IF;
492: l_item_id := p_material_tbl(i).inventory_item_id;
493: l_from_uom := p_material_tbl(i).dtl_um;
494: l_to_uom := l_item_uom;

Line 558: gme_debug.log_initialize ('FixedProcessLoss');

554: BEGIN
555: x_return_status := fnd_api.g_ret_sts_success;
556:
557: IF (g_debug <> -1) THEN
558: gme_debug.log_initialize ('FixedProcessLoss');
559: END IF;
560:
561: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
562: gme_debug.put_line ( g_pkg_name

Line 561: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

557: IF (g_debug <> -1) THEN
558: gme_debug.log_initialize ('FixedProcessLoss');
559: END IF;
560:
561: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
562: gme_debug.put_line ( g_pkg_name
563: || '.'
564: || l_api_name);
565: END IF;

Line 562: gme_debug.put_line ( g_pkg_name

558: gme_debug.log_initialize ('FixedProcessLoss');
559: END IF;
560:
561: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
562: gme_debug.put_line ( g_pkg_name
563: || '.'
564: || l_api_name);
565: END IF;
566: gme_debug.put_line('batch id is ' || p_batch_header_rec.batch_id);

Line 566: gme_debug.put_line('batch id is ' || p_batch_header_rec.batch_id);

562: gme_debug.put_line ( g_pkg_name
563: || '.'
564: || l_api_name);
565: END IF;
566: gme_debug.put_line('batch id is ' || p_batch_header_rec.batch_id);
567: FOR l_rec IN cur_get_matl (p_batch_header_rec.batch_id) LOOP
568: i := i + 1;
569: l_material_tbl (i) := l_rec;
570: END LOOP;

Line 572: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

568: i := i + 1;
569: l_material_tbl (i) := l_rec;
570: END LOOP;
571:
572: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
573: gme_debug.put_line('before call to gme_fpl_pvt.apply_fixed_process_loss');
574: END IF;
575: -- Initialize output batch header
576: x_batch_header_rec := p_batch_header_rec;

Line 573: gme_debug.put_line('before call to gme_fpl_pvt.apply_fixed_process_loss');

569: l_material_tbl (i) := l_rec;
570: END LOOP;
571:
572: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
573: gme_debug.put_line('before call to gme_fpl_pvt.apply_fixed_process_loss');
574: END IF;
575: -- Initialize output batch header
576: x_batch_header_rec := p_batch_header_rec;
577: x_material_tbl := l_material_tbl;

Line 588: IF (g_debug = gme_debug.g_log_statement) THEN

584: ,x_batch_header_rec => x_batch_header_rec
585: ,x_material_tbl => x_material_tbl
586: ,x_return_status => x_return_status
587: );
588: IF (g_debug = gme_debug.g_log_statement) THEN
589: gme_debug.put_line ('Return from Apply Fixed Proccess Loss is ' || x_return_status);
590: END IF;
591: IF x_return_status <> fnd_api.g_ret_sts_success THEN
592: RAISE Fixed_process_loss_failure;

Line 589: gme_debug.put_line ('Return from Apply Fixed Proccess Loss is ' || x_return_status);

585: ,x_material_tbl => x_material_tbl
586: ,x_return_status => x_return_status
587: );
588: IF (g_debug = gme_debug.g_log_statement) THEN
589: gme_debug.put_line ('Return from Apply Fixed Proccess Loss is ' || x_return_status);
590: END IF;
591: IF x_return_status <> fnd_api.g_ret_sts_success THEN
592: RAISE Fixed_process_loss_failure;
593: END IF;

Line 611: IF (g_debug = gme_debug.g_log_statement) THEN

607: RAISE error_update_batch;
608: END IF;
609:
610: FOR i IN 1..x_material_tbl.COUNT LOOP
611: IF (g_debug = gme_debug.g_log_statement) THEN
612: gme_debug.put_line('Before calling gme_material_details_dbl.update_row');
613: END IF;
614: IF NOT (gme_material_details_dbl.update_row (x_material_tbl (i) )) THEN
615: RAISE material_save_failed;

Line 612: gme_debug.put_line('Before calling gme_material_details_dbl.update_row');

608: END IF;
609:
610: FOR i IN 1..x_material_tbl.COUNT LOOP
611: IF (g_debug = gme_debug.g_log_statement) THEN
612: gme_debug.put_line('Before calling gme_material_details_dbl.update_row');
613: END IF;
614: IF NOT (gme_material_details_dbl.update_row (x_material_tbl (i) )) THEN
615: RAISE material_save_failed;
616: ELSE

Line 624: IF (g_debug = gme_debug.g_log_statement) THEN

620: END IF;
621: END LOOP;
622: EXCEPTION
623: WHEN Fixed_process_loss_failure THEN
624: IF (g_debug = gme_debug.g_log_statement) THEN
625: gme_debug.put_line ('Failed to apply FPL');
626: END IF;
627: WHEN error_update_batch THEN
628: x_return_status := FND_API.g_ret_sts_unexp_error;

Line 625: gme_debug.put_line ('Failed to apply FPL');

621: END LOOP;
622: EXCEPTION
623: WHEN Fixed_process_loss_failure THEN
624: IF (g_debug = gme_debug.g_log_statement) THEN
625: gme_debug.put_line ('Failed to apply FPL');
626: END IF;
627: WHEN error_update_batch THEN
628: x_return_status := FND_API.g_ret_sts_unexp_error;
629: WHEN material_save_failed THEN

Line 630: IF (g_debug = gme_debug.g_log_statement) THEN

626: END IF;
627: WHEN error_update_batch THEN
628: x_return_status := FND_API.g_ret_sts_unexp_error;
629: WHEN material_save_failed THEN
630: IF (g_debug = gme_debug.g_log_statement) THEN
631: gme_debug.put_line ('Material save failed');
632: END IF;
633: x_return_status := fnd_api.g_ret_sts_error;
634: WHEN setup_failure THEN

Line 631: gme_debug.put_line ('Material save failed');

627: WHEN error_update_batch THEN
628: x_return_status := FND_API.g_ret_sts_unexp_error;
629: WHEN material_save_failed THEN
630: IF (g_debug = gme_debug.g_log_statement) THEN
631: gme_debug.put_line ('Material save failed');
632: END IF;
633: x_return_status := fnd_api.g_ret_sts_error;
634: WHEN setup_failure THEN
635: --ROLLBACK TO SAVEPOINT create_batch;