DBA Data[Home] [Help]

APPS.GME_INCREMENTAL_BACKFLUSH_PVT dependencies on GME_DEBUG

Line 153: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

149: error_cant_go_neg EXCEPTION;
150:
151:
152: BEGIN
153: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
154: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
155: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
156: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
157: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_detail_rec.line_no);

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

150:
151:
152: BEGIN
153: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
154: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
155: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
156: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
157: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_detail_rec.line_no);
158: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_detail_rec.line_type);

Line 155: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);

151:
152: BEGIN
153: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
154: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
155: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
156: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
157: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_detail_rec.line_no);
158: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_detail_rec.line_type);
159: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);

Line 156: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);

152: BEGIN
153: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
154: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
155: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
156: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
157: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_detail_rec.line_no);
158: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_detail_rec.line_type);
159: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
160: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);

Line 157: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_detail_rec.line_no);

153: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
154: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
155: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
156: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
157: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_detail_rec.line_no);
158: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_detail_rec.line_type);
159: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
160: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
161: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_backflush_rsrc_usg_ind='||p_backflush_rsrc_usg_ind);

Line 158: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_detail_rec.line_type);

154: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
155: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
156: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
157: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_detail_rec.line_no);
158: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_detail_rec.line_type);
159: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
160: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
161: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_backflush_rsrc_usg_ind='||p_backflush_rsrc_usg_ind);
162: IF p_trans_date IS NULL THEN

Line 159: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);

155: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
156: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
157: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_detail_rec.line_no);
158: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_detail_rec.line_type);
159: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
160: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
161: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_backflush_rsrc_usg_ind='||p_backflush_rsrc_usg_ind);
162: IF p_trans_date IS NULL THEN
163: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date IS NULL');

Line 160: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);

156: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
157: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_detail_rec.line_no);
158: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_detail_rec.line_type);
159: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
160: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
161: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_backflush_rsrc_usg_ind='||p_backflush_rsrc_usg_ind);
162: IF p_trans_date IS NULL THEN
163: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date IS NULL');
164: ELSE

Line 161: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_backflush_rsrc_usg_ind='||p_backflush_rsrc_usg_ind);

157: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_detail_rec.line_no);
158: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_detail_rec.line_type);
159: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
160: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
161: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_backflush_rsrc_usg_ind='||p_backflush_rsrc_usg_ind);
162: IF p_trans_date IS NULL THEN
163: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date IS NULL');
164: ELSE
165: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date='||to_char(p_trans_date, 'YYYY-MON-DD HH24:MI:SS'));

Line 163: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date IS NULL');

159: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
160: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
161: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_backflush_rsrc_usg_ind='||p_backflush_rsrc_usg_ind);
162: IF p_trans_date IS NULL THEN
163: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date IS NULL');
164: ELSE
165: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date='||to_char(p_trans_date, 'YYYY-MON-DD HH24:MI:SS'));
166: END IF;
167: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' gme_common_pvt.g_move_to_temp='||gme_common_pvt.g_move_to_temp);

Line 165: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date='||to_char(p_trans_date, 'YYYY-MON-DD HH24:MI:SS'));

161: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_backflush_rsrc_usg_ind='||p_backflush_rsrc_usg_ind);
162: IF p_trans_date IS NULL THEN
163: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date IS NULL');
164: ELSE
165: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date='||to_char(p_trans_date, 'YYYY-MON-DD HH24:MI:SS'));
166: END IF;
167: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' gme_common_pvt.g_move_to_temp='||gme_common_pvt.g_move_to_temp);
168: END IF;
169:

Line 167: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' gme_common_pvt.g_move_to_temp='||gme_common_pvt.g_move_to_temp);

163: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date IS NULL');
164: ELSE
165: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date='||to_char(p_trans_date, 'YYYY-MON-DD HH24:MI:SS'));
166: END IF;
167: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' gme_common_pvt.g_move_to_temp='||gme_common_pvt.g_move_to_temp);
168: END IF;
169:
170: /* Set the return status to success initially */
171: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 196: IF ( NVL(G_DEBUG,-1) <= GME_DEBUG.G_LOG_STATEMENT ) THEN

192: ,x_pct_plan_res => l_incr_factor_res
193: ,x_return_status => l_return_status);
194:
195: --FPBug#4667093 Begin
196: IF ( NVL(G_DEBUG,-1) <= GME_DEBUG.G_LOG_STATEMENT ) THEN
197: gme_debug.put_line (g_pkg_name||'.'||l_api_name||'Single Product:l_incr_factor= '||l_incr_factor);
198: END IF;
199:
200: /* add the incr qty to old actual to come up with new actual

Line 197: gme_debug.put_line (g_pkg_name||'.'||l_api_name||'Single Product:l_incr_factor= '||l_incr_factor);

193: ,x_return_status => l_return_status);
194:
195: --FPBug#4667093 Begin
196: IF ( NVL(G_DEBUG,-1) <= GME_DEBUG.G_LOG_STATEMENT ) THEN
197: gme_debug.put_line (g_pkg_name||'.'||l_api_name||'Single Product:l_incr_factor= '||l_incr_factor);
198: END IF;
199:
200: /* add the incr qty to old actual to come up with new actual
201: as l_incr_factor now depicts the percent increase from previous actual

Line 222: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

218: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
219: RAISE error_derive_factor;
220: END IF;
221:
222: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
223: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_incr_factor= '||l_incr_factor);
224: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_incr_factor_res= '||l_incr_factor_res);
225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_hold_new_actual= '||l_hold_new_actual);
226: END IF;

Line 223: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_incr_factor= '||l_incr_factor);

219: RAISE error_derive_factor;
220: END IF;
221:
222: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
223: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_incr_factor= '||l_incr_factor);
224: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_incr_factor_res= '||l_incr_factor_res);
225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_hold_new_actual= '||l_hold_new_actual);
226: END IF;
227: --FPBug#4667093 End

Line 224: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_incr_factor_res= '||l_incr_factor_res);

220: END IF;
221:
222: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
223: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_incr_factor= '||l_incr_factor);
224: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_incr_factor_res= '||l_incr_factor_res);
225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_hold_new_actual= '||l_hold_new_actual);
226: END IF;
227: --FPBug#4667093 End
228: ELSE

Line 225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_hold_new_actual= '||l_hold_new_actual);

221:
222: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
223: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_incr_factor= '||l_incr_factor);
224: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_incr_factor_res= '||l_incr_factor_res);
225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_hold_new_actual= '||l_hold_new_actual);
226: END IF;
227: --FPBug#4667093 End
228: ELSE
229: -- if this is a phantom batch, the qty passed is the incr factor as already calculated

Line 240: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

236: */
237: l_hold_new_actual := l_in_material_detail_rec.actual_qty +
238: ((l_in_material_detail_rec.wip_plan_qty * l_incr_factor) / 100);
239:
240: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
241: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' phantom batch; l_incr_factor= '||l_incr_factor);
242: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_hold_new_actual= '||l_hold_new_actual);
243: END IF;
244: --FPBug#4667093 End

Line 241: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' phantom batch; l_incr_factor= '||l_incr_factor);

237: l_hold_new_actual := l_in_material_detail_rec.actual_qty +
238: ((l_in_material_detail_rec.wip_plan_qty * l_incr_factor) / 100);
239:
240: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
241: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' phantom batch; l_incr_factor= '||l_incr_factor);
242: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_hold_new_actual= '||l_hold_new_actual);
243: END IF;
244: --FPBug#4667093 End
245:

Line 242: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_hold_new_actual= '||l_hold_new_actual);

238: ((l_in_material_detail_rec.wip_plan_qty * l_incr_factor) / 100);
239:
240: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
241: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' phantom batch; l_incr_factor= '||l_incr_factor);
242: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_hold_new_actual= '||l_hold_new_actual);
243: END IF;
244: --FPBug#4667093 End
245:
246: END IF;

Line 257: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

253:
254: FOR i IN 1 .. l_material_detail_tbl.COUNT LOOP
255: l_material_detail_rec := l_material_detail_tbl (i);
256:
257: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
258: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' -------------------------------------');
259: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' TOP of material detail loop; processing material_detail_id: '||l_material_detail_rec.material_detail_id);
260: END IF;
261:

Line 258: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' -------------------------------------');

254: FOR i IN 1 .. l_material_detail_tbl.COUNT LOOP
255: l_material_detail_rec := l_material_detail_tbl (i);
256:
257: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
258: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' -------------------------------------');
259: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' TOP of material detail loop; processing material_detail_id: '||l_material_detail_rec.material_detail_id);
260: END IF;
261:
262: --FPBug#4667093 add IF condition

Line 259: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' TOP of material detail loop; processing material_detail_id: '||l_material_detail_rec.material_detail_id);

255: l_material_detail_rec := l_material_detail_tbl (i);
256:
257: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
258: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' -------------------------------------');
259: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' TOP of material detail loop; processing material_detail_id: '||l_material_detail_rec.material_detail_id);
260: END IF;
261:
262: --FPBug#4667093 add IF condition
263: /* if material line is same as the line which drives IB then don't calculate new actual */

Line 266: IF ( NVL(G_DEBUG,-1) <= GME_DEBUG.G_LOG_STATEMENT ) THEN

