DBA Data[Home] [Help]

APPS.CN_FORMULA_GEN_PKG dependencies on CN_FORMULA_GEN_PKG

Line 1: PACKAGE BODY CN_FORMULA_GEN_PKG AS

1: PACKAGE BODY CN_FORMULA_GEN_PKG AS
2: -- $Header: cnfmgenb.pls 120.25.12020000.3 2012/10/04 05:06:03 rnagaraj ship $
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'CN_FORMULA_GEN_PKG';
5:

Line 4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'CN_FORMULA_GEN_PKG';

1: PACKAGE BODY CN_FORMULA_GEN_PKG AS
2: -- $Header: cnfmgenb.pls 120.25.12020000.3 2012/10/04 05:06:03 rnagaraj ship $
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'CN_FORMULA_GEN_PKG';
5:
6: TYPE str_tbl_type IS TABLE OF VARCHAR2(80) INDEX BY BINARY_INTEGER;
7: TYPE id_tbl_type IS TABLE OF VARCHAR2(15) INDEX BY BINARY_INTEGER;
8: TYPE commission_clmns_tbl_type IS TABLE OF VARCHAR2(15) INDEX BY BINARY_INTEGER;

Line 140: 'cn.plsql.cn_formula_gen_pkg.parse.exception',

136: exception
137: when others then
138: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
139: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
140: 'cn.plsql.cn_formula_gen_pkg.parse.exception',
141: sqlerrm);
142: end if;
143: raise;
144: END parse;

Line 430: 'cn.plsql.cn_formula_gen_pkg.init_tab_column_list.exception',

426: exception
427: when others then
428: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
429: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
430: 'cn.plsql.cn_formula_gen_pkg.init_tab_column_list.exception',
431: sqlerrm);
432: end if;
433: raise;
434: END init_tab_column_list;

Line 470: 'cn.plsql.cn_formula_gen_pkg.lower_str.exception',

466: exception
467: when others then
468: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
469: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
470: 'cn.plsql.cn_formula_gen_pkg.lower_str.exception',
471: sqlerrm);
472: end if;
473: raise;
474: end;

Line 803: 'cn.plsql.cn_formula_gen_pkg.generate_init.exception',

799: EXCEPTION
800: WHEN OTHERS THEN
801: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
802: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
803: 'cn.plsql.cn_formula_gen_pkg.generate_init.exception',
804: sqlerrm);
805: end if;
806: raise;
807: END;

Line 853: 'cn.plsql.cn_formula_gen_pkg.check_create_object.exception',

849: EXCEPTION
850: WHEN OTHERS THEN
851: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
852: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
853: 'cn.plsql.cn_formula_gen_pkg.check_create_object.exception',
854: sqlerrm);
855: end if;
856: raise;
857: END check_create_object;

Line 1472: 'cn.plsql.cn_formula_gen_pkg.handle_bonus_ex_tbl_orderby.exception',

1468: exception
1469: when others then
1470: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1471: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
1472: 'cn.plsql.cn_formula_gen_pkg.handle_bonus_ex_tbl_orderby.exception',
1473: sqlerrm);
1474: end if;
1475: raise;
1476: END handle_bonus_ex_tbl_orderby;

Line 1984: 'cn.plsql.cn_formula_gen_pkg.get_input.exception',

1980: EXCEPTION
1981: when others then
1982: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1983: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
1984: 'cn.plsql.cn_formula_gen_pkg.get_input.exception',
1985: sqlerrm);
1986: end if;
1987: raise;
1988: END get_input;

Line 2227: 'cn.plsql.cn_formula_gen_pkg.get_commission.exception',

2223: EXCEPTION
2224: when others then
2225: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2226: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
2227: 'cn.plsql.cn_formula_gen_pkg.get_commission.exception',
2228: sqlerrm);
2229: end if;
2230: raise;
2231: END get_commission;

Line 2484: 'cn.plsql.cn_formula_gen_pkg.get_perf.exception',

2480: EXCEPTION
2481: when others then
2482: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2483: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
2484: 'cn.plsql.cn_formula_gen_pkg.get_perf.exception',
2485: sqlerrm);
2486: end if;
2487: raise;
2488: END get_perf;

Line 3514: 'cn.plsql.cn_formula_gen_pkg.calculate_quota.exception',

3510: EXCEPTION
3511: when others then
3512: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3513: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
3514: 'cn.plsql.cn_formula_gen_pkg.calculate_quota.exception',
3515: sqlerrm);
3516: end if;
3517: raise;
3518: END calculate_quota;

Line 3679: 'cn.plsql.cn_formula_gen_pkg.get_result.exception',

3675: EXCEPTION
3676: when others then
3677: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3678: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
3679: 'cn.plsql.cn_formula_gen_pkg.get_result.exception',
3680: sqlerrm);
3681: end if;
3682: raise;
3683: END get_result;

Line 3824: 'cn.plsql.cn_formula_gen_pkg.update_revclass_perf.exception',

