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 484: IF g_debug <= gme_debug.g_log_procedure THEN

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

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

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

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

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

Line 549: IF g_debug <= gme_debug.g_log_statement THEN

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

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

546: DELETE from gmf_batch_requirements_gtmp;
547:
548: -- Get all products and step association
549: IF g_debug <= gme_debug.g_log_statement THEN
550: gme_debug.put_line ('Get all products and step association');
551: END IF;
552:
553: IF l_use_item_step_dep = 'Y' THEN
554: FOR p IN c_batch_products(p_batch_id)

Line 655: IF g_debug <= gme_debug.g_log_statement THEN

651: END LOOP;
652: END IF;
653:
654: -- Now insert any remaining ing/res which was not used for any product
655: IF g_debug <= gme_debug.g_log_statement THEN
656: gme_debug.put_line ('Now insert any remaining ingredients which was not used for any product...');
657: END IF;
658:
659: INSERT INTO gmf_batch_requirements_gtmp(

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

652: END IF;
653:
654: -- Now insert any remaining ing/res which was not used for any product
655: IF g_debug <= gme_debug.g_log_statement THEN
656: gme_debug.put_line ('Now insert any remaining ingredients which was not used for any product...');
657: END IF;
658:
659: INSERT INTO gmf_batch_requirements_gtmp(
660: vib_id,

Line 714: IF g_debug <= gme_debug.g_log_statement THEN

710: FROM gmf_batch_requirements_gtmp f
711: WHERE
712: batch_id = p_batch_id );
713:
714: IF g_debug <= gme_debug.g_log_statement THEN
715: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
716: gme_debug.put_line ('Now insert any remaining resources which was not used for any product...');
717: END IF;
718:

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

711: WHERE
712: batch_id = p_batch_id );
713:
714: IF g_debug <= gme_debug.g_log_statement THEN
715: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
716: gme_debug.put_line ('Now insert any remaining resources which was not used for any product...');
717: END IF;
718:
719:

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

712: batch_id = p_batch_id );
713:
714: IF g_debug <= gme_debug.g_log_statement THEN
715: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
716: gme_debug.put_line ('Now insert any remaining resources which was not used for any product...');
717: END IF;
718:
719:
720: INSERT INTO gmf_batch_requirements_gtmp(

Line 774: IF g_debug <= gme_debug.g_log_statement THEN

770: FROM gmf_batch_requirements_gtmp f
771: WHERE
772: batch_id = p_batch_id );
773:
774: IF g_debug <= gme_debug.g_log_statement THEN
775: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
776: END IF;
777:
778: -- Now insert any product that may have been missed out

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

771: WHERE
772: batch_id = p_batch_id );
773:
774: IF g_debug <= gme_debug.g_log_statement THEN
775: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
776: END IF;
777:
778: -- Now insert any product that may have been missed out
779: IF g_debug <= gme_debug.g_log_statement THEN

Line 779: IF g_debug <= gme_debug.g_log_statement THEN

775: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
776: END IF;
777:
778: -- Now insert any product that may have been missed out
779: IF g_debug <= gme_debug.g_log_statement THEN
780: gme_debug.put_line ('Now insert any product that may have been missed out...');
781: END IF;
782:
783: INSERT INTO gmf_batch_requirements_gtmp(

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

776: END IF;
777:
778: -- Now insert any product that may have been missed out
779: IF g_debug <= gme_debug.g_log_statement THEN
780: gme_debug.put_line ('Now insert any product that may have been missed out...');
781: END IF;
782:
783: INSERT INTO gmf_batch_requirements_gtmp(
784: vib_id,

Line 837: IF g_debug <= gme_debug.g_log_statement THEN

833: SELECT prod_material_detail_id
834: FROM gmf_batch_requirements_gtmp f
835: WHERE
836: batch_id = p_batch_id );
837: IF g_debug <= gme_debug.g_log_statement THEN
838: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
839: END IF;
840:
841: IF g_debug <= gme_debug.g_log_statement THEN

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

834: FROM gmf_batch_requirements_gtmp f
835: WHERE
836: batch_id = p_batch_id );
837: IF g_debug <= gme_debug.g_log_statement THEN
838: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
839: END IF;
840:
841: IF g_debug <= gme_debug.g_log_statement THEN
842: gme_debug.put_line ('inserting remaining resources');

