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.15.12000000.5 2007/09/26 18:23:44 achanda 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.15.12000000.5 2007/09/26 18:23:44 achanda 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 1465: 'cn.plsql.cn_formula_gen_pkg.handle_bonus_ex_tbl_orderby.exception',

1461: exception
1462: when others then
1463: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1464: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
1465: 'cn.plsql.cn_formula_gen_pkg.handle_bonus_ex_tbl_orderby.exception',
1466: sqlerrm);
1467: end if;
1468: raise;
1469: END handle_bonus_ex_tbl_orderby;

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

1967: EXCEPTION
1968: when others then
1969: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1970: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
1971: 'cn.plsql.cn_formula_gen_pkg.get_input.exception',
1972: sqlerrm);
1973: end if;
1974: raise;
1975: END get_input;

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

2210: EXCEPTION
2211: when others then
2212: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2213: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
2214: 'cn.plsql.cn_formula_gen_pkg.get_commission.exception',
2215: sqlerrm);
2216: end if;
2217: raise;
2218: END get_commission;

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

2467: EXCEPTION
2468: when others then
2469: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2470: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
2471: 'cn.plsql.cn_formula_gen_pkg.get_perf.exception',
2472: sqlerrm);
2473: end if;
2474: raise;
2475: END get_perf;

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

3497: EXCEPTION
3498: when others then
3499: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3500: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
3501: 'cn.plsql.cn_formula_gen_pkg.calculate_quota.exception',
3502: sqlerrm);
3503: end if;
3504: raise;
3505: END calculate_quota;

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

3662: EXCEPTION
3663: when others then
3664: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3665: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
3666: 'cn.plsql.cn_formula_gen_pkg.get_result.exception',
3667: sqlerrm);
3668: end if;
3669: raise;
3670: END get_result;

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

3807: EXCEPTION
3808: when others then
3809: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
3810: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
3811: 'cn.plsql.cn_formula_gen_pkg.update_revclass_perf.exception',
3812: sqlerrm);
3813: end if;
3814: raise;
3815: END update_revclass_perf;

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

4270: EXCEPTION
4271: when others then
4272: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4273: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
4274: 'cn.plsql.cn_formula_gen_pkg.calculate_bonus_quota.exception',
4275: sqlerrm);
4276: end if;
4277: raise;
4278: END calculate_bonus_quota;

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

4579: EXCEPTION
4580: WHEN OTHERS THEN
4581: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4582: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
4583: 'cn.plsql.cn_formula_gen_pkg.get_forecast_commission.exception',
4584: sqlerrm);
4585: end if;
4586: raise;
4587: END get_forecast_commission;

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

4663: EXCEPTION
4664: WHEN OTHERS THEN
4665: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4666: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
4667: 'cn.plsql.cn_formula_gen_pkg.get_sql_select.exception',
4668: sqlerrm);
4669: end if;
4670: raise;
4671: END;

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

4797: EXCEPTION
4798: WHEN OTHERS THEN
4799: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4800: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
4801: 'cn.plsql.cn_formula_gen_pkg.get_estimated_payout.exception',
4802: sqlerrm);
4803: end if;
4804: raise;
4805: END get_estimated_payout;

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

4819: l_repository_id cn_repositories.repository_id%TYPE;
4820: BEGIN
4821: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4822: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4823: 'cn.plsql.cn_formula_gen_pkg.create_formula.begin',
4824: 'Beginning of create_formula procedure ...');
4825: end if;
4826:
4827: cn_utils.set_org_id(g_org_id);

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

4836: check_create_object(package_name, 'PKB', package_body_id, l_repository_id);
4837:
4838: if (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4839: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
4840: 'cn.plsql.cn_formula_gen_pkg.create_formula.statement',
4841: 'The formula package name is '||package_name);
4842: end if;
4843:
4844: cn_message_pkg.debug('The formula package name is ' ||package_name);

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

4852: init_tab_column_list(p_formula_id);
4853:
4854: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4855: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4856: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4857: 'After generate_init in create_formula');
4858: end if;
4859:
4860: cn_message_pkg.debug( 'after generate_init ');

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

4869: get_input(spec_code, body_code);
4870: cn_message_pkg.debug( 'after get_input');
4871: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4872: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4873: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4874: 'After generating get_input in create_formula');
4875: end if;
4876:
4877:

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

4878: get_perf(spec_code, body_code);
4879: cn_message_pkg.debug( 'after get_perf ');
4880: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4881: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4882: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4883: 'After generating get_perf in create_formula');
4884: end if;
4885:
4886: get_commission(spec_code, body_code);

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

