DBA Data[Home] [Help]

APPS.GMF_VIB dependencies on GME_DEBUG

Line 77: IF g_debug <= gme_debug.g_log_procedure THEN

73: l_api_name VARCHAR2(30) := 'Create_Batch_Requirements';
74: BEGIN
75: x_return_status := FND_API.G_RET_STS_SUCCESS ;
76:
77: IF g_debug <= gme_debug.g_log_procedure THEN
78: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
79: END IF;
80:
81: -- Check if the Batch requirements already exist

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

74: BEGIN
75: x_return_status := FND_API.G_RET_STS_SUCCESS ;
76:
77: IF g_debug <= gme_debug.g_log_procedure THEN
78: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
79: END IF;
80:
81: -- Check if the Batch requirements already exist
82: BEGIN

Line 99: IF g_debug <= gme_debug.g_log_procedure THEN

95: RETURN;
96: END IF;
97: END;
98:
99: IF g_debug <= gme_debug.g_log_procedure THEN
100: gme_debug.put_line ('calling Create_Temp_Batch_Requirements');
101: END IF;
102:
103: Create_Temp_Batch_Requirements (

Line 100: gme_debug.put_line ('calling Create_Temp_Batch_Requirements');

96: END IF;
97: END;
98:
99: IF g_debug <= gme_debug.g_log_procedure THEN
100: gme_debug.put_line ('calling Create_Temp_Batch_Requirements');
101: END IF;
102:
103: Create_Temp_Batch_Requirements (
104: p_api_version,

Line 111: IF g_debug <= gme_debug.g_log_procedure THEN

107: x_return_status,
108: x_msg_count,
109: x_msg_data);
110:
111: IF g_debug <= gme_debug.g_log_procedure THEN
112: gme_debug.put_line ('after Create_Temp_Batch_Requirements status/msg: ' || x_return_status ||'/'||x_msg_data);
113: END IF;
114:
115:

Line 112: gme_debug.put_line ('after Create_Temp_Batch_Requirements status/msg: ' || x_return_status ||'/'||x_msg_data);

108: x_msg_count,
109: x_msg_data);
110:
111: IF g_debug <= gme_debug.g_log_procedure THEN
112: gme_debug.put_line ('after Create_Temp_Batch_Requirements status/msg: ' || x_return_status ||'/'||x_msg_data);
113: END IF;
114:
115:
116: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

Line 119: IF g_debug <= gme_debug.g_log_statement THEN