Line 841: IF g_debug <= gme_debug.g_log_statement THEN

837: IF g_debug <= gme_debug.g_log_statement THEN
838: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
839: END IF;
840:
841: IF g_debug <= gme_debug.g_log_statement THEN
842: gme_debug.put_line ('inserting remaining resources');
843: END IF;
844: INSERT INTO gmf_batch_requirements_gtmp(
845: vib_id,

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

838: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
839: END IF;
840:
841: IF g_debug <= gme_debug.g_log_statement THEN
842: gme_debug.put_line ('inserting remaining resources');
843: END IF;
844: INSERT INTO gmf_batch_requirements_gtmp(
845: vib_id,
846: batch_id,

Line 898: IF g_debug <= gme_debug.g_log_statement THEN

894: FROM gmf_batch_requirements_gtmp f
895: WHERE
896: batch_id = p_batch_id );
897:
898: IF g_debug <= gme_debug.g_log_statement THEN
899: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
900: END IF;
901:
902:

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

895: WHERE
896: batch_id = p_batch_id );
897:
898: IF g_debug <= gme_debug.g_log_statement THEN
899: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
900: END IF;
901:
902:
903: -- Now update the derived cost alloc and required doc qty

Line 904: IF g_debug <= gme_debug.g_log_statement THEN

900: END IF;
901:
902:
903: -- Now update the derived cost alloc and required doc qty
904: IF g_debug <= gme_debug.g_log_statement THEN
905: gme_debug.put_line ('Now updating the derived cost alloc and required doc qty ...');
906: END IF;
907:
908: FOR i IN c_total_prod_alloc(p_batch_id) LOOP

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

901:
902:
903: -- Now update the derived cost alloc and required doc qty
904: IF g_debug <= gme_debug.g_log_statement THEN
905: gme_debug.put_line ('Now updating the derived cost alloc and required doc qty ...');
906: END IF;
907:
908: FOR i IN c_total_prod_alloc(p_batch_id) LOOP
909: BEGIN

Line 927: IF g_debug <= gme_debug.g_log_statement THEN

923: RAISE;
924: END;
925: END LOOP;
926:
927: IF g_debug <= gme_debug.g_log_statement THEN
928: gme_debug.put_line ('Done updating the derived cost alloc and required doc qty ...');
929: END IF;
930:
931: x_return_status := FND_API.G_RET_STS_SUCCESS ;

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

924: END;
925: END LOOP;
926:
927: IF g_debug <= gme_debug.g_log_statement THEN
928: gme_debug.put_line ('Done updating the derived cost alloc and required doc qty ...');
929: END IF;
930:
931: x_return_status := FND_API.G_RET_STS_SUCCESS ;
932:

Line 933: IF g_debug <= gme_debug.g_log_procedure THEN

929: END IF;
930:
931: x_return_status := FND_API.G_RET_STS_SUCCESS ;
932:
933: IF g_debug <= gme_debug.g_log_procedure THEN
934: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
935: END IF;
936:
937: EXCEPTION

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

930:
931: x_return_status := FND_API.G_RET_STS_SUCCESS ;
932:
933: IF g_debug <= gme_debug.g_log_procedure THEN
934: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
935: END IF;
936:
937: EXCEPTION
938: WHEN OTHERS THEN

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

935: END IF;
936:
937: EXCEPTION
938: WHEN OTHERS THEN
939: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
940: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
941: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
942: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
943: FND_MSG_PUB.Add;

Line 1128: IF g_debug <= gme_debug.g_log_procedure THEN

1124:
1125: BEGIN
1126: x_return_status := FND_API.G_RET_STS_SUCCESS ;
1127:
1128: IF g_debug <= gme_debug.g_log_procedure THEN
1129: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
1130: END IF;
1131:
1132: -- Validate that the VIB details do not exist already

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