262: --FPBug#4667093 add IF condition
263: /* if material line is same as the line which drives IB then don't calculate new actual */
264: IF l_material_detail_rec.material_detail_id = l_in_material_detail_rec.material_detail_id THEN
265: l_new_actual := l_hold_new_actual;
266: IF ( NVL(G_DEBUG,-1) <= GME_DEBUG.G_LOG_STATEMENT ) THEN
267: gme_debug.put_line (g_pkg_name||'.'||l_api_name||'IB Driven new actual: '||l_new_actual);
268: END IF;
269: ELSE
270: IF (l_material_detail_rec.scale_type = 0) THEN

Line 267: gme_debug.put_line (g_pkg_name||'.'||l_api_name||'IB Driven new actual: '||l_new_actual);

263: /* if material line is same as the line which drives IB then don't calculate new actual */
264: IF l_material_detail_rec.material_detail_id = l_in_material_detail_rec.material_detail_id THEN
265: l_new_actual := l_hold_new_actual;
266: IF ( NVL(G_DEBUG,-1) <= GME_DEBUG.G_LOG_STATEMENT ) THEN
267: gme_debug.put_line (g_pkg_name||'.'||l_api_name||'IB Driven new actual: '||l_new_actual);
268: END IF;
269: ELSE
270: IF (l_material_detail_rec.scale_type = 0) THEN
271: -- set actual qty for fixed line only if it is zero

Line 276: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

272: -- fixed items will have already been set the first time through
273: IF (l_material_detail_rec.actual_qty = 0) THEN
274: l_new_actual := l_material_detail_rec.wip_plan_qty;
275:
276: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
277: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' fixed scale: new actual: '||l_new_actual);
278: END IF;
279: ELSE
280: l_new_actual := l_material_detail_rec.actual_qty;

Line 277: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' fixed scale: new actual: '||l_new_actual);

273: IF (l_material_detail_rec.actual_qty = 0) THEN
274: l_new_actual := l_material_detail_rec.wip_plan_qty;
275:
276: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
277: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' fixed scale: new actual: '||l_new_actual);
278: END IF;
279: ELSE
280: l_new_actual := l_material_detail_rec.actual_qty;
281: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

Line 281: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

277: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' fixed scale: new actual: '||l_new_actual);
278: END IF;
279: ELSE
280: l_new_actual := l_material_detail_rec.actual_qty;
281: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
282: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' fixed scale: same actual: '||l_new_actual);
283: END IF;
284: END IF; /* l_material_detail_rec.actual_qty = 0 */
285: ELSE

Line 282: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' fixed scale: same actual: '||l_new_actual);

278: END IF;
279: ELSE
280: l_new_actual := l_material_detail_rec.actual_qty;
281: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
282: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' fixed scale: same actual: '||l_new_actual);
283: END IF;
284: END IF; /* l_material_detail_rec.actual_qty = 0 */
285: ELSE
286: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

Line 286: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

282: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' fixed scale: same actual: '||l_new_actual);
283: END IF;
284: END IF; /* l_material_detail_rec.actual_qty = 0 */
285: ELSE
286: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
287: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' actual_qty= '||l_material_detail_rec.actual_qty);
288: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' wip_plan_qty= '||l_material_detail_rec.wip_plan_qty);
289: END IF;
290:

Line 287: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' actual_qty= '||l_material_detail_rec.actual_qty);

283: END IF;
284: END IF; /* l_material_detail_rec.actual_qty = 0 */
285: ELSE
286: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
287: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' actual_qty= '||l_material_detail_rec.actual_qty);
288: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' wip_plan_qty= '||l_material_detail_rec.wip_plan_qty);
289: END IF;
290:
291: -- add the incr qty to old actual to come up with new actual

Line 288: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' wip_plan_qty= '||l_material_detail_rec.wip_plan_qty);

284: END IF; /* l_material_detail_rec.actual_qty = 0 */
285: ELSE
286: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
287: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' actual_qty= '||l_material_detail_rec.actual_qty);
288: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' wip_plan_qty= '||l_material_detail_rec.wip_plan_qty);
289: END IF;
290:
291: -- add the incr qty to old actual to come up with new actual
292: -- as p_incr_factor now depicts the percent increase from previous actual.

Line 295: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

291: -- add the incr qty to old actual to come up with new actual
292: -- as p_incr_factor now depicts the percent increase from previous actual.
293: l_new_actual := l_material_detail_rec.actual_qty +
294: ((l_material_detail_rec.wip_plan_qty * l_incr_factor) / 100);
295: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
296: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' not fixed scale: new actual: '||l_new_actual);
297: END IF;
298:
299: --FPBug#4660793 Begin

Line 296: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' not fixed scale: new actual: '||l_new_actual);

292: -- as p_incr_factor now depicts the percent increase from previous actual.
293: l_new_actual := l_material_detail_rec.actual_qty +
294: ((l_material_detail_rec.wip_plan_qty * l_incr_factor) / 100);
295: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
296: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' not fixed scale: new actual: '||l_new_actual);
297: END IF;
298:
299: --FPBug#4660793 Begin
300: IF (l_material_detail_rec.scale_type = 2) THEN

Line 306: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN

302: l_scale_rec.qty := l_new_actual;
303: l_scale_rec.scale_multiple := l_material_detail_rec.scale_multiple;
304: l_scale_rec.rounding_direction := l_material_detail_rec.rounding_direction;
305:
306: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
307: gme_debug.put_line('values going to int mult scale are: ');
308: gme_debug.put_line('qty '||l_scale_rec.qty);
309: gme_debug.put_line('rnd variance '||l_scale_rec.scale_rounding_variance);
310: gme_debug.put_line('multiple '||l_scale_rec.scale_multiple);

Line 307: gme_debug.put_line('values going to int mult scale are: ');

303: l_scale_rec.scale_multiple := l_material_detail_rec.scale_multiple;
304: l_scale_rec.rounding_direction := l_material_detail_rec.rounding_direction;
305:
306: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
307: gme_debug.put_line('values going to int mult scale are: ');
308: gme_debug.put_line('qty '||l_scale_rec.qty);
309: gme_debug.put_line('rnd variance '||l_scale_rec.scale_rounding_variance);
310: gme_debug.put_line('multiple '||l_scale_rec.scale_multiple);
311: gme_debug.put_line('rnd direction '||l_scale_rec.rounding_direction);

Line 308: gme_debug.put_line('qty '||l_scale_rec.qty);

304: l_scale_rec.rounding_direction := l_material_detail_rec.rounding_direction;
305:
306: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
307: gme_debug.put_line('values going to int mult scale are: ');
308: gme_debug.put_line('qty '||l_scale_rec.qty);
309: gme_debug.put_line('rnd variance '||l_scale_rec.scale_rounding_variance);
310: gme_debug.put_line('multiple '||l_scale_rec.scale_multiple);
311: gme_debug.put_line('rnd direction '||l_scale_rec.rounding_direction);
312: END IF;

Line 309: gme_debug.put_line('rnd variance '||l_scale_rec.scale_rounding_variance);

305:
306: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
307: gme_debug.put_line('values going to int mult scale are: ');
308: gme_debug.put_line('qty '||l_scale_rec.qty);
309: gme_debug.put_line('rnd variance '||l_scale_rec.scale_rounding_variance);
310: gme_debug.put_line('multiple '||l_scale_rec.scale_multiple);
311: gme_debug.put_line('rnd direction '||l_scale_rec.rounding_direction);
312: END IF;
313:

Line 310: gme_debug.put_line('multiple '||l_scale_rec.scale_multiple);

306: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
307: gme_debug.put_line('values going to int mult scale are: ');
308: gme_debug.put_line('qty '||l_scale_rec.qty);
309: gme_debug.put_line('rnd variance '||l_scale_rec.scale_rounding_variance);
310: gme_debug.put_line('multiple '||l_scale_rec.scale_multiple);
311: gme_debug.put_line('rnd direction '||l_scale_rec.rounding_direction);
312: END IF;
313:
314: gmd_common_scale.integer_multiple_scale

Line 311: gme_debug.put_line('rnd direction '||l_scale_rec.rounding_direction);

307: gme_debug.put_line('values going to int mult scale are: ');
308: gme_debug.put_line('qty '||l_scale_rec.qty);
309: gme_debug.put_line('rnd variance '||l_scale_rec.scale_rounding_variance);
310: gme_debug.put_line('multiple '||l_scale_rec.scale_multiple);
311: gme_debug.put_line('rnd direction '||l_scale_rec.rounding_direction);
312: END IF;
313:
314: gmd_common_scale.integer_multiple_scale
315: ( p_scale_rec => l_scale_rec

Line 326: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN

322: END IF;
323:
324: l_new_actual := l_scale_rec_out.qty;
325:
326: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
327: gme_debug.put_line('new actual after integer scaling is '||l_new_actual);
328: END IF;
329: END IF; /* l_material_detail_rec.scale_type = 2 */
330: --FPBug#4660793 End

Line 327: gme_debug.put_line('new actual after integer scaling is '||l_new_actual);

323:
324: l_new_actual := l_scale_rec_out.qty;
325:
326: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
327: gme_debug.put_line('new actual after integer scaling is '||l_new_actual);
328: END IF;
329: END IF; /* l_material_detail_rec.scale_type = 2 */
330: --FPBug#4660793 End
331: END IF; -- IF (l_material_detail_rec.scale_type = 0)

Line 335: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

331: END IF; -- IF (l_material_detail_rec.scale_type = 0)
332: END IF; /*l_material_detail_rec.material_detail_id = p_material_detail_rec.material_detail_id*/
333:
334: IF l_new_actual < 0 THEN
335: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
336: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' raising error; new actual= '||l_new_actual);
337: END IF;
338: RAISE error_cant_go_neg;
339: END IF;

