DBA Data[Home] [Help]

APPS.GME_UPDATE_STEP_QTY_PVT dependencies on GME_COMMON_PVT

Line 93: IF (x_batch_step_rec.step_status = gme_common_pvt.g_step_cancelled) THEN

89: RAISE batch_step_fetch_error;
90: END IF;
91:
92: /* The current Step Status must allow editing of step qty */
93: IF (x_batch_step_rec.step_status = gme_common_pvt.g_step_cancelled) THEN
94: RAISE invalid_step_status;
95: END IF;
96:
97: l_batch_header.batch_id := x_batch_step_rec.batch_id;

Line 119: IF (l_batch_header.batch_status = gme_common_pvt.g_batch_cancelled) THEN

115: END IF;
116: l_rec := 0;
117:
118: /* The Batch must not be in Cancelled state to edit the step qty. */
119: IF (l_batch_header.batch_status = gme_common_pvt.g_batch_cancelled) THEN
120: RAISE invalid_batch_status;
121: END IF;
122:
123: /* If automatic step qty calculation is set for the batch then */

Line 138: (gme_common_pvt.g_step_pending

134: gme_debug.put_line ('Calling calc_step_qty. step status is ' ||x_batch_step_rec.step_status);
135: END IF;
136:
137: IF x_batch_step_rec.step_status IN
138: (gme_common_pvt.g_step_pending
139: ,gme_common_pvt.g_step_wip
140: ,gme_common_pvt.g_step_completed) THEN
141: gmd_auto_step_calc.calc_step_qty
142: (p_parent_id => l_batch_header.batch_id

Line 139: ,gme_common_pvt.g_step_wip

135: END IF;
136:
137: IF x_batch_step_rec.step_status IN
138: (gme_common_pvt.g_step_pending
139: ,gme_common_pvt.g_step_wip
140: ,gme_common_pvt.g_step_completed) THEN
141: gmd_auto_step_calc.calc_step_qty
142: (p_parent_id => l_batch_header.batch_id
143: ,p_step_tbl => l_step_tbl

Line 140: ,gme_common_pvt.g_step_completed) THEN

136:
137: IF x_batch_step_rec.step_status IN
138: (gme_common_pvt.g_step_pending
139: ,gme_common_pvt.g_step_wip
140: ,gme_common_pvt.g_step_completed) THEN
141: gmd_auto_step_calc.calc_step_qty
142: (p_parent_id => l_batch_header.batch_id
143: ,p_step_tbl => l_step_tbl
144: ,p_msg_count => x_message_count

Line 182: IF x_batch_step_rec.step_status > gme_common_pvt.g_step_pending THEN

178: gme_debug.put_line ('VOL qty is ' ||l_step_tbl (l_rec).step_vol_qty);
179: END IF;
180:
181: /* If step status is not in pending then actual quantities have to be updated. */
182: IF x_batch_step_rec.step_status > gme_common_pvt.g_step_pending THEN
183: x_batch_step_rec.actual_step_qty := l_step_tbl (l_rec).step_qty;
184: x_batch_step_rec.actual_mass_qty :=
185: l_step_tbl (l_rec).step_mass_qty;
186: x_batch_step_rec.actual_volume_qty :=

Line 197: IF x_batch_step_rec.step_status > gme_common_pvt.g_step_wip THEN

193: l_step_tbl (l_rec).step_vol_qty;
194: END IF;
195: /* If automatic step quantity calculation is not set for the current batch */
196: ELSE
197: IF x_batch_step_rec.step_status > gme_common_pvt.g_step_wip THEN
198: IF x_batch_step_rec.actual_step_qty IS NULL THEN
199: x_batch_step_rec.actual_step_qty :=
200: x_batch_step_rec.plan_step_qty;
201: x_batch_step_rec.actual_mass_qty :=

Line 211: ELSIF x_batch_step_rec.step_status = gme_common_pvt.g_step_wip

207: ELSE
208: calculate_mass_vol_qty (x_batch_step_rec);
209: END IF;
210: /* Bug 3545726 backflush actual qty based on factor */
211: ELSIF x_batch_step_rec.step_status = gme_common_pvt.g_step_wip
212: AND gme_common_pvt.g_backflush_rsrc_usg_ind = 1
213: AND p_backflush_factor IS NOT NULL THEN
214: x_batch_step_rec.actual_step_qty :=
215: NVL (x_batch_step_rec.actual_step_qty, 0)

Line 212: AND gme_common_pvt.g_backflush_rsrc_usg_ind = 1

208: calculate_mass_vol_qty (x_batch_step_rec);
209: END IF;
210: /* Bug 3545726 backflush actual qty based on factor */
211: ELSIF x_batch_step_rec.step_status = gme_common_pvt.g_step_wip
212: AND gme_common_pvt.g_backflush_rsrc_usg_ind = 1
213: AND p_backflush_factor IS NOT NULL THEN
214: x_batch_step_rec.actual_step_qty :=
215: NVL (x_batch_step_rec.actual_step_qty, 0)
216: + (x_batch_step_rec.plan_step_qty * p_backflush_factor);

Line 231: IF x_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN

227: END IF; /* IF x_batch_step_rec.step_status > 1 */
228: END IF; /* IF l_batch_header.automatic_step_calculation = 1 */
229:
230: /* If the step status is pending the null the actual quantities */
231: IF x_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN
232: x_batch_step_rec.actual_step_qty := NULL;
233: x_batch_step_rec.actual_mass_qty := NULL;
234: x_batch_step_rec.actual_volume_qty := NULL;
235: END IF;

Line 252: (gme_common_pvt.g_step_pending

248: IF l_batch_header.automatic_step_calculation = 1 THEN
249: /* If the step status is certified or WIP then the transafer quantities */
250: /* would affect the succeeding steps. */
251: IF x_batch_step_rec.step_status IN
252: (gme_common_pvt.g_step_pending
253: ,gme_common_pvt.g_step_wip
254: ,gme_common_pvt.g_step_completed) THEN
255: /* We have to invoke the calculate quantities routine for all the */
256: /* succeeding steps. */

Line 253: ,gme_common_pvt.g_step_wip

249: /* If the step status is certified or WIP then the transafer quantities */
250: /* would affect the succeeding steps. */
251: IF x_batch_step_rec.step_status IN
252: (gme_common_pvt.g_step_pending
253: ,gme_common_pvt.g_step_wip
254: ,gme_common_pvt.g_step_completed) THEN
255: /* We have to invoke the calculate quantities routine for all the */
256: /* succeeding steps. */
257: FOR dep_steps IN dependent_steps (l_batch_header.batch_id

Line 254: ,gme_common_pvt.g_step_completed) THEN

250: /* would affect the succeeding steps. */
251: IF x_batch_step_rec.step_status IN
252: (gme_common_pvt.g_step_pending
253: ,gme_common_pvt.g_step_wip
254: ,gme_common_pvt.g_step_completed) THEN
255: /* We have to invoke the calculate quantities routine for all the */
256: /* succeeding steps. */
257: FOR dep_steps IN dependent_steps (l_batch_header.batch_id
258: ,l_batch_step.batchstep_id) LOOP

Line 271: gme_common_pvt.g_step_pending)

267:
268: /* We need to apply the transfer quantities if only the step status is in */
269: /* confirm with the dependent step status */
270: IF ( (x_batch_step_rec.step_status >
271: gme_common_pvt.g_step_pending)
272: AND (l_batch_step.step_status >
273: gme_common_pvt.g_step_pending) )
274: OR ( (x_batch_step_rec.step_status =
275: gme_common_pvt.g_step_pending)

Line 273: gme_common_pvt.g_step_pending) )

269: /* confirm with the dependent step status */
270: IF ( (x_batch_step_rec.step_status >
271: gme_common_pvt.g_step_pending)
272: AND (l_batch_step.step_status >
273: gme_common_pvt.g_step_pending) )
274: OR ( (x_batch_step_rec.step_status =
275: gme_common_pvt.g_step_pending)
276: AND (l_batch_step.step_status =
277: gme_common_pvt.g_step_pending) ) THEN

Line 275: gme_common_pvt.g_step_pending)

271: gme_common_pvt.g_step_pending)
272: AND (l_batch_step.step_status >
273: gme_common_pvt.g_step_pending) )
274: OR ( (x_batch_step_rec.step_status =
275: gme_common_pvt.g_step_pending)
276: AND (l_batch_step.step_status =
277: gme_common_pvt.g_step_pending) ) THEN
278: /* Get the record number for the current step in the step table */
279: l_rec :=