1125: BEGIN
1126: x_return_status := FND_API.G_RET_STS_SUCCESS ;
1127:
1128: IF g_debug <= gme_debug.g_log_procedure THEN
1129: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
1130: END IF;
1131:
1132: -- Validate that the VIB details do not exist already
1133: SELECT count(*)

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

1149: IF l_use_vib IS NULL THEN
1150: l_use_vib := 'N';
1151: END IF;
1152:
1153: gme_debug.put_line ('Profile...Use VIB = '||l_use_vib);
1154:
1155:
1156: -- If this is a product reversal, reverse the VIB layers.
1157: IF p_tran_rec.primary_quantity < 0 and p_tran_rec.reverse_id IS NOT NULL THEN

Line 1159: IF g_debug <= gme_debug.g_log_procedure THEN

1155:
1156: -- If this is a product reversal, reverse the VIB layers.
1157: IF p_tran_rec.primary_quantity < 0 and p_tran_rec.reverse_id IS NOT NULL THEN
1158:
1159: IF g_debug <= gme_debug.g_log_procedure THEN
1160: gme_debug.put_line ('product reversal, reverse the VIB layers');
1161: END IF;
1162:
1163: IF g_debug <= gme_debug.g_log_procedure THEN

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

1156: -- If this is a product reversal, reverse the VIB layers.
1157: IF p_tran_rec.primary_quantity < 0 and p_tran_rec.reverse_id IS NOT NULL THEN
1158:
1159: IF g_debug <= gme_debug.g_log_procedure THEN
1160: gme_debug.put_line ('product reversal, reverse the VIB layers');
1161: END IF;
1162:
1163: IF g_debug <= gme_debug.g_log_procedure THEN
1164: gme_debug.put_line ('now reversing material vib layers');

Line 1163: IF g_debug <= gme_debug.g_log_procedure THEN

1159: IF g_debug <= gme_debug.g_log_procedure THEN
1160: gme_debug.put_line ('product reversal, reverse the VIB layers');
1161: END IF;
1162:
1163: IF g_debug <= gme_debug.g_log_procedure THEN
1164: gme_debug.put_line ('now reversing material vib layers');
1165: END IF;
1166:
1167: FOR v IN c_orig_mtl_vib LOOP

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

1160: gme_debug.put_line ('product reversal, reverse the VIB layers');
1161: END IF;
1162:
1163: IF g_debug <= gme_debug.g_log_procedure THEN
1164: gme_debug.put_line ('now reversing material vib layers');
1165: END IF;
1166:
1167: FOR v IN c_orig_mtl_vib LOOP
1168: BEGIN

Line 1186: IF g_debug <= gme_debug.g_log_statement THEN

1182: vib.requirement_id = r.requirement_id AND
1183: vib.consume_layer_id = v.c_layer_id;
1184:
1185: IF l_count > 0 THEN
1186: IF g_debug <= gme_debug.g_log_statement THEN
1187: gme_debug.put_line ('No VIB, the ingredient reversals may already have ' ||
1188: 'been consumed by a previous prod yield. do not reverse anymore.');
1189: END IF;
1190:

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

1183: vib.consume_layer_id = v.c_layer_id;
1184:
1185: IF l_count > 0 THEN
1186: IF g_debug <= gme_debug.g_log_statement THEN
1187: gme_debug.put_line ('No VIB, the ingredient reversals may already have ' ||
1188: 'been consumed by a previous prod yield. do not reverse anymore.');
1189: END IF;
1190:
1191: RAISE e_invalid_mtl_reversal;

Line 1240: IF g_debug <= gme_debug.g_log_procedure THEN

1236: NULL; -- Skip to next row
1237: END;
1238: END LOOP;
1239:
1240: IF g_debug <= gme_debug.g_log_procedure THEN
1241: gme_debug.put_line ('now reversing resource vib layers');
1242: END IF;
1243:
1244: FOR v IN c_orig_rsrc_vib LOOP

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