4886: get_commission(spec_code, body_code);
4887: cn_message_pkg.debug( 'after get_commission');
4888: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4889: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4890: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4891: 'After generating get_commission in create_formula');
4892: end if;
4893: END IF;
4894:

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

4896: calculate_quota(spec_code, body_code);
4897: cn_message_pkg.debug( 'after calculate_quota ');
4898: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4899: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4900: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4901: 'After generating calculate_quota in create_formula');
4902: end if;
4903: ELSIF g_formula_type = 'B' THEN
4904: calculate_bonus_quota(spec_code, body_code);

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

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

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

4914: get_result(spec_code, body_code);
4915: cn_message_pkg.debug( 'after get_result ');
4916: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4917: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4918: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4919: 'After generating get_result in create_formula');
4920: end if;
4921: END IF;
4922:

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

4924: update_revclass_perf(spec_code, body_code);
4925: cn_message_pkg.debug( 'after update_revclass_perf ');
4926: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4927: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4928: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4929: 'After generating update_revclass_perf in create_formula');
4930: end if;
4931: END IF;
4932:

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

4934: get_forecast_commission(spec_code, body_code);
4935: cn_message_pkg.debug( 'after get_forecast_commission');
4936: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4937: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
4938: 'cn.plsql.cn_formula_gen_pkg.create_formula.progress',
4939: 'After generating get_forecast_commission in create_formula');
4940: end if;
4941: END IF;
4942:

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

4948: RETURN TRUE;
4949:
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.end',
4953: 'End of create_formula');
4954: end if;
4955: EXCEPTION
4956: when others then

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

4956: when others then
4957: cn_utils.unset_org_id;
4958: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
4959: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
4960: 'cn.plsql.cn_formula_gen_pkg.parse.exception',
4961: sqlerrm);
4962: end if;
4963: raise;
4964: END create_formula;

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

5053: -- Codes start here
5054:
5055: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5056: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5057: 'cn.plsql.cn_formula_gen_pkg.generate_formula.begin',
5058: 'Beginning of generate_formula ...');
5059: end if;
5060:
5061: g_org_id := p_org_id;

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

5066:
5067: IF l_status THEN /* formula created successfully. Continue to install it. */
5068: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5069: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5070: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',
5071: 'Generate the PL/SQL code successfully in generate_formula');
5072: end if;
5073:
5074: SELECT co.object_id

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

5129: AND org_id = g_org_id;
5130:
5131: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5132: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5133: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',
5134: 'Compiled formula package successfullly in generate_formula');
5135: end if;
5136: ELSE
5137: UPDATE cn_calc_formulas_all

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

5145: fnd_message.set_name('CN', 'CN_FORMULA_COMPILE_ERR');
5146: FND_MSG_PUB.ADD;
5147: if (FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5148: FND_LOG.MESSAGE(FND_LOG.LEVEL_ERROR,
5149: 'cn.plsql.cn_formula_gen_pkg.generate_formula.error',
5150: FALSE);
5151: end if;
5152:
5153: END IF;

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

5153: END IF;
5154:
5155: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5156: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5157: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',
5158: 'Failed to Compile formula package in generate_formula');
5159: end if;
5160:
5161: END IF;

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

5161: END IF;
5162: ELSE -- failed to created formula package
5163: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5164: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5165: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',
5166: 'Failed to generate the PL/SQL code in generate_formula');
5167: end if;
5168:
5169: UPDATE cn_calc_formulas_all

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

5183:
5184:
5185: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5186: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
5187: 'cn.plsql.cn_formula_gen_pkg.generate_formula.progress',
5188: 'End of generate_formula');
5189: end if;
5190:
5191: -- Standard check of p_commit.

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

5230: );
5231:
5232: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
5233: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
5234: 'cn.plsql.cn_formula_gen_pkg.generate_formula.exception',
5235: sqlerrm);
5236: end if;
5237: END generate_formula;
5238:

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

5268: and status = 'INVALID';
5269:
5270: BEGIN
5271: FOR formula IN formulas LOOP
5272: cn_formula_gen_pkg.generate_formula(p_api_version => 1.0,
5273: x_return_status => l_return_status,
5274: x_msg_count => l_msg_count,
5275: x_msg_data => l_msg_data,
5276: p_formula_id => formula.calc_formula_id,

Line 5313: END cn_formula_gen_pkg;

5309: retcode := 2;
5310: errbuf := sqlerrm;
5311: END generate_formula_conc;
5312:
5313: END cn_formula_gen_pkg;