Line 277: gme_common_pvt.g_step_pending) ) THEN

273: gme_common_pvt.g_step_pending) )
274: OR ( (x_batch_step_rec.step_status =
275: gme_common_pvt.g_step_pending)
276: AND (l_batch_step.step_status =
277: gme_common_pvt.g_step_pending) ) THEN
278: /* Get the record number for the current step in the step table */
279: l_rec :=
280: gmd_auto_step_calc.get_step_rec
281: (l_batch_step.batchstep_no

Line 286: IF l_batch_step.step_status > gme_common_pvt.g_step_pending THEN

282: ,l_step_tbl);
283:
284: /* If step status is not in pending then actual quantities have to */
285: /* be updated */
286: IF l_batch_step.step_status > gme_common_pvt.g_step_pending THEN
287: l_batch_step.actual_step_qty :=
288: l_step_tbl (l_rec).step_qty;
289: l_batch_step.actual_mass_qty :=
290: l_step_tbl (l_rec).step_mass_qty;

Line 328: gme_common_pvt.log_message ('GME_API_INV_STAT_STEP_EDIT');

324: ,p_data => x_message_list);
325: WHEN invalid_step_status THEN
326: ROLLBACK TO SAVEPOINT update_step_qty;
327: x_return_status := fnd_api.g_ret_sts_error;
328: gme_common_pvt.log_message ('GME_API_INV_STAT_STEP_EDIT');
329: fnd_msg_pub.count_and_get (p_count => x_message_count
330: ,p_data => x_message_list);
331: WHEN batch_header_fetch_error THEN
332: ROLLBACK TO SAVEPOINT update_step_qty;

Line 339: gme_common_pvt.log_message ('GME_API_INV_BATCH_EDIT_STEP');

335: ,p_data => x_message_list);
336: WHEN invalid_batch_status THEN
337: ROLLBACK TO SAVEPOINT update_step_qty;
338: x_return_status := fnd_api.g_ret_sts_error;
339: gme_common_pvt.log_message ('GME_API_INV_BATCH_EDIT_STEP');
340: fnd_msg_pub.count_and_get (p_count => x_message_count
341: ,p_data => x_message_list);
342: WHEN auto_step_calc_error THEN
343: ROLLBACK TO SAVEPOINT update_step_qty;

Line 406: IF l_um_type = gme_common_pvt.g_mass_um_type THEN