1237: END;
1238: END LOOP;
1239:
1240: IF g_debug <= gme_debug.g_log_procedure THEN
1241: gme_debug.put_line ('now reversing resource vib layers');
1242: END IF;
1243:
1244: FOR v IN c_orig_rsrc_vib LOOP
1245: BEGIN

Line 1263: IF g_debug <= gme_debug.g_log_statement THEN

1259: vib.requirement_id = r.requirement_id AND
1260: vib.consume_layer_id = v.c_layer_id;
1261:
1262: IF l_count > 0 THEN
1263: IF g_debug <= gme_debug.g_log_statement THEN
1264: gme_debug.put_line ('No VIB, the resource reversals may already have ' ||
1265: 'been consumed by a previous prod yield. do not reverse anymore.');
1266: END IF;
1267:

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

1260: vib.consume_layer_id = v.c_layer_id;
1261:
1262: IF l_count > 0 THEN
1263: IF g_debug <= gme_debug.g_log_statement THEN
1264: gme_debug.put_line ('No VIB, the resource reversals may already have ' ||
1265: 'been consumed by a previous prod yield. do not reverse anymore.');
1266: END IF;
1267:
1268: RAISE e_invalid_rsrc_reversal;

Line 1320: IF g_debug <= gme_debug.g_log_procedure THEN

1316: RETURN; -- Done with the reversal
1317: END IF;
1318:
1319: -- For regular yields follow the following logic.
1320: IF g_debug <= gme_debug.g_log_procedure THEN
1321: gme_debug.put_line ('regular product yield');
1322: END IF;
1323:
1324:

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

1317: END IF;
1318:
1319: -- For regular yields follow the following logic.
1320: IF g_debug <= gme_debug.g_log_procedure THEN
1321: gme_debug.put_line ('regular product yield');
1322: END IF;
1323:
1324:
1325: -- Go through the batch requirement rows for this product and insert

Line 1336: IF g_debug <= gme_debug.g_log_statement THEN

1332: IF req.ing_material_detail_id IS NOT NULL THEN
1333: -- select ingredient layers that can be consumed for the
1334: -- IB qty
1335:
1336: IF g_debug <= gme_debug.g_log_statement THEN
1337: gme_debug.put_line ('processing ingredient or by-product to create vib details');
1338: END IF;
1339:
1340: FOR ing in c_ing_layers(req.ing_material_detail_id) LOOP

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

1333: -- select ingredient layers that can be consumed for the
1334: -- IB qty
1335:
1336: IF g_debug <= gme_debug.g_log_statement THEN
1337: gme_debug.put_line ('processing ingredient or by-product to create vib details');
1338: END IF;
1339:
1340: FOR ing in c_ing_layers(req.ing_material_detail_id) LOOP
1341: BEGIN

Line 1343: IF g_debug <= gme_debug.g_log_statement THEN

1339:
1340: FOR ing in c_ing_layers(req.ing_material_detail_id) LOOP
1341: BEGIN
1342:
1343: IF g_debug <= gme_debug.g_log_statement THEN
1344: gme_debug.put_line ('consuming ing/byProd layer. matl_dtl_id: ' || req.ing_material_detail_id ||
1345: ' consume layer_id: ' ||ing.layer_id );
1346: END IF;
1347:

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

1340: FOR ing in c_ing_layers(req.ing_material_detail_id) LOOP
1341: BEGIN
1342:
1343: IF g_debug <= gme_debug.g_log_statement THEN
1344: gme_debug.put_line ('consuming ing/byProd layer. matl_dtl_id: ' || req.ing_material_detail_id ||
1345: ' consume layer_id: ' ||ing.layer_id );
1346: END IF;
1347:
1348: IF l_use_vib = 'Y' THEN

Line 1493: IF g_debug <= gme_debug.g_log_statement THEN

1489: -- IF the VIB details are for a resource
1490: IF req.batchstep_resource_id IS NOT NULL THEN
1491: -- select ingredient layers that can be consumed for the
1492: -- IB qty
1493: IF g_debug <= gme_debug.g_log_statement THEN
1494: gme_debug.put_line ('processing ingredient or by-product to create vib details');
1495: END IF;
1496:
1497: FOR rsrc IN c_rsrc_layers(req.batchstep_resource_id) LOOP

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