Line 336: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' raising error; new actual= '||l_new_actual);

332: END IF; /*l_material_detail_rec.material_detail_id = p_material_detail_rec.material_detail_id*/
333:
334: IF l_new_actual < 0 THEN
335: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
336: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' raising error; new actual= '||l_new_actual);
337: END IF;
338: RAISE error_cant_go_neg;
339: END IF;
340:

Line 373: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

369: IF NOT gme_material_details_dbl.fetch_row(l_phantom_material_rec, l_phantom_material_rec) THEN
370: RAISE error_fetch_matl;
371: END IF;
372:
373: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
374: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' processing phantom batch with batch_id/material_detail_id: '||l_phantom_batch_rec.batch_id||'/'||l_phantom_material_rec.material_detail_id);
375: END IF;
376:
377: incremental_backflush

Line 374: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' processing phantom batch with batch_id/material_detail_id: '||l_phantom_batch_rec.batch_id||'/'||l_phantom_material_rec.material_detail_id);

370: RAISE error_fetch_matl;
371: END IF;
372:
373: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
374: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' processing phantom batch with batch_id/material_detail_id: '||l_phantom_batch_rec.batch_id||'/'||l_phantom_material_rec.material_detail_id);
375: END IF;
376:
377: incremental_backflush
378: (p_batch_header_rec => l_phantom_batch_rec

Line 399: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

395: ELSIF l_batch_header_rec.update_inventory_ind = 'Y' AND
396: l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
397: IF l_new_actual = 0 THEN
398: -- full revert
399: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
400: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new actual = 0; calling gme_unrelease_batch_pvt.revert_material_full');
401: END IF;
402:
403: gme_unrelease_batch_pvt.revert_material_full

Line 400: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new actual = 0; calling gme_unrelease_batch_pvt.revert_material_full');

396: l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
397: IF l_new_actual = 0 THEN
398: -- full revert
399: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
400: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new actual = 0; calling gme_unrelease_batch_pvt.revert_material_full');
401: END IF;
402:
403: gme_unrelease_batch_pvt.revert_material_full
404: (p_material_detail_rec => l_material_detail_rec

Line 424: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

420: l_upd_material := TRUE;
421: ELSIF l_incr_qty < 0 THEN
422: -- partial revert
423: l_decr_qty := -1 * l_incr_qty;
424: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
425: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' call revert_material_partial: incr_qty/decr_qty= '||l_incr_qty||'/'||l_decr_qty);
426: END IF;
427: revert_material_partial
428: (p_material_detail_rec => l_material_detail_rec

Line 425: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' call revert_material_partial: incr_qty/decr_qty= '||l_incr_qty||'/'||l_decr_qty);

421: ELSIF l_incr_qty < 0 THEN
422: -- partial revert
423: l_decr_qty := -1 * l_incr_qty;
424: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
425: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' call revert_material_partial: incr_qty/decr_qty= '||l_incr_qty||'/'||l_decr_qty);
426: END IF;
427: revert_material_partial
428: (p_material_detail_rec => l_material_detail_rec
429: ,p_qty => l_decr_qty

Line 447: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

443: END IF;
444: l_upd_material := TRUE;
445: ELSIF l_incr_qty = 0 THEN
446: -- nothing to do
447: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
448: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' incr_qty calculated to 0... nothing to do');
449: END IF;
450: l_upd_material := FALSE;
451: ELSE

Line 448: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' incr_qty calculated to 0... nothing to do');

444: l_upd_material := TRUE;
445: ELSIF l_incr_qty = 0 THEN
446: -- nothing to do
447: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
448: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' incr_qty calculated to 0... nothing to do');
449: END IF;
450: l_upd_material := FALSE;
451: ELSE
452: -- consume or yield based on line type

Line 454: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

450: l_upd_material := FALSE;
451: ELSE
452: -- consume or yield based on line type
453: IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN
454: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
455: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_release_batch_pvt.consume_material with target_qty= '||l_new_actual);
456: END IF;
457: gme_release_batch_pvt.consume_material
458: (p_material_dtl_rec => l_material_detail_rec

Line 455: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_release_batch_pvt.consume_material with target_qty= '||l_new_actual);

451: ELSE
452: -- consume or yield based on line type
453: IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN
454: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
455: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_release_batch_pvt.consume_material with target_qty= '||l_new_actual);
456: END IF;
457: gme_release_batch_pvt.consume_material
458: (p_material_dtl_rec => l_material_detail_rec
459: ,p_trans_date => p_trans_date

Line 466: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

462: ,x_exception_material_tbl => x_exception_material_tbl
463: ,x_actual_qty => l_actual_qty
464: ,x_return_status => l_return_status);
465: ELSE
466: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
467: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_complete_batch_pvt.yield_material with target_qty= '||l_new_actual);
468: END IF;
469: gme_complete_batch_pvt.yield_material
470: (p_material_dtl_rec => l_material_detail_rec

Line 467: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_complete_batch_pvt.yield_material with target_qty= '||l_new_actual);

463: ,x_actual_qty => l_actual_qty
464: ,x_return_status => l_return_status);
465: ELSE
466: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
467: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_complete_batch_pvt.yield_material with target_qty= '||l_new_actual);
468: END IF;
469: gme_complete_batch_pvt.yield_material
470: (p_material_dtl_rec => l_material_detail_rec
471: ,p_yield_qty => l_new_actual

Line 482: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

478: END IF;
479:
480: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
481: x_return_status := l_return_status;
482: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
483: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' raising exception with x_return_status= '||x_return_status);
484: END IF;
485: RAISE error_consum_yield;
486: END IF;

Line 483: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' raising exception with x_return_status= '||x_return_status);

479:
480: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
481: x_return_status := l_return_status;
482: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
483: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' raising exception with x_return_status= '||x_return_status);
484: END IF;
485: RAISE error_consum_yield;
486: END IF;
487:

Line 497: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

493:
494: IF l_upd_material THEN
495: l_material_detail_rec.actual_qty := l_actual_qty;
496:
497: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
498: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling update material actual qty= '||l_material_detail_rec.actual_qty);
499: END IF;
500:
501: IF NOT gme_material_details_dbl.update_row (l_material_detail_rec) THEN

Line 498: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling update material actual qty= '||l_material_detail_rec.actual_qty);

494: IF l_upd_material THEN
495: l_material_detail_rec.actual_qty := l_actual_qty;
496:
497: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
498: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling update material actual qty= '||l_material_detail_rec.actual_qty);
499: END IF;
500:
501: IF NOT gme_material_details_dbl.update_row (l_material_detail_rec) THEN
502: RAISE error_update_row;

Line 508: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

504: END IF; -- IF l_upd_material THEN
505: ELSE -- lab batches or non transactable materials
506: l_material_detail_rec.actual_qty := l_new_actual;
507:
508: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
509: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling update material actual qty= '||l_material_detail_rec.actual_qty);
510: END IF;
511:
512: IF NOT gme_material_details_dbl.update_row (l_material_detail_rec) THEN

Line 509: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling update material actual qty= '||l_material_detail_rec.actual_qty);

505: ELSE -- lab batches or non transactable materials
506: l_material_detail_rec.actual_qty := l_new_actual;
507:
508: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
509: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling update material actual qty= '||l_material_detail_rec.actual_qty);
510: END IF;
511:
512: IF NOT gme_material_details_dbl.update_row (l_material_detail_rec) THEN
513: RAISE error_update_row;

Line 570: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

566: END IF;
567: END IF; -- IF l_in_batch_step_rec.batchstep_id IS NOT NULL THEN
568: END IF; -- IF l_batch_header_rec.automatic_step_calculation = 1 THEN
569:
570: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
571: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' for batch_id= '||p_batch_header_rec.batch_id||' and x_return_status= '||x_return_status);
572: END IF;
573:
574: EXCEPTION

Line 571: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' for batch_id= '||p_batch_header_rec.batch_id||' and x_return_status= '||x_return_status);

567: END IF; -- IF l_in_batch_step_rec.batchstep_id IS NOT NULL THEN
568: END IF; -- IF l_batch_header_rec.automatic_step_calculation = 1 THEN
569:
570: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
571: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' for batch_id= '||p_batch_header_rec.batch_id||' and x_return_status= '||x_return_status);
572: END IF;
573:
574: EXCEPTION
575: WHEN error_fetch_batch OR error_fetch_matl OR error_update_row THEN

Line 588: IF g_debug <= gme_debug.g_log_procedure THEN

584: WHEN update_step_qty_error OR ERROR_UPDATING_STEPS THEN
585: x_return_status := l_return_status;
586: WHEN OTHERS THEN
587: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
588: IF g_debug <= gme_debug.g_log_procedure THEN
589: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
590: END IF;
591: x_return_status := FND_API.g_ret_sts_unexp_error;
592: END incremental_backflush;

Line 589: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

585: x_return_status := l_return_status;
586: WHEN OTHERS THEN
587: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
588: IF g_debug <= gme_debug.g_log_procedure THEN
589: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
590: END IF;
591: x_return_status := FND_API.g_ret_sts_unexp_error;
592: END incremental_backflush;
593:

Line 625: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

621: -- p_qty_type 2 % plan
622:
623: BEGIN
624:
625: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
626: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
627: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
628: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
629: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);

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

622:
623: BEGIN
624:
625: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
626: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
627: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
628: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
629: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
630: --FPBug#4667093 rework

Line 627: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);