402: INTO l_um_type, l_std_factor;
403:
404: CLOSE cur_get_uom;
405:
406: IF l_um_type = gme_common_pvt.g_mass_um_type THEN
407: /* If step status is not in pending then actual quantities have to */
408: /* be updated */
409: IF p_batch_step_rec.step_status > gme_common_pvt.g_step_pending THEN
410: p_batch_step_rec.actual_mass_qty :=

Line 409: IF p_batch_step_rec.step_status > gme_common_pvt.g_step_pending THEN

405:
406: IF l_um_type = gme_common_pvt.g_mass_um_type THEN
407: /* If step status is not in pending then actual quantities have to */
408: /* be updated */
409: IF p_batch_step_rec.step_status > gme_common_pvt.g_step_pending THEN
410: p_batch_step_rec.actual_mass_qty :=
411: NVL (p_batch_step_rec.actual_step_qty * l_std_factor, 0);
412: ELSE
413: p_batch_step_rec.plan_mass_qty :=

Line 416: ELSIF l_um_type = gme_common_pvt.g_volume_um_type THEN

412: ELSE
413: p_batch_step_rec.plan_mass_qty :=
414: NVL (p_batch_step_rec.plan_step_qty * l_std_factor, 0);
415: END IF; /* IF p_batch_step_rec.step_status > 1 */
416: ELSIF l_um_type = gme_common_pvt.g_volume_um_type THEN
417: /* If step status is not in pending then actual quantities have to */
418: /* be updated */
419: IF p_batch_step_rec.step_status > gme_common_pvt.g_step_pending THEN
420: p_batch_step_rec.actual_volume_qty :=

Line 419: IF p_batch_step_rec.step_status > gme_common_pvt.g_step_pending THEN

415: END IF; /* IF p_batch_step_rec.step_status > 1 */
416: ELSIF l_um_type = gme_common_pvt.g_volume_um_type THEN
417: /* If step status is not in pending then actual quantities have to */
418: /* be updated */
419: IF p_batch_step_rec.step_status > gme_common_pvt.g_step_pending THEN
420: p_batch_step_rec.actual_volume_qty :=
421: NVL (p_batch_step_rec.actual_step_qty * l_std_factor, 0);
422: ELSE
423: p_batch_step_rec.plan_volume_qty :=

Line 426: END IF; /* IF l_um_type = gme_common_pvt.g_mass_um_type */

422: ELSE
423: p_batch_step_rec.plan_volume_qty :=
424: NVL (p_batch_step_rec.plan_step_qty * l_std_factor, 0);
425: END IF; /* IF p_batch_step_rec.step_status > 1 */
426: END IF; /* IF l_um_type = gme_common_pvt.g_mass_um_type */
427:
428: IF g_debug <= gme_debug.g_log_procedure THEN
429: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
430: END IF;

Line 494: IF p_batch_step_rec.step_status > gme_common_pvt.g_step_pending THEN