1490: IF req.batchstep_resource_id IS NOT NULL THEN
1491: -- select ingredient layers that can be consumed for the
1492: -- IB qty
1493: IF g_debug <= gme_debug.g_log_statement THEN
1494: gme_debug.put_line ('processing ingredient or by-product to create vib details');
1495: END IF;
1496:
1497: FOR rsrc IN c_rsrc_layers(req.batchstep_resource_id) LOOP
1498: BEGIN

Line 1655: IF g_debug <= gme_debug.g_log_statement THEN

1651:
1652: -- There is still some IB quantity not consumed, insert a NULL layer consumption.
1653: IF l_use_vib = 'Y' and l_required_ib_doc_qty <> 0 THEN
1654:
1655: IF g_debug <= gme_debug.g_log_statement THEN
1656: gme_debug.put_line ('inserting NULL consumption layer for matl_dtl_id: ' || req.ing_material_detail_id);
1657: END IF;
1658:
1659: l_consume_ib_pri_qty := 0;

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

1652: -- There is still some IB quantity not consumed, insert a NULL layer consumption.
1653: IF l_use_vib = 'Y' and l_required_ib_doc_qty <> 0 THEN
1654:
1655: IF g_debug <= gme_debug.g_log_statement THEN
1656: gme_debug.put_line ('inserting NULL consumption layer for matl_dtl_id: ' || req.ing_material_detail_id);
1657: END IF;
1658:
1659: l_consume_ib_pri_qty := 0;
1660: IF req.ing_material_detail_id IS NOT NULL THEN

Line 1750: IF g_debug <= gme_debug.g_log_procedure THEN

1746: END LOOP; -- c_batch_req
1747:
1748: x_return_status := FND_API.G_RET_STS_SUCCESS;
1749:
1750: IF g_debug <= gme_debug.g_log_procedure THEN
1751: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1752: END IF;
1753:
1754: EXCEPTION

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

1747:
1748: x_return_status := FND_API.G_RET_STS_SUCCESS;
1749:
1750: IF g_debug <= gme_debug.g_log_procedure THEN
1751: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1752: END IF;
1753:
1754: EXCEPTION
1755: WHEN OTHERS THEN

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

1752: END IF;
1753:
1754: EXCEPTION
1755: WHEN OTHERS THEN
1756: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
1757: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
1758: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
1759: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
1760: FND_MSG_PUB.Add;

Line 1914: IF g_debug <= gme_debug.g_log_procedure THEN

1910:
1911: BEGIN
1912: x_return_status := FND_API.G_RET_STS_SUCCESS ;
1913:
1914: IF g_debug <= gme_debug.g_log_procedure THEN
1915: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
1916: END IF;
1917:
1918: -- Validate batch_id

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

1911: BEGIN
1912: x_return_status := FND_API.G_RET_STS_SUCCESS ;
1913:
1914: IF g_debug <= gme_debug.g_log_procedure THEN
1915: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
1916: END IF;
1917:
1918: -- Validate batch_id
1919: BEGIN

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

1968: IF l_use_vib IS NULL THEN
1969: l_use_vib := 'N';
1970: END IF;
1971:
1972: gme_debug.put_line ('Use VIB = ' || l_use_vib );
1973: IF g_debug <= gme_debug.g_log_statement THEN
1974: gme_debug.put_line ('reversing out all NULL consumptions layers, if any');
1975: END IF;
1976:

Line 1973: IF g_debug <= gme_debug.g_log_statement THEN

1969: l_use_vib := 'N';
1970: END IF;
1971:
1972: gme_debug.put_line ('Use VIB = ' || l_use_vib );
1973: IF g_debug <= gme_debug.g_log_statement THEN
1974: gme_debug.put_line ('reversing out all NULL consumptions layers, if any');
1975: END IF;
1976:
1977:

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

