DBA Data[Home] [Help]

APPS.GME_REROUTE_BATCH_PVT dependencies on GME_COMMON_PVT

Line 67: AND line_type = gme_common_pvt.g_line_type_prod

63: SELECT plan_qty, dtl_um
64: FROM gme_material_details
65: WHERE batch_id = v_batch_id
66: AND inventory_item_id = v_inventory_item_id
67: AND line_type = gme_common_pvt.g_line_type_prod
68: ORDER BY line_no ASC;
69:
70: l_material_detail_ids_tab gme_common_pvt.number_tab;
71: l_material_detail_rec gme_material_details%ROWTYPE;

Line 70: l_material_detail_ids_tab gme_common_pvt.number_tab;

66: AND inventory_item_id = v_inventory_item_id
67: AND line_type = gme_common_pvt.g_line_type_prod
68: ORDER BY line_no ASC;
69:
70: l_material_detail_ids_tab gme_common_pvt.number_tab;
71: l_material_detail_rec gme_material_details%ROWTYPE;
72: l_return_code NUMBER;
73: l_recipe_id NUMBER;
74: l_temp_qty NUMBER DEFAULT 0;

Line 80: l_material_details gme_common_pvt.material_details_tab;

76: l_message_list VARCHAR2 (1000);
77: l_max_step_date DATE;
78: l_process_parameters_tab gmd_recipe_fetch_pub.recp_resc_proc_param_tbl;
79: l_gme_material_details gme_material_details%ROWTYPE;
80: l_material_details gme_common_pvt.material_details_tab;
81: l_total_output_qty_b NUMBER;
82: l_total_output_qty_c NUMBER;
83: l_phantom_ids_tab gme_common_pvt.number_tab;
84: l_phantom_associated_to_step BOOLEAN;

Line 83: l_phantom_ids_tab gme_common_pvt.number_tab;

79: l_gme_material_details gme_material_details%ROWTYPE;
80: l_material_details gme_common_pvt.material_details_tab;
81: l_total_output_qty_b NUMBER;
82: l_total_output_qty_c NUMBER;
83: l_phantom_ids_tab gme_common_pvt.number_tab;
84: l_phantom_associated_to_step BOOLEAN;
85: l_phantom_batch_header_rec gme_batch_header%ROWTYPE;
86: l_phantom_batch_header_rec_out gme_batch_header%ROWTYPE;
87: no_continous_periods EXCEPTION;

Line 118: IF (NOT gme_common_pvt.get_batch_header

114: /* Set the return status to success initially */
115: x_return_status := fnd_api.g_ret_sts_success;
116:
117: /* Get the Batch header */
118: IF (NOT gme_common_pvt.get_batch_header
119: (p_batch_header_rec => p_batch_header_rec
120: ,p_org_code => NULL
121: ,p_batch_type => NULL
122: ,x_batch_header_rec => x_batch_header_rec) ) THEN

Line 172: ,x_recipe_rout_tbl => gme_common_pvt.routings

168: ,x_return_status => x_return_status
169: ,x_msg_count => l_message_count
170: ,x_msg_data => l_message_list
171: ,x_return_code => l_return_code
172: ,x_recipe_rout_tbl => gme_common_pvt.routings
173: ,x_recipe_rout_matl_tbl => gme_common_pvt.routing_materials
174: ,x_recipe_step_out => gme_common_pvt.steps
175: ,x_routing_depd_tbl => gme_common_pvt.step_dependencies
176: ,x_oprn_act_out => gme_common_pvt.activities

Line 173: ,x_recipe_rout_matl_tbl => gme_common_pvt.routing_materials

169: ,x_msg_count => l_message_count
170: ,x_msg_data => l_message_list
171: ,x_return_code => l_return_code
172: ,x_recipe_rout_tbl => gme_common_pvt.routings
173: ,x_recipe_rout_matl_tbl => gme_common_pvt.routing_materials
174: ,x_recipe_step_out => gme_common_pvt.steps
175: ,x_routing_depd_tbl => gme_common_pvt.step_dependencies
176: ,x_oprn_act_out => gme_common_pvt.activities
177: ,x_oprn_resc_rec => gme_common_pvt.resources

Line 174: ,x_recipe_step_out => gme_common_pvt.steps

170: ,x_msg_data => l_message_list
171: ,x_return_code => l_return_code
172: ,x_recipe_rout_tbl => gme_common_pvt.routings
173: ,x_recipe_rout_matl_tbl => gme_common_pvt.routing_materials
174: ,x_recipe_step_out => gme_common_pvt.steps
175: ,x_routing_depd_tbl => gme_common_pvt.step_dependencies
176: ,x_oprn_act_out => gme_common_pvt.activities
177: ,x_oprn_resc_rec => gme_common_pvt.resources
178: ,x_recp_resc_proc_param_tbl => l_process_parameters_tab

Line 175: ,x_routing_depd_tbl => gme_common_pvt.step_dependencies

171: ,x_return_code => l_return_code
172: ,x_recipe_rout_tbl => gme_common_pvt.routings
173: ,x_recipe_rout_matl_tbl => gme_common_pvt.routing_materials
174: ,x_recipe_step_out => gme_common_pvt.steps
175: ,x_routing_depd_tbl => gme_common_pvt.step_dependencies
176: ,x_oprn_act_out => gme_common_pvt.activities
177: ,x_oprn_resc_rec => gme_common_pvt.resources
178: ,x_recp_resc_proc_param_tbl => l_process_parameters_tab
179: ,x_formula_header_rec => l_formula_master

Line 176: ,x_oprn_act_out => gme_common_pvt.activities

172: ,x_recipe_rout_tbl => gme_common_pvt.routings
173: ,x_recipe_rout_matl_tbl => gme_common_pvt.routing_materials
174: ,x_recipe_step_out => gme_common_pvt.steps
175: ,x_routing_depd_tbl => gme_common_pvt.step_dependencies
176: ,x_oprn_act_out => gme_common_pvt.activities
177: ,x_oprn_resc_rec => gme_common_pvt.resources
178: ,x_recp_resc_proc_param_tbl => l_process_parameters_tab
179: ,x_formula_header_rec => l_formula_master
180: ,x_formula_dtl_tbl => gme_common_pvt.materials);