490: /* Bug 3545726 store original charges */
491: l_orig_charges := NVL (p_batch_step_rec.actual_charges, 0);
492:
493: -- Bug 10051993 Let's pass in the new step qty.
494: IF p_batch_step_rec.step_status > gme_common_pvt.g_step_pending THEN
495: calc_charge (p_step_id => p_batch_step_rec.batchstep_id
496: ,p_mass_qty => p_batch_step_rec.actual_mass_qty
497: ,p_vol_qty => p_batch_step_rec.actual_volume_qty
498: ,x_charge => l_charges

Line 507: ELSIF p_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN

503: RAISE error_calc_charge;
504: ELSE
505: p_batch_step_rec.actual_charges := l_charges;
506: END IF;
507: ELSIF p_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN
508: calc_charge (p_step_id => p_batch_step_rec.batchstep_id
509: ,p_mass_qty => p_batch_step_rec.plan_mass_qty
510: ,p_vol_qty => p_batch_step_rec.plan_volume_qty
511: ,p_step_qty => p_batch_step_rec.plan_step_qty -- 10051993

Line 758: gme_debug.put_line('gme_common_pvt.g_mass_um_type: '||gme_common_pvt.g_mass_um_type);

754:
755: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
756: gme_debug.put_line('x_tolerance: '||x_tolerance);
757: gme_debug.put_line('x_stdum_tolerance: '||x_stdum_tolerance);
758: gme_debug.put_line('gme_common_pvt.g_mass_um_type: '||gme_common_pvt.g_mass_um_type);
759: gme_debug.put_line('gme_common_pvt.g_volume_um_type: '||gme_common_pvt.g_volume_um_type);
760: END IF;
761:
762: -- Capacity will be in either mass or volume...

Line 759: gme_debug.put_line('gme_common_pvt.g_volume_um_type: '||gme_common_pvt.g_volume_um_type);

755: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
756: gme_debug.put_line('x_tolerance: '||x_tolerance);
757: gme_debug.put_line('x_stdum_tolerance: '||x_stdum_tolerance);
758: gme_debug.put_line('gme_common_pvt.g_mass_um_type: '||gme_common_pvt.g_mass_um_type);
759: gme_debug.put_line('gme_common_pvt.g_volume_um_type: '||gme_common_pvt.g_volume_um_type);
760: END IF;
761:
762: -- Capacity will be in either mass or volume...
763: IF x_um_type = gme_common_pvt.g_mass_um_type THEN

Line 763: IF x_um_type = gme_common_pvt.g_mass_um_type THEN

759: gme_debug.put_line('gme_common_pvt.g_volume_um_type: '||gme_common_pvt.g_volume_um_type);
760: END IF;
761:
762: -- Capacity will be in either mass or volume...
763: IF x_um_type = gme_common_pvt.g_mass_um_type THEN
764: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
765: gme_debug.put_line('This is MASS type.');
766: END IF;
767:

Line 800: ELSIF x_um_type = gme_common_pvt.g_volume_um_type THEN

796: gme_debug.put_line('x_charge is: '||x_charge);
797: gme_debug.put_line('l_remaining_quantity is: '||l_remaining_quantity);
798: END IF;
799:
800: ELSIF x_um_type = gme_common_pvt.g_volume_um_type THEN
801:
802: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
803: gme_debug.put_line('This is VOLUME type.');
804: END IF;

Line 845: ,PRECISION => gme_common_pvt.g_precision

841:
842: x_temp_qty :=
843: inv_convert.inv_um_convert
844: (item_id => 0
845: ,PRECISION => gme_common_pvt.g_precision
846: ,from_quantity => x_step_qty
847: ,from_unit => x_step_qty_uom
848: ,to_unit => x_max_cap_uom
849: ,from_name => NULL

Line 949: gme_common_pvt.log_message ('GME_BATCH_STEP_NOT_FOUND'

945: END IF;
946: EXCEPTION
947: WHEN error_step_not_found THEN
948: x_return_status := fnd_api.g_ret_sts_error;
949: gme_common_pvt.log_message ('GME_BATCH_STEP_NOT_FOUND'
950: ,'STEP_ID'
951: ,p_step_id);
952: WHEN error_calc_charge_conv THEN
953: -- x_return_status := FND_API.G_RET_STS_ERROR;

Line 954: gme_common_pvt.log_message ('GME_CALC_CHARGE_CONV_ERROR'

950: ,'STEP_ID'
951: ,p_step_id);
952: WHEN error_calc_charge_conv THEN
953: -- x_return_status := FND_API.G_RET_STS_ERROR;
954: gme_common_pvt.log_message ('GME_CALC_CHARGE_CONV_ERROR'
955: ,'STEP_NO'
956: ,x_step_no);
957: WHEN error_max_cap_not_mass_vol THEN
958: gme_common_pvt.log_message

Line 958: gme_common_pvt.log_message

954: gme_common_pvt.log_message ('GME_CALC_CHARGE_CONV_ERROR'
955: ,'STEP_NO'
956: ,x_step_no);
957: WHEN error_max_cap_not_mass_vol THEN
958: gme_common_pvt.log_message
959: ('GME_MAX_CAP_NOT_MASS_VOL_ERR'
960: ,'STEP_NO'
961: ,x_step_no
962: ,'MASS'

Line 963: ,gme_common_pvt.g_mass_um_type

959: ('GME_MAX_CAP_NOT_MASS_VOL_ERR'
960: ,'STEP_NO'
961: ,x_step_no
962: ,'MASS'
963: ,gme_common_pvt.g_mass_um_type
964: ,'VOLUME'
965: ,gme_common_pvt.g_volume_um_type);
966: WHEN error_charge_insert THEN
967: gme_common_pvt.log_message ('GME_INSERT_CHARGE_ERROR'

Line 965: ,gme_common_pvt.g_volume_um_type);

961: ,x_step_no
962: ,'MASS'
963: ,gme_common_pvt.g_mass_um_type
964: ,'VOLUME'
965: ,gme_common_pvt.g_volume_um_type);
966: WHEN error_charge_insert THEN
967: gme_common_pvt.log_message ('GME_INSERT_CHARGE_ERROR'
968: ,'STEP_NO'
969: ,x_step_no);

Line 967: gme_common_pvt.log_message ('GME_INSERT_CHARGE_ERROR'

963: ,gme_common_pvt.g_mass_um_type
964: ,'VOLUME'
965: ,gme_common_pvt.g_volume_um_type);
966: WHEN error_charge_insert THEN
967: gme_common_pvt.log_message ('GME_INSERT_CHARGE_ERROR'
968: ,'STEP_NO'
969: ,x_step_no);
970: WHEN OTHERS THEN
971: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 1008: l_batchstep_activity_ids gme_common_pvt.number_tab;

1004: ,p_dependency_type IN NUMBER DEFAULT NULL)
1005: IS
1006: l_api_name CONSTANT VARCHAR2 (30) := 'update_activities';
1007: /* Collections for details etc */
1008: l_batchstep_activity_ids gme_common_pvt.number_tab;
1009: l_gme_batchstep_activities gme_batch_step_activities%ROWTYPE;
1010: l_gme_calc_int_rsrc_usage_char VARCHAR2 (10);
1011: l_user_profile_option_name VARCHAR2 (100);
1012: /* Local variables */

Line 1063: gme_common_pvt.g_calc_interim_rsrc_usg_ind;

1059: IF p_batch_hdr_rec.automatic_step_calculation = 1 THEN
1060: IF (p_gme_calc_int_rsrc_usage IS NULL) THEN
1061: l_gme_calc_int_rsrc_usage_char := NULL;
1062: l_gme_calc_int_rsrc_usage_char :=
1063: gme_common_pvt.g_calc_interim_rsrc_usg_ind;
1064: p_gme_calc_int_rsrc_usage := l_gme_calc_int_rsrc_usage_char;
1065: l_gme_calc_int_rsrc_usage_char := NULL;
1066: END IF;
1067: ELSE

Line 1072: gme_common_pvt.g_step_wip)

1068: p_gme_calc_int_rsrc_usage := NULL;
1069: END IF;
1070:
1071: IF ( ( ( (p_batch_step_rec.step_status =
1072: gme_common_pvt.g_step_wip)
1073: AND (NVL (p_gme_calc_int_rsrc_usage, 0) = 1)
1074: OR NVL (gme_common_pvt.g_backflush_rsrc_usg_ind, 0) =
1075: 1)
1076: OR (p_batch_step_rec.step_status >

Line 1074: OR NVL (gme_common_pvt.g_backflush_rsrc_usg_ind, 0) =

1070:
1071: IF ( ( ( (p_batch_step_rec.step_status =
1072: gme_common_pvt.g_step_wip)
1073: AND (NVL (p_gme_calc_int_rsrc_usage, 0) = 1)
1074: OR NVL (gme_common_pvt.g_backflush_rsrc_usg_ind, 0) =
1075: 1)
1076: OR (p_batch_step_rec.step_status >
1077: gme_common_pvt.g_step_wip) )
1078: AND (NVL (l_gme_batchstep_activities.actual_activity_factor, 0) =

Line 1077: gme_common_pvt.g_step_wip) )

1073: AND (NVL (p_gme_calc_int_rsrc_usage, 0) = 1)
1074: OR NVL (gme_common_pvt.g_backflush_rsrc_usg_ind, 0) =
1075: 1)
1076: OR (p_batch_step_rec.step_status >
1077: gme_common_pvt.g_step_wip) )
1078: AND (NVL (l_gme_batchstep_activities.actual_activity_factor, 0) =
1079: 0) ) THEN
1080: l_gme_batchstep_activities.actual_activity_factor :=
1081: l_gme_batchstep_activities.plan_activity_factor;

Line 1082: ELSIF (p_batch_step_rec.step_status = gme_common_pvt.g_step_pending) THEN

1078: AND (NVL (l_gme_batchstep_activities.actual_activity_factor, 0) =
1079: 0) ) THEN
1080: l_gme_batchstep_activities.actual_activity_factor :=
1081: l_gme_batchstep_activities.plan_activity_factor;
1082: ELSIF (p_batch_step_rec.step_status = gme_common_pvt.g_step_pending) THEN
1083: l_gme_batchstep_activities.actual_activity_factor := NULL;
1084: END IF;
1085:
1086: /* Let us update all the resources attached to the activity */

Line 1122: l_user_profile_option_name := gme_common_pvt.g_calc_interim_rsrc_usg_ind;

1118: WHEN VALUE_ERROR THEN
1119: x_return_status := fnd_api.g_ret_sts_error;
1120:
1121: IF l_gme_calc_int_rsrc_usage_char IS NOT NULL THEN
1122: l_user_profile_option_name := gme_common_pvt.g_calc_interim_rsrc_usg_ind;
1123: /* SELECT user_profile_option_name
1124: INTO l_user_profile_option_name
1125: FROM fnd_profile_options_vl
1126: WHERE application_id = 553

Line 1129: gme_common_pvt.log_message ('GME_INVALID_VALUE_PROFILE'

1125: FROM fnd_profile_options_vl
1126: WHERE application_id = 553
1127: AND profile_option_name = 'GME_CALC_INT_RSRC_USAGE';*/
1128:
1129: gme_common_pvt.log_message ('GME_INVALID_VALUE_PROFILE'
1130: ,'VALUE'
1131: ,l_gme_calc_int_rsrc_usage_char
1132: ,'PROFILE'
1133: ,l_user_profile_option_name);

Line 1179: l_batchstep_resource_ids gme_common_pvt.number_tab;

1175: ,p_dependency_type IN NUMBER DEFAULT NULL)
1176: IS
1177: l_api_name CONSTANT VARCHAR2 (30) := 'update_resources';
1178: /* Collections for details etc */
1179: l_batchstep_resource_ids gme_common_pvt.number_tab;
1180: l_gme_batchstep_resources gme_batch_step_resources%ROWTYPE;
1181: l_resource_txns gme_resource_txns_gtmp%ROWTYPE;
1182: l_resource_tab gme_common_pvt.resource_transactions_tab;
1183: /* Local variables */