1970: END IF;
1971:
1972: gme_debug.put_line ('Use VIB = ' || l_use_vib );
1973: IF g_debug <= gme_debug.g_log_statement THEN
1974: gme_debug.put_line ('reversing out all NULL consumptions layers, if any');
1975: END IF;
1976:
1977:
1978: -- reverse out all NULL consumption layers

Line 1981: IF g_debug <= gme_debug.g_log_statement THEN

1977:
1978: -- reverse out all NULL consumption layers
1979: FOR n IN c_null_consume_layers LOOP
1980:
1981: IF g_debug <= gme_debug.g_log_statement THEN
1982: gme_debug.put_line ('NULL consumption layer found for prod layer/txn/lot: ' ||
1983: n.prod_layer_id ||'/'||n.mmt_transaction_id||'/'||n.lot_number ||
1984: ' requirement_id for NULL consumption layer: ' || n.requirement_id);
1985: END IF;

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

1978: -- reverse out all NULL consumption layers
1979: FOR n IN c_null_consume_layers LOOP
1980:
1981: IF g_debug <= gme_debug.g_log_statement THEN
1982: gme_debug.put_line ('NULL consumption layer found for prod layer/txn/lot: ' ||
1983: n.prod_layer_id ||'/'||n.mmt_transaction_id||'/'||n.lot_number ||
1984: ' requirement_id for NULL consumption layer: ' || n.requirement_id);
1985: END IF;
1986:

Line 2068: IF g_debug <= gme_debug.g_log_procedure THEN

2064: END LOOP;
2065:
2066: -- going thru the requirement details
2067:
2068: IF g_debug <= gme_debug.g_log_procedure THEN
2069: gme_debug.put_line ('looping thru all the requirements to create finalization layers');
2070: END IF;
2071:
2072: prev_prod_material_detail_id := -99;

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

2065:
2066: -- going thru the requirement details
2067:
2068: IF g_debug <= gme_debug.g_log_procedure THEN
2069: gme_debug.put_line ('looping thru all the requirements to create finalization layers');
2070: END IF;
2071:
2072: prev_prod_material_detail_id := -99;
2073: FOR req IN c_batch_req LOOP

Line 2076: IF g_debug <= gme_debug.g_log_statement THEN

2072: prev_prod_material_detail_id := -99;
2073: FOR req IN c_batch_req LOOP
2074: BEGIN
2075:
2076: IF g_debug <= gme_debug.g_log_statement THEN
2077: gme_debug.put_line ('Processing prod_material_detail_id: ' || req.prod_material_detail_id ||
2078: ' ing_material_detail_id/batchstep_resource_id: ' || req.ing_material_detail_id||
2079: '/'||req.batchstep_resource_id);
2080: END IF;

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

2073: FOR req IN c_batch_req LOOP
2074: BEGIN
2075:
2076: IF g_debug <= gme_debug.g_log_statement THEN
2077: gme_debug.put_line ('Processing prod_material_detail_id: ' || req.prod_material_detail_id ||
2078: ' ing_material_detail_id/batchstep_resource_id: ' || req.ing_material_detail_id||
2079: '/'||req.batchstep_resource_id);
2080: END IF;
2081:

Line 2098: IF g_debug <= gme_debug.g_log_statement THEN

2094:
2095: FOR ing IN c_remaining_ing_layers (req.ing_material_detail_id) LOOP
2096: BEGIN
2097:
2098: IF g_debug <= gme_debug.g_log_statement THEN
2099: gme_debug.put_line ('processing remaining ingredients layers...');
2100: END IF;
2101:
2102: --

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

2095: FOR ing IN c_remaining_ing_layers (req.ing_material_detail_id) LOOP
2096: BEGIN
2097:
2098: IF g_debug <= gme_debug.g_log_statement THEN
2099: gme_debug.put_line ('processing remaining ingredients layers...');
2100: END IF;
2101:
2102: --
2103: -- Bug 5607069: When using Actuals:

Line 2290: IF g_debug <= gme_debug.g_log_statement THEN