3820: EXCEPTION
3821: when others then
3822: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3823: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
3824: 'cn.plsql.cn_formula_gen_pkg.update_revclass_perf.exception',
3825: sqlerrm);
3826: end if;
3827: raise;
3828: END update_revclass_perf;

Line 4287: 'cn.plsql.cn_formula_gen_pkg.calculate_bonus_quota.exception',

4283: EXCEPTION
4284: when others then
4285: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4286: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
4287: 'cn.plsql.cn_formula_gen_pkg.calculate_bonus_quota.exception',
4288: sqlerrm);
4289: end if;
4290: raise;
4291: END calculate_bonus_quota;

Line 4596: 'cn.plsql.cn_formula_gen_pkg.get_forecast_commission.exception',

4592: EXCEPTION
4593: WHEN OTHERS THEN
4594: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4595: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
4596: 'cn.plsql.cn_formula_gen_pkg.get_forecast_commission.exception',
4597: sqlerrm);
4598: end if;
4599: raise;
4600: END get_forecast_commission;

Line 4680: 'cn.plsql.cn_formula_gen_pkg.get_sql_select.exception',

4676: EXCEPTION
4677: WHEN OTHERS THEN
4678: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4679: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
4680: 'cn.plsql.cn_formula_gen_pkg.get_sql_select.exception',
4681: sqlerrm);
4682: end if;
4683: raise;
4684: END;

Line 4814: 'cn.plsql.cn_formula_gen_pkg.get_estimated_payout.exception',

4810: EXCEPTION
4811: WHEN OTHERS THEN
4812: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4813: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
4814: 'cn.plsql.cn_formula_gen_pkg.get_estimated_payout.exception',
4815: sqlerrm);
4816: end if;
4817: raise;
4818: END get_estimated_payout;

Line 4839: 'cn.plsql.cn_formula_gen_pkg.create_formula',

4835: -- ADDED for bug 14230033
4836: IF ( ad_zd.get_edition('PATCH') IS NOT NULL ) THEN
4837: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4838: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4839: 'cn.plsql.cn_formula_gen_pkg.create_formula',
4840: 'AD_ZD_DISABLED_FEATURE');
4841: END IF;
4842: RETURN FALSE;
4843: END IF;

Line 4847: 'cn.plsql.cn_formula_gen_pkg.create_formula.begin',

4843: END IF;
4844:
4845: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4846: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4847: 'cn.plsql.cn_formula_gen_pkg.create_formula.begin',
4848: 'Beginning of create_formula procedure ...');
4849: end if;
4850:
4851: cn_utils.set_org_id(g_org_id);

Line 4864: 'cn.plsql.cn_formula_gen_pkg.create_formula.statement',

4860: check_create_object(package_name, 'PKB', package_body_id, l_repository_id);
4861:
4862: if (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4863: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
4864: 'cn.plsql.cn_formula_gen_pkg.create_formula.statement',
4865: 'The formula package name is '||package_name);
4866: end if;
4867:
4868: cn_message_pkg.debug('The formula package name is ' ||package_name);

Line 4880: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',

4876: init_tab_column_list(p_formula_id);
4877:
4878: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4879: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4880: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4881: 'After generate_init in create_formula');
4882: end if;
4883:
4884: cn_message_pkg.debug( 'after generate_init ');

Line 4897: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',

4893: get_input(spec_code, body_code);
4894: cn_message_pkg.debug( 'after get_input');
4895: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4896: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4897: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4898: 'After generating get_input in create_formula');
4899: end if;
4900:
4901:

Line 4906: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',

4902: get_perf(spec_code, body_code);
4903: cn_message_pkg.debug( 'after get_perf ');
4904: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4905: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4906: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4907: 'After generating get_perf in create_formula');
4908: end if;
4909:
4910: get_commission(spec_code, body_code);

Line 4914: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',

4910: get_commission(spec_code, body_code);
4911: cn_message_pkg.debug( 'after get_commission');
4912: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4913: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4914: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4915: 'After generating get_commission in create_formula');
4916: end if;
4917: END IF;
4918:

Line 4924: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',

4920: calculate_quota(spec_code, body_code);
4921: cn_message_pkg.debug( 'after calculate_quota ');
4922: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4923: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4924: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4925: 'After generating calculate_quota in create_formula');
4926: end if;
4927: ELSIF g_formula_type = 'B' THEN
4928: calculate_bonus_quota(spec_code, body_code);

Line 4932: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',

4928: calculate_bonus_quota(spec_code, body_code);
4929: cn_message_pkg.debug( 'after calculate_bonus_quota ');
4930: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4931: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4932: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4933: 'After generating calculate_bonus_quota in create_formula');
4934: end if;
4935: END IF;
4936:

Line 4942: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',

4938: get_result(spec_code, body_code);
4939: cn_message_pkg.debug( 'after get_result ');
4940: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4941: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4942: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4943: 'After generating get_result in create_formula');
4944: end if;
4945: END IF;
4946:

Line 4952: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',

4948: update_revclass_perf(spec_code, body_code);
4949: cn_message_pkg.debug( 'after update_revclass_perf ');
4950: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4951: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4952: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4953: 'After generating update_revclass_perf in create_formula');
4954: end if;
4955: END IF;
4956:

Line 4962: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',

4958: get_forecast_commission(spec_code, body_code);
4959: cn_message_pkg.debug( 'after get_forecast_commission');
4960: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4961: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4962: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4963: 'After generating get_forecast_commission in create_formula');
4964: end if;
4965: END IF;
4966:

Line 4976: 'cn.plsql.cn_formula_gen_pkg.create_formula.end',

4972: RETURN TRUE;
4973:
4974: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4975: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4976: 'cn.plsql.cn_formula_gen_pkg.create_formula.end',
4977: 'End of create_formula');
4978: end if;
4979: EXCEPTION
4980: when others then

Line 4984: 'cn.plsql.cn_formula_gen_pkg.parse.exception',

4980: when others then
4981: cn_utils.unset_org_id;
4982: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4983: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
4984: 'cn.plsql.cn_formula_gen_pkg.parse.exception',
4985: sqlerrm);
4986: end if;
4987: raise;
4988: END create_formula;

Line 5106: 'cn.plsql.cn_formula_gen_pkg.generate_formula',

5102: -- ADDED for bug 14230033
5103: IF ( ad_zd.get_edition('PATCH') IS NOT NULL ) THEN
5104: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5105: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5106: 'cn.plsql.cn_formula_gen_pkg.generate_formula',
5107: 'AD_ZD_DISABLED_FEATURE ...');
5108: END IF;
5109: x_return_status := 'E';
5110: x_msg_data := 'AD_ZD_DISABLED_FEATURE';

Line 5136: 'cn.plsql.cn_formula_gen_pkg.generate_formula.begin',

5132: -- Codes start here
5133:
5134: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5135: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5136: 'cn.plsql.cn_formula_gen_pkg.generate_formula.begin',
5137: 'Beginning of generate_formula ...');
5138: end if;
5139:
5140: g_org_id := p_org_id;

Line 5149: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',

5145:
5146: IF l_status THEN /* formula created successfully. Continue to install it. */
5147: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5148: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5149: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',
5150: 'Generate the PL/SQL code successfully in generate_formula');
5151: end if;
5152:
5153: -- start usage of ad_ddl from bug 12330815 ( repalce dbms_sql with ad_ddl)

Line 5216: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',

5212: AND org_id = g_org_id;
5213:
5214: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5215: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5216: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',
5217: 'Compiled formula package successfullly in generate_formula');
5218: end if;
5219: ELSE
5220: UPDATE cn_calc_formulas_all

Line 5232: 'cn.plsql.cn_formula_gen_pkg.generate_formula.error',

5228: fnd_message.set_name('CN', 'CN_FORMULA_COMPILE_ERR');
5229: FND_MSG_PUB.ADD;
5230: if (FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5231: FND_LOG.MESSAGE(FND_LOG.LEVEL_ERROR,
5232: 'cn.plsql.cn_formula_gen_pkg.generate_formula.error',
5233: FALSE);
5234: end if;
5235:
5236: END IF;

Line 5240: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',

5236: END IF;
5237:
5238: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5239: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5240: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',
5241: 'Failed to Compile formula package in generate_formula');
5242: end if;
5243:
5244: END IF;

Line 5248: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',

5244: END IF;
5245: ELSE -- failed to created formula package
5246: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5247: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5248: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',
5249: 'Failed to generate the PL/SQL code in generate_formula');
5250: end if;
5251:
5252: UPDATE cn_calc_formulas_all

Line 5270: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',

5266:
5267:
5268: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5269: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5270: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',
5271: 'End of generate_formula');
5272: end if;
5273:
5274: -- Standard check of p_commit.

Line 5317: 'cn.plsql.cn_formula_gen_pkg.generate_formula.exception',

5313: );
5314:
5315: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5316: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
5317: 'cn.plsql.cn_formula_gen_pkg.generate_formula.exception',
5318: sqlerrm);
5319: end if;
5320: END generate_formula;
5321:

Line 5389: cn_formula_gen_pkg.generate_formula(p_api_version => 1.0,

5385: END LOOP;
5386:
5387: -- Re-create the formula packages for the upgrade
5388: FOR formula IN formulas LOOP
5389: cn_formula_gen_pkg.generate_formula(p_api_version => 1.0,
5390: x_return_status => l_return_status,
5391: x_msg_count => l_msg_count,
5392: x_msg_data => l_msg_data,
5393: p_formula_id => formula.calc_formula_id,

Line 5430: END cn_formula_gen_pkg;

5426: retcode := 2;
5427: errbuf := sqlerrm;
5428: END generate_formula_conc;
5429:
5430: END cn_formula_gen_pkg;