Line 1182: l_resource_tab gme_common_pvt.resource_transactions_tab;

1178: /* Collections for details etc */
1179: l_batchstep_resource_ids gme_common_pvt.number_tab;
1180: l_gme_batchstep_resources gme_batch_step_resources%ROWTYPE;
1181: l_resource_txns gme_resource_txns_gtmp%ROWTYPE;
1182: l_resource_tab gme_common_pvt.resource_transactions_tab;
1183: /* Local variables */
1184: l_sum_comp_usage NUMBER;
1185: l_override_usage NUMBER;
1186: l_actual_usage NUMBER;

Line 1256: NVL (gme_common_pvt.g_allow_qty_below_min_ind, 1);

1252: l_doc_type := 'FPO';
1253: END IF;
1254:
1255: l_allow_qty_below_cap :=
1256: NVL (gme_common_pvt.g_allow_qty_below_min_ind, 1);
1257: l_copy_plan_to_actual :=
1258: NVL (gme_common_pvt.g_def_actual_rsrc_usg_ind, 1);
1259:
1260: /* Fetch all the resources associated with the activity */

Line 1258: NVL (gme_common_pvt.g_def_actual_rsrc_usg_ind, 1);

1254:
1255: l_allow_qty_below_cap :=
1256: NVL (gme_common_pvt.g_allow_qty_below_min_ind, 1);
1257: l_copy_plan_to_actual :=
1258: NVL (gme_common_pvt.g_def_actual_rsrc_usg_ind, 1);
1259:
1260: /* Fetch all the resources associated with the activity */
1261: OPEN cur_step_resource_ids
1262: (p_batchstep_activities_rec.batchstep_activity_id);