623: BEGIN
624:
625: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
626: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
627: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
628: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
629: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
630: --FPBug#4667093 rework
631: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'p_gme_ib_factor ='||p_gme_ib_factor||' line type='||p_material_detail_rec.line_type);

Line 628: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);

624:
625: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
626: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
627: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
628: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
629: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
630: --FPBug#4667093 rework
631: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'p_gme_ib_factor ='||p_gme_ib_factor||' line type='||p_material_detail_rec.line_type);
632: END IF;

Line 629: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);

625: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
626: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
627: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
628: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
629: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
630: --FPBug#4667093 rework
631: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'p_gme_ib_factor ='||p_gme_ib_factor||' line type='||p_material_detail_rec.line_type);
632: END IF;
633:

Line 631: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'p_gme_ib_factor ='||p_gme_ib_factor||' line type='||p_material_detail_rec.line_type);

627: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
628: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
629: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
630: --FPBug#4667093 rework
631: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'p_gme_ib_factor ='||p_gme_ib_factor||' line type='||p_material_detail_rec.line_type);
632: END IF;
633:
634: /* Set the return status to success initially */
635: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 660: IF nvl(g_debug,-1) <= gme_debug.g_log_statement THEN

656: ELSE
657: l_required_qty := p_material_detail_rec.wip_plan_qty;
658: END IF;
659:
660: IF nvl(g_debug,-1) <= gme_debug.g_log_statement THEN
661: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'l_required_qty: '||l_required_qty);
662: END IF;
663: --FPBug#4667093 End
664:

Line 661: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'l_required_qty: '||l_required_qty);

657: l_required_qty := p_material_detail_rec.wip_plan_qty;
658: END IF;
659:
660: IF nvl(g_debug,-1) <= gme_debug.g_log_statement THEN
661: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'l_required_qty: '||l_required_qty);
662: END IF;
663: --FPBug#4667093 End
664:
665: -- x_pct_plan is the percent to be applied to WIP plan to come up with the incremental qty

Line 703: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

699: x_pct_plan := ((l_new_actual - l_old_actual_qty)/l_required_qty) * 100;
700: x_pct_plan_res := p_qty - ((l_old_actual_qty/l_required_qty))*100 ;
701: END IF;
702:
703: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
704: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' x_pct_plan= '||x_pct_plan);
705: END IF;
706:
707: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

Line 704: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' x_pct_plan= '||x_pct_plan);

700: x_pct_plan_res := p_qty - ((l_old_actual_qty/l_required_qty))*100 ;
701: END IF;
702:
703: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
704: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' x_pct_plan= '||x_pct_plan);
705: END IF;
706:
707: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
708: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' with x_return_status= '||x_return_status);

Line 707: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

703: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
704: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' x_pct_plan= '||x_pct_plan);
705: END IF;
706:
707: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
708: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' with x_return_status= '||x_return_status);
709: END IF;
710:
711: EXCEPTION

Line 708: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' with x_return_status= '||x_return_status);

704: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' x_pct_plan= '||x_pct_plan);
705: END IF;
706:
707: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
708: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' with x_return_status= '||x_return_status);
709: END IF;
710:
711: EXCEPTION
712: --FPBug#4667093

Line 717: IF g_debug <= gme_debug.g_log_procedure THEN

713: WHEN ERROR_IN_GET_TOTAL_QTY THEN
714: x_return_status := l_return_status;
715: WHEN OTHERS THEN
716: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
717: IF g_debug <= gme_debug.g_log_procedure THEN
718: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
719: END IF;
720: x_return_status := FND_API.g_ret_sts_unexp_error;
721: END derive_factor;

Line 718: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

714: x_return_status := l_return_status;
715: WHEN OTHERS THEN
716: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
717: IF g_debug <= gme_debug.g_log_procedure THEN
718: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
719: END IF;
720: x_return_status := FND_API.g_ret_sts_unexp_error;
721: END derive_factor;
722:

Line 745: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

741:
742: error_updating_steps EXCEPTION;
743:
744: BEGIN
745: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
746: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
747: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batchstep_id='||p_batchstep_id);
748: END IF;
749:

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

742: error_updating_steps EXCEPTION;
743:
744: BEGIN
745: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
746: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
747: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batchstep_id='||p_batchstep_id);
748: END IF;
749:
750: -- Set the return status to success initially

Line 747: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batchstep_id='||p_batchstep_id);

743:
744: BEGIN
745: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
746: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
747: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batchstep_id='||p_batchstep_id);
748: END IF;
749:
750: -- Set the return status to success initially
751: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 791: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

787: END IF;
788: END IF;
789: END LOOP;
790:
791: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
792: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
793: END IF;
794:
795: EXCEPTION

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

788: END IF;
789: END LOOP;
790:
791: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
792: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
793: END IF;
794:
795: EXCEPTION
796: WHEN error_updating_steps THEN

Line 800: IF g_debug <= gme_debug.g_log_procedure THEN

796: WHEN error_updating_steps THEN
797: NULL;
798: WHEN OTHERS THEN
799: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
800: IF g_debug <= gme_debug.g_log_procedure THEN
801: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
802: END IF;
803: x_return_status := FND_API.g_ret_sts_unexp_error;
804: END update_dependent_steps;

Line 801: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

797: NULL;
798: WHEN OTHERS THEN
799: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
800: IF g_debug <= gme_debug.g_log_procedure THEN
801: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
802: END IF;
803: x_return_status := FND_API.g_ret_sts_unexp_error;
804: END update_dependent_steps;
805:

Line 875: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

871: error_trans EXCEPTION;
872:
873: BEGIN
874:
875: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
876: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
877: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
878: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
879: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_control_code='||p_lot_control_code);

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

872:
873: BEGIN
874:
875: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
876: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
877: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
878: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
879: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_control_code='||p_lot_control_code);
880: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_create_resv_pend_lots='||p_create_resv_pend_lots);

Line 877: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);

873: BEGIN
874:
875: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
876: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
877: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
878: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
879: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_control_code='||p_lot_control_code);
880: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_create_resv_pend_lots='||p_create_resv_pend_lots);
881: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_divisible_flag='||p_lot_divisible_flag);

Line 878: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);

874:
875: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
876: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
877: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
878: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
879: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_control_code='||p_lot_control_code);
880: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_create_resv_pend_lots='||p_create_resv_pend_lots);
881: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_divisible_flag='||p_lot_divisible_flag);
882: END IF;

Line 879: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_control_code='||p_lot_control_code);

875: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
876: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
877: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
878: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
879: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_control_code='||p_lot_control_code);
880: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_create_resv_pend_lots='||p_create_resv_pend_lots);
881: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_divisible_flag='||p_lot_divisible_flag);
882: END IF;
883:

Line 880: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_create_resv_pend_lots='||p_create_resv_pend_lots);

876: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
877: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
878: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
879: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_control_code='||p_lot_control_code);
880: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_create_resv_pend_lots='||p_create_resv_pend_lots);
881: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_divisible_flag='||p_lot_divisible_flag);
882: END IF;
883:
884: -- Set the return status to success initially

Line 881: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_divisible_flag='||p_lot_divisible_flag);

877: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
878: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
879: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_control_code='||p_lot_control_code);
880: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_create_resv_pend_lots='||p_create_resv_pend_lots);
881: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_divisible_flag='||p_lot_divisible_flag);
882: END IF;
883:
884: -- Set the return status to success initially
885: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 896: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

892: ,p_batch_id => p_material_detail_rec.batch_id
893: ,x_mmt_tbl => l_mmt_tbl
894: ,x_return_status => x_return_status);
895:
896: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
897: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' gme_transactions_pvt.get_mat_trans returned '||l_mmt_tbl.count||' trxns with return_status='||x_return_status);
898: END IF;
899:
900: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 897: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' gme_transactions_pvt.get_mat_trans returned '||l_mmt_tbl.count||' trxns with return_status='||x_return_status);

893: ,x_mmt_tbl => l_mmt_tbl
894: ,x_return_status => x_return_status);
895:
896: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
897: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' gme_transactions_pvt.get_mat_trans returned '||l_mmt_tbl.count||' trxns with return_status='||x_return_status);
898: END IF;
899:
900: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
901: RAISE error_get_trans;

Line 932: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

928:
929: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN
930: IF p_lot_divisible_flag = 'N' THEN
931: l_whole_qty := TRUE;
932: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
933: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = TRUE because lot indivisible item');
934: END IF;
935: ELSE
936: l_whole_qty := FALSE;

Line 933: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = TRUE because lot indivisible item');

929: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN
930: IF p_lot_divisible_flag = 'N' THEN
931: l_whole_qty := TRUE;
932: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
933: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = TRUE because lot indivisible item');
934: END IF;
935: ELSE
936: l_whole_qty := FALSE;
937: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

Line 937: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

933: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = TRUE because lot indivisible item');
934: END IF;
935: ELSE
936: l_whole_qty := FALSE;
937: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
938: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = FALSE because lot is divisible; next check if dispensed');
939: END IF;
940: END IF;
941:

Line 938: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = FALSE because lot is divisible; next check if dispensed');

934: END IF;
935: ELSE
936: l_whole_qty := FALSE;
937: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
938: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = FALSE because lot is divisible; next check if dispensed');
939: END IF;
940: END IF;
941:
942: -- test again for dispensed items

Line 946: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

942: -- test again for dispensed items
943: IF NOT l_whole_qty THEN
944: IF NVL(p_material_detail_rec.dispense_ind,'N') = 'Y' THEN
945: l_whole_qty := TRUE;
946: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
947: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = TRUE because dispensed item');
948: END IF;
949: END IF;
950: END IF;