Line 177: ,x_oprn_resc_rec => gme_common_pvt.resources

173: ,x_recipe_rout_matl_tbl => gme_common_pvt.routing_materials
174: ,x_recipe_step_out => gme_common_pvt.steps
175: ,x_routing_depd_tbl => gme_common_pvt.step_dependencies
176: ,x_oprn_act_out => gme_common_pvt.activities
177: ,x_oprn_resc_rec => gme_common_pvt.resources
178: ,x_recp_resc_proc_param_tbl => l_process_parameters_tab
179: ,x_formula_header_rec => l_formula_master
180: ,x_formula_dtl_tbl => gme_common_pvt.materials);
181:

Line 180: ,x_formula_dtl_tbl => gme_common_pvt.materials);

176: ,x_oprn_act_out => gme_common_pvt.activities
177: ,x_oprn_resc_rec => gme_common_pvt.resources
178: ,x_recp_resc_proc_param_tbl => l_process_parameters_tab
179: ,x_formula_header_rec => l_formula_master
180: ,x_formula_dtl_tbl => gme_common_pvt.materials);
181:
182: IF (x_return_status = fnd_api.g_ret_sts_error) THEN
183: RAISE fnd_api.g_exc_error;
184: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN

Line 189: IF gme_common_pvt.routings.COUNT > 0 THEN