Line 1296: gme_common_pvt.g_step_wip)

1292: IF p_batch_hdr_rec.automatic_step_calculation = 1 THEN
1293: /* If the step status is greater than pending then we have to calculate the actual quantities
1294: calculate resource qty and usage for WIP asqc batch if profile is set */
1295: IF ( ( (p_batch_step_rec.step_status =
1296: gme_common_pvt.g_step_wip)
1297: AND (NVL (p_gme_calc_int_rsrc_usage, 0) = 1) )
1298: OR (p_batch_step_rec.step_status > gme_common_pvt.g_step_wip) ) THEN
1299: IF l_process_qty <> 0 THEN
1300: l_gme_batchstep_resources.actual_rsrc_qty :=

Line 1298: OR (p_batch_step_rec.step_status > gme_common_pvt.g_step_wip) ) THEN

1294: calculate resource qty and usage for WIP asqc batch if profile is set */
1295: IF ( ( (p_batch_step_rec.step_status =
1296: gme_common_pvt.g_step_wip)
1297: AND (NVL (p_gme_calc_int_rsrc_usage, 0) = 1) )
1298: OR (p_batch_step_rec.step_status > gme_common_pvt.g_step_wip) ) THEN
1299: IF l_process_qty <> 0 THEN
1300: l_gme_batchstep_resources.actual_rsrc_qty :=
1301: p_batch_step_rec.actual_step_qty
1302: * p_batchstep_activities_rec.actual_activity_factor;

Line 1339: gme_common_pvt.g_step_pending) THEN

1335: /* Count if the Actual Resource Count is zero. */
1336: IF (NVL (l_gme_batchstep_resources.actual_rsrc_count, 0) =
1337: 0)
1338: AND (p_batch_step_rec.step_status >
1339: gme_common_pvt.g_step_pending) THEN
1340: l_gme_batchstep_resources.actual_rsrc_count :=
1341: l_gme_batchstep_resources.plan_rsrc_count;
1342: END IF;
1343:

Line 1344: IF p_batch_step_rec.step_status = gme_common_pvt.g_step_wip THEN

1340: l_gme_batchstep_resources.actual_rsrc_count :=
1341: l_gme_batchstep_resources.plan_rsrc_count;
1342: END IF;
1343:
1344: IF p_batch_step_rec.step_status = gme_common_pvt.g_step_wip THEN
1345: l_gme_batchstep_resources.plan_rsrc_count :=
1346: NVL (l_gme_batchstep_resources.plan_rsrc_count, 1);
1347: l_gme_batchstep_resources.plan_rsrc_usage :=
1348: NVL (l_gme_batchstep_resources.plan_rsrc_usage, 0);

Line 1353: ELSIF p_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN

1349: l_gme_batchstep_resources.plan_rsrc_qty :=
1350: NVL (l_gme_batchstep_resources.plan_rsrc_qty, 0);
1351: END IF;
1352: /* If the step status is pending then we have to update the plan quantities */
1353: ELSIF p_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN
1354: l_gme_batchstep_resources.plan_rsrc_qty :=
1355: p_batch_step_rec.plan_step_qty
1356: * p_batchstep_activities_rec.plan_activity_factor;
1357:

Line 1381: ELSIF (p_batch_step_rec.step_status > gme_common_pvt.g_step_wip) THEN

1377: l_gme_batchstep_resources.actual_rsrc_usage := NULL;
1378: l_gme_batchstep_resources.actual_rsrc_qty := NULL;
1379: l_gme_batchstep_resources.actual_rsrc_count := NULL;
1380: END IF; /*IF p_batch_step_rec.step_status > 1*/
1381: ELSIF (p_batch_step_rec.step_status > gme_common_pvt.g_step_wip) THEN
1382: OPEN cur_prev_actv_fact
1383: (p_batchstep_activities_rec.batchstep_activity_id);
1384:
1385: FETCH cur_prev_actv_fact

Line 1501: ELSIF (p_batch_step_rec.step_status = gme_common_pvt.g_step_pending) THEN

1497:
1498: /* (New Fix) if at end of calculation usage is null assign zero */
1499: l_gme_batchstep_resources.actual_rsrc_count :=
1500: NVL (l_gme_batchstep_resources.actual_rsrc_count, 1);
1501: ELSIF (p_batch_step_rec.step_status = gme_common_pvt.g_step_pending) THEN
1502: OPEN cur_prev_actv_fact
1503: (p_batchstep_activities_rec.batchstep_activity_id);
1504:
1505: FETCH cur_prev_actv_fact

Line 1583: ELSIF p_batch_step_rec.step_status = gme_common_pvt.g_step_wip THEN

1579: NVL (l_gme_batchstep_resources.plan_rsrc_qty, 0);
1580: l_gme_batchstep_resources.actual_rsrc_usage := NULL;
1581: l_gme_batchstep_resources.actual_rsrc_qty := NULL;
1582: l_gme_batchstep_resources.actual_rsrc_count := NULL;
1583: ELSIF p_batch_step_rec.step_status = gme_common_pvt.g_step_wip THEN
1584: IF (p_backflush_factor IS NOT NULL) THEN
1585: IF l_gme_batchstep_resources.scale_type = 1 THEN
1586: /* Proportional resource scale type */
1587: IF (p_batchstep_activities_rec.plan_activity_factor > 0) THEN