Line 947: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = TRUE because dispensed item');

943: IF NOT l_whole_qty THEN
944: IF NVL(p_material_detail_rec.dispense_ind,'N') = 'Y' THEN
945: l_whole_qty := TRUE;
946: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
947: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = TRUE because dispensed item');
948: END IF;
949: END IF;
950: END IF;
951: ELSE -- product and byproduct doesn't apply for either dispensed or lot divisible... don't have to take whole qty

Line 953: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

949: END IF;
950: END IF;
951: ELSE -- product and byproduct doesn't apply for either dispensed or lot divisible... don't have to take whole qty
952: l_whole_qty := FALSE;
953: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
954: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = FALSE because prod/byprod');
955: END IF;
956: END IF;
957:

Line 954: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = FALSE because prod/byprod');

950: END IF;
951: ELSE -- product and byproduct doesn't apply for either dispensed or lot divisible... don't have to take whole qty
952: l_whole_qty := FALSE;
953: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
954: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = FALSE because prod/byprod');
955: END IF;
956: END IF;
957:
958: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

Line 958: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

954: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = FALSE because prod/byprod');
955: END IF;
956: END IF;
957:
958: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
959: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_trxn_type='||l_trxn_type);
960: END IF;
961:
962: IF p_lot_control_code = 1 THEN

Line 959: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_trxn_type='||l_trxn_type);

955: END IF;
956: END IF;
957:
958: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
959: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_trxn_type='||l_trxn_type);
960: END IF;
961:
962: IF p_lot_control_code = 1 THEN
963:

Line 964: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

960: END IF;
961:
962: IF p_lot_control_code = 1 THEN
963:
964: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
965: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' ********** NOT LOT CONTROL **********');
966: END IF;
967:
968: i := 1;

Line 965: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' ********** NOT LOT CONTROL **********');

961:
962: IF p_lot_control_code = 1 THEN
963:
964: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
965: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' ********** NOT LOT CONTROL **********');
966: END IF;
967:
968: i := 1;
969: WHILE i <= l_mmt_tbl.count AND l_qty > 0 LOOP

Line 972: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

968: i := 1;
969: WHILE i <= l_mmt_tbl.count AND l_qty > 0 LOOP
970: l_mmt_rec := l_mmt_tbl(i);
971:
972: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
973: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');
974: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);
975: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);
976: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);

Line 973: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');

969: WHILE i <= l_mmt_tbl.count AND l_qty > 0 LOOP
970: l_mmt_rec := l_mmt_tbl(i);
971:
972: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
973: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');
974: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);
975: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);
976: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);
977: END IF;

Line 974: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);

970: l_mmt_rec := l_mmt_tbl(i);
971:
972: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
973: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');
974: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);
975: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);
976: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);
977: END IF;
978:

Line 975: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);

971:
972: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
973: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');
974: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);
975: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);
976: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);
977: END IF;
978:
979: IF l_mmt_rec.transaction_type_id = l_trxn_type THEN

Line 976: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);

972: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
973: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');
974: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);
975: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);
976: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);
977: END IF;
978:
979: IF l_mmt_rec.transaction_type_id = l_trxn_type THEN
980: l_trxn_qty := l_mmt_rec.transaction_quantity;

Line 994: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

990: RAISE inv_negative;
991: END IF;
992: END IF;
993:
994: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
995: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.delete_material_txn for trxns_id='||l_mmt_rec.transaction_id);
996: END IF;
997: -- delete this transaction, reduce the qty to decrement
998: gme_transactions_pvt.delete_material_txn

Line 995: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.delete_material_txn for trxns_id='||l_mmt_rec.transaction_id);

991: END IF;
992: END IF;
993:
994: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
995: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.delete_material_txn for trxns_id='||l_mmt_rec.transaction_id);
996: END IF;
997: -- delete this transaction, reduce the qty to decrement
998: gme_transactions_pvt.delete_material_txn
999: (p_transaction_id => l_mmt_rec.transaction_id

Line 1005: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1001: ,x_return_status => l_return_status);
1002:
1003: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1004: -- do nothing... move on to the next, to try to reduce
1005: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1006: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.delete_material_txn returned '||l_return_status);
1007: END IF;
1008: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1009: x_return_status := l_return_status;

Line 1006: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.delete_material_txn returned '||l_return_status);

1002:
1003: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1004: -- do nothing... move on to the next, to try to reduce
1005: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1006: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.delete_material_txn returned '||l_return_status);
1007: END IF;
1008: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1009: x_return_status := l_return_status;
1010: RAISE error_trans;

Line 1045: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1041: RAISE inv_negative;
1042: END IF;
1043: END IF;
1044:
1045: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1046: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.update_material_txn for trxns_id='||l_mmt_rec.transaction_id);
1047: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; update trxn with qty='||l_mmt_rec.transaction_quantity);
1048: END IF;
1049:

Line 1046: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.update_material_txn for trxns_id='||l_mmt_rec.transaction_id);

1042: END IF;
1043: END IF;
1044:
1045: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1046: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.update_material_txn for trxns_id='||l_mmt_rec.transaction_id);
1047: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; update trxn with qty='||l_mmt_rec.transaction_quantity);
1048: END IF;
1049:
1050: gme_transactions_pvt.update_material_txn

Line 1047: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; update trxn with qty='||l_mmt_rec.transaction_quantity);

1043: END IF;
1044:
1045: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1046: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.update_material_txn for trxns_id='||l_mmt_rec.transaction_id);
1047: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; update trxn with qty='||l_mmt_rec.transaction_quantity);
1048: END IF;
1049:
1050: gme_transactions_pvt.update_material_txn
1051: (p_mmt_rec => l_mmt_rec

Line 1057: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1053: ,x_return_status => l_return_status);
1054:
1055: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1056: -- do nothing... move on to the next, to try to reduce
1057: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1058: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.update_material_txn returned '||l_return_status);
1059: END IF;
1060: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1061: x_return_status := l_return_status;

Line 1058: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.update_material_txn returned '||l_return_status);

1054:
1055: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1056: -- do nothing... move on to the next, to try to reduce
1057: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1058: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.update_material_txn returned '||l_return_status);
1059: END IF;
1060: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1061: x_return_status := l_return_status;
1062: RAISE error_trans;

Line 1096: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1092: END IF;
1093:
1094: END IF; -- IF l_trxn_qty <= l_qty THEN
1095: ELSE
1096: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1097: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' cant process because not the same transaction_type_id: trxns_id='||l_mmt_rec.transaction_id);
1098: END IF;
1099: END IF; -- IF l_mmt_rec.transaction_type_id = l_trxn_type THEN
1100:

Line 1097: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' cant process because not the same transaction_type_id: trxns_id='||l_mmt_rec.transaction_id);

1093:
1094: END IF; -- IF l_trxn_qty <= l_qty THEN
1095: ELSE
1096: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1097: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' cant process because not the same transaction_type_id: trxns_id='||l_mmt_rec.transaction_id);
1098: END IF;
1099: END IF; -- IF l_mmt_rec.transaction_type_id = l_trxn_type THEN
1100:
1101: i := i + 1;

Line 1107: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1103: END LOOP;
1104: ELSE -- p_lot_control_code = 2 which means lot control
1105:
1106:
1107: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1108: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' ********** LOT CONTROL **********');
1109: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' right before cursor cur_lot_qty');
1110: END IF;
1111:

Line 1108: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' ********** LOT CONTROL **********');

1104: ELSE -- p_lot_control_code = 2 which means lot control
1105:
1106:
1107: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1108: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' ********** LOT CONTROL **********');
1109: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' right before cursor cur_lot_qty');
1110: END IF;
1111:
1112: FOR cur_lot_qty_rec IN cur_lot_qty(

Line 1109: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' right before cursor cur_lot_qty');

1105:
1106:
1107: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1108: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' ********** LOT CONTROL **********');
1109: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' right before cursor cur_lot_qty');
1110: END IF;
1111:
1112: FOR cur_lot_qty_rec IN cur_lot_qty(
1113: p_material_detail_rec.inventory_item_id

Line 1118: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1114: ,p_material_detail_rec.organization_id
1115: ,p_material_detail_rec.batch_id
1116: ,p_material_detail_rec.material_detail_id) LOOP
1117: l_lot_qty_tab(cur_lot_qty_rec.lot_number) := ABS(cur_lot_qty_rec.sum_trx);
1118: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1119: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' lot tab index: lot_number:'||cur_lot_qty_rec.lot_number);
1120: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' lot tab qty sum: '||l_lot_qty_tab(cur_lot_qty_rec.lot_number));
1121: END IF;
1122: END LOOP;

Line 1119: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' lot tab index: lot_number:'||cur_lot_qty_rec.lot_number);

1115: ,p_material_detail_rec.batch_id
1116: ,p_material_detail_rec.material_detail_id) LOOP
1117: l_lot_qty_tab(cur_lot_qty_rec.lot_number) := ABS(cur_lot_qty_rec.sum_trx);
1118: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1119: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' lot tab index: lot_number:'||cur_lot_qty_rec.lot_number);
1120: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' lot tab qty sum: '||l_lot_qty_tab(cur_lot_qty_rec.lot_number));
1121: END IF;
1122: END LOOP;
1123:

Line 1120: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' lot tab qty sum: '||l_lot_qty_tab(cur_lot_qty_rec.lot_number));

