[Home] [Help]
349: BEGIN
350:
351: G_CURRENT_RUNTIME_LEVEL := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
352:
353: gmf_util.log('Begin of procedure '|| l_procedure_name);
354:
355: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
356: THEN
357: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
405:
406: --
407: -- Populate Global variables
408: --
409: gmf_util.log(l_procedure_name || ': Populate Global variables');
410: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
411: THEN
412: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
413: END IF;
438: FROM gmf_legal_entities gle
439: WHERE gle.legal_entity_id = g_legal_entity_id ;
440: EXCEPTION
441: WHEN NO_DATA_FOUND then
442: gmf_util.log(l_procedure_name || ': No data found in gmf_legal_entities query');
443: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
444: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
445: END IF;
446: RAISE;
451: FROM gl_ledgers gl
452: WHERE gl.ledger_id = g_ledger_id;
453: EXCEPTION
454: WHEN NO_DATA_FOUND then
455: gmf_util.log(l_procedure_name || ': No data found in gl_ledgers query');
456: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
457: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
458: END IF;
459: RAISE;
473: AND lk.lookup_type = 'GMF_COST_METHOD'
474: AND lk.lookup_code = mthd.cost_type ;
475: EXCEPTION
476: WHEN NO_DATA_FOUND then
477: gmf_util.log(l_procedure_name || ': No data found in cost types query');
478: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
479: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
480: END IF;
481: RAISE;
516: g_crev_prev_cost_mthd := NULL;
517:
518: ELSE
519:
520: gmf_util.log(l_procedure_name || ': query cost reval data');
521: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
522: THEN
523: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
524: END IF;
545: -- End of -- Populate Global variables
546: --
547:
548:
549: gmf_util.log('Starting GMF SLA Pre-Processor program:');
550: gmf_util.log(' Legal Entity =>' || g_legal_entity_name);
551: gmf_util.log(' Ledger =>' || g_ledger_name);
552: gmf_util.log(' Cost Type =>' || g_cost_type_code);
553: gmf_util.log(' Cost Method =>' || g_cost_method);
546: --
547:
548:
549: gmf_util.log('Starting GMF SLA Pre-Processor program:');
550: gmf_util.log(' Legal Entity =>' || g_legal_entity_name);
551: gmf_util.log(' Ledger =>' || g_ledger_name);
552: gmf_util.log(' Cost Type =>' || g_cost_type_code);
553: gmf_util.log(' Cost Method =>' || g_cost_method);
554: gmf_util.log(' Process Category =>' || g_process_category);
547:
548:
549: gmf_util.log('Starting GMF SLA Pre-Processor program:');
550: gmf_util.log(' Legal Entity =>' || g_legal_entity_name);
551: gmf_util.log(' Ledger =>' || g_ledger_name);
552: gmf_util.log(' Cost Type =>' || g_cost_type_code);
553: gmf_util.log(' Cost Method =>' || g_cost_method);
554: gmf_util.log(' Process Category =>' || g_process_category);
555:
548:
549: gmf_util.log('Starting GMF SLA Pre-Processor program:');
550: gmf_util.log(' Legal Entity =>' || g_legal_entity_name);
551: gmf_util.log(' Ledger =>' || g_ledger_name);
552: gmf_util.log(' Cost Type =>' || g_cost_type_code);
553: gmf_util.log(' Cost Method =>' || g_cost_method);
554: gmf_util.log(' Process Category =>' || g_process_category);
555:
556: gmf_util.log(' Post txn at Component cost(1)/Item cost(0) =>' || g_post_txn_cmpt_cost);
549: gmf_util.log('Starting GMF SLA Pre-Processor program:');
550: gmf_util.log(' Legal Entity =>' || g_legal_entity_name);
551: gmf_util.log(' Ledger =>' || g_ledger_name);
552: gmf_util.log(' Cost Type =>' || g_cost_type_code);
553: gmf_util.log(' Cost Method =>' || g_cost_method);
554: gmf_util.log(' Process Category =>' || g_process_category);
555:
556: gmf_util.log(' Post txn at Component cost(1)/Item cost(0) =>' || g_post_txn_cmpt_cost);
557: gmf_util.log(' Numer of Processes =>' || g_num_of_process);
550: gmf_util.log(' Legal Entity =>' || g_legal_entity_name);
551: gmf_util.log(' Ledger =>' || g_ledger_name);
552: gmf_util.log(' Cost Type =>' || g_cost_type_code);
553: gmf_util.log(' Cost Method =>' || g_cost_method);
554: gmf_util.log(' Process Category =>' || g_process_category);
555:
556: gmf_util.log(' Post txn at Component cost(1)/Item cost(0) =>' || g_post_txn_cmpt_cost);
557: gmf_util.log(' Numer of Processes =>' || g_num_of_process);
558:
552: gmf_util.log(' Cost Type =>' || g_cost_type_code);
553: gmf_util.log(' Cost Method =>' || g_cost_method);
554: gmf_util.log(' Process Category =>' || g_process_category);
555:
556: gmf_util.log(' Post txn at Component cost(1)/Item cost(0) =>' || g_post_txn_cmpt_cost);
557: gmf_util.log(' Numer of Processes =>' || g_num_of_process);
558:
559: gmf_util.log(' gl_fiscal_year =>' || p_gl_fiscal_year);
560: gmf_util.log(' gl_period =>' || p_gl_period);
553: gmf_util.log(' Cost Method =>' || g_cost_method);
554: gmf_util.log(' Process Category =>' || g_process_category);
555:
556: gmf_util.log(' Post txn at Component cost(1)/Item cost(0) =>' || g_post_txn_cmpt_cost);
557: gmf_util.log(' Numer of Processes =>' || g_num_of_process);
558:
559: gmf_util.log(' gl_fiscal_year =>' || p_gl_fiscal_year);
560: gmf_util.log(' gl_period =>' || p_gl_period);
561:
555:
556: gmf_util.log(' Post txn at Component cost(1)/Item cost(0) =>' || g_post_txn_cmpt_cost);
557: gmf_util.log(' Numer of Processes =>' || g_num_of_process);
558:
559: gmf_util.log(' gl_fiscal_year =>' || p_gl_fiscal_year);
560: gmf_util.log(' gl_period =>' || p_gl_period);
561:
562: gmf_util.log(' open_gl_date =>' || p_open_gl_date);
563:
556: gmf_util.log(' Post txn at Component cost(1)/Item cost(0) =>' || g_post_txn_cmpt_cost);
557: gmf_util.log(' Numer of Processes =>' || g_num_of_process);
558:
559: gmf_util.log(' gl_fiscal_year =>' || p_gl_fiscal_year);
560: gmf_util.log(' gl_period =>' || p_gl_period);
561:
562: gmf_util.log(' open_gl_date =>' || p_open_gl_date);
563:
564: gmf_util.log(' posting_start_date =>' || p_posting_start_date);
558:
559: gmf_util.log(' gl_fiscal_year =>' || p_gl_fiscal_year);
560: gmf_util.log(' gl_period =>' || p_gl_period);
561:
562: gmf_util.log(' open_gl_date =>' || p_open_gl_date);
563:
564: gmf_util.log(' posting_start_date =>' || p_posting_start_date);
565: gmf_util.log(' posting_end_date =>' || p_posting_end_date);
566:
560: gmf_util.log(' gl_period =>' || p_gl_period);
561:
562: gmf_util.log(' open_gl_date =>' || p_open_gl_date);
563:
564: gmf_util.log(' posting_start_date =>' || p_posting_start_date);
565: gmf_util.log(' posting_end_date =>' || p_posting_end_date);
566:
567: gmf_util.log(' post_if_no_cost =>' || p_post_if_no_cost);
568:
561:
562: gmf_util.log(' open_gl_date =>' || p_open_gl_date);
563:
564: gmf_util.log(' posting_start_date =>' || p_posting_start_date);
565: gmf_util.log(' posting_end_date =>' || p_posting_end_date);
566:
567: gmf_util.log(' post_if_no_cost =>' || p_post_if_no_cost);
568:
569: /* Start INVCONV umoogala
563:
564: gmf_util.log(' posting_start_date =>' || p_posting_start_date);
565: gmf_util.log(' posting_end_date =>' || p_posting_end_date);
566:
567: gmf_util.log(' post_if_no_cost =>' || p_post_if_no_cost);
568:
569: /* Start INVCONV umoogala
570: gmf_util.log(' post CM =>' || p_post_cm);
571: gmf_util.log(' post IC =>' || p_post_ic);
566:
567: gmf_util.log(' post_if_no_cost =>' || p_post_if_no_cost);
568:
569: /* Start INVCONV umoogala
570: gmf_util.log(' post CM =>' || p_post_cm);
571: gmf_util.log(' post IC =>' || p_post_ic);
572: gmf_util.log(' post OM =>' || p_post_om);
573: gmf_util.log(' post OP =>' || p_post_op);
574: gmf_util.log(' post PM =>' || p_post_pm);
567: gmf_util.log(' post_if_no_cost =>' || p_post_if_no_cost);
568:
569: /* Start INVCONV umoogala
570: gmf_util.log(' post CM =>' || p_post_cm);
571: gmf_util.log(' post IC =>' || p_post_ic);
572: gmf_util.log(' post OM =>' || p_post_om);
573: gmf_util.log(' post OP =>' || p_post_op);
574: gmf_util.log(' post PM =>' || p_post_pm);
575: gmf_util.log(' post PO =>' || p_post_po);
568:
569: /* Start INVCONV umoogala
570: gmf_util.log(' post CM =>' || p_post_cm);
571: gmf_util.log(' post IC =>' || p_post_ic);
572: gmf_util.log(' post OM =>' || p_post_om);
573: gmf_util.log(' post OP =>' || p_post_op);
574: gmf_util.log(' post PM =>' || p_post_pm);
575: gmf_util.log(' post PO =>' || p_post_po);
576: gmf_util.log(' post PUR =>' || p_post_pur);
569: /* Start INVCONV umoogala
570: gmf_util.log(' post CM =>' || p_post_cm);
571: gmf_util.log(' post IC =>' || p_post_ic);
572: gmf_util.log(' post OM =>' || p_post_om);
573: gmf_util.log(' post OP =>' || p_post_op);
574: gmf_util.log(' post PM =>' || p_post_pm);
575: gmf_util.log(' post PO =>' || p_post_po);
576: gmf_util.log(' post PUR =>' || p_post_pur);
577: */
570: gmf_util.log(' post CM =>' || p_post_cm);
571: gmf_util.log(' post IC =>' || p_post_ic);
572: gmf_util.log(' post OM =>' || p_post_om);
573: gmf_util.log(' post OP =>' || p_post_op);
574: gmf_util.log(' post PM =>' || p_post_pm);
575: gmf_util.log(' post PO =>' || p_post_po);
576: gmf_util.log(' post PUR =>' || p_post_pur);
577: */
578:
571: gmf_util.log(' post IC =>' || p_post_ic);
572: gmf_util.log(' post OM =>' || p_post_om);
573: gmf_util.log(' post OP =>' || p_post_op);
574: gmf_util.log(' post PM =>' || p_post_pm);
575: gmf_util.log(' post PO =>' || p_post_po);
576: gmf_util.log(' post PUR =>' || p_post_pur);
577: */
578:
579: /* Validate input params */
572: gmf_util.log(' post OM =>' || p_post_om);
573: gmf_util.log(' post OP =>' || p_post_op);
574: gmf_util.log(' post PM =>' || p_post_pm);
575: gmf_util.log(' post PO =>' || p_post_po);
576: gmf_util.log(' post PUR =>' || p_post_pur);
577: */
578:
579: /* Validate input params */
580: gmf_util.log(l_procedure_name || ': calling validate_parameters procedure');
576: gmf_util.log(' post PUR =>' || p_post_pur);
577: */
578:
579: /* Validate input params */
580: gmf_util.log(l_procedure_name || ': calling validate_parameters procedure');
581: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
582: THEN
583: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
584: END IF;
624: RAISE e_validation_failed;
625: END IF;
626:
627: /* insert the control record */
628: gmf_util.log(l_procedure_name || ': inserting the control records into gl_subr_sta');
629: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
630: THEN
631: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
632: END IF;
678: END IF;
679:
680: END IF; --}
681:
682: gmf_util.log('Number of Processes = '||g_num_req||' g_legal_entity_id = '||g_legal_entity_id||
683: ' l_up_posting_start_date = '||to_char(l_up_posting_start_date, 'mm-dd-yyyy hh24:mi:ss')||
684: ' l_up_posting_end_date = '||to_char(l_up_posting_end_date, 'mm-dd-yyyy hh24:mi:ss')||
685: ' l_date_range_secs = '||round(l_date_range_secs));
686:
748: END IF;
749:
750: COMMIT;
751:
752: gmf_util.log(l_procedure_name || ': Submitting concurrent request');
753: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
754: THEN
755: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
756: END IF;
782:
783: fnd_message.set_name('GMF','GL_NOTE_REF_NO');
784: fnd_message.set_token('S1', l_subledger_ref_no);
785: l_msg_text := fnd_message.get;
786: gmf_util.log(l_msg_text);
787:
788: gmf_util.log(l_procedure_name || ': concurrent request submitted. Reference#: ' || l_subledger_ref_no);
789: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
790: THEN
784: fnd_message.set_token('S1', l_subledger_ref_no);
785: l_msg_text := fnd_message.get;
786: gmf_util.log(l_msg_text);
787:
788: gmf_util.log(l_procedure_name || ': concurrent request submitted. Reference#: ' || l_subledger_ref_no);
789: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
790: THEN
791: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
792: END IF;
800: x_errbuf := 'Concurrent request submitted. Reference#: ' || TO_CHAR(l_subledger_ref_no) ;
801: END LOOP;
802:
803: IF l_cursor_found = 'N' THEN
804: gmf_util.log(l_procedure_name || ': NO TRANSACTIONS TO PROCESS - Concurrent request NOT submitted.');
805: END IF;
806: ELSIF ( --} {
807: (
808: l_up_post_ic = 1 OR
885: END IF;
886:
887: COMMIT;
888:
889: gmf_util.log(l_procedure_name || ': Submitting concurrent request');
890: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
891: THEN
892: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
893: END IF;
919:
920: fnd_message.set_name('GMF','GL_NOTE_REF_NO');
921: fnd_message.set_token('S1', l_subledger_ref_no);
922: l_msg_text := fnd_message.get;
923: gmf_util.log(l_msg_text);
924:
925: gmf_util.log(l_procedure_name || ': concurrent request submitted. Reference#: ' || l_subledger_ref_no);
926: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
927: THEN
921: fnd_message.set_token('S1', l_subledger_ref_no);
922: l_msg_text := fnd_message.get;
923: gmf_util.log(l_msg_text);
924:
925: gmf_util.log(l_procedure_name || ': concurrent request submitted. Reference#: ' || l_subledger_ref_no);
926: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
927: THEN
928: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
929: END IF;
966: END IF;
967:
968: COMMIT;
969:
970: gmf_util.log(l_procedure_name || ': Submitting concurrent request');
971: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
972: THEN
973: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
974: END IF;
1000:
1001: fnd_message.set_name('GMF','GL_NOTE_REF_NO');
1002: fnd_message.set_token('S1', l_subledger_ref_no);
1003: l_msg_text := fnd_message.get;
1004: gmf_util.log(l_msg_text);
1005:
1006: gmf_util.log(l_procedure_name || ': concurrent request submitted. Reference#: ' || l_subledger_ref_no);
1007: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1008: THEN
1002: fnd_message.set_token('S1', l_subledger_ref_no);
1003: l_msg_text := fnd_message.get;
1004: gmf_util.log(l_msg_text);
1005:
1006: gmf_util.log(l_procedure_name || ': concurrent request submitted. Reference#: ' || l_subledger_ref_no);
1007: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1008: THEN
1009: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1010: END IF;
1022: WHEN e_req_submit_error THEN
1023: x_retcode := 3;
1024: x_errbuf := l_msg_text;
1025:
1026: gmf_util.log(l_procedure_name || ': e_req_submit_error: ' || x_errbuf);
1027: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1028: THEN
1029: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1030: END IF;
1033:
1034: WHEN e_validation_failed THEN
1035: x_retcode := 3;
1036:
1037: gmf_util.log('e_validation_failed: ' || x_errbuf);
1038: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1039: THEN
1040: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1041: END IF;
1044:
1045: WHEN e_ctlrec_failed THEN
1046: x_retcode := 3;
1047:
1048: gmf_util.log('e_ctlrec_failed: ' || x_errbuf);
1049: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1050: THEN
1051: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1052: END IF;
1055:
1056: WHEN e_reval_error THEN
1057: x_retcode := 3;
1058:
1059: gmf_util.log('error: ' || x_errbuf);
1060: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1061: THEN
1062: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1063: END IF;
1065: WHEN others THEN
1066: x_retcode := 3;
1067: x_errbuf := DBMS_UTILITY.FORMAT_ERROR_BACKTRACE;
1068:
1069: gmf_util.log('in when other. error: ' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
1070: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1071: THEN
1072: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1073: END IF;
1102: l_retval BOOLEAN;
1103: l_procedure_name CONSTANT VARCHAR2(30) := 'END_PROCESS';
1104: BEGIN
1105:
1106: gmf_util.log('Begin of procedure '|| l_procedure_name);
1107:
1108: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1109: THEN
1110: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1259: e_invalid_parameter EXCEPTION;
1260:
1261: BEGIN
1262:
1263: gmf_util.log('Begin of procedure '|| l_procedure_name);
1264:
1265: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1266: THEN
1267: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1269:
1270: --
1271: -- Validating GL Fiscal Year
1272: --
1273: gmf_util.log('validating GL Fiscal Year');
1274: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1275: THEN
1276: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1277: END IF;
1292:
1293: --
1294: -- Validating GL Period
1295: --
1296: gmf_util.log('validating GL Period');
1297: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1298: THEN
1299: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1300: END IF;
1314:
1315: --
1316: -- Validating date ranges
1317: --
1318: gmf_util.log('validating date ranges');
1319: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1320: THEN
1321: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1322: END IF;
1340:
1341: --
1342: -- Validating posting dates against GL Period
1343: --
1344: gmf_util.log('Validating posting dates against GL Period');
1345: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1346: THEN
1347: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1348: END IF;
1374:
1375: --
1376: -- check the status of gl_period passed in
1377: --
1378: gmf_util.log('verifying the status of gl_period passed in. status: ' || l_gl_period_status);
1379: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1380: THEN
1381: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1382: END IF;
1386: THEN
1387: IF( l_open_gl_date IS NULL )
1388: THEN
1389: x_errbuf := 'GL Period is closed. Open GL date required' ;
1390: gmf_util.log('error: ' || x_errbuf);
1391: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1392: THEN
1393: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1394: END IF;
1404: IF( c_gl_period%NOTFOUND )
1405: THEN
1406: x_errbuf := 'Unable to find period for Open GL Date: ' || to_char(l_open_gl_date,'YYYY/MM/DD HH24:MI:SS') ;
1407: CLOSE c_gl_period;
1408: gmf_util.log('error: ' || x_errbuf);
1409: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1410: THEN
1411: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1412: END IF;
1418:
1419: IF( l_gl_period_status_2 NOT IN ('F','N','O') )
1420: THEN
1421: x_errbuf := 'Open GL Date not in an Open GL Period' ;
1422: gmf_util.log('error: ' || x_errbuf);
1423: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1424: THEN
1425: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1426: END IF;
1452:
1453: IF (g_process_category = 'REVALUATION_TRANSACTIONS')
1454: AND (g_cost_method_type <> 6) /* Non-Lot Cost Method */
1455: THEN
1456: gmf_util.log('calling check_costing procedure');
1457: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1458: THEN
1459: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1460: END IF;
1475:
1476: IF( l_retstatus <> 'S' )
1477: THEN
1478: x_errbuf := l_errbuf;
1479: gmf_util.log(l_procedure_name || ': error returned from check_costing procedure. ' ||
1480: 'error: ' || x_errbuf);
1481: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1482: THEN
1483: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1500: WHEN others THEN
1501: x_retstatus := 'E';
1502: x_errbuf := DBMS_UTILITY.FORMAT_ERROR_BACKTRACE;
1503:
1504: gmf_util.log('in when other. error: ' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
1505: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1506: THEN
1507: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1508: END IF;
1641:
1642:
1643: BEGIN
1644:
1645: gmf_util.log('Begin of procedure '|| l_procedure_name);
1646:
1647: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1648: THEN
1649: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1661: IF (g_process_category = 'PURCHASING_TRANSACTIONS') THEN l_post_pur := 1; END IF;
1662: IF (g_process_category = 'PRODUCTIONS_TRANSACTIONS') THEN l_post_pm := 1; END IF; --Bug 7355006
1663:
1664: /* check for already running or scheduled process for same params */
1665: gmf_util.log('check for already running or scheduled process for same params');
1666:
1667: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1668: THEN
1669: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1709: THEN
1710: l_period_id := 0;
1711: ELSE
1712: /* Getting period_id for LE, CT and dates */
1713: gmf_util.log('Getting period_id for LE, CT and dates.');
1714:
1715: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1716: THEN
1717: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1901:
1902: IF sql%rowcount = 0
1903: THEN
1904: x_errbuf := l_procedure_name || ': failed to insert control record';
1905: gmf_util.log('failed to insert control record');
1906: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1907: THEN
1908: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1909: END IF;
1914: x_subledger_ref_no := l_subledger_ref_no;
1915:
1916: x_retstatus := 'S';
1917:
1918: gmf_util.log(l_procedure_name || ': ' || sql%rowcount || ' control record inserted into gl_subr_sta table. ' ||
1919: ' end of procedure');
1920: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1921: THEN
1922: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1926: EXCEPTION
1927: WHEN e_insert_error
1928: THEN
1929:
1930: gmf_util.log(x_errbuf);
1931: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
1932: THEN
1933: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
1934: END IF;
2089: l_inv_period_close_status BOOLEAN;
2090:
2091: BEGIN
2092:
2093: gmf_util.log('Begin of procedure '|| l_procedure_name);
2094:
2095: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2096: THEN
2097: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2113: --
2114: -- First get the start and end date for the cost reval prior period.
2115: -- OPEN c_stend(p_co_code, lc_reval_tmp.crev_prior_calendar, lc_reval_tmp.crev_prior_period);
2116: --
2117: gmf_util.log('Check to see if current and prior period are successive');
2118: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2119: THEN
2120: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2121: END IF;
2134:
2135: --
2136: -- Now get the start and end date for the cost reval current period.
2137: --
2138: gmf_util.log('Now get the start and end date for the cost reval current period');
2139: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2140: THEN
2141: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2142: END IF;
2155: * Check if there is any period between the end_date of prior period and
2156: * start_date of current period. If there are any then period are not
2157: * consecutive. Display the message and return the error
2158: */
2159: gmf_util.log('Check for consecutive periods');
2160: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2161: THEN
2162: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2163: END IF;
2182: -- TBD how to send errors from this proc?
2183: --
2184:
2185: /* Bug#5623121 ANTHIYAG 30-Oct-2006 Start */
2186: gmf_util.log(l_procedure_name || ': Getting the inventory period for the Previous costing period');
2187: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
2188: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2189: END IF;
2190:
2225: x_inv_fiscal_year := NULL;
2226: x_inv_period := NULL;
2227: END;
2228:
2229: gmf_util.log(l_procedure_name || ': Inventory Period Year and Number fetched is : ' || x_inv_fiscal_year ||'/'|| x_inv_period);
2230: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
2231: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2232: END IF;
2233:
2238: FETCH cur_inv_period_status INTO l_close_status;
2239: CLOSE cur_inv_period_status;
2240:
2241: IF (NVL (l_close_status, 0) <= 0) THEN
2242: gmf_util.log(l_procedure_name || ': Inventory Period Year and Number: ' || x_inv_fiscal_year ||'/'|| x_inv_period || ' is not closed ');
2243: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
2244: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2245: END IF;
2246: FND_MESSAGE.SET_NAME ('GMF', 'CM_AC_INVENT_NOT_CL');
2252: --
2253: -- Check current costing period is equivalent to gl yr/prd
2254: -- Bug 1837429
2255: --
2256: gmf_util.log(l_procedure_name || ': Check current costing period is equivalent to gl yr/prd');
2257: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2258: THEN
2259: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2260: END IF;
2269: RAISE e_reval_error;
2270: END IF;
2271:
2272:
2273: gmf_util.log(l_procedure_name || ': Checking whether GL Date ' || to_char(g_crev_gl_trans_date, 'DD-MON-YYYY') ||
2274: ' is with data range: ' || to_char(p_period_start_date, 'DD-MON-YYYY') || ' and ' || to_char(p_period_end_date, 'DD-MON-YYYY'));
2275: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2276: THEN
2277: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2301: EXCEPTION
2302: WHEN e_reval_error THEN
2303: x_retstatus := 'E';
2304:
2305: gmf_util.log(l_procedure_name || ': error: ' || x_errbuf);
2306: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2307: THEN
2308: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2309: END IF;
2393: l_procedure_name CONSTANT VARCHAR2(30) := 'INTER_MOD_CAL_CONV';
2394:
2395: BEGIN
2396:
2397: gmf_util.log('Begin of procedure '|| l_procedure_name);
2398:
2399: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2400: THEN
2401: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2466: EXCEPTION
2467: WHEN e_invalid_inv_period THEN
2468: x_retstatus := 'E';
2469:
2470: gmf_util.log(l_procedure_name || ': error: ' || x_errbuf);
2471: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2472: THEN
2473: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2474: END IF;
2493:
2494: --
2495: -- Populate Global variables
2496: --
2497: gmf_util.log(l_procedure_name || ': Populate Global variables');
2498: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2499: THEN
2500: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2501: END IF;
2533: FROM gmf_legal_entities gle
2534: WHERE gle.legal_entity_id = g_legal_entity_id ;
2535: EXCEPTION
2536: WHEN NO_DATA_FOUND then
2537: gmf_util.log(l_procedure_name || ': No data found in gmf_legal_entities query');
2538: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
2539: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2540: END IF;
2541: RAISE;
2546: FROM gl_ledgers gl
2547: WHERE gl.ledger_id = g_ledger_id;
2548: EXCEPTION
2549: WHEN NO_DATA_FOUND then
2550: gmf_util.log(l_procedure_name || ': No data found in gl_ledgers query');
2551: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
2552: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2553: END IF;
2554: RAISE;
2568: AND lk.lookup_type = 'GMF_COST_METHOD'
2569: AND lk.lookup_code = mthd.cost_type ;
2570: EXCEPTION
2571: WHEN NO_DATA_FOUND then
2572: gmf_util.log(l_procedure_name || ': No data found in cost types query');
2573: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
2574: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2575: END IF;
2576: RAISE;
2601: g_crev_prev_cost_mthd := NULL;
2602:
2603: ELSE
2604:
2605: gmf_util.log(l_procedure_name || ': query cost reval data');
2606: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL )
2607: THEN
2608: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME || l_procedure_name, g_log_msg);
2609: END IF;