185: RAISE fnd_api.g_exc_unexpected_error;
186: END IF;
187:
188: -- Added code for Enforce Step Dependency
189: IF gme_common_pvt.routings.COUNT > 0 THEN
190: x_batch_header_rec.enforce_step_dependency :=
191: NVL (gme_common_pvt.routings (1).enforce_step_dependency, 0);
192: END IF;
193: --{

Line 191: NVL (gme_common_pvt.routings (1).enforce_step_dependency, 0);

187:
188: -- Added code for Enforce Step Dependency
189: IF gme_common_pvt.routings.COUNT > 0 THEN
190: x_batch_header_rec.enforce_step_dependency :=
191: NVL (gme_common_pvt.routings (1).enforce_step_dependency, 0);
192: END IF;
193: --{
194: IF gme_common_pvt.routings.COUNT <> 0 THEN
195: /* Formula quantities calculation */

Line 194: IF gme_common_pvt.routings.COUNT <> 0 THEN

190: x_batch_header_rec.enforce_step_dependency :=
191: NVL (gme_common_pvt.routings (1).enforce_step_dependency, 0);
192: END IF;
193: --{
194: IF gme_common_pvt.routings.COUNT <> 0 THEN
195: /* Formula quantities calculation */
196: l_total_output_qty_c := 0;
197:
198: FOR i IN 1 .. gme_common_pvt.materials.COUNT LOOP

Line 198: FOR i IN 1 .. gme_common_pvt.materials.COUNT LOOP

194: IF gme_common_pvt.routings.COUNT <> 0 THEN
195: /* Formula quantities calculation */
196: l_total_output_qty_c := 0;
197:
198: FOR i IN 1 .. gme_common_pvt.materials.COUNT LOOP
199: --{
200: IF gme_common_pvt.materials (i).line_type IN (1, 2) THEN
201: --{
202: IF gme_common_pvt.materials (i).detail_uom =

Line 200: IF gme_common_pvt.materials (i).line_type IN (1, 2) THEN

196: l_total_output_qty_c := 0;
197:
198: FOR i IN 1 .. gme_common_pvt.materials.COUNT LOOP
199: --{
200: IF gme_common_pvt.materials (i).line_type IN (1, 2) THEN
201: --{
202: IF gme_common_pvt.materials (i).detail_uom =
203: gme_common_pvt.routings (1).routing_uom THEN
204: l_total_output_qty_c :=

Line 202: IF gme_common_pvt.materials (i).detail_uom =

198: FOR i IN 1 .. gme_common_pvt.materials.COUNT LOOP
199: --{
200: IF gme_common_pvt.materials (i).line_type IN (1, 2) THEN
201: --{
202: IF gme_common_pvt.materials (i).detail_uom =
203: gme_common_pvt.routings (1).routing_uom THEN
204: l_total_output_qty_c :=
205: l_total_output_qty_c
206: + gme_common_pvt.materials (i).qty;

Line 203: gme_common_pvt.routings (1).routing_uom THEN

199: --{
200: IF gme_common_pvt.materials (i).line_type IN (1, 2) THEN
201: --{
202: IF gme_common_pvt.materials (i).detail_uom =
203: gme_common_pvt.routings (1).routing_uom THEN
204: l_total_output_qty_c :=
205: l_total_output_qty_c
206: + gme_common_pvt.materials (i).qty;
207: ELSE

Line 206: + gme_common_pvt.materials (i).qty;

202: IF gme_common_pvt.materials (i).detail_uom =
203: gme_common_pvt.routings (1).routing_uom THEN
204: l_total_output_qty_c :=
205: l_total_output_qty_c
206: + gme_common_pvt.materials (i).qty;
207: ELSE
208: l_temp_qty :=
209: inv_convert.inv_um_convert
210: (item_id => gme_common_pvt.materials (i).inventory_item_id

Line 210: (item_id => gme_common_pvt.materials (i).inventory_item_id

206: + gme_common_pvt.materials (i).qty;
207: ELSE
208: l_temp_qty :=
209: inv_convert.inv_um_convert
210: (item_id => gme_common_pvt.materials (i).inventory_item_id
211: ,PRECISION => gme_common_pvt.g_precision
212: ,from_quantity => gme_common_pvt.materials (i).qty
213: ,from_unit => gme_common_pvt.materials (i).detail_uom
214: ,to_unit => gme_common_pvt.routings (1).routing_uom

Line 211: ,PRECISION => gme_common_pvt.g_precision

207: ELSE
208: l_temp_qty :=
209: inv_convert.inv_um_convert
210: (item_id => gme_common_pvt.materials (i).inventory_item_id
211: ,PRECISION => gme_common_pvt.g_precision
212: ,from_quantity => gme_common_pvt.materials (i).qty
213: ,from_unit => gme_common_pvt.materials (i).detail_uom
214: ,to_unit => gme_common_pvt.routings (1).routing_uom
215: ,from_name => NULL

Line 212: ,from_quantity => gme_common_pvt.materials (i).qty

208: l_temp_qty :=
209: inv_convert.inv_um_convert
210: (item_id => gme_common_pvt.materials (i).inventory_item_id
211: ,PRECISION => gme_common_pvt.g_precision
212: ,from_quantity => gme_common_pvt.materials (i).qty
213: ,from_unit => gme_common_pvt.materials (i).detail_uom
214: ,to_unit => gme_common_pvt.routings (1).routing_uom
215: ,from_name => NULL
216: ,to_name => NULL);

Line 213: ,from_unit => gme_common_pvt.materials (i).detail_uom

209: inv_convert.inv_um_convert
210: (item_id => gme_common_pvt.materials (i).inventory_item_id
211: ,PRECISION => gme_common_pvt.g_precision
212: ,from_quantity => gme_common_pvt.materials (i).qty
213: ,from_unit => gme_common_pvt.materials (i).detail_uom
214: ,to_unit => gme_common_pvt.routings (1).routing_uom
215: ,from_name => NULL
216: ,to_name => NULL);
217:

Line 214: ,to_unit => gme_common_pvt.routings (1).routing_uom

210: (item_id => gme_common_pvt.materials (i).inventory_item_id
211: ,PRECISION => gme_common_pvt.g_precision
212: ,from_quantity => gme_common_pvt.materials (i).qty
213: ,from_unit => gme_common_pvt.materials (i).detail_uom
214: ,to_unit => gme_common_pvt.routings (1).routing_uom
215: ,from_name => NULL
216: ,to_name => NULL);
217:
218: IF (l_temp_qty = -99999) THEN

Line 219: gme_common_pvt.log_message

215: ,from_name => NULL
216: ,to_name => NULL);
217:
218: IF (l_temp_qty = -99999) THEN
219: gme_common_pvt.log_message
220: (p_message_code => 'INV_UOM_CONVERSION_ERROR'
221: ,p_token1_name => 'uom1'
222: ,p_token1_value => gme_common_pvt.materials
223: (i).detail_uom

Line 222: ,p_token1_value => gme_common_pvt.materials

218: IF (l_temp_qty = -99999) THEN
219: gme_common_pvt.log_message
220: (p_message_code => 'INV_UOM_CONVERSION_ERROR'
221: ,p_token1_name => 'uom1'
222: ,p_token1_value => gme_common_pvt.materials
223: (i).detail_uom
224: ,p_token2_name => 'uom2'
225: ,p_token2_value => gme_common_pvt.routings (1).routing_uom
226: ,p_token3_name => 'module'

Line 225: ,p_token2_value => gme_common_pvt.routings (1).routing_uom

221: ,p_token1_name => 'uom1'
222: ,p_token1_value => gme_common_pvt.materials
223: (i).detail_uom
224: ,p_token2_name => 'uom2'
225: ,p_token2_value => gme_common_pvt.routings (1).routing_uom
226: ,p_token3_name => 'module'
227: ,p_token3_value => 'GME_REROUTE_BATCH_PVT.validate_validity_id'
228: ,p_product_code => 'INV');
229: RAISE fnd_api.g_exc_error;

Line 239: gme_common_pvt.log_message ('GME_API_PROD_QTY_CANT_ZERO');

235: END IF;--} /* l_material_details (i).line_type IN (1, 2) */
236: END LOOP;
237:
238: IF l_total_output_qty_c = 0 THEN
239: gme_common_pvt.log_message ('GME_API_PROD_QTY_CANT_ZERO');
240: RAISE fnd_api.g_exc_error;
241: END IF;
242:
243: /* Batch Quantities calculation */

Line 256: gme_common_pvt.routings (1).routing_uom THEN

252: --{
253: IF l_material_details (l_row_count).line_type > 0 THEN
254: --{
255: IF l_material_details (l_row_count).dtl_um =
256: gme_common_pvt.routings (1).routing_uom THEN
257: l_total_output_qty_b :=
258: l_total_output_qty_b
259: + l_material_details (l_row_count).plan_qty;
260: ELSE

Line 265: ,PRECISION => gme_common_pvt.g_precision

261: l_temp_qty :=
262: inv_convert.inv_um_convert
263: (item_id => l_material_details
264: (l_row_count).inventory_item_id
265: ,PRECISION => gme_common_pvt.g_precision
266: ,from_quantity => l_material_details
267: (l_row_count).plan_qty
268: ,from_unit => l_material_details
269: (l_row_count).dtl_um

Line 270: ,to_unit => gme_common_pvt.routings

266: ,from_quantity => l_material_details
267: (l_row_count).plan_qty
268: ,from_unit => l_material_details
269: (l_row_count).dtl_um
270: ,to_unit => gme_common_pvt.routings
271: (1).routing_uom
272: ,from_name => NULL
273: ,to_name => NULL);
274:

Line 276: gme_common_pvt.log_message

272: ,from_name => NULL
273: ,to_name => NULL);
274:
275: IF (l_temp_qty = -99999) THEN
276: gme_common_pvt.log_message
277: (p_message_code => 'INV_UOM_CONVERSION_ERROR'
278: ,p_token1_name => 'uom1'
279: ,p_token1_value => l_material_details
280: (l_row_count).dtl_um

Line 282: ,p_token2_value => gme_common_pvt.routings

278: ,p_token1_name => 'uom1'
279: ,p_token1_value => l_material_details
280: (l_row_count).dtl_um
281: ,p_token2_name => 'uom2'
282: ,p_token2_value => gme_common_pvt.routings
283: (1).routing_uom
284: ,p_token3_name => 'module'
285: ,p_token3_value => 'GME_REROUTE_BATCH_PVT.validate_validity_id'
286: ,p_product_code => 'INV');

Line 297: gme_common_pvt.log_message ('GME_API_PROD_QTY_CANT_ZERO');

293: END IF; --} -- IF l_material_details (l_row_count).line_type > 0
294: END LOOP; -- l_row_count IN 1 .. l_material_details.Count
295:
296: IF l_total_output_qty_b = 0 THEN
297: gme_common_pvt.log_message ('GME_API_PROD_QTY_CANT_ZERO');
298: RAISE fnd_api.g_exc_error;
299: END IF;
300: END IF;--}
301:

Line 302: gme_common_pvt.g_routing_scale_factor :=

298: RAISE fnd_api.g_exc_error;
299: END IF;
300: END IF;--}
301:
302: gme_common_pvt.g_routing_scale_factor :=
303: l_total_output_qty_b / l_total_output_qty_c;
304:
305: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
306: gme_debug.put_line ( 'Routing scale factor is '

Line 307: || gme_common_pvt.g_routing_scale_factor);

303: l_total_output_qty_b / l_total_output_qty_c;
304:
305: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
306: gme_debug.put_line ( 'Routing scale factor is '
307: || gme_common_pvt.g_routing_scale_factor);
308: END IF;
309: ELSE
310: gme_common_pvt.g_routing_scale_factor := 1;
311: END IF;--}

Line 310: gme_common_pvt.g_routing_scale_factor := 1;

306: gme_debug.put_line ( 'Routing scale factor is '
307: || gme_common_pvt.g_routing_scale_factor);
308: END IF;
309: ELSE
310: gme_common_pvt.g_routing_scale_factor := 1;
311: END IF;--}
312:
313: /* We have all the data needed to create steps, so lets call */
314: /* the create step API */

Line 316: (p_recipe_rout_step_tbl => gme_common_pvt.steps

312:
313: /* We have all the data needed to create steps, so lets call */
314: /* the create step API */
315: gme_create_step_pvt.create_batch_steps
316: (p_recipe_rout_step_tbl => gme_common_pvt.steps
317: ,p_recipe_rout_act_tbl => gme_common_pvt.activities
318: ,p_recipe_rout_resc_tbl => gme_common_pvt.resources
319: ,p_resc_parameters_tbl => l_process_parameters_tab
320: ,p_recipe_rout_matl_tbl => gme_common_pvt.routing_materials

Line 317: ,p_recipe_rout_act_tbl => gme_common_pvt.activities

313: /* We have all the data needed to create steps, so lets call */
314: /* the create step API */
315: gme_create_step_pvt.create_batch_steps
316: (p_recipe_rout_step_tbl => gme_common_pvt.steps
317: ,p_recipe_rout_act_tbl => gme_common_pvt.activities
318: ,p_recipe_rout_resc_tbl => gme_common_pvt.resources
319: ,p_resc_parameters_tbl => l_process_parameters_tab
320: ,p_recipe_rout_matl_tbl => gme_common_pvt.routing_materials
321: ,p_routing_depd_tbl => gme_common_pvt.step_dependencies

Line 318: ,p_recipe_rout_resc_tbl => gme_common_pvt.resources

314: /* the create step API */
315: gme_create_step_pvt.create_batch_steps
316: (p_recipe_rout_step_tbl => gme_common_pvt.steps
317: ,p_recipe_rout_act_tbl => gme_common_pvt.activities
318: ,p_recipe_rout_resc_tbl => gme_common_pvt.resources
319: ,p_resc_parameters_tbl => l_process_parameters_tab
320: ,p_recipe_rout_matl_tbl => gme_common_pvt.routing_materials
321: ,p_routing_depd_tbl => gme_common_pvt.step_dependencies
322: ,p_gme_batch_header_rec => x_batch_header_rec

Line 320: ,p_recipe_rout_matl_tbl => gme_common_pvt.routing_materials

316: (p_recipe_rout_step_tbl => gme_common_pvt.steps
317: ,p_recipe_rout_act_tbl => gme_common_pvt.activities
318: ,p_recipe_rout_resc_tbl => gme_common_pvt.resources
319: ,p_resc_parameters_tbl => l_process_parameters_tab
320: ,p_recipe_rout_matl_tbl => gme_common_pvt.routing_materials
321: ,p_routing_depd_tbl => gme_common_pvt.step_dependencies
322: ,p_gme_batch_header_rec => x_batch_header_rec
323: ,p_use_workday_cal => p_use_workday_cal
324: ,p_contiguity_override => p_contiguity_override

Line 321: ,p_routing_depd_tbl => gme_common_pvt.step_dependencies

317: ,p_recipe_rout_act_tbl => gme_common_pvt.activities
318: ,p_recipe_rout_resc_tbl => gme_common_pvt.resources
319: ,p_resc_parameters_tbl => l_process_parameters_tab
320: ,p_recipe_rout_matl_tbl => gme_common_pvt.routing_materials
321: ,p_routing_depd_tbl => gme_common_pvt.step_dependencies
322: ,p_gme_batch_header_rec => x_batch_header_rec
323: ,p_use_workday_cal => p_use_workday_cal
324: ,p_contiguity_override => p_contiguity_override
325: ,x_return_status => x_return_status);

Line 336: IF (gme_common_pvt.steps.COUNT > 0) THEN

332: RAISE fnd_api.g_exc_unexpected_error;
333: END IF;
334:
335: --create batch steps updates the batch header
336: IF (gme_common_pvt.steps.COUNT > 0) THEN
337: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
338: ELSE
339: l_no_steps := TRUE;
340: END IF;

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

333: END IF;
334:
335: --create batch steps updates the batch header
336: IF (gme_common_pvt.steps.COUNT > 0) THEN
337: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
338: ELSE
339: l_no_steps := TRUE;
340: END IF;
341:

Line 383: ,PRECISION => gme_common_pvt.g_precision

379:
380: l_temp_qty :=
381: inv_convert.inv_um_convert
382: (item_id => l_inventory_item_id
383: ,PRECISION => gme_common_pvt.g_precision
384: ,from_quantity => l_prim_prod_qty
385: ,from_unit => l_prim_prod_um
386: ,to_unit => l_prim_item_um
387: ,from_name => NULL

Line 391: gme_common_pvt.log_message

387: ,from_name => NULL
388: ,to_name => NULL);
389:
390: IF (l_temp_qty = -99999) THEN
391: gme_common_pvt.log_message
392: (p_message_code => 'INV_UOM_CONVERSION_ERROR'
393: ,p_token1_name => 'uom1'
394: ,p_token1_value => l_prim_prod_um
395: ,p_token2_name => 'uom2'

Line 403: IF (gme_common_pvt.calc_date_from_prod_rule

399: ,p_product_code => 'INV');
400: RAISE fnd_api.g_exc_error;
401: END IF;
402:
403: IF (gme_common_pvt.calc_date_from_prod_rule
404: (p_organization_id => x_batch_header_rec.organization_id
405: ,p_inventory_item_id => l_inventory_item_id
406: ,p_item_qty => l_temp_qty
407: ,p_start_date => x_batch_header_rec.plan_start_date

Line 436: gme_common_pvt.g_timestamp;

432: x_batch_header_rec.plan_cmplt_date;
433: ELSIF x_batch_header_rec.plan_start_date IS NULL
434: AND x_batch_header_rec.plan_cmplt_date IS NULL THEN
435: x_batch_header_rec.plan_start_date :=
436: gme_common_pvt.g_timestamp;
437: x_batch_header_rec.plan_cmplt_date :=
438: gme_common_pvt.g_timestamp;
439: END IF;
440:

Line 438: gme_common_pvt.g_timestamp;

434: AND x_batch_header_rec.plan_cmplt_date IS NULL THEN
435: x_batch_header_rec.plan_start_date :=
436: gme_common_pvt.g_timestamp;
437: x_batch_header_rec.plan_cmplt_date :=
438: gme_common_pvt.g_timestamp;
439: END IF;
440:
441: IF (g_debug = gme_debug.g_log_statement) THEN
442: gme_debug.put_line

Line 468: gme_common_pvt.material_date_change

464: FOR i IN 1 .. l_material_detail_ids_tab.COUNT LOOP
465: l_material_detail_rec.material_detail_id :=
466: l_material_detail_ids_tab (i);
467: l_phantom_associated_to_step := FALSE;
468: gme_common_pvt.material_date_change
469: (p_material_detail_id => l_material_detail_rec.material_detail_id
470: ,p_material_date => NULL
471: ,x_return_status => x_return_status);
472: IF (g_debug = gme_debug.g_log_statement) THEN

Line 474: ( 'after call to gme_common_pvt.material_date_change

470: ,p_material_date => NULL
471: ,x_return_status => x_return_status);
472: IF (g_debug = gme_debug.g_log_statement) THEN
473: gme_debug.put_line
474: ( 'after call to gme_common_pvt.material_date_change
475: material_detail_id is='
476: ||to_char(l_material_detail_ids_tab (i))
477: ||' return status = '||x_return_status);
478: END IF;

Line 497: IF(gme_common_pvt.is_material_auto_release(l_material_detail_rec.phantom_line_id)=3 AND

493: RAISE error_dbl;
494: END IF;
495: -- IF(l_material_detail_rec.material_requirement_date <> l_db_mtl_dtl_rec.material_requirement_date ) THEN
496: l_phantom_batch_header_rec.batch_id:= l_phantom_ids_tab (i);
497: IF(gme_common_pvt.is_material_auto_release(l_material_detail_rec.phantom_line_id)=3 AND
498: gme_common_pvt.is_material_assoc_to_step
499: (l_material_detail_rec.phantom_line_id )) THEN
500: l_phantom_associated_to_step := TRUE;
501: l_phantom_batch_step_rec.batch_id:= l_phantom_ids_tab (i);

Line 498: gme_common_pvt.is_material_assoc_to_step

494: END IF;
495: -- IF(l_material_detail_rec.material_requirement_date <> l_db_mtl_dtl_rec.material_requirement_date ) THEN
496: l_phantom_batch_header_rec.batch_id:= l_phantom_ids_tab (i);
497: IF(gme_common_pvt.is_material_auto_release(l_material_detail_rec.phantom_line_id)=3 AND
498: gme_common_pvt.is_material_assoc_to_step
499: (l_material_detail_rec.phantom_line_id )) THEN
500: l_phantom_associated_to_step := TRUE;
501: l_phantom_batch_step_rec.batch_id:= l_phantom_ids_tab (i);
502: SELECT batchstep_id INTO l_phantom_batch_step_rec.batchstep_id

Line 569: gme_common_pvt.log_message('GME_EXPIRED_RESERV_MO_DELETED');

565: /* If any of the reservations are MO allocations deleted then respective message
566: will be put on the stack but return status will be 'S' to form or API */
567: IF (l_B_count > 0) OR (l_R_count > 0 AND l_M_count > 0) THEN
568: --atleast for one material line MO allocations and reservations are deleted
569: gme_common_pvt.log_message('GME_EXPIRED_RESERV_MO_DELETED');
570: --x_return_status := 'W';
571: ELSIF l_R_count > 0 THEN
572: ----atleast for one material line reservations are deleted
573: gme_common_pvt.log_message('GME_EXPIRED_RESERV_DELETED');

Line 573: gme_common_pvt.log_message('GME_EXPIRED_RESERV_DELETED');

569: gme_common_pvt.log_message('GME_EXPIRED_RESERV_MO_DELETED');
570: --x_return_status := 'W';
571: ELSIF l_R_count > 0 THEN
572: ----atleast for one material line reservations are deleted
573: gme_common_pvt.log_message('GME_EXPIRED_RESERV_DELETED');
574: --x_return_status := 'W';
575: ELSIF l_M_count > 0 THEN
576: ----atleast for one material line MO allocations are deleted
577: gme_common_pvt.log_message('GME_EXPIRED_MO_DELETED');

Line 577: gme_common_pvt.log_message('GME_EXPIRED_MO_DELETED');

573: gme_common_pvt.log_message('GME_EXPIRED_RESERV_DELETED');
574: --x_return_status := 'W';
575: ELSIF l_M_count > 0 THEN
576: ----atleast for one material line MO allocations are deleted
577: gme_common_pvt.log_message('GME_EXPIRED_MO_DELETED');
578: --x_return_status := 'W';
579: END IF;
580: x_return_status := fnd_api.g_ret_sts_success;
581: --FPBug#4585491 End

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

613: || 'UNEXPECTED:'
614: || SQLERRM);
615: END IF;
616: WHEN error_dbl THEN
617: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
618: x_return_status := FND_API.g_ret_sts_unexp_error;
619:
620: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
621: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ': '

Line 769: gme_common_pvt.log_message ('GME_API_INVALID_BATCH_REROUTE');

765: x_return_status := fnd_api.g_ret_sts_success;
766:
767: /* Don't allow the Batch to be Rerouted if the Batch Status is not pending */
768: IF (p_batch_header_rec.batch_status <> 1) THEN
769: gme_common_pvt.log_message ('GME_API_INVALID_BATCH_REROUTE');
770: RAISE fnd_api.g_exc_error;
771: END IF;
772:
773: /* LCF Batches may not have a validity rule

Line 777: gme_common_pvt.log_message ('GME_REROUTE_NOT_FOR_LCF');

773: /* LCF Batches may not have a validity rule
774: We do not want to allow reroute for these batches */
775: IF (p_batch_header_rec.recipe_validity_rule_id IS NULL) THEN
776: --Bug#5439736 replaced the message
777: gme_common_pvt.log_message ('GME_REROUTE_NOT_FOR_LCF');
778: RAISE fnd_api.g_exc_error;
779: END IF;
780:
781: /* New validity rule should be different from the existing */

Line 783: gme_common_pvt.log_message ('GME_API_SAME_VALIDITY_RULE');

779: END IF;
780:
781: /* New validity rule should be different from the existing */
782: IF p_batch_header_rec.recipe_validity_rule_id = p_validity_rule_id THEN
783: gme_common_pvt.log_message ('GME_API_SAME_VALIDITY_RULE');
784: RAISE fnd_api.g_exc_error;
785: END IF;
786:
787: OPEN cur_get_validity_rule_details (p_validity_rule_id);

Line 795: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');

791:
792: IF (cur_get_validity_rule_details%NOTFOUND) THEN
793: CLOSE cur_get_validity_rule_details;
794:
795: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
796: RAISE fnd_api.g_exc_error;
797: END IF;
798:
799: CLOSE cur_get_validity_rule_details;

Line 811: gme_common_pvt.log_message ('GME_REROUTE_NO_PRIM_PROD');

807:
808: IF (cur_get_material_details%NOTFOUND) THEN
809: CLOSE cur_get_material_details;
810: --Bug#5439736 replaced the message
811: gme_common_pvt.log_message ('GME_REROUTE_NO_PRIM_PROD');
812: RAISE fnd_api.g_exc_error;
813: END IF;
814:
815: CLOSE cur_get_material_details;

Line 819: gme_common_pvt.log_message ('GME_API_VALIDITY_DIFF_FORM');

815: CLOSE cur_get_material_details;
816:
817: /* whether the new validity rule belongs to the same formula as the batch */
818: IF (p_batch_header_rec.formula_id <> l_formula_id) THEN
819: gme_common_pvt.log_message ('GME_API_VALIDITY_DIFF_FORM');
820: RAISE fnd_api.g_exc_error;
821: END IF;
822:
823: IF (NVL (g_debug, 0) IN

Line 934: ,PRECISION => gme_common_pvt.g_precision

930: ELSE
931: l_conv_qty :=
932: inv_convert.inv_um_convert
933: (item_id => get_rec.inventory_item_id
934: ,PRECISION => gme_common_pvt.g_precision
935: ,from_quantity => get_rec.plan_qty
936: ,from_unit => get_rec.line_um
937: ,to_unit => get_rec.item_um
938: ,from_name => NULL

Line 942: gme_common_pvt.log_message

938: ,from_name => NULL
939: ,to_name => NULL);
940:
941: IF (l_conv_qty = -99999) THEN
942: gme_common_pvt.log_message
943: (p_message_code => 'INV_UOM_CONVERSION_ERROR'
944: ,p_token1_name => 'uom1'
945: ,p_token1_value => get_rec.line_um
946: ,p_token2_name => 'uom2'

Line 969: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');

965:
966: CLOSE cur_validate_validity;
967:
968: IF (l_count = 0) THEN
969: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
970: RAISE fnd_api.g_exc_error;
971: END IF;
972:
973: IF (NVL (g_debug, 0) IN