1116: ,p_material_detail_rec.material_detail_id) LOOP
1117: l_lot_qty_tab(cur_lot_qty_rec.lot_number) := ABS(cur_lot_qty_rec.sum_trx);
1118: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1119: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' lot tab index: lot_number:'||cur_lot_qty_rec.lot_number);
1120: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' lot tab qty sum: '||l_lot_qty_tab(cur_lot_qty_rec.lot_number));
1121: END IF;
1122: END LOOP;
1123:
1124: -- loop the trxns checking each lot trxn against lot sum to see if

Line 1133: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1129: i := 1;
1130: WHILE i <= l_mmt_tbl.count AND l_qty > 0 LOOP
1131: l_mmt_rec := l_mmt_tbl(i);
1132:
1133: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1134: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');
1135: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);
1136: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);
1137: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);

Line 1134: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');

1130: WHILE i <= l_mmt_tbl.count AND l_qty > 0 LOOP
1131: l_mmt_rec := l_mmt_tbl(i);
1132:
1133: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1134: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');
1135: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);
1136: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);
1137: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);
1138: END IF;

Line 1135: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);

1131: l_mmt_rec := l_mmt_tbl(i);
1132:
1133: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1134: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');
1135: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);
1136: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);
1137: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);
1138: END IF;
1139:

Line 1136: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);

1132:
1133: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1134: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');
1135: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);
1136: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);
1137: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);
1138: END IF;
1139:
1140:

Line 1137: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);

1133: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1134: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; ******************* ');
1135: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing i='||i);
1136: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; processing trxns_id='||l_mmt_rec.transaction_id);
1137: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; qty to reduce='||l_qty);
1138: END IF;
1139:
1140:
1141: IF l_mmt_rec.transaction_type_id = l_trxn_type THEN

Line 1164: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1160:
1161: l_decr_qty := 0;
1162: j:= 1;
1163:
1164: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1165: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' before lot loop; l_mmln_tbl.COUNT='||l_mmln_tbl.COUNT);
1166: END IF;
1167:
1168: -- keep last successful qties; in case update or delete is not successful, and you have to go back

Line 1165: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' before lot loop; l_mmln_tbl.COUNT='||l_mmln_tbl.COUNT);

1161: l_decr_qty := 0;
1162: j:= 1;
1163:
1164: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1165: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' before lot loop; l_mmln_tbl.COUNT='||l_mmln_tbl.COUNT);
1166: END IF;
1167:
1168: -- keep last successful qties; in case update or delete is not successful, and you have to go back
1169: l_last_lot_qty_tab := l_lot_qty_tab;

Line 1174: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1170: l_last_qty := l_qty;
1171: l_mmln_tbl_orig := l_mmln_tbl;
1172:
1173: WHILE j <= l_mmln_tbl.COUNT AND l_qty > 0 LOOP
1174: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1175: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; j='||j);
1176: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_decr_qty='||l_decr_qty);
1177: END IF;
1178:

Line 1175: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; j='||j);

1171: l_mmln_tbl_orig := l_mmln_tbl;
1172:
1173: WHILE j <= l_mmln_tbl.COUNT AND l_qty > 0 LOOP
1174: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1175: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; j='||j);
1176: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_decr_qty='||l_decr_qty);
1177: END IF;
1178:
1179: ln := l_mmln_tbl(j).lot_number;

Line 1176: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_decr_qty='||l_decr_qty);

1172:
1173: WHILE j <= l_mmln_tbl.COUNT AND l_qty > 0 LOOP
1174: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1175: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; j='||j);
1176: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_decr_qty='||l_decr_qty);
1177: END IF;
1178:
1179: ln := l_mmln_tbl(j).lot_number;
1180:

Line 1181: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1177: END IF;
1178:
1179: ln := l_mmln_tbl(j).lot_number;
1180:
1181: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1182: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; processing lot number='||ln);
1183: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; sum lot trxn for this lot='||l_lot_qty_tab(ln));
1184: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);
1185: END IF;

Line 1182: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; processing lot number='||ln);

1178:
1179: ln := l_mmln_tbl(j).lot_number;
1180:
1181: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1182: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; processing lot number='||ln);
1183: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; sum lot trxn for this lot='||l_lot_qty_tab(ln));
1184: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);
1185: END IF;
1186:

Line 1183: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; sum lot trxn for this lot='||l_lot_qty_tab(ln));

1179: ln := l_mmln_tbl(j).lot_number;
1180:
1181: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1182: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; processing lot number='||ln);
1183: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; sum lot trxn for this lot='||l_lot_qty_tab(ln));
1184: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);
1185: END IF;
1186:
1187: -- if you need to take the entire lot qty, then take it... else, go on to figure out how much you can take

Line 1184: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);

1180:
1181: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1182: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; processing lot number='||ln);
1183: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; sum lot trxn for this lot='||l_lot_qty_tab(ln));
1184: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);
1185: END IF;
1186:
1187: -- if you need to take the entire lot qty, then take it... else, go on to figure out how much you can take
1188: IF l_whole_qty THEN

Line 1206: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1202: END IF;
1203: END IF;
1204: END IF;
1205:
1206: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1207: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; reducing lot qty by='||l_temp_qty);
1208: END IF;
1209:
1210: l_mmln_tbl(j).transaction_quantity := l_mmln_tbl(j).transaction_quantity - l_temp_qty;

Line 1207: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; reducing lot qty by='||l_temp_qty);

1203: END IF;
1204: END IF;
1205:
1206: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1207: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; reducing lot qty by='||l_temp_qty);
1208: END IF;
1209:
1210: l_mmln_tbl(j).transaction_quantity := l_mmln_tbl(j).transaction_quantity - l_temp_qty;
1211: l_mmln_tbl(j).primary_quantity := NULL;

Line 1224: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1220: END IF;
1221:
1222: l_decr_qty := l_decr_qty + l_temp_qty;
1223:
1224: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_mmln_tbl(j).transaction_quantity='||l_mmln_tbl(j).transaction_quantity);
1226: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_lot_qty_tab(ln)='||l_lot_qty_tab(ln));
1227: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);
1228: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_decr_qty='||l_decr_qty);

Line 1225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_mmln_tbl(j).transaction_quantity='||l_mmln_tbl(j).transaction_quantity);

1221:
1222: l_decr_qty := l_decr_qty + l_temp_qty;
1223:
1224: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_mmln_tbl(j).transaction_quantity='||l_mmln_tbl(j).transaction_quantity);
1226: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_lot_qty_tab(ln)='||l_lot_qty_tab(ln));
1227: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);
1228: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_decr_qty='||l_decr_qty);
1229: END IF;

Line 1226: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_lot_qty_tab(ln)='||l_lot_qty_tab(ln));

1222: l_decr_qty := l_decr_qty + l_temp_qty;
1223:
1224: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_mmln_tbl(j).transaction_quantity='||l_mmln_tbl(j).transaction_quantity);
1226: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_lot_qty_tab(ln)='||l_lot_qty_tab(ln));
1227: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);
1228: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_decr_qty='||l_decr_qty);
1229: END IF;
1230:

Line 1227: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);

1223:
1224: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_mmln_tbl(j).transaction_quantity='||l_mmln_tbl(j).transaction_quantity);
1226: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_lot_qty_tab(ln)='||l_lot_qty_tab(ln));
1227: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);
1228: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_decr_qty='||l_decr_qty);
1229: END IF;
1230:
1231: j := j + 1;

Line 1228: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_decr_qty='||l_decr_qty);

1224: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1225: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_mmln_tbl(j).transaction_quantity='||l_mmln_tbl(j).transaction_quantity);
1226: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_lot_qty_tab(ln)='||l_lot_qty_tab(ln));
1227: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_qty='||l_qty);
1228: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in lot loop; l_decr_qty='||l_decr_qty);
1229: END IF;
1230:
1231: j := j + 1;
1232: END LOOP;

Line 1234: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1230:
1231: j := j + 1;
1232: END LOOP;
1233:
1234: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1235: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after lot loop; l_decr_qty='||l_decr_qty);
1236: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after lot loop; l_mmt_rec.transaction_quantity='||l_mmt_rec.transaction_quantity);
1237: END IF;
1238:

Line 1235: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after lot loop; l_decr_qty='||l_decr_qty);

1231: j := j + 1;
1232: END LOOP;
1233:
1234: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1235: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after lot loop; l_decr_qty='||l_decr_qty);
1236: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after lot loop; l_mmt_rec.transaction_quantity='||l_mmt_rec.transaction_quantity);
1237: END IF;
1238:
1239:

Line 1236: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after lot loop; l_mmt_rec.transaction_quantity='||l_mmt_rec.transaction_quantity);

1232: END LOOP;
1233:
1234: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1235: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after lot loop; l_decr_qty='||l_decr_qty);
1236: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after lot loop; l_mmt_rec.transaction_quantity='||l_mmt_rec.transaction_quantity);
1237: END IF;
1238:
1239:
1240: IF l_decr_qty = l_mmt_rec.transaction_quantity THEN

Line 1254: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1250: RAISE inv_negative;
1251: END IF;
1252: END IF;
1253:
1254: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1255: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.delete_material_txn with trxn_id='||l_mmt_tbl(i).transaction_id);
1256: END IF;
1257:
1258: -- delete the transaction... all lots were used

Line 1255: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.delete_material_txn with trxn_id='||l_mmt_tbl(i).transaction_id);

1251: END IF;
1252: END IF;
1253:
1254: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1255: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.delete_material_txn with trxn_id='||l_mmt_tbl(i).transaction_id);
1256: END IF;
1257:
1258: -- delete the transaction... all lots were used
1259: gme_transactions_pvt.delete_material_txn