2286: IF (l_last_prod_layer.layer_id IS NOT NULL AND req.batchstep_resource_id IS NOT NULL) THEN
2287: FOR rsrc IN c_remaining_rsrc_layers (req.batchstep_resource_id) LOOP
2288: BEGIN
2289:
2290: IF g_debug <= gme_debug.g_log_statement THEN
2291: gme_debug.put_line ('processing remaining resource layers...');
2292: END IF;
2293:
2294:

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

2287: FOR rsrc IN c_remaining_rsrc_layers (req.batchstep_resource_id) LOOP
2288: BEGIN
2289:
2290: IF g_debug <= gme_debug.g_log_statement THEN
2291: gme_debug.put_line ('processing remaining resource layers...');
2292: END IF;
2293:
2294:
2295: --

Line 2472: IF g_debug <= gme_debug.g_log_statement THEN

2468: END;
2469: END LOOP;
2470:
2471: -- Now update the remaining_ib_doc_qty based upon the finalized layers.
2472: IF g_debug <= gme_debug.g_log_statement THEN
2473: gme_debug.put_line ('Now update the remaining_ib_doc_qty based upon the finalized layers');
2474: END IF;
2475:
2476: FOR c IN c_finalize_layer_consumption LOOP

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

2469: END LOOP;
2470:
2471: -- Now update the remaining_ib_doc_qty based upon the finalized layers.
2472: IF g_debug <= gme_debug.g_log_statement THEN
2473: gme_debug.put_line ('Now update the remaining_ib_doc_qty based upon the finalized layers');
2474: END IF;
2475:
2476: FOR c IN c_finalize_layer_consumption LOOP
2477: BEGIN

Line 2494: IF g_debug <= gme_debug.g_log_procedure THEN

2490: END LOOP;
2491:
2492: x_return_status := FND_API.G_RET_STS_SUCCESS;
2493:
2494: IF g_debug <= gme_debug.g_log_procedure THEN
2495: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2496: END IF;
2497:
2498: EXCEPTION

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

2491:
2492: x_return_status := FND_API.G_RET_STS_SUCCESS;
2493:
2494: IF g_debug <= gme_debug.g_log_procedure THEN
2495: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2496: END IF;
2497:
2498: EXCEPTION
2499: WHEN OTHERS THEN

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

2496: END IF;
2497:
2498: EXCEPTION
2499: WHEN OTHERS THEN
2500: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
2501: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
2502: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
2503: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
2504: FND_MSG_PUB.Add;

Line 2553: IF g_debug <= gme_debug.g_log_procedure THEN

2549: BEGIN
2550:
2551: x_return_status := FND_API.G_RET_STS_SUCCESS ;
2552:
2553: IF g_debug <= gme_debug.g_log_procedure THEN
2554: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2555: END IF;
2556:
2557: -- Validate batch_id

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

2550:
2551: x_return_status := FND_API.G_RET_STS_SUCCESS ;
2552:
2553: IF g_debug <= gme_debug.g_log_procedure THEN
2554: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2555: END IF;
2556:
2557: -- Validate batch_id
2558: BEGIN

Line 2581: IF g_debug <= gme_debug.g_log_statement THEN

2577: END;
2578:
2579: -- Delete all rows from gmf_incoming_material_layers which are used in
2580: -- gmf_batch_vib_details with finalize_ind = 1
2581: IF g_debug <= gme_debug.g_log_statement THEN
2582: gme_debug.put_line ('deleting pseudo layers...');
2583: END IF;
2584:
2585: DELETE from gmf_incoming_material_layers

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

2578:
2579: -- Delete all rows from gmf_incoming_material_layers which are used in
2580: -- gmf_batch_vib_details with finalize_ind = 1
2581: IF g_debug <= gme_debug.g_log_statement THEN
2582: gme_debug.put_line ('deleting pseudo layers...');
2583: END IF;
2584:
2585: DELETE from gmf_incoming_material_layers
2586: WHERE

Line 2597: IF g_debug <= gme_debug.g_log_statement THEN