Line 1745: IF gme_common_pvt.is_qty_below_capacity

1741: || l_allow_qty_below_cap);
1742: END IF;
1743:
1744: IF l_allow_qty_below_cap = 0 THEN
1745: IF gme_common_pvt.is_qty_below_capacity
1746: (p_batch_step_resources_rec => l_gme_batchstep_resources) THEN
1747: RAISE qty_below_cap_error;
1748: END IF;
1749: END IF; /* IF l_allow_qty_below_cap = 0 */

Line 1755: gme_common_pvt.g_step_pending)

1751: /* Only if the update inventory ind is set to 'Y' on the batch header */
1752: /* then only we will have resource transactions */
1753: IF p_batch_hdr_rec.update_inventory_ind = 'Y' THEN
1754: IF (p_batch_step_rec.step_status >
1755: gme_common_pvt.g_step_pending)
1756: AND (NVL (l_gme_batchstep_resources.actual_rsrc_usage, -1) >= 0) THEN
1757: IF p_batch_hdr_rec.automatic_step_calculation = 1 THEN
1758: OPEN cur_sum_override_resource
1759: (l_gme_batchstep_resources.batchstep_resource_id

Line 1793: gme_common_pvt.g_step_pending

1789: RAISE resource_trans_ins_err;
1790: END IF;
1791: /* we have to delete the actual transactions and create pending resource transactions */
1792: ELSIF ( p_batch_step_rec.step_status =
1793: gme_common_pvt.g_step_pending
1794: OR ( p_batch_hdr_rec.automatic_step_calculation = 1
1795: AND p_batch_step_rec.step_status =
1796: gme_common_pvt.g_step_wip) ) THEN
1797: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

Line 1796: gme_common_pvt.g_step_wip) ) THEN

1792: ELSIF ( p_batch_step_rec.step_status =
1793: gme_common_pvt.g_step_pending
1794: OR ( p_batch_hdr_rec.automatic_step_calculation = 1
1795: AND p_batch_step_rec.step_status =
1796: gme_common_pvt.g_step_wip) ) THEN
1797: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1798: gme_debug.put_line (' invoking pending usage');
1799: END IF;
1800:

Line 1843: gme_common_pvt.log_message ('GME_API_RSRC_QTY_BELOW_CAP'

1839: WHEN error_txns_update THEN
1840: x_return_status := fnd_api.g_ret_sts_error;
1841: WHEN qty_below_cap_error THEN
1842: x_return_status := fnd_api.g_ret_sts_error;
1843: gme_common_pvt.log_message ('GME_API_RSRC_QTY_BELOW_CAP'
1844: ,'RESOURCES'
1845: ,l_gme_batchstep_resources.resources);
1846: WHEN OTHERS THEN
1847: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 1943: ,gme_common_pvt.g_timestamp);

1939:
1940: IF p_completed = 1 THEN
1941: l_ins_resource_row.trans_date :=
1942: NVL (p_batchstep_resource.actual_start_date
1943: ,gme_common_pvt.g_timestamp);
1944: l_ins_resource_row.start_date :=
1945: NVL (p_batchstep_resource.actual_start_date
1946: ,gme_common_pvt.g_timestamp);
1947: gme_create_step_pvt.get_usage_in_hours

Line 1946: ,gme_common_pvt.g_timestamp);

1942: NVL (p_batchstep_resource.actual_start_date
1943: ,gme_common_pvt.g_timestamp);
1944: l_ins_resource_row.start_date :=
1945: NVL (p_batchstep_resource.actual_start_date
1946: ,gme_common_pvt.g_timestamp);
1947: gme_create_step_pvt.get_usage_in_hours
1948: (p_usage
1949: ,p_batchstep_resource.usage_um
1950: ,l_usage_hrs

Line 1964: IF (l_ins_resource_row.end_date > gme_common_pvt.g_timestamp) THEN

1960:
1961: l_ins_resource_row.end_date :=
1962: (l_ins_resource_row.start_date + (l_usage_hrs / 24) );
1963:
1964: IF (l_ins_resource_row.end_date > gme_common_pvt.g_timestamp) THEN
1965: l_ins_resource_row.end_date := gme_common_pvt.g_timestamp;
1966: END IF;
1967: ELSE
1968: l_ins_resource_row.end_date :=

Line 1965: l_ins_resource_row.end_date := gme_common_pvt.g_timestamp;

1961: l_ins_resource_row.end_date :=
1962: (l_ins_resource_row.start_date + (l_usage_hrs / 24) );
1963:
1964: IF (l_ins_resource_row.end_date > gme_common_pvt.g_timestamp) THEN
1965: l_ins_resource_row.end_date := gme_common_pvt.g_timestamp;
1966: END IF;
1967: ELSE
1968: l_ins_resource_row.end_date :=
1969: NVL (p_batchstep_resource.actual_cmplt_date

Line 1977: ,gme_common_pvt.g_timestamp);

1973: END IF;
1974: ELSE
1975: l_ins_resource_row.trans_date :=
1976: NVL (p_batchstep_resource.plan_start_date
1977: ,gme_common_pvt.g_timestamp);
1978: l_ins_resource_row.start_date :=
1979: NVL (p_batchstep_resource.plan_start_date
1980: ,gme_common_pvt.g_timestamp);
1981: l_ins_resource_row.end_date :=

Line 1980: ,gme_common_pvt.g_timestamp);

1976: NVL (p_batchstep_resource.plan_start_date
1977: ,gme_common_pvt.g_timestamp);
1978: l_ins_resource_row.start_date :=
1979: NVL (p_batchstep_resource.plan_start_date
1980: ,gme_common_pvt.g_timestamp);
1981: l_ins_resource_row.end_date :=
1982: NVL (p_batchstep_resource.plan_cmplt_date
1983: ,gme_common_pvt.g_timestamp);
1984: END IF;

Line 1983: ,gme_common_pvt.g_timestamp);

1979: NVL (p_batchstep_resource.plan_start_date
1980: ,gme_common_pvt.g_timestamp);
1981: l_ins_resource_row.end_date :=
1982: NVL (p_batchstep_resource.plan_cmplt_date
1983: ,gme_common_pvt.g_timestamp);
1984: END IF;
1985:
1986: l_ins_resource_row.completed_ind := p_completed;
1987: l_ins_resource_row.posted_ind := 0;

Line 2221: l_resource_tab gme_common_pvt.resource_transactions_tab;

2217: AND action_code <> 'DEL';
2218:
2219: /* Collections for details etc */
2220: l_resource_txns gme_resource_txns_gtmp%ROWTYPE;
2221: l_resource_tab gme_common_pvt.resource_transactions_tab;
2222: l_batch_hdr gme_batch_header%ROWTYPE;
2223: /* Local variables */
2224: l_sum_comp_usage NUMBER;
2225: l_cnt_comp_usage NUMBER;

Line 2484: l_resource_tab gme_common_pvt.resource_transactions_tab;

2480: WHERE line_id = v_batchstep_resource_id AND completed_ind = 0;
2481:
2482: /* Collections for details etc */
2483: l_resource_txns gme_resource_txns_gtmp%ROWTYPE;
2484: l_resource_tab gme_common_pvt.resource_transactions_tab;
2485: /* Local variables */
2486: l_alloc_usage NUMBER;
2487: l_usage NUMBER;
2488: l_tot_usage NUMBER;

Line 2545: IF l_step_status = gme_common_pvt.g_step_wip THEN

2541:
2542:
2543: /* If the step is in WIP then we need to adjust the pending transactions */
2544: /* so lets calculate the usage to be adjusted */
2545: IF l_step_status = gme_common_pvt.g_step_wip THEN
2546: /* Lets get the previous actual usage */
2547:
2548: OPEN cur_get_rsrc_dtl
2549: (p_batch_step_resources_rec.batchstep_resource_id);

Line 2610: IF l_step_status = gme_common_pvt.g_step_wip THEN

2606: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2607: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': l_step_status :'||l_step_status);
2608: END IF;
2609:
2610: IF l_step_status = gme_common_pvt.g_step_wip THEN
2611: l_remaining_tran_count := l_remaining_tran_count - 1;
2612: l_usage := l_resource_txns.resource_usage - l_alloc_usage;
2613:
2614: -- Bug 8564008

Line 2709: ELSIF l_step_status > gme_common_pvt.g_step_wip THEN

2705:
2706: IF l_return_status <> x_return_status THEN
2707: RAISE fnd_api.g_exc_error;
2708: END IF;
2709: ELSIF l_step_status > gme_common_pvt.g_step_wip THEN
2710: /* If the step is certified then their shouldn't be any further pending transactions */
2711: gme_resource_engine_pvt.delete_resource_trans
2712: (p_tran_rec => l_resource_txns
2713: ,x_return_status => l_return_status);

Line 2794: l_step_resources gme_common_pvt.resources_tab;

2790: l_return_status VARCHAR2(1);
2791: l_calc_step_qty BOOLEAN;
2792: l_uom VARCHAR2(3);
2793: l_gmd_resources gmd_recipe_fetch_pub.oprn_resc_tbl;
2794: l_step_resources gme_common_pvt.resources_tab;
2795:
2796: error_batchstep_id EXCEPTION;
2797: error_in_calc_capacity EXCEPTION;
2798: error_calc_charge EXCEPTION;

Line 2827: IF l_step_rec.step_status > gme_common_pvt.g_step_pending THEN

2823: OPEN c_get_step_qty(p_batchstep_rec.batchstep_id);
2824: FETCH c_get_step_qty INTO l_step_rec;
2825: CLOSE c_get_step_qty;
2826:
2827: IF l_step_rec.step_status > gme_common_pvt.g_step_pending THEN
2828: l_step_qty := l_step_rec.actual_step_qty;
2829: l_in_step_qty := x_batchstep_rec.actual_step_qty;
2830: ELSE
2831: l_step_qty := l_step_rec.plan_step_qty;

Line 2909: IF l_step_rec.step_status > gme_common_pvt.g_step_pending THEN

2905: gme_update_step_qty_pvt.calculate_mass_vol_qty(
2906: p_batch_step_rec => x_batchstep_rec
2907: );
2908:
2909: IF l_step_rec.step_status > gme_common_pvt.g_step_pending THEN
2910: l_mass_qty := x_batchstep_rec.actual_mass_qty;
2911: l_vol_qty := x_batchstep_rec.actual_volume_qty;
2912: ELSE
2913: l_mass_qty := x_batchstep_rec.plan_mass_qty;

Line 2939: IF l_step_rec.step_status > gme_common_pvt.g_step_pending THEN

2935: END IF;
2936: RAISE error_calc_charge;
2937: END IF;
2938:
2939: IF l_step_rec.step_status > gme_common_pvt.g_step_pending THEN
2940: x_batchstep_rec.actual_charges := l_charge;
2941: ELSE
2942: x_batchstep_rec.plan_charges := l_charge;
2943: END IF;