Line 1267: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1263:
1264: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1265: l_trxn_success := FALSE;
1266: -- do nothing... move on to the next, to try to reduce
1267: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1268: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.delete_material_txn returned '||l_return_status);
1269: END IF;
1270: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1271: x_return_status := l_return_status;

Line 1268: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.delete_material_txn returned '||l_return_status);

1264: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1265: l_trxn_success := FALSE;
1266: -- do nothing... move on to the next, to try to reduce
1267: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1268: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.delete_material_txn returned '||l_return_status);
1269: END IF;
1270: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1271: x_return_status := l_return_status;
1272: RAISE error_trans;

Line 1311: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1307: RAISE inv_negative;
1308: END IF;
1309: END IF;
1310:
1311: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1312: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' quantity decremented from transaction:'||l_decr_qty);
1313:
1314: FOR j IN 1..l_mmln_tbl.COUNT LOOP
1315: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot number:'||l_mmln_tbl(j).lot_number);

Line 1312: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' quantity decremented from transaction:'||l_decr_qty);

1308: END IF;
1309: END IF;
1310:
1311: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1312: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' quantity decremented from transaction:'||l_decr_qty);
1313:
1314: FOR j IN 1..l_mmln_tbl.COUNT LOOP
1315: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot number:'||l_mmln_tbl(j).lot_number);
1316: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot quantity: '||l_mmln_tbl(j).transaction_quantity);

Line 1315: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot number:'||l_mmln_tbl(j).lot_number);

1311: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1312: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' quantity decremented from transaction:'||l_decr_qty);
1313:
1314: FOR j IN 1..l_mmln_tbl.COUNT LOOP
1315: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot number:'||l_mmln_tbl(j).lot_number);
1316: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot quantity: '||l_mmln_tbl(j).transaction_quantity);
1317: END LOOP;
1318:
1319: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new transaction quantity:'||l_mmt_rec.transaction_quantity);

Line 1316: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot quantity: '||l_mmln_tbl(j).transaction_quantity);

1312: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' quantity decremented from transaction:'||l_decr_qty);
1313:
1314: FOR j IN 1..l_mmln_tbl.COUNT LOOP
1315: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot number:'||l_mmln_tbl(j).lot_number);
1316: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot quantity: '||l_mmln_tbl(j).transaction_quantity);
1317: END LOOP;
1318:
1319: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new transaction quantity:'||l_mmt_rec.transaction_quantity);
1320:

Line 1319: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new transaction quantity:'||l_mmt_rec.transaction_quantity);

1315: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot number:'||l_mmln_tbl(j).lot_number);
1316: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl lot quantity: '||l_mmln_tbl(j).transaction_quantity);
1317: END LOOP;
1318:
1319: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new transaction quantity:'||l_mmt_rec.transaction_quantity);
1320:
1321: FOR j IN 1..l_mmln_tbl_new.COUNT LOOP
1322: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl_new lot number:'||l_mmln_tbl_new(j).lot_number);
1323: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl_new lot quantity: '||l_mmln_tbl_new(j).transaction_quantity);

Line 1322: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl_new lot number:'||l_mmln_tbl_new(j).lot_number);

1318:
1319: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new transaction quantity:'||l_mmt_rec.transaction_quantity);
1320:
1321: FOR j IN 1..l_mmln_tbl_new.COUNT LOOP
1322: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl_new lot number:'||l_mmln_tbl_new(j).lot_number);
1323: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl_new lot quantity: '||l_mmln_tbl_new(j).transaction_quantity);
1324: END LOOP;
1325:
1326: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_transactions_pvt.update_material_txn with updatd l_mmt_rec and new l_mmln_tbl_new');

Line 1323: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl_new lot quantity: '||l_mmln_tbl_new(j).transaction_quantity);

1319: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new transaction quantity:'||l_mmt_rec.transaction_quantity);
1320:
1321: FOR j IN 1..l_mmln_tbl_new.COUNT LOOP
1322: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl_new lot number:'||l_mmln_tbl_new(j).lot_number);
1323: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl_new lot quantity: '||l_mmln_tbl_new(j).transaction_quantity);
1324: END LOOP;
1325:
1326: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_transactions_pvt.update_material_txn with updatd l_mmt_rec and new l_mmln_tbl_new');
1327: END IF;

Line 1326: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_transactions_pvt.update_material_txn with updatd l_mmt_rec and new l_mmln_tbl_new');

1322: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl_new lot number:'||l_mmln_tbl_new(j).lot_number);
1323: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_mmln_tbl_new lot quantity: '||l_mmln_tbl_new(j).transaction_quantity);
1324: END LOOP;
1325:
1326: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_transactions_pvt.update_material_txn with updatd l_mmt_rec and new l_mmln_tbl_new');
1327: END IF;
1328:
1329: gme_transactions_pvt.update_material_txn
1330: (p_mmt_rec => l_mmt_rec

Line 1337: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1333:
1334: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1335: l_trxn_success := FALSE;
1336: -- do nothing... move on to the next, to try to reduce
1337: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1338: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.update_material_txn returned '||l_return_status);
1339: END IF;
1340: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1341: x_return_status := l_return_status;

Line 1338: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.update_material_txn returned '||l_return_status);

1334: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1335: l_trxn_success := FALSE;
1336: -- do nothing... move on to the next, to try to reduce
1337: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1338: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.update_material_txn returned '||l_return_status);
1339: END IF;
1340: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1341: x_return_status := l_return_status;
1342: RAISE error_trans;

Line 1400: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1396: l_qty := l_last_qty;
1397: END IF;
1398:
1399: ELSE
1400: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1401: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' cant process because not the same transaction_type_id: trxns_id='||l_mmt_rec.transaction_id);
1402: END IF;
1403: END IF; -- IF l_mmt_rec.transaction_type_id = l_trxn_type THEN
1404:

Line 1401: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' cant process because not the same transaction_type_id: trxns_id='||l_mmt_rec.transaction_id);

1397: END IF;
1398:
1399: ELSE
1400: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1401: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' cant process because not the same transaction_type_id: trxns_id='||l_mmt_rec.transaction_id);
1402: END IF;
1403: END IF; -- IF l_mmt_rec.transaction_type_id = l_trxn_type THEN
1404:
1405: i := i + 1;

Line 1412: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN

1408:
1409: -- actual qty is reduced by the amount requested less what couldn't be reduced
1410: x_actual_qty := p_material_detail_rec.actual_qty - l_total_decr_qty;
1411:
1412: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1413: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' total decremented='||l_total_decr_qty);
1414: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new actual='||x_actual_qty);
1415: END IF;
1416:

Line 1413: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' total decremented='||l_total_decr_qty);

1409: -- actual qty is reduced by the amount requested less what couldn't be reduced
1410: x_actual_qty := p_material_detail_rec.actual_qty - l_total_decr_qty;
1411:
1412: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1413: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' total decremented='||l_total_decr_qty);
1414: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new actual='||x_actual_qty);
1415: END IF;
1416:
1417: -- raise exception if couldn't reduce by requested

Line 1414: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new actual='||x_actual_qty);

1410: x_actual_qty := p_material_detail_rec.actual_qty - l_total_decr_qty;
1411:
1412: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1413: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' total decremented='||l_total_decr_qty);
1414: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new actual='||x_actual_qty);
1415: END IF;
1416:
1417: -- raise exception if couldn't reduce by requested
1418: IF l_total_decr_qty < p_qty THEN

Line 1430: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

1426: ,x_exception_material_tbl => x_exception_material_tbl
1427: ,x_return_status => x_return_status);
1428: END IF;
1429:
1430: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1431: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' with return status= '||x_return_status);
1432: END IF;
1433:
1434: EXCEPTION

Line 1431: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' with return status= '||x_return_status);

1427: ,x_return_status => x_return_status);
1428: END IF;
1429:
1430: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1431: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' with return status= '||x_return_status);
1432: END IF;
1433:
1434: EXCEPTION
1435: WHEN error_get_trans OR error_get_lot OR error_trans OR inv_negative THEN

Line 1439: IF g_debug <= gme_debug.g_log_procedure THEN

1435: WHEN error_get_trans OR error_get_lot OR error_trans OR inv_negative THEN
1436: NULL;
1437: WHEN OTHERS THEN
1438: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1439: IF g_debug <= gme_debug.g_log_procedure THEN
1440: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
1441: END IF;
1442: x_return_status := FND_API.g_ret_sts_unexp_error;
1443: END revert_material_partial;

Line 1440: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

1436: NULL;
1437: WHEN OTHERS THEN
1438: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1439: IF g_debug <= gme_debug.g_log_procedure THEN
1440: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
1441: END IF;
1442: x_return_status := FND_API.g_ret_sts_unexp_error;
1443: END revert_material_partial;
1444:

Line 1473: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

1469: --Bug#5111078
1470: error_inv_action_lab EXCEPTION;
1471:
1472: BEGIN
1473: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1474: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1475: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
1476: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
1477: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_adjust_cmplt='||p_adjust_cmplt);

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

1470: error_inv_action_lab EXCEPTION;
1471:
1472: BEGIN
1473: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1474: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1475: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
1476: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
1477: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_adjust_cmplt='||p_adjust_cmplt);
1478: END IF;

Line 1475: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);

1471:
1472: BEGIN
1473: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1474: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1475: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
1476: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
1477: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_adjust_cmplt='||p_adjust_cmplt);
1478: END IF;
1479:

Line 1476: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);

1472: BEGIN
1473: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1474: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1475: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
1476: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
1477: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_adjust_cmplt='||p_adjust_cmplt);
1478: END IF;
1479:
1480: -- Set the return status to success initially

Line 1477: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_adjust_cmplt='||p_adjust_cmplt);

1473: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1474: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1475: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
1476: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batch_id='||p_batch_header_rec.batch_id);
1477: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_adjust_cmplt='||p_adjust_cmplt);
1478: END IF;
1479:
1480: -- Set the return status to success initially
1481: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1533: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

1529: IF NVL(l_step_status, 0) = gme_common_pvt.g_step_cancelled THEN
1530: RAISE error_step_cancelled;
1531: END IF;
1532:
1533: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1534: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
1535: END IF;
1536:
1537: EXCEPTION

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

1530: RAISE error_step_cancelled;
1531: END IF;
1532:
1533: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1534: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
1535: END IF;
1536:
1537: EXCEPTION
1538: WHEN ERROR_INV_ACTION_FPO THEN

Line 1568: IF g_debug <= gme_debug.g_log_procedure THEN

1564: x_return_status := FND_API.G_RET_STS_ERROR;
1565: gme_common_pvt.log_message('PM_INVALID_PHANTOM_ACTION');
1566: WHEN OTHERS THEN
1567: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1568: IF g_debug <= gme_debug.g_log_procedure THEN
1569: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
1570: END IF;
1571: x_return_status := FND_API.g_ret_sts_unexp_error;
1572: END validate_material_for_IB;

Line 1569: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

1565: gme_common_pvt.log_message('PM_INVALID_PHANTOM_ACTION');
1566: WHEN OTHERS THEN
1567: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1568: IF g_debug <= gme_debug.g_log_procedure THEN
1569: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
1570: END IF;
1571: x_return_status := FND_API.g_ret_sts_unexp_error;
1572: END validate_material_for_IB;
1573:

Line 1584: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

1580: ERROR_INV_INCR_TYPE EXCEPTION;
1581: ERROR_QTY_CANT_BE_ZERO EXCEPTION;
1582: ERROR_QTY_CREATE_NEG_ACTUAL EXCEPTION;
1583: BEGIN
1584: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1585: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1586: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
1587: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1588: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_actual_qty='||p_actual_qty);

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

1581: ERROR_QTY_CANT_BE_ZERO EXCEPTION;
1582: ERROR_QTY_CREATE_NEG_ACTUAL EXCEPTION;
1583: BEGIN
1584: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1585: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1586: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
1587: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1588: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_actual_qty='||p_actual_qty);
1589: END IF;

Line 1586: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);

1582: ERROR_QTY_CREATE_NEG_ACTUAL EXCEPTION;
1583: BEGIN
1584: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1585: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1586: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
1587: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1588: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_actual_qty='||p_actual_qty);
1589: END IF;
1590:

Line 1587: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);

1583: BEGIN
1584: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1585: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1586: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
1587: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1588: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_actual_qty='||p_actual_qty);
1589: END IF;
1590:
1591: -- Set the return status to success initially

Line 1588: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_actual_qty='||p_actual_qty);

1584: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1585: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1586: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty_type='||p_qty_type);
1587: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1588: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_actual_qty='||p_actual_qty);
1589: END IF;
1590:
1591: -- Set the return status to success initially
1592: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1623: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

1619: RAISE ERROR_QTY_CREATE_NEG_ACTUAL;
1620: END IF;
1621: END IF;
1622:
1623: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1624: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
1625: END IF;
1626:
1627: EXCEPTION

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

1620: END IF;
1621: END IF;
1622:
1623: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1624: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
1625: END IF;
1626:
1627: EXCEPTION
1628: WHEN ERROR_INV_INCR_TYPE THEN

Line 1639: IF g_debug <= gme_debug.g_log_procedure THEN

1635: x_return_status := FND_API.G_RET_STS_ERROR;
1636: gme_common_pvt.log_message( 'GME_API_QTY_CANT_BE_ZERO');
1637: WHEN OTHERS THEN
1638: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1639: IF g_debug <= gme_debug.g_log_procedure THEN
1640: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
1641: END IF;
1642: x_return_status := FND_API.g_ret_sts_unexp_error;
1643: END validate_qty_for_IB;

Line 1640: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

1636: gme_common_pvt.log_message( 'GME_API_QTY_CANT_BE_ZERO');
1637: WHEN OTHERS THEN
1638: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1639: IF g_debug <= gme_debug.g_log_procedure THEN
1640: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
1641: END IF;
1642: x_return_status := FND_API.g_ret_sts_unexp_error;
1643: END validate_qty_for_IB;
1644:

Line 1660: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

1656:
1657: um_convert_error EXCEPTION;
1658:
1659: BEGIN
1660: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1661: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1662: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_item_id='||p_item_id);
1663: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_number='||p_lot_number);
1664: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);

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

1657: um_convert_error EXCEPTION;
1658:
1659: BEGIN
1660: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1661: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1662: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_item_id='||p_item_id);
1663: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_number='||p_lot_number);
1664: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1665: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_from_um='||p_from_um);

Line 1662: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_item_id='||p_item_id);

1658:
1659: BEGIN
1660: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1661: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1662: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_item_id='||p_item_id);
1663: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_number='||p_lot_number);
1664: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1665: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_from_um='||p_from_um);
1666: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_to_um='||p_to_um);

Line 1663: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_number='||p_lot_number);

1659: BEGIN
1660: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1661: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1662: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_item_id='||p_item_id);
1663: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_number='||p_lot_number);
1664: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1665: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_from_um='||p_from_um);
1666: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_to_um='||p_to_um);
1667: END IF;

Line 1664: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);

1660: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1661: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1662: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_item_id='||p_item_id);
1663: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_number='||p_lot_number);
1664: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1665: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_from_um='||p_from_um);
1666: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_to_um='||p_to_um);
1667: END IF;
1668:

Line 1665: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_from_um='||p_from_um);

1661: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1662: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_item_id='||p_item_id);
1663: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_number='||p_lot_number);
1664: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1665: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_from_um='||p_from_um);
1666: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_to_um='||p_to_um);
1667: END IF;
1668:
1669: /* Set the return status to success initially */

Line 1666: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_to_um='||p_to_um);

1662: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_item_id='||p_item_id);
1663: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_lot_number='||p_lot_number);
1664: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_qty='||p_qty);
1665: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_from_um='||p_from_um);
1666: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_to_um='||p_to_um);
1667: END IF;
1668:
1669: /* Set the return status to success initially */
1670: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

1671:
1672: IF p_to_um = p_from_um THEN
1673: x_conv_qty := p_qty;
1674: ELSE
1675: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1676: gme_debug.put_line
1677: ( g_pkg_name
1678: || '.'
1679: || l_api_name

Line 1676: gme_debug.put_line

1672: IF p_to_um = p_from_um THEN
1673: x_conv_qty := p_qty;
1674: ELSE
1675: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1676: gme_debug.put_line
1677: ( g_pkg_name
1678: || '.'
1679: || l_api_name
1680: || ' before call to inv_convert.inv_um_convert');

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

1692: ,to_name => NULL);
1693:
1694: -- Note: -99999 should be in gme_common_pvt
1695: IF x_conv_qty = -99999 THEN
1696: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1697: gme_debug.put_line
1698: ( g_pkg_name
1699: || '.'
1700: || l_api_name

Line 1697: gme_debug.put_line

1693:
1694: -- Note: -99999 should be in gme_common_pvt
1695: IF x_conv_qty = -99999 THEN
1696: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1697: gme_debug.put_line
1698: ( g_pkg_name
1699: || '.'
1700: || l_api_name
1701: || ' inv_convert.inv_um_convert returned error');

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

1704: RAISE um_convert_error;
1705: END IF;
1706: END IF; -- IF p_to_um = p_from_um THEN
1707:
1708: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1709: gme_debug.put_line
1710: ( g_pkg_name
1711: || '.'
1712: || l_api_name

Line 1709: gme_debug.put_line

1705: END IF;
1706: END IF; -- IF p_to_um = p_from_um THEN
1707:
1708: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1709: gme_debug.put_line
1710: ( g_pkg_name
1711: || '.'
1712: || l_api_name
1713: || ' converted qty = '||x_conv_qty);

Line 1716: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

1712: || l_api_name
1713: || ' converted qty = '||x_conv_qty);
1714: END IF;
1715:
1716: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1717: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
1718: END IF;
1719: EXCEPTION
1720: WHEN um_convert_error THEN

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

1713: || ' converted qty = '||x_conv_qty);
1714: END IF;
1715:
1716: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
1717: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
1718: END IF;
1719: EXCEPTION
1720: WHEN um_convert_error THEN
1721: FND_MESSAGE.SET_NAME('INV','INV_NO_CONVERSION_ERR');

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

1724: x_return_status := fnd_api.g_ret_sts_error;
1725: WHEN OTHERS THEN
1726: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1727:
1728: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1729: gme_debug.put_line ( 'Unexpected error: '
1730: || g_pkg_name
1731: || '.'
1732: || l_api_name

Line 1729: gme_debug.put_line ( 'Unexpected error: '

1725: WHEN OTHERS THEN
1726: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1727:
1728: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1729: gme_debug.put_line ( 'Unexpected error: '
1730: || g_pkg_name
1731: || '.'
1732: || l_api_name
1733: || ': '