2593: r.batch_id = p_batch_id AND
2594: r.requirement_id = v.requirement_id AND
2595: v.finalize_ind = 1);
2596:
2597: IF g_debug <= gme_debug.g_log_statement THEN
2598: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2599: END IF;
2600:
2601:

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

2594: r.requirement_id = v.requirement_id AND
2595: v.finalize_ind = 1);
2596:
2597: IF g_debug <= gme_debug.g_log_statement THEN
2598: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2599: END IF;
2600:
2601:
2602: -- Delete all rows from the gmf_batch_vib_details with finalize_ind = 1

Line 2604: IF g_debug <= gme_debug.g_log_statement THEN

2600:
2601:
2602: -- Delete all rows from the gmf_batch_vib_details with finalize_ind = 1
2603: -- and the comsume_layer_id is NULL.
2604: IF g_debug <= gme_debug.g_log_statement THEN
2605: gme_debug.put_line ('now deleting NULL finalized consumption layers');
2606: END IF;
2607:
2608: DELETE from gmf_batch_vib_details

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

2601:
2602: -- Delete all rows from the gmf_batch_vib_details with finalize_ind = 1
2603: -- and the comsume_layer_id is NULL.
2604: IF g_debug <= gme_debug.g_log_statement THEN
2605: gme_debug.put_line ('now deleting NULL finalized consumption layers');
2606: END IF;
2607:
2608: DELETE from gmf_batch_vib_details
2609: WHERE

Line 2618: IF g_debug <= gme_debug.g_log_statement THEN

2614: FROM gmf_batch_requirements
2615: WHERE
2616: Batch_id = p_batch_id);
2617:
2618: IF g_debug <= gme_debug.g_log_statement THEN
2619: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2620: END IF;
2621:
2622: IF g_debug <= gme_debug.g_log_statement THEN

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

2615: WHERE
2616: Batch_id = p_batch_id);
2617:
2618: IF g_debug <= gme_debug.g_log_statement THEN
2619: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2620: END IF;
2621:
2622: IF g_debug <= gme_debug.g_log_statement THEN
2623: gme_debug.put_line ('now deleting regular finalized consumption layers. Also, updating remaining qty in outgoing layers table.');

Line 2622: IF g_debug <= gme_debug.g_log_statement THEN

2618: IF g_debug <= gme_debug.g_log_statement THEN
2619: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2620: END IF;
2621:
2622: IF g_debug <= gme_debug.g_log_statement THEN
2623: gme_debug.put_line ('now deleting regular finalized consumption layers. Also, updating remaining qty in outgoing layers table.');
2624: END IF;
2625:
2626: FOR f IN c_finalize_rows LOOP

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

2619: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
2620: END IF;
2621:
2622: IF g_debug <= gme_debug.g_log_statement THEN
2623: gme_debug.put_line ('now deleting regular finalized consumption layers. Also, updating remaining qty in outgoing layers table.');
2624: END IF;
2625:
2626: FOR f IN c_finalize_rows LOOP
2627: BEGIN

Line 2651: IF g_debug <= gme_debug.g_log_procedure THEN

2647: END LOOP;
2648:
2649: x_return_status := FND_API.G_RET_STS_SUCCESS;
2650:
2651: IF g_debug <= gme_debug.g_log_procedure THEN
2652: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2653: END IF;
2654:
2655: EXCEPTION

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

2648:
2649: x_return_status := FND_API.G_RET_STS_SUCCESS;
2650:
2651: IF g_debug <= gme_debug.g_log_procedure THEN
2652: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2653: END IF;
2654:
2655: EXCEPTION
2656: WHEN OTHERS THEN

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

2653: END IF;
2654:
2655: EXCEPTION
2656: WHEN OTHERS THEN
2657: gme_debug.put_line ('Exiting api (thru when others) ' || g_pkg_name || '.' || l_api_name);
2658: FND_MESSAGE.SET_NAME('GMI','GMF_SQL_ERROR');
2659: FND_MESSAGE.SET_TOKEN('ERRCODE',SQLCODE);
2660: FND_MESSAGE.SET_TOKEN('ERRM',SQLERRM);
2661: FND_MSG_PUB.Add;