DBA Data[Home] [Help]

APPS.CN_CALC_FORMULAS_PVT dependencies on CN_FORMULA_INPUTS

Line 193: from cn_formula_inputs where calc_formula_id = p_calc_formula_id;

189: and a.calc_formula_id = p_calc_formula_id;
190:
191: cursor inputs is
192: select calc_sql_exp_id, f_calc_sql_exp_id
193: from cn_formula_inputs where calc_formula_id = p_calc_formula_id;
194: BEGIN
195:
196: -- 1. Formula should have only a single dimension rate table (no rate table is also allowed)
197: -- 2. The rate table can only have AMOUNT or PERCENT based tiers.

Line 451: -- call table handler to create the input records in cn_formula_inputs

447: END IF;
448:
449: /* End - R12 Notes History */
450:
451: -- call table handler to create the input records in cn_formula_inputs
452: IF (p_input_tbl.COUNT > 0) THEN
453: FOR i IN p_input_tbl.first..p_input_tbl.last LOOP
454: l_temp_id := NULL;
455: cn_formula_inputs_pkg.insert_row

Line 455: cn_formula_inputs_pkg.insert_row

451: -- call table handler to create the input records in cn_formula_inputs
452: IF (p_input_tbl.COUNT > 0) THEN
453: FOR i IN p_input_tbl.first..p_input_tbl.last LOOP
454: l_temp_id := NULL;
455: cn_formula_inputs_pkg.insert_row
456: (x_formula_input_id => l_temp_id,
457: x_calc_formula_id => x_calc_formula_id,
458: x_calc_sql_exp_id => p_input_tbl(i).calc_sql_exp_id,
459: x_f_calc_sql_exp_id => p_input_tbl(i).f_calc_sql_exp_id,

Line 751: -- call table handler to insert/update/delete the input records in cn_formula_inputs

747: -- *********************************************************************
748: -- ************ Start - This code is not required in R12 ***************
749: -- *********************************************************************
750: /*
751: -- call table handler to insert/update/delete the input records in cn_formula_inputs
752: IF (p_input_tbl.COUNT > 0) THEN
753: x_formula_status := 'INCOMPLETE';
754: FOR i IN p_input_tbl.first..p_input_tbl.last LOOP
755: IF (p_input_tbl(i).formula_input_id IS NULL) THEN

Line 757: cn_formula_inputs_pkg.insert_row

753: x_formula_status := 'INCOMPLETE';
754: FOR i IN p_input_tbl.first..p_input_tbl.last LOOP
755: IF (p_input_tbl(i).formula_input_id IS NULL) THEN
756: l_temp_id := NULL;
757: cn_formula_inputs_pkg.insert_row
758: (x_formula_input_id => l_temp_id,
759: x_calc_formula_id => p_calc_formula_id,
760: x_calc_sql_exp_id => p_input_tbl(i).calc_sql_exp_id,
761: x_f_calc_sql_exp_id => p_input_tbl(i).f_calc_sql_exp_id,

Line 772: cn_formula_inputs_pkg.delete_row(p_input_tbl(i).formula_input_id);

768: );
769:
770: l_update_count := l_update_count + 1;
771: ELSIF (p_input_tbl(i).calc_sql_exp_id IS NULL) THEN
772: cn_formula_inputs_pkg.delete_row(p_input_tbl(i).formula_input_id);
773: l_num_dim := l_num_dim - 1;
774: ELSE
775: cn_formula_inputs_pkg.lock_row
776: (x_formula_input_id => p_input_tbl(i).formula_input_id,

Line 775: cn_formula_inputs_pkg.lock_row

771: ELSIF (p_input_tbl(i).calc_sql_exp_id IS NULL) THEN
772: cn_formula_inputs_pkg.delete_row(p_input_tbl(i).formula_input_id);
773: l_num_dim := l_num_dim - 1;
774: ELSE
775: cn_formula_inputs_pkg.lock_row
776: (x_formula_input_id => p_input_tbl(i).formula_input_id,
777: x_object_version_number => p_input_tbl(i).object_version_number);
778:
779: cn_formula_inputs_pkg.update_row

Line 779: cn_formula_inputs_pkg.update_row

775: cn_formula_inputs_pkg.lock_row
776: (x_formula_input_id => p_input_tbl(i).formula_input_id,
777: x_object_version_number => p_input_tbl(i).object_version_number);
778:
779: cn_formula_inputs_pkg.update_row
780: (x_formula_input_id => p_input_tbl(i).formula_input_id,
781: x_calc_formula_id => p_calc_formula_id,
782: x_calc_sql_exp_id => p_input_tbl(i).calc_sql_exp_id,
783: x_f_calc_sql_exp_id => p_input_tbl(i).f_calc_sql_exp_id,

Line 1255: update cn_formula_inputs set cumulative_flag = 'N' where calc_formula_id = p_calc_formula_id;

1251: /* End - R12 Notes History */
1252:
1253: -- if th cumulative flag or the split flag has been set to "N", then set the corros flags in the input table to "N"
1254: IF p_cumulative_flag = 'N' THEN
1255: update cn_formula_inputs set cumulative_flag = 'N' where calc_formula_id = p_calc_formula_id;
1256: END IF;
1257:
1258: IF p_split_flag = 'N' THEN
1259: update cn_formula_inputs set split_flag = 'N' where calc_formula_id = p_calc_formula_id;

Line 1259: update cn_formula_inputs set split_flag = 'N' where calc_formula_id = p_calc_formula_id;

1255: update cn_formula_inputs set cumulative_flag = 'N' where calc_formula_id = p_calc_formula_id;
1256: END IF;
1257:
1258: IF p_split_flag = 'N' THEN
1259: update cn_formula_inputs set split_flag = 'N' where calc_formula_id = p_calc_formula_id;
1260: END IF;
1261:
1262: -- IF the split is changed, the changes has to be reflected
1263: IF rec_info.split_flag <> p_split_flag THEN

Line 1264: update cn_formula_inputs set split_flag = p_split_flag

1260: END IF;
1261:
1262: -- IF the split is changed, the changes has to be reflected
1263: IF rec_info.split_flag <> p_split_flag THEN
1264: update cn_formula_inputs set split_flag = p_split_flag
1265: where calc_formula_id = p_calc_formula_id and split_flag <> 'N' ;
1266:
1267: -- changes for BUG#2797926
1268: IF (p_split_flag = 'Y') AND (p_split_flag IS NOT NULL )THEN

Line 1273: FROM cn_formula_inputs

1269: -- check whether there is only one row in the
1270: -- formula inputs
1271: SELECT count(*)
1272: INTO l_count_formula_input
1273: FROM cn_formula_inputs
1274: WHERE calc_formula_id = p_calc_formula_id ;
1275:
1276: -- if only one formula input is there
1277: -- update the split flag to 'Y'

Line 1279: update cn_formula_inputs set split_flag = p_split_flag

1275:
1276: -- if only one formula input is there
1277: -- update the split flag to 'Y'
1278: IF (l_count_formula_input = 1) THEN
1279: update cn_formula_inputs set split_flag = p_split_flag
1280: where calc_formula_id = p_calc_formula_id ;
1281: END IF;
1282: END IF;
1283: END IF;

Line 1567: DELETE FROM cn_formula_inputs WHERE calc_formula_id = p_calc_formula_id AND org_id = p_org_id;

1563: END IF;
1564: /* End - R12 Notes History */
1565:
1566: -- delete formula inputs and rate table assignments
1567: DELETE FROM cn_formula_inputs WHERE calc_formula_id = p_calc_formula_id AND org_id = p_org_id;
1568: DELETE FROM cn_rt_formula_asgns WHERE calc_formula_id = p_calc_formula_id AND org_id = p_org_id;
1569:
1570: -- delete formula packages and the records in cn_objects if they exist.
1571:

Line 1691: cn_formula_inputs c

1687: SELECT a.status, a.exp_type_code, b.status f_status,
1688: b.exp_type_code f_exp_type_code
1689: FROM cn_calc_sql_exps a,
1690: cn_calc_sql_exps b,
1691: cn_formula_inputs c
1692: WHERE a.calc_sql_exp_id = c.calc_sql_exp_id
1693: AND b.calc_sql_exp_id(+) = c.f_calc_sql_exp_id
1694: AND c.calc_formula_id = p_calc_formula_id;
1695:

Line 1916: FROM cn_formula_inputs

1912: IF (l_split_flag = 'Y') THEN
1913:
1914: SELECT count(*)
1915: INTO l_count_formula_input
1916: FROM cn_formula_inputs
1917: WHERE calc_formula_id = p_calc_formula_id
1918: AND split_flag = 'Y';
1919:
1920: IF l_count_formula_input = 0 THEN