115:
116: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
117:
118: -- Copy the temp table to the actual table
119: IF g_debug <= gme_debug.g_log_statement THEN
120: gme_debug.put_line ('inserting into req table from gtmp table');
121: END IF;
122:
123: INSERT INTO gmf_batch_requirements(

Line 120: gme_debug.put_line ('inserting into req table from gtmp table');

116: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
117:
118: -- Copy the temp table to the actual table
119: IF g_debug <= gme_debug.g_log_statement THEN
120: gme_debug.put_line ('inserting into req table from gtmp table');
121: END IF;
122:
123: INSERT INTO gmf_batch_requirements(
124: vib_id,

Line 166: IF g_debug <= gme_debug.g_log_statement THEN

162: vib_profile_value
163: FROM gmf_batch_requirements_gtmp
164: WHERE batch_id = p_batch_id;
165:
166: IF g_debug <= gme_debug.g_log_statement THEN
167: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
168: END IF;
169: END IF;
170:

Line 167: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');

163: FROM gmf_batch_requirements_gtmp
164: WHERE batch_id = p_batch_id;
165:
166: IF g_debug <= gme_debug.g_log_statement THEN
167: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
168: END IF;
169: END IF;
170:
171: IF g_debug <= gme_debug.g_log_procedure THEN

Line 171: IF g_debug <= gme_debug.g_log_procedure THEN

167: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
168: END IF;
169: END IF;
170:
171: IF g_debug <= gme_debug.g_log_procedure THEN
172: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
173: END IF;
174:
175: EXCEPTION

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

168: END IF;
169: END IF;
170:
171: IF g_debug <= gme_debug.g_log_procedure THEN
172: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
173: END IF;
174:
175: EXCEPTION
176: WHEN OTHERS THEN

Line 177: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);

173: END IF;
174:
175: EXCEPTION
176: WHEN OTHERS THEN
177: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
178: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
179: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
180: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
181: FND_MSG_PUB.Add;

Line 221: IF g_debug <= gme_debug.g_log_procedure THEN

217: BEGIN
218:
219: x_return_status := FND_API.G_RET_STS_SUCCESS ;
220:
221: IF g_debug <= gme_debug.g_log_procedure THEN
222: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
223: END IF;
224:
225: IF g_debug <= gme_debug.g_log_procedure THEN

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

218:
219: x_return_status := FND_API.G_RET_STS_SUCCESS ;
220:
221: IF g_debug <= gme_debug.g_log_procedure THEN
222: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
223: END IF;
224:
225: IF g_debug <= gme_debug.g_log_procedure THEN
226: gme_debug.put_line ('calling Create_Temp_Batch_Requirements');

Line 225: IF g_debug <= gme_debug.g_log_procedure THEN

221: IF g_debug <= gme_debug.g_log_procedure THEN
222: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
223: END IF;
224:
225: IF g_debug <= gme_debug.g_log_procedure THEN
226: gme_debug.put_line ('calling Create_Temp_Batch_Requirements');
227: END IF;
228:
229: Create_Temp_Batch_Requirements (

Line 226: gme_debug.put_line ('calling Create_Temp_Batch_Requirements');

222: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
223: END IF;
224:
225: IF g_debug <= gme_debug.g_log_procedure THEN
226: gme_debug.put_line ('calling Create_Temp_Batch_Requirements');
227: END IF;
228:
229: Create_Temp_Batch_Requirements (
230: p_api_version,

Line 237: IF g_debug <= gme_debug.g_log_procedure THEN

233: x_return_status,
234: x_msg_count,
235: x_msg_data);
236:
237: IF g_debug <= gme_debug.g_log_procedure THEN
238: gme_debug.put_line ('after Create_Temp_Batch_Requirements status/msg: ' || x_return_status ||'/'||x_msg_data);
239: END IF;
240:
241: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

Line 238: gme_debug.put_line ('after Create_Temp_Batch_Requirements status/msg: ' || x_return_status ||'/'||x_msg_data);

234: x_msg_count,
235: x_msg_data);
236:
237: IF g_debug <= gme_debug.g_log_procedure THEN
238: gme_debug.put_line ('after Create_Temp_Batch_Requirements status/msg: ' || x_return_status ||'/'||x_msg_data);
239: END IF;
240:
241: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
242:

Line 249: IF g_debug <= gme_debug.g_log_statement THEN

245: WHERE
246: batch_id = p_batch_id;
247:
248:
249: IF g_debug <= gme_debug.g_log_statement THEN
250: gme_debug.put_line ('inserting into req table from gtmp');
251: END IF;
252:
253: INSERT INTO gmf_batch_requirements(

Line 250: gme_debug.put_line ('inserting into req table from gtmp');

246: batch_id = p_batch_id;
247:
248:
249: IF g_debug <= gme_debug.g_log_statement THEN
250: gme_debug.put_line ('inserting into req table from gtmp');
251: END IF;
252:
253: INSERT INTO gmf_batch_requirements(
254: vib_id,

Line 295: IF g_debug <= gme_debug.g_log_statement THEN

291: organization_id,
292: vib_profile_value
293: FROM gmf_batch_requirements_gtmp;
294:
295: IF g_debug <= gme_debug.g_log_statement THEN
296: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
297: END IF;
298: END IF;
299:

Line 296: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');

292: vib_profile_value
293: FROM gmf_batch_requirements_gtmp;
294:
295: IF g_debug <= gme_debug.g_log_statement THEN
296: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
297: END IF;
298: END IF;
299:
300: IF g_debug <= gme_debug.g_log_procedure THEN

Line 300: IF g_debug <= gme_debug.g_log_procedure THEN

296: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
297: END IF;
298: END IF;
299:
300: IF g_debug <= gme_debug.g_log_procedure THEN
301: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
302: END IF;
303:
304: EXCEPTION

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

297: END IF;
298: END IF;
299:
300: IF g_debug <= gme_debug.g_log_procedure THEN
301: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
302: END IF;
303:
304: EXCEPTION
305: WHEN OTHERS THEN

Line 306: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);

302: END IF;
303:
304: EXCEPTION
305: WHEN OTHERS THEN
306: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
307: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
308: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
309: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
310: FND_MSG_PUB.Add;

Line 349: IF g_debug <= gme_debug.g_log_procedure THEN

345: l_api_name VARCHAR2(30) := 'Delete_Batch_Requirements';
346: BEGIN
347: x_return_status := FND_API.G_RET_STS_SUCCESS ;
348:
349: IF g_debug <= gme_debug.g_log_procedure THEN
350: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
351: END IF;
352:
353: -- Validate batch_id

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

346: BEGIN
347: x_return_status := FND_API.G_RET_STS_SUCCESS ;
348:
349: IF g_debug <= gme_debug.g_log_procedure THEN
350: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
351: END IF;
352:
353: -- Validate batch_id
354: BEGIN

Line 375: IF g_debug <= gme_debug.g_log_statement THEN

371: FND_MSG_PUB.Add;
372: RAISE;
373: END;
374:
375: IF g_debug <= gme_debug.g_log_statement THEN
376: gme_debug.put_line ('deleting batch reqs');
377: END IF;
378:
379: UPDATE gmf_batch_requirements

Line 376: gme_debug.put_line ('deleting batch reqs');

372: RAISE;
373: END;
374:
375: IF g_debug <= gme_debug.g_log_statement THEN
376: gme_debug.put_line ('deleting batch reqs');
377: END IF;
378:
379: UPDATE gmf_batch_requirements
380: SET delete_mark = 1

Line 385: IF g_debug <= gme_debug.g_log_statement THEN

381: WHERE
382: batch_id = p_batch_id AND
383: delete_mark = 0;
384:
385: IF g_debug <= gme_debug.g_log_statement THEN
386: gme_debug.put_line (sql%ROWCOUNT || ' rows deleted');
387: END IF;
388:
389: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 386: gme_debug.put_line (sql%ROWCOUNT || ' rows deleted');

382: batch_id = p_batch_id AND
383: delete_mark = 0;
384:
385: IF g_debug <= gme_debug.g_log_statement THEN
386: gme_debug.put_line (sql%ROWCOUNT || ' rows deleted');
387: END IF;
388:
389: x_return_status := FND_API.G_RET_STS_SUCCESS;
390:

Line 391: IF g_debug <= gme_debug.g_log_procedure THEN

387: END IF;
388:
389: x_return_status := FND_API.G_RET_STS_SUCCESS;
390:
391: IF g_debug <= gme_debug.g_log_procedure THEN
392: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
393: END IF;
394:
395: EXCEPTION

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

388:
389: x_return_status := FND_API.G_RET_STS_SUCCESS;
390:
391: IF g_debug <= gme_debug.g_log_procedure THEN
392: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
393: END IF;
394:
395: EXCEPTION
396: WHEN OTHERS THEN

Line 397: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);

393: END IF;
394:
395: EXCEPTION
396: WHEN OTHERS THEN
397: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
398: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
399: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
400: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
401: FND_MSG_PUB.Add;

Line 485: IF g_debug <= gme_debug.g_log_procedure THEN

481: l_api_name VARCHAR2(30) := 'Create_Temp_Batch_Requirements';
482: BEGIN
483: x_return_status := FND_API.G_RET_STS_SUCCESS ;
484:
485: IF g_debug <= gme_debug.g_log_procedure THEN
486: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
487: END IF;
488:
489: -- Validate batch_id

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

482: BEGIN
483: x_return_status := FND_API.G_RET_STS_SUCCESS ;
484:
485: IF g_debug <= gme_debug.g_log_procedure THEN
486: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
487: END IF;
488:
489: -- Validate batch_id
490: BEGIN

Line 545: gme_debug.put_line ('profiles. step_dep: ' || l_use_item_step_dep || ' vib: ' || l_vib_profile_value);

541: IF (l_vib_profile_value IS NULL) THEN
542: l_vib_profile_value := 'N';
543: END IF;
544:
545: gme_debug.put_line ('profiles. step_dep: ' || l_use_item_step_dep || ' vib: ' || l_vib_profile_value);
546:
547: -- Delete the temp table first
548: DELETE from gmf_batch_requirements_gtmp;
549:

Line 551: IF g_debug <= gme_debug.g_log_statement THEN

547: -- Delete the temp table first
548: DELETE from gmf_batch_requirements_gtmp;
549:
550: -- Get all products and step association
551: IF g_debug <= gme_debug.g_log_statement THEN
552: gme_debug.put_line ('Get all products and step association');
553: END IF;
554:
555: IF l_use_item_step_dep = 'Y' THEN

Line 552: gme_debug.put_line ('Get all products and step association');

548: DELETE from gmf_batch_requirements_gtmp;
549:
550: -- Get all products and step association
551: IF g_debug <= gme_debug.g_log_statement THEN
552: gme_debug.put_line ('Get all products and step association');
553: END IF;
554:
555: IF l_use_item_step_dep = 'Y' THEN
556:

Line 664: IF g_debug <= gme_debug.g_log_statement THEN

660: END LOOP;
661: END IF;
662:
663: -- Now insert any remaining ing/res which was not used for any product
664: IF g_debug <= gme_debug.g_log_statement THEN
665: gme_debug.put_line ('Now insert any remaining ingredients which was not used for any product...');
666: END IF;
667:
668: INSERT INTO gmf_batch_requirements_gtmp(

Line 665: gme_debug.put_line ('Now insert any remaining ingredients which was not used for any product...');

661: END IF;
662:
663: -- Now insert any remaining ing/res which was not used for any product
664: IF g_debug <= gme_debug.g_log_statement THEN
665: gme_debug.put_line ('Now insert any remaining ingredients which was not used for any product...');
666: END IF;
667:
668: INSERT INTO gmf_batch_requirements_gtmp(
669: vib_id,

Line 723: IF g_debug <= gme_debug.g_log_statement THEN

719: FROM gmf_batch_requirements_gtmp f
720: WHERE
721: batch_id = p_batch_id );
722:
723: IF g_debug <= gme_debug.g_log_statement THEN
724: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
725: gme_debug.put_line ('Now insert any remaining resources which was not used for any product...');
726: END IF;
727:

Line 724: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');

720: WHERE
721: batch_id = p_batch_id );
722:
723: IF g_debug <= gme_debug.g_log_statement THEN
724: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
725: gme_debug.put_line ('Now insert any remaining resources which was not used for any product...');
726: END IF;
727:
728: /* Bug 13442362 13367279 Added gme_batch_steps and joins so that index on gme_batch_step_resources is used */

Line 725: gme_debug.put_line ('Now insert any remaining resources which was not used for any product...');

721: batch_id = p_batch_id );
722:
723: IF g_debug <= gme_debug.g_log_statement THEN
724: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
725: gme_debug.put_line ('Now insert any remaining resources which was not used for any product...');
726: END IF;
727:
728: /* Bug 13442362 13367279 Added gme_batch_steps and joins so that index on gme_batch_step_resources is used */
729:

Line 785: IF g_debug <= gme_debug.g_log_statement THEN

781: FROM gmf_batch_requirements_gtmp f
782: WHERE
783: batch_id = p_batch_id );
784:
785: IF g_debug <= gme_debug.g_log_statement THEN
786: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
787: END IF;
788:
789: -- Now insert any product that may have been missed out

Line 786: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');

782: WHERE
783: batch_id = p_batch_id );
784:
785: IF g_debug <= gme_debug.g_log_statement THEN
786: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
787: END IF;
788:
789: -- Now insert any product that may have been missed out
790: IF g_debug <= gme_debug.g_log_statement THEN

Line 790: IF g_debug <= gme_debug.g_log_statement THEN

786: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
787: END IF;
788:
789: -- Now insert any product that may have been missed out
790: IF g_debug <= gme_debug.g_log_statement THEN
791: gme_debug.put_line ('Now insert any product that may have been missed out...');
792: END IF;
793:
794: INSERT INTO gmf_batch_requirements_gtmp(

Line 791: gme_debug.put_line ('Now insert any product that may have been missed out...');

787: END IF;
788:
789: -- Now insert any product that may have been missed out
790: IF g_debug <= gme_debug.g_log_statement THEN
791: gme_debug.put_line ('Now insert any product that may have been missed out...');
792: END IF;
793:
794: INSERT INTO gmf_batch_requirements_gtmp(
795: vib_id,

Line 848: IF g_debug <= gme_debug.g_log_statement THEN

844: SELECT prod_material_detail_id
845: FROM gmf_batch_requirements_gtmp f
846: WHERE
847: batch_id = p_batch_id );
848: IF g_debug <= gme_debug.g_log_statement THEN
849: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
850: END IF;
851:
852: IF g_debug <= gme_debug.g_log_statement THEN

Line 849: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');

845: FROM gmf_batch_requirements_gtmp f
846: WHERE
847: batch_id = p_batch_id );
848: IF g_debug <= gme_debug.g_log_statement THEN
849: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
850: END IF;
851:
852: IF g_debug <= gme_debug.g_log_statement THEN
853: gme_debug.put_line ('inserting remaining resources');

Line 852: IF g_debug <= gme_debug.g_log_statement THEN

848: IF g_debug <= gme_debug.g_log_statement THEN
849: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
850: END IF;
851:
852: IF g_debug <= gme_debug.g_log_statement THEN
853: gme_debug.put_line ('inserting remaining resources');
854: END IF;
855:
856: /* Bug 13442362 13367279 Added gme_batch_steps and joins so that index on gme_batch_step_resources is used */

Line 853: gme_debug.put_line ('inserting remaining resources');

849: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
850: END IF;
851:
852: IF g_debug <= gme_debug.g_log_statement THEN
853: gme_debug.put_line ('inserting remaining resources');
854: END IF;
855:
856: /* Bug 13442362 13367279 Added gme_batch_steps and joins so that index on gme_batch_step_resources is used */
857:

Line 913: IF g_debug <= gme_debug.g_log_statement THEN

909: FROM gmf_batch_requirements_gtmp f
910: WHERE
911: batch_id = p_batch_id );
912:
913: IF g_debug <= gme_debug.g_log_statement THEN
914: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
915: END IF;
916:
917:

Line 914: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');

910: WHERE
911: batch_id = p_batch_id );
912:
913: IF g_debug <= gme_debug.g_log_statement THEN
914: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
915: END IF;
916:
917:
918: -- Now update the derived cost alloc and required doc qty

Line 919: IF g_debug <= gme_debug.g_log_statement THEN

915: END IF;
916:
917:
918: -- Now update the derived cost alloc and required doc qty
919: IF g_debug <= gme_debug.g_log_statement THEN
920: gme_debug.put_line ('Now updating the derived cost alloc and required doc qty ...');
921: END IF;
922:
923: FOR i IN c_total_prod_alloc(p_batch_id) LOOP

Line 920: gme_debug.put_line ('Now updating the derived cost alloc and required doc qty ...');

916:
917:
918: -- Now update the derived cost alloc and required doc qty
919: IF g_debug <= gme_debug.g_log_statement THEN
920: gme_debug.put_line ('Now updating the derived cost alloc and required doc qty ...');
921: END IF;
922:
923: FOR i IN c_total_prod_alloc(p_batch_id) LOOP
924: BEGIN

Line 942: IF g_debug <= gme_debug.g_log_statement THEN

938: RAISE;
939: END;
940: END LOOP;
941:
942: IF g_debug <= gme_debug.g_log_statement THEN
943: gme_debug.put_line ('Done updating the derived cost alloc and required doc qty ...');
944: END IF;
945:
946: x_return_status := FND_API.G_RET_STS_SUCCESS ;

Line 943: gme_debug.put_line ('Done updating the derived cost alloc and required doc qty ...');

939: END;
940: END LOOP;
941:
942: IF g_debug <= gme_debug.g_log_statement THEN
943: gme_debug.put_line ('Done updating the derived cost alloc and required doc qty ...');
944: END IF;
945:
946: x_return_status := FND_API.G_RET_STS_SUCCESS ;
947:

Line 948: IF g_debug <= gme_debug.g_log_procedure THEN

944: END IF;
945:
946: x_return_status := FND_API.G_RET_STS_SUCCESS ;
947:
948: IF g_debug <= gme_debug.g_log_procedure THEN
949: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
950: END IF;
951:
952: EXCEPTION

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

945:
946: x_return_status := FND_API.G_RET_STS_SUCCESS ;
947:
948: IF g_debug <= gme_debug.g_log_procedure THEN
949: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
950: END IF;
951:
952: EXCEPTION
953: WHEN OTHERS THEN

Line 954: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);

950: END IF;
951:
952: EXCEPTION
953: WHEN OTHERS THEN
954: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
955: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
956: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
957: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
958: FND_MSG_PUB.Add;

Line 1165: IF g_debug <= gme_debug.g_log_procedure THEN

1161:
1162: BEGIN
1163: x_return_status := FND_API.G_RET_STS_SUCCESS ;
1164:
1165: IF g_debug <= gme_debug.g_log_procedure THEN
1166: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
1167: END IF;
1168:
1169: -- Validate that the VIB details do not exist already

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

1162: BEGIN
1163: x_return_status := FND_API.G_RET_STS_SUCCESS ;
1164:
1165: IF g_debug <= gme_debug.g_log_procedure THEN
1166: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
1167: END IF;
1168:
1169: -- Validate that the VIB details do not exist already
1170: SELECT count(*)

Line 1190: gme_debug.put_line ('Profile...Use VIB = '||l_use_vib);

1186: IF l_use_vib IS NULL THEN
1187: l_use_vib := 'N';
1188: END IF;
1189:
1190: gme_debug.put_line ('Profile...Use VIB = '||l_use_vib);
1191:
1192:
1193: -- If this is a product reversal, reverse the VIB layers.
1194: IF p_tran_rec.primary_quantity < 0 and p_tran_rec.reverse_id IS NOT NULL THEN

Line 1196: IF g_debug <= gme_debug.g_log_procedure THEN

1192:
1193: -- If this is a product reversal, reverse the VIB layers.
1194: IF p_tran_rec.primary_quantity < 0 and p_tran_rec.reverse_id IS NOT NULL THEN
1195:
1196: IF g_debug <= gme_debug.g_log_procedure THEN
1197: gme_debug.put_line ('product reversal, reverse the VIB layers');
1198: END IF;
1199:
1200: IF g_debug <= gme_debug.g_log_procedure THEN

Line 1197: gme_debug.put_line ('product reversal, reverse the VIB layers');

1193: -- If this is a product reversal, reverse the VIB layers.
1194: IF p_tran_rec.primary_quantity < 0 and p_tran_rec.reverse_id IS NOT NULL THEN
1195:
1196: IF g_debug <= gme_debug.g_log_procedure THEN
1197: gme_debug.put_line ('product reversal, reverse the VIB layers');
1198: END IF;
1199:
1200: IF g_debug <= gme_debug.g_log_procedure THEN
1201: gme_debug.put_line ('now reversing material vib layers');

Line 1200: IF g_debug <= gme_debug.g_log_procedure THEN

1196: IF g_debug <= gme_debug.g_log_procedure THEN
1197: gme_debug.put_line ('product reversal, reverse the VIB layers');
1198: END IF;
1199:
1200: IF g_debug <= gme_debug.g_log_procedure THEN
1201: gme_debug.put_line ('now reversing material vib layers');
1202: END IF;
1203:
1204: FOR v IN c_orig_mtl_vib LOOP

Line 1201: gme_debug.put_line ('now reversing material vib layers');

1197: gme_debug.put_line ('product reversal, reverse the VIB layers');
1198: END IF;
1199:
1200: IF g_debug <= gme_debug.g_log_procedure THEN
1201: gme_debug.put_line ('now reversing material vib layers');
1202: END IF;
1203:
1204: FOR v IN c_orig_mtl_vib LOOP
1205: BEGIN

Line 1223: IF g_debug <= gme_debug.g_log_statement THEN

1219: vib.requirement_id = r.requirement_id AND
1220: vib.consume_layer_id = v.c_layer_id;
1221:
1222: IF l_count > 0 THEN
1223: IF g_debug <= gme_debug.g_log_statement THEN
1224: gme_debug.put_line ('No VIB, the ingredient reversals may already have ' ||
1225: 'been consumed by a previous prod yield. do not reverse anymore.');
1226: END IF;
1227:

Line 1224: gme_debug.put_line ('No VIB, the ingredient reversals may already have ' ||

1220: vib.consume_layer_id = v.c_layer_id;
1221:
1222: IF l_count > 0 THEN
1223: IF g_debug <= gme_debug.g_log_statement THEN
1224: gme_debug.put_line ('No VIB, the ingredient reversals may already have ' ||
1225: 'been consumed by a previous prod yield. do not reverse anymore.');
1226: END IF;
1227:
1228: RAISE e_invalid_mtl_reversal;

Line 1277: IF g_debug <= gme_debug.g_log_procedure THEN

1273: NULL; -- Skip to next row
1274: END;
1275: END LOOP;
1276:
1277: IF g_debug <= gme_debug.g_log_procedure THEN
1278: gme_debug.put_line ('now reversing resource vib layers');
1279: END IF;
1280:
1281: FOR v IN c_orig_rsrc_vib LOOP

Line 1278: gme_debug.put_line ('now reversing resource vib layers');

1274: END;
1275: END LOOP;
1276:
1277: IF g_debug <= gme_debug.g_log_procedure THEN
1278: gme_debug.put_line ('now reversing resource vib layers');
1279: END IF;
1280:
1281: FOR v IN c_orig_rsrc_vib LOOP
1282: BEGIN

Line 1300: IF g_debug <= gme_debug.g_log_statement THEN

1296: vib.requirement_id = r.requirement_id AND
1297: vib.consume_layer_id = v.c_layer_id;
1298:
1299: IF l_count > 0 THEN
1300: IF g_debug <= gme_debug.g_log_statement THEN
1301: gme_debug.put_line ('No VIB, the resource reversals may already have ' ||
1302: 'been consumed by a previous prod yield. do not reverse anymore.');
1303: END IF;
1304:

Line 1301: gme_debug.put_line ('No VIB, the resource reversals may already have ' ||

1297: vib.consume_layer_id = v.c_layer_id;
1298:
1299: IF l_count > 0 THEN
1300: IF g_debug <= gme_debug.g_log_statement THEN
1301: gme_debug.put_line ('No VIB, the resource reversals may already have ' ||
1302: 'been consumed by a previous prod yield. do not reverse anymore.');
1303: END IF;
1304:
1305: RAISE e_invalid_rsrc_reversal;

Line 1357: IF g_debug <= gme_debug.g_log_procedure THEN

1353: RETURN; -- Done with the reversal
1354: END IF;
1355:
1356: -- For regular yields follow the following logic.
1357: IF g_debug <= gme_debug.g_log_procedure THEN
1358: gme_debug.put_line ('regular product yield');
1359: END IF;
1360:
1361:

Line 1358: gme_debug.put_line ('regular product yield');

1354: END IF;
1355:
1356: -- For regular yields follow the following logic.
1357: IF g_debug <= gme_debug.g_log_procedure THEN
1358: gme_debug.put_line ('regular product yield');
1359: END IF;
1360:
1361:
1362: -- Go through the batch requirement rows for this product and insert

Line 1373: IF g_debug <= gme_debug.g_log_statement THEN

1369: IF req.ing_material_detail_id IS NOT NULL THEN
1370: -- select ingredient layers that can be consumed for the
1371: -- IB qty
1372:
1373: IF g_debug <= gme_debug.g_log_statement THEN
1374: gme_debug.put_line ('processing ingredient or by-product to create vib details');
1375: END IF;
1376:
1377: -- Loop for all layers of an ingredient PK Bug 8472152

Line 1374: gme_debug.put_line ('processing ingredient or by-product to create vib details');

1370: -- select ingredient layers that can be consumed for the
1371: -- IB qty
1372:
1373: IF g_debug <= gme_debug.g_log_statement THEN
1374: gme_debug.put_line ('processing ingredient or by-product to create vib details');
1375: END IF;
1376:
1377: -- Loop for all layers of an ingredient PK Bug 8472152
1378:

Line 1388: IF g_debug <= gme_debug.g_log_statement THEN

1384:
1385: FOR ing in c_ing_layers(req.ing_material_detail_id) LOOP
1386: BEGIN
1387: l_curr_cnt := l_curr_cnt + 1; -- Bug 8472152
1388: IF g_debug <= gme_debug.g_log_statement THEN
1389: gme_debug.put_line ('consuming ing/byProd layer. matl_dtl_id: ' || req.ing_material_detail_id ||
1390: ' consume layer_id: ' ||ing.layer_id );
1391: END IF;
1392:

Line 1389: gme_debug.put_line ('consuming ing/byProd layer. matl_dtl_id: ' || req.ing_material_detail_id ||

1385: FOR ing in c_ing_layers(req.ing_material_detail_id) LOOP
1386: BEGIN
1387: l_curr_cnt := l_curr_cnt + 1; -- Bug 8472152
1388: IF g_debug <= gme_debug.g_log_statement THEN
1389: gme_debug.put_line ('consuming ing/byProd layer. matl_dtl_id: ' || req.ing_material_detail_id ||
1390: ' consume layer_id: ' ||ing.layer_id );
1391: END IF;
1392:
1393: IF l_use_vib = 'Y' THEN

Line 1553: IF g_debug <= gme_debug.g_log_statement THEN

1549: -- IF the VIB details are for a resource
1550: IF req.batchstep_resource_id IS NOT NULL THEN
1551: -- select ingredient layers that can be consumed for the
1552: -- IB qty
1553: IF g_debug <= gme_debug.g_log_statement THEN
1554: gme_debug.put_line ('processing ingredient or by-product to create vib details');
1555: END IF;
1556:
1557: FOR rsrc IN c_rsrc_layers(req.batchstep_resource_id) LOOP

Line 1554: gme_debug.put_line ('processing ingredient or by-product to create vib details');

1550: IF req.batchstep_resource_id IS NOT NULL THEN
1551: -- select ingredient layers that can be consumed for the
1552: -- IB qty
1553: IF g_debug <= gme_debug.g_log_statement THEN
1554: gme_debug.put_line ('processing ingredient or by-product to create vib details');
1555: END IF;
1556:
1557: FOR rsrc IN c_rsrc_layers(req.batchstep_resource_id) LOOP
1558: BEGIN

Line 1715: IF g_debug <= gme_debug.g_log_statement THEN

1711:
1712: -- There is still some IB quantity not consumed, insert a NULL layer consumption.
1713: IF l_use_vib = 'Y' and l_required_ib_doc_qty <> 0 THEN
1714:
1715: IF g_debug <= gme_debug.g_log_statement THEN
1716: gme_debug.put_line ('inserting NULL consumption layer for matl_dtl_id: ' || req.ing_material_detail_id);
1717: END IF;
1718:
1719: l_consume_ib_pri_qty := 0;

Line 1716: gme_debug.put_line ('inserting NULL consumption layer for matl_dtl_id: ' || req.ing_material_detail_id);

1712: -- There is still some IB quantity not consumed, insert a NULL layer consumption.
1713: IF l_use_vib = 'Y' and l_required_ib_doc_qty <> 0 THEN
1714:
1715: IF g_debug <= gme_debug.g_log_statement THEN
1716: gme_debug.put_line ('inserting NULL consumption layer for matl_dtl_id: ' || req.ing_material_detail_id);
1717: END IF;
1718:
1719: l_consume_ib_pri_qty := 0;
1720: IF req.ing_material_detail_id IS NOT NULL THEN

Line 1810: IF g_debug <= gme_debug.g_log_procedure THEN

1806: END LOOP; -- c_batch_req
1807:
1808: x_return_status := FND_API.G_RET_STS_SUCCESS;
1809:
1810: IF g_debug <= gme_debug.g_log_procedure THEN
1811: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1812: END IF;
1813:
1814: EXCEPTION

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

1807:
1808: x_return_status := FND_API.G_RET_STS_SUCCESS;
1809:
1810: IF g_debug <= gme_debug.g_log_procedure THEN
1811: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1812: END IF;
1813:
1814: EXCEPTION
1815: WHEN OTHERS THEN

Line 1816: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);

1812: END IF;
1813:
1814: EXCEPTION
1815: WHEN OTHERS THEN
1816: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
1817: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
1818: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
1819: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
1820: FND_MSG_PUB.Add;

Line 1977: IF g_debug <= gme_debug.g_log_procedure THEN

1973:
1974: BEGIN
1975: x_return_status := FND_API.G_RET_STS_SUCCESS ;
1976:
1977: IF g_debug <= gme_debug.g_log_procedure THEN
1978: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
1979: END IF;
1980:
1981: -- Validate batch_id

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

1974: BEGIN
1975: x_return_status := FND_API.G_RET_STS_SUCCESS ;
1976:
1977: IF g_debug <= gme_debug.g_log_procedure THEN
1978: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
1979: END IF;
1980:
1981: -- Validate batch_id
1982: BEGIN

Line 2035: gme_debug.put_line ('Use VIB = ' || l_use_vib );

2031: IF l_use_vib IS NULL THEN
2032: l_use_vib := 'N';
2033: END IF;
2034:
2035: gme_debug.put_line ('Use VIB = ' || l_use_vib );
2036: IF g_debug <= gme_debug.g_log_statement THEN
2037: gme_debug.put_line ('reversing out all NULL consumptions layers, if any');
2038: END IF;
2039:

Line 2036: IF g_debug <= gme_debug.g_log_statement THEN

2032: l_use_vib := 'N';
2033: END IF;
2034:
2035: gme_debug.put_line ('Use VIB = ' || l_use_vib );
2036: IF g_debug <= gme_debug.g_log_statement THEN
2037: gme_debug.put_line ('reversing out all NULL consumptions layers, if any');
2038: END IF;
2039:
2040:

Line 2037: gme_debug.put_line ('reversing out all NULL consumptions layers, if any');

2033: END IF;
2034:
2035: gme_debug.put_line ('Use VIB = ' || l_use_vib );
2036: IF g_debug <= gme_debug.g_log_statement THEN
2037: gme_debug.put_line ('reversing out all NULL consumptions layers, if any');
2038: END IF;
2039:
2040:
2041: -- reverse out all NULL consumption layers

Line 2044: IF g_debug <= gme_debug.g_log_statement THEN

2040:
2041: -- reverse out all NULL consumption layers
2042: FOR n IN c_null_consume_layers LOOP
2043:
2044: IF g_debug <= gme_debug.g_log_statement THEN
2045: gme_debug.put_line ('NULL consumption layer found for prod layer/txn/lot: ' ||
2046: n.prod_layer_id ||'/'||n.mmt_transaction_id||'/'||n.lot_number ||
2047: ' requirement_id for NULL consumption layer: ' || n.requirement_id);
2048: END IF;

Line 2045: gme_debug.put_line ('NULL consumption layer found for prod layer/txn/lot: ' ||

2041: -- reverse out all NULL consumption layers
2042: FOR n IN c_null_consume_layers LOOP
2043:
2044: IF g_debug <= gme_debug.g_log_statement THEN
2045: gme_debug.put_line ('NULL consumption layer found for prod layer/txn/lot: ' ||
2046: n.prod_layer_id ||'/'||n.mmt_transaction_id||'/'||n.lot_number ||
2047: ' requirement_id for NULL consumption layer: ' || n.requirement_id);
2048: END IF;
2049:

Line 2131: IF g_debug <= gme_debug.g_log_procedure THEN

2127: END LOOP;
2128:
2129: -- going thru the requirement details
2130:
2131: IF g_debug <= gme_debug.g_log_procedure THEN
2132: gme_debug.put_line ('looping thru all the requirements to create finalization layers');
2133: END IF;
2134:
2135: prev_prod_material_detail_id := -99;

Line 2132: gme_debug.put_line ('looping thru all the requirements to create finalization layers');

2128:
2129: -- going thru the requirement details
2130:
2131: IF g_debug <= gme_debug.g_log_procedure THEN
2132: gme_debug.put_line ('looping thru all the requirements to create finalization layers');
2133: END IF;
2134:
2135: prev_prod_material_detail_id := -99;
2136: FOR req IN c_batch_req LOOP

Line 2139: IF g_debug <= gme_debug.g_log_statement THEN

2135: prev_prod_material_detail_id := -99;
2136: FOR req IN c_batch_req LOOP
2137: BEGIN
2138:
2139: IF g_debug <= gme_debug.g_log_statement THEN
2140: gme_debug.put_line ('Processing prod_material_detail_id: ' || req.prod_material_detail_id ||
2141: ' ing_material_detail_id/batchstep_resource_id: ' || req.ing_material_detail_id||
2142: '/'||req.batchstep_resource_id);
2143: END IF;

Line 2140: gme_debug.put_line ('Processing prod_material_detail_id: ' || req.prod_material_detail_id ||

2136: FOR req IN c_batch_req LOOP
2137: BEGIN
2138:
2139: IF g_debug <= gme_debug.g_log_statement THEN
2140: gme_debug.put_line ('Processing prod_material_detail_id: ' || req.prod_material_detail_id ||
2141: ' ing_material_detail_id/batchstep_resource_id: ' || req.ing_material_detail_id||
2142: '/'||req.batchstep_resource_id);
2143: END IF;
2144:

Line 2161: IF g_debug <= gme_debug.g_log_statement THEN

2157:
2158: FOR ing IN c_remaining_ing_layers (req.ing_material_detail_id) LOOP
2159: BEGIN
2160:
2161: IF g_debug <= gme_debug.g_log_statement THEN
2162: gme_debug.put_line ('processing remaining ingredients layers...');
2163: END IF;
2164:
2165: --

Line 2162: gme_debug.put_line ('processing remaining ingredients layers...');

2158: FOR ing IN c_remaining_ing_layers (req.ing_material_detail_id) LOOP
2159: BEGIN
2160:
2161: IF g_debug <= gme_debug.g_log_statement THEN
2162: gme_debug.put_line ('processing remaining ingredients layers...');
2163: END IF;
2164:
2165: --
2166: -- Bug 5607069: When using Actuals:

Line 2353: IF g_debug <= gme_debug.g_log_statement THEN

2349: IF (l_last_prod_layer.layer_id IS NOT NULL AND req.batchstep_resource_id IS NOT NULL) THEN
2350: FOR rsrc IN c_remaining_rsrc_layers (req.batchstep_resource_id) LOOP
2351: BEGIN
2352:
2353: IF g_debug <= gme_debug.g_log_statement THEN
2354: gme_debug.put_line ('processing remaining resource layers...');
2355: END IF;
2356:
2357:

Line 2354: gme_debug.put_line ('processing remaining resource layers...');

2350: FOR rsrc IN c_remaining_rsrc_layers (req.batchstep_resource_id) LOOP
2351: BEGIN
2352:
2353: IF g_debug <= gme_debug.g_log_statement THEN
2354: gme_debug.put_line ('processing remaining resource layers...');
2355: END IF;
2356:
2357:
2358: --

Line 2535: IF g_debug <= gme_debug.g_log_statement THEN

2531: END;
2532: END LOOP;
2533:
2534: -- Now update the remaining_ib_doc_qty based upon the finalized layers.
2535: IF g_debug <= gme_debug.g_log_statement THEN
2536: gme_debug.put_line ('Now update the remaining_ib_doc_qty based upon the finalized layers');
2537: END IF;
2538:
2539: FOR c IN c_finalize_layer_consumption LOOP

Line 2536: gme_debug.put_line ('Now update the remaining_ib_doc_qty based upon the finalized layers');

2532: END LOOP;
2533:
2534: -- Now update the remaining_ib_doc_qty based upon the finalized layers.
2535: IF g_debug <= gme_debug.g_log_statement THEN
2536: gme_debug.put_line ('Now update the remaining_ib_doc_qty based upon the finalized layers');
2537: END IF;
2538:
2539: FOR c IN c_finalize_layer_consumption LOOP
2540: BEGIN

Line 2557: IF g_debug <= gme_debug.g_log_procedure THEN

2553: END LOOP;
2554:
2555: x_return_status := FND_API.G_RET_STS_SUCCESS;
2556:
2557: IF g_debug <= gme_debug.g_log_procedure THEN
2558: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2559: END IF;
2560:
2561: EXCEPTION

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

2554:
2555: x_return_status := FND_API.G_RET_STS_SUCCESS;
2556:
2557: IF g_debug <= gme_debug.g_log_procedure THEN
2558: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2559: END IF;
2560:
2561: EXCEPTION
2562: WHEN OTHERS THEN

Line 2563: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);

2559: END IF;
2560:
2561: EXCEPTION
2562: WHEN OTHERS THEN
2563: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
2564: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
2565: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
2566: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
2567: FND_MSG_PUB.Add;

Line 2637: IF g_debug <= gme_debug.g_log_procedure THEN

2633: BEGIN
2634:
2635: x_return_status := FND_API.G_RET_STS_SUCCESS ;
2636:
2637: IF g_debug <= gme_debug.g_log_procedure THEN
2638: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2639: END IF;
2640:
2641: -- Validate batch_id

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

2634:
2635: x_return_status := FND_API.G_RET_STS_SUCCESS ;
2636:
2637: IF g_debug <= gme_debug.g_log_procedure THEN
2638: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2639: END IF;
2640:
2641: -- Validate batch_id
2642: BEGIN

Line 2713: IF g_debug <= gme_debug.g_log_statement THEN

2709: WHERE xe.application_id = 555
2710: AND xe.event_id = l_event.event_id
2711: AND xe.event_type_code = 'CLOS';
2712:
2713: IF g_debug <= gme_debug.g_log_statement THEN
2714: gme_debug.put_line ('Found Batch close event_id = '||l_event.event_id || ' Ledger_id= '||l_event.ledger_id);
2715: gme_debug.put_line ('deleting batch close events extract lines ');
2716: END IF;
2717:

Line 2714: gme_debug.put_line ('Found Batch close event_id = '||l_event.event_id || ' Ledger_id= '||l_event.ledger_id);

2710: AND xe.event_id = l_event.event_id
2711: AND xe.event_type_code = 'CLOS';
2712:
2713: IF g_debug <= gme_debug.g_log_statement THEN
2714: gme_debug.put_line ('Found Batch close event_id = '||l_event.event_id || ' Ledger_id= '||l_event.ledger_id);
2715: gme_debug.put_line ('deleting batch close events extract lines ');
2716: END IF;
2717:
2718: GMF_LAYERS.log_message (

Line 2715: gme_debug.put_line ('deleting batch close events extract lines ');

2711: AND xe.event_type_code = 'CLOS';
2712:
2713: IF g_debug <= gme_debug.g_log_statement THEN
2714: gme_debug.put_line ('Found Batch close event_id = '||l_event.event_id || ' Ledger_id= '||l_event.ledger_id);
2715: gme_debug.put_line ('deleting batch close events extract lines ');
2716: END IF;
2717:
2718: GMF_LAYERS.log_message (
2719: p_table_name => 'GMF_BATCH_VIB_DETAILS',

Line 2732: IF g_debug <= gme_debug.g_log_statement THEN

2728: AND event_class_code = 'BATCH_CLOSE'
2729: AND transaction_id = p_batch_id
2730: AND event_id = l_event.event_id);
2731:
2732: IF g_debug <= gme_debug.g_log_statement THEN
2733: gme_debug.put_line ('deleting batch close events extract header ');
2734: END IF;
2735:
2736: DELETE FROM gmf_xla_extract_headers

Line 2733: gme_debug.put_line ('deleting batch close events extract header ');

2729: AND transaction_id = p_batch_id
2730: AND event_id = l_event.event_id);
2731:
2732: IF g_debug <= gme_debug.g_log_statement THEN
2733: gme_debug.put_line ('deleting batch close events extract header ');
2734: END IF;
2735:
2736: DELETE FROM gmf_xla_extract_headers
2737: WHERE entity_code = 'PRODUCTION'

Line 2746: IF g_debug <= gme_debug.g_log_statement THEN

2742: END LOOP;
2743:
2744: IF (l_close_event_count >= 1) THEN
2745:
2746: IF g_debug <= gme_debug.g_log_statement THEN
2747: gme_debug.put_line ('deleting batch close events');
2748: END IF;
2749: xla_events_pkg.delete_bulk_events( p_application_id => 555);
2750: delete from xla_events_int_gt ;

Line 2747: gme_debug.put_line ('deleting batch close events');

2743:
2744: IF (l_close_event_count >= 1) THEN
2745:
2746: IF g_debug <= gme_debug.g_log_statement THEN
2747: gme_debug.put_line ('deleting batch close events');
2748: END IF;
2749: xla_events_pkg.delete_bulk_events( p_application_id => 555);
2750: delete from xla_events_int_gt ;
2751: END IF;

Line 2756: IF g_debug <= gme_debug.g_log_statement THEN

2752:
2753: -- End Bug 11839588
2754: -- Delete all rows from gmf_incoming_material_layers which are used in
2755: -- gmf_batch_vib_details with finalize_ind = 1
2756: IF g_debug <= gme_debug.g_log_statement THEN
2757: gme_debug.put_line ('deleting pseudo layers...');
2758: END IF;
2759:
2760: DELETE from gmf_incoming_material_layers

Line 2757: gme_debug.put_line ('deleting pseudo layers...');

2753: -- End Bug 11839588
2754: -- Delete all rows from gmf_incoming_material_layers which are used in
2755: -- gmf_batch_vib_details with finalize_ind = 1
2756: IF g_debug <= gme_debug.g_log_statement THEN
2757: gme_debug.put_line ('deleting pseudo layers...');
2758: END IF;
2759:
2760: DELETE from gmf_incoming_material_layers
2761: WHERE

Line 2772: IF g_debug <= gme_debug.g_log_statement THEN

2768: r.batch_id = p_batch_id AND
2769: r.requirement_id = v.requirement_id AND
2770: v.finalize_ind = 1);
2771:
2772: IF g_debug <= gme_debug.g_log_statement THEN
2773: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2774: END IF;
2775:
2776:

Line 2773: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');

2769: r.requirement_id = v.requirement_id AND
2770: v.finalize_ind = 1);
2771:
2772: IF g_debug <= gme_debug.g_log_statement THEN
2773: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2774: END IF;
2775:
2776:
2777: -- Delete all rows from the gmf_batch_vib_details with finalize_ind = 1

Line 2779: IF g_debug <= gme_debug.g_log_statement THEN

2775:
2776:
2777: -- Delete all rows from the gmf_batch_vib_details with finalize_ind = 1
2778: -- and the comsume_layer_id is NULL.
2779: IF g_debug <= gme_debug.g_log_statement THEN
2780: gme_debug.put_line ('now deleting NULL finalized consumption layers');
2781: END IF;
2782:
2783: DELETE from gmf_batch_vib_details

Line 2780: gme_debug.put_line ('now deleting NULL finalized consumption layers');

2776:
2777: -- Delete all rows from the gmf_batch_vib_details with finalize_ind = 1
2778: -- and the comsume_layer_id is NULL.
2779: IF g_debug <= gme_debug.g_log_statement THEN
2780: gme_debug.put_line ('now deleting NULL finalized consumption layers');
2781: END IF;
2782:
2783: DELETE from gmf_batch_vib_details
2784: WHERE

Line 2793: IF g_debug <= gme_debug.g_log_statement THEN

2789: FROM gmf_batch_requirements
2790: WHERE
2791: Batch_id = p_batch_id);
2792:
2793: IF g_debug <= gme_debug.g_log_statement THEN
2794: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2795: END IF;
2796:
2797: IF g_debug <= gme_debug.g_log_statement THEN

Line 2794: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');

2790: WHERE
2791: Batch_id = p_batch_id);
2792:
2793: IF g_debug <= gme_debug.g_log_statement THEN
2794: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2795: END IF;
2796:
2797: IF g_debug <= gme_debug.g_log_statement THEN
2798: gme_debug.put_line ('now deleting regular finalized consumption layers. Also, updating remaining qty in outgoing layers table.');

Line 2797: IF g_debug <= gme_debug.g_log_statement THEN

2793: IF g_debug <= gme_debug.g_log_statement THEN
2794: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2795: END IF;
2796:
2797: IF g_debug <= gme_debug.g_log_statement THEN
2798: gme_debug.put_line ('now deleting regular finalized consumption layers. Also, updating remaining qty in outgoing layers table.');
2799: END IF;
2800:
2801: FOR f IN c_finalize_rows LOOP

Line 2798: gme_debug.put_line ('now deleting regular finalized consumption layers. Also, updating remaining qty in outgoing layers table.');

2794: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2795: END IF;
2796:
2797: IF g_debug <= gme_debug.g_log_statement THEN
2798: gme_debug.put_line ('now deleting regular finalized consumption layers. Also, updating remaining qty in outgoing layers table.');
2799: END IF;
2800:
2801: FOR f IN c_finalize_rows LOOP
2802: BEGIN

Line 2826: IF g_debug <= gme_debug.g_log_procedure THEN

2822: END LOOP;
2823:
2824: x_return_status := FND_API.G_RET_STS_SUCCESS;
2825:
2826: IF g_debug <= gme_debug.g_log_procedure THEN
2827: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2828: END IF;
2829:
2830: EXCEPTION

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

2823:
2824: x_return_status := FND_API.G_RET_STS_SUCCESS;
2825:
2826: IF g_debug <= gme_debug.g_log_procedure THEN
2827: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2828: END IF;
2829:
2830: EXCEPTION
2831: WHEN OTHERS THEN

Line 2832: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);

2828: END IF;
2829:
2830: EXCEPTION
2831: WHEN OTHERS THEN
2832: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
2833: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
2834: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
2835: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
2836: FND_MSG_PUB.Add;