DBA Data[Home] [Help]

APPS.PSB_WS_ACCT2 dependencies on PSB_WS_ACCT1

Line 23: AND effective_start_date <= PSB_WS_ACCT1.g_startdate_pp

19: SELECT budget_group_id,
20: num_proposed_years
21: FROM psb_budget_groups
22: WHERE budget_group_type = 'R'
23: AND effective_start_date <= PSB_WS_ACCT1.g_startdate_pp
24: AND ( effective_end_date is null or effective_end_date >=
25: PSB_WS_ACCT1.g_enddate_cy )
26: START WITH budget_group_id = budgetgroup_id
27: CONNECT BY prior budget_group_id = parent_budget_group_id;

Line 25: PSB_WS_ACCT1.g_enddate_cy )

21: FROM psb_budget_groups
22: WHERE budget_group_type = 'R'
23: AND effective_start_date <= PSB_WS_ACCT1.g_startdate_pp
24: AND ( effective_end_date is null or effective_end_date >=
25: PSB_WS_ACCT1.g_enddate_cy )
26: START WITH budget_group_id = budgetgroup_id
27: CONNECT BY prior budget_group_id = parent_budget_group_id;
28:
29: TYPE g_currency_tbl_type IS TABLE OF VARCHAR2(15)

Line 48: g_gl_actual_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;

44:
45: TYPE TokValArray IS TABLE OF VARCHAR2(1000)
46: INDEX BY BINARY_INTEGER;
47:
48: g_gl_actual_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;
49: g_num_actual_periods NUMBER;
50: g_gl_budget_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;
51: g_num_budget_periods NUMBER;
52: g_alloc_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;

Line 50: g_gl_budget_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;

46: INDEX BY BINARY_INTEGER;
47:
48: g_gl_actual_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;
49: g_num_actual_periods NUMBER;
50: g_gl_budget_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;
51: g_num_budget_periods NUMBER;
52: g_alloc_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;
53:
54: -- Bug#3514350: To check if CY estimates need to be processed.

Line 52: g_alloc_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;

48: g_gl_actual_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;
49: g_num_actual_periods NUMBER;
50: g_gl_budget_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;
51: g_num_budget_periods NUMBER;
52: g_alloc_periods PSB_WS_ACCT1.g_budgetperiod_tbl_type;
53:
54: -- Bug#3514350: To check if CY estimates need to be processed.
55: g_process_cy_estimates BOOLEAN := TRUE;
56:

Line 72: g_period_amount PSB_WS_ACCT1.g_prdamt_tbl_type;

68: g_actuals_stat_total NUMBER;
69:
70: --bug 3704360 made the following variable as public by declaring it in the spec
71: --g_running_total NUMBER;
72: g_period_amount PSB_WS_ACCT1.g_prdamt_tbl_type;
73:
74: g_summary_ccid NUMBER;
75: g_summ_bgroup_id NUMBER;
76:

Line 609: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop

605: l_balance_type VARCHAR2(1);
606:
607: BEGIN
608:
609: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop
610: g_period_amount(l_init_index) := null;
611: end loop;
612:
613: l_ytd_amount := 0;

Line 747: PSB_WS_ACCT1.Create_Account_Dist

743: -- ', p_budget_year_id=' || TO_CHAR(p_budget_year_id) ||
744: -- ', l_balance_type=' || l_balance_type ||
745: -- ', p_ytd_amount=' || TO_CHAR(l_ytd_amount));
746:
747: PSB_WS_ACCT1.Create_Account_Dist
748: (p_api_version => 1.0,
749: p_return_status => l_return_status,
750: p_account_line_id => l_account_line_id,
751: p_worksheet_id => p_worksheet_id,

Line 775: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop

771: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
772: raise FND_API.G_EXC_ERROR;
773: end if;
774:
775: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop
776: g_period_amount(l_init_index) := null;
777: end loop;
778:
779: l_ytd_amount := 0;

Line 1008: PSB_WS_ACCT1.DSQL_Budget_Balance

1004: end if;
1005:
1006: -- Create Dynamic SQL Statements for extracting GL Balances
1007:
1008: PSB_WS_ACCT1.DSQL_Budget_Balance
1009: (p_return_status => l_return_status,
1010: p_sql_statement => g_sql_budget_balance,
1011: p_set_of_books_id => p_set_of_books_id,
1012: p_budgetary_control => p_budgetary_control,

Line 1022: PSB_WS_ACCT1.DSQL_Actual_Balance

1018: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
1019: raise FND_API.G_EXC_ERROR;
1020: end if;
1021:
1022: PSB_WS_ACCT1.DSQL_Actual_Balance
1023: (p_return_status => l_return_status,
1024: p_sql_statement => g_sql_actual_balance,
1025: p_set_of_books_id => p_set_of_books_id,
1026: p_incl_adj_period => p_incl_adj_period,

Line 1039: PSB_WS_ACCT1.DSQL_Encum_Balance

1035: g_include_gl_oblig_balance := p_include_gl_oblig_balance ;
1036: g_include_gl_other_balance := p_include_gl_other_balance ;
1037: -- Bug#5030613 End
1038:
1039: PSB_WS_ACCT1.DSQL_Encum_Balance
1040: (p_return_status => l_return_status,
1041: p_sql_statement => g_sql_encum_balance,
1042: p_set_of_books_id => p_set_of_books_id,
1043: p_incl_adj_period => p_incl_adj_period,

Line 1140: LIMIT PSB_WS_ACCT1.g_limit_bulk_numrows; */

1136: loop
1137:
1138: -- for bug 4256345
1139: /* fetch c_ccids BULK COLLECT INTO l_ccids.ccid, l_ccids.start_date, l_ccids.end_date
1140: LIMIT PSB_WS_ACCT1.g_limit_bulk_numrows; */
1141: fetch l_ccid_csr BULK COLLECT INTO l_ccids.ccid LIMIT PSB_WS_ACCT1.g_limit_bulk_numrows;
1142:
1143:
1144: for l_ccid_index in 1..l_ccids.ccid.count loop

Line 1141: fetch l_ccid_csr BULK COLLECT INTO l_ccids.ccid LIMIT PSB_WS_ACCT1.g_limit_bulk_numrows;

1137:
1138: -- for bug 4256345
1139: /* fetch c_ccids BULK COLLECT INTO l_ccids.ccid, l_ccids.start_date, l_ccids.end_date
1140: LIMIT PSB_WS_ACCT1.g_limit_bulk_numrows; */
1141: fetch l_ccid_csr BULK COLLECT INTO l_ccids.ccid LIMIT PSB_WS_ACCT1.g_limit_bulk_numrows;
1142:
1143:
1144: for l_ccid_index in 1..l_ccids.ccid.count loop
1145: /* start bug 4256345 */

Line 1164: PSB_WS_ACCT1.Check_CCID_Type

1160: IF lt_valid_ccid = 'TRUE' THEN
1161: /* end bug 4256345 */
1162:
1163: -- Check whether CCID belongs to Personnel or Non Personnel Services.
1164: PSB_WS_ACCT1.Check_CCID_Type
1165: ( p_api_version => 1.0,
1166: p_return_status => l_return_status,
1167: p_ccid_type => l_ccid_type,
1168: p_flex_code => p_flex_code,

Line 1215: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop

1211:
1212: /* Bug No 2640277 End */
1213:
1214: -- Process all budget years for the CCID.
1215: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
1216:
1217: l_year_start_date :=
1218: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;
1219: l_year_end_date :=

Line 1218: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;

1214: -- Process all budget years for the CCID.
1215: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
1216:
1217: l_year_start_date :=
1218: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;
1219: l_year_end_date :=
1220: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date;
1221:
1222: -- Check if CCID is valid for the year being processed.

Line 1220: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date;

1216:
1217: l_year_start_date :=
1218: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;
1219: l_year_end_date :=
1220: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date;
1221:
1222: -- Check if CCID is valid for the year being processed.
1223: if (((l_ccid_start_period <= l_year_end_date) and (l_ccid_end_period is null))
1224: or ((l_ccid_start_period between l_year_start_date and l_year_end_date)

Line 1231: if PSB_WS_ACCT1.g_budget_years(l_year_index).year_type

1227: and (l_ccid_end_period > l_year_end_date))))
1228: then
1229:
1230: -- Process PY and CY balances.
1231: if PSB_WS_ACCT1.g_budget_years(l_year_index).year_type
1232: IN ('PY', 'CY')
1233: then
1234:
1235: for l_init_index in 1..g_gl_actual_periods.Count loop

Line 1257: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop

1253: g_num_actual_periods := 0;
1254: g_num_budget_periods := 0;
1255:
1256: -- Process budget periods for the year being processed.
1257: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop
1258:
1259: -- Extract Budget Balances for Budget Periods in CY
1260:
1261: if (PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =

Line 1261: if (PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =

1257: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop
1258:
1259: -- Extract Budget Balances for Budget Periods in CY
1260:
1261: if (PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =
1262: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id)
1263: then
1264:
1265: g_gl_budget_periods(l_init_index).budget_period_id :=

Line 1262: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id)

1258:
1259: -- Extract Budget Balances for Budget Periods in CY
1260:
1261: if (PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =
1262: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id)
1263: then
1264:
1265: g_gl_budget_periods(l_init_index).budget_period_id :=
1266: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;

Line 1266: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;

1262: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id)
1263: then
1264:
1265: g_gl_budget_periods(l_init_index).budget_period_id :=
1266: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
1267: g_gl_budget_periods(l_init_index).long_sequence_no :=
1268: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
1269: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
1270: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

Line 1268: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;

1264:
1265: g_gl_budget_periods(l_init_index).budget_period_id :=
1266: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
1267: g_gl_budget_periods(l_init_index).long_sequence_no :=
1268: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
1269: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
1270: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
1271: g_gl_budget_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
1272:

Line 1269: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;

1265: g_gl_budget_periods(l_init_index).budget_period_id :=
1266: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
1267: g_gl_budget_periods(l_init_index).long_sequence_no :=
1268: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
1269: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
1270: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
1271: g_gl_budget_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
1272:
1273: g_num_budget_periods := g_num_budget_periods + 1;

Line 1270: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

1266: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
1267: g_gl_budget_periods(l_init_index).long_sequence_no :=
1268: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
1269: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
1270: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
1271: g_gl_budget_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
1272:
1273: g_num_budget_periods := g_num_budget_periods + 1;
1274:

Line 1271: g_gl_budget_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;

1267: g_gl_budget_periods(l_init_index).long_sequence_no :=
1268: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
1269: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
1270: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
1271: g_gl_budget_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
1272:
1273: g_num_budget_periods := g_num_budget_periods + 1;
1274:
1275: -- Extract Actuals for Budget Periods in CY up to GL

Line 1279: (p_gl_cutoff_period > PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))

1275: -- Extract Actuals for Budget Periods in CY up to GL
1276: -- Cutoff Date
1277:
1278: if ((p_gl_cutoff_period is null) or
1279: (p_gl_cutoff_period > PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))
1280: then
1281: g_gl_actual_periods(l_init_index).budget_period_id :=
1282: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
1283: g_gl_actual_periods(l_init_index).long_sequence_no :=

Line 1282: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;

1278: if ((p_gl_cutoff_period is null) or
1279: (p_gl_cutoff_period > PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))
1280: then
1281: g_gl_actual_periods(l_init_index).budget_period_id :=
1282: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
1283: g_gl_actual_periods(l_init_index).long_sequence_no :=
1284: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
1285: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
1286: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

Line 1284: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;

1280: then
1281: g_gl_actual_periods(l_init_index).budget_period_id :=
1282: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
1283: g_gl_actual_periods(l_init_index).long_sequence_no :=
1284: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
1285: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
1286: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
1287: g_gl_actual_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
1288:

Line 1285: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;

1281: g_gl_actual_periods(l_init_index).budget_period_id :=
1282: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
1283: g_gl_actual_periods(l_init_index).long_sequence_no :=
1284: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
1285: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
1286: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
1287: g_gl_actual_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
1288:
1289: g_num_actual_periods := g_num_actual_periods + 1;

Line 1286: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

1282: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
1283: g_gl_actual_periods(l_init_index).long_sequence_no :=
1284: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
1285: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
1286: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
1287: g_gl_actual_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
1288:
1289: g_num_actual_periods := g_num_actual_periods + 1;
1290:

Line 1287: g_gl_actual_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;

1283: g_gl_actual_periods(l_init_index).long_sequence_no :=
1284: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
1285: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
1286: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
1287: g_gl_actual_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
1288:
1289: g_num_actual_periods := g_num_actual_periods + 1;
1290:
1291: end if;

Line 1306: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,

1302: ( p_return_status => l_return_status,
1303: p_ccid => l_ccids.ccid(l_ccid_index),
1304: p_account_type => l_account_type,
1305: p_budget_year_id =>
1306: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
1307: p_year_name =>
1308: PSB_WS_ACCT1.g_budget_years(l_year_index).year_name,
1309: p_year_start_date =>
1310: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

Line 1308: PSB_WS_ACCT1.g_budget_years(l_year_index).year_name,

1304: p_account_type => l_account_type,
1305: p_budget_year_id =>
1306: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
1307: p_year_name =>
1308: PSB_WS_ACCT1.g_budget_years(l_year_index).year_name,
1309: p_year_start_date =>
1310: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
1311: p_year_end_date =>
1312: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,

Line 1310: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

1306: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
1307: p_year_name =>
1308: PSB_WS_ACCT1.g_budget_years(l_year_index).year_name,
1309: p_year_start_date =>
1310: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
1311: p_year_end_date =>
1312: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
1313: p_budget_year_type =>
1314: PSB_WS_ACCT1.g_budget_years(l_year_index).year_type,

Line 1312: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,

1308: PSB_WS_ACCT1.g_budget_years(l_year_index).year_name,
1309: p_year_start_date =>
1310: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
1311: p_year_end_date =>
1312: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
1313: p_budget_year_type =>
1314: PSB_WS_ACCT1.g_budget_years(l_year_index).year_type,
1315: p_incl_stat_bal => p_incl_stat_bal,
1316: p_incl_trans_bal => p_incl_trans_bal,

Line 1314: PSB_WS_ACCT1.g_budget_years(l_year_index).year_type,

1310: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
1311: p_year_end_date =>
1312: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
1313: p_budget_year_type =>
1314: PSB_WS_ACCT1.g_budget_years(l_year_index).year_type,
1315: p_incl_stat_bal => p_incl_stat_bal,
1316: p_incl_trans_bal => p_incl_trans_bal,
1317: p_incl_adj_period => p_incl_adj_period,
1318: p_set_of_books_id => p_set_of_books_id,

Line 1406: if l_num_accounts > PSB_WS_ACCT1.g_checkpoint_save then

1402: END IF ;
1403: -- End computing CY and PP Balances for CCID by applying Parameters
1404:
1405: l_num_accounts := l_num_accounts + 1;
1406: if l_num_accounts > PSB_WS_ACCT1.g_checkpoint_save then
1407: commit work;
1408: l_num_accounts := 0;
1409: end if;
1410:

Line 1570: x_period_amount IN OUT NOCOPY PSB_WS_Acct1.g_prdamt_tbl_type

1566: (
1567: x_return_status OUT NOCOPY VARCHAR2,
1568: --
1569: p_spread_amount IN NUMBER,
1570: x_period_amount IN OUT NOCOPY PSB_WS_Acct1.g_prdamt_tbl_type
1571: )
1572: IS
1573: --
1574: l_api_name CONSTANT VARCHAR2(30) := 'Distribute_Prorated_Amount_Pvt';

Line 1713: l_period_amount PSB_WS_Acct1.g_prdamt_tbl_type;

1709: l_return_status VARCHAR2(1);
1710: l_start_index PLS_INTEGER;
1711: l_end_index PLS_INTEGER;
1712: l_account_line_id NUMBER;
1713: l_period_amount PSB_WS_Acct1.g_prdamt_tbl_type;
1714: -- Bug 3548345
1715: -- l_create_zero_bal VARCHAR2(1);
1716: --
1717: l_ytd_actual_amount NUMBER := 0;

Line 1797: FOR i IN 1..PSB_WS_ACCT1.g_max_num_amounts LOOP

1793: --
1794: BEGIN
1795:
1796: -- Initialize period table for the current account line.
1797: FOR i IN 1..PSB_WS_ACCT1.g_max_num_amounts LOOP
1798: l_period_amount(i) := NULL ;
1799: END LOOP ;
1800:
1801: --

Line 2368: PSB_WS_Acct1.Create_Account_Dist

2364: --pd('2: Call Create_Account_Dist=> ccid=' || TO_CHAR(p_ccid) ||
2365: -- ', p_budget_year_id=' || TO_CHAR(p_budget_year_id) ||
2366: -- ', p_ytd_amount=' || TO_CHAR(l_ytd_estimate_amount));
2367:
2368: PSB_WS_Acct1.Create_Account_Dist
2369: ( p_api_version => 1.0,
2370: p_return_status => l_return_status,
2371: p_account_line_id => l_account_line_id,
2372: p_worksheet_id => p_worksheet_id,

Line 2717: PSB_WS_ACCT1.DSQL_Budget_Balance

2713: end if;
2714:
2715: -- Create Dynamic SQL Statements for extracting GL Balances
2716:
2717: PSB_WS_ACCT1.DSQL_Budget_Balance
2718: (p_return_status => l_return_status,
2719: p_sql_statement => g_sql_budget_balance,
2720: p_set_of_books_id => l_set_of_books_id,
2721: p_budgetary_control => l_budgetary_control,

Line 2731: PSB_WS_ACCT1.DSQL_Actual_Balance

2727: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
2728: raise FND_API.G_EXC_ERROR;
2729: end if;
2730:
2731: PSB_WS_ACCT1.DSQL_Actual_Balance
2732: (p_return_status => l_return_status,
2733: p_sql_statement => g_sql_actual_balance,
2734: p_set_of_books_id => l_set_of_books_id,
2735: p_incl_adj_period => l_incl_adj_period,

Line 2748: PSB_WS_ACCT1.DSQL_Encum_Balance

2744: g_include_gl_oblig_balance := l_include_gl_oblig_balance ;
2745: g_include_gl_other_balance := l_include_gl_other_balance ;
2746: -- Bug#5030613 End
2747:
2748: PSB_WS_ACCT1.DSQL_Encum_Balance
2749: (p_return_status => l_return_status,
2750: p_sql_statement => g_sql_encum_balance,
2751: p_set_of_books_id => l_set_of_books_id,
2752: p_incl_adj_period => l_incl_adj_period,

Line 2813: if l_budget_calendar_id <> NVL( PSB_WS_ACCT1.g_budget_calendar_id,

2809:
2810: g_cur_encum_balance := dbms_sql.open_cursor;
2811: dbms_sql.parse(g_cur_encum_balance, g_sql_encum_balance, dbms_sql.v7);
2812:
2813: if l_budget_calendar_id <> NVL( PSB_WS_ACCT1.g_budget_calendar_id,
2814: FND_API.G_MISS_NUM)
2815: then
2816:
2817: PSB_WS_ACCT1.Cache_Budget_Calendar

Line 2817: PSB_WS_ACCT1.Cache_Budget_Calendar

2813: if l_budget_calendar_id <> NVL( PSB_WS_ACCT1.g_budget_calendar_id,
2814: FND_API.G_MISS_NUM)
2815: then
2816:
2817: PSB_WS_ACCT1.Cache_Budget_Calendar
2818: ( p_return_status => l_return_status,
2819: p_budget_calendar_id => l_budget_calendar_id
2820: ) ;
2821: --

Line 2829: IF l_gl_cutoff_period = PSB_WS_ACCT1.g_enddate_cy THEN

2825:
2826: end if;
2827:
2828: -- Bug#3514350: Check if CY estimates need to be processed or not.
2829: IF l_gl_cutoff_period = PSB_WS_ACCT1.g_enddate_cy THEN
2830: g_process_cy_estimates := FALSE;
2831: ELSE
2832: g_process_cy_estimates := TRUE;
2833: END IF;

Line 2860: LIMIT PSB_WS_ACCT1.g_limit_bulk_numrows;

2856: loop
2857:
2858: fetch c_ccids BULK COLLECT INTO l_ccids.ccid, l_ccids.start_date,
2859: l_ccids.end_date
2860: LIMIT PSB_WS_ACCT1.g_limit_bulk_numrows;
2861:
2862: -- Process given set of accounts for the curreng fetch.
2863: for l_ccid_index in 1..l_ccids.ccid.count loop
2864:

Line 2882: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop

2878: X_template_id => l_template_id ) ;
2879:
2880:
2881: -- Process all budget years for the CCID.
2882: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
2883:
2884: l_year_start_date :=
2885: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;
2886: l_year_end_date :=

Line 2885: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;

2881: -- Process all budget years for the CCID.
2882: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
2883:
2884: l_year_start_date :=
2885: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;
2886: l_year_end_date :=
2887: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date;
2888:
2889: -- Check if CCID is valid for the year being processed.

Line 2887: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date;

2883:
2884: l_year_start_date :=
2885: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;
2886: l_year_end_date :=
2887: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date;
2888:
2889: -- Check if CCID is valid for the year being processed.
2890: if (((l_ccid_start_period <= l_year_end_date) and (l_ccid_end_period is null))
2891: or ((l_ccid_start_period between l_year_start_date and l_year_end_date)

Line 2898: if PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY' then

2894: and (l_ccid_end_period > l_year_end_date))))
2895: then
2896:
2897: -- Process CY balances.
2898: if PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY' then
2899:
2900: for l_init_index in 1..g_gl_actual_periods.Count loop
2901: g_gl_actual_periods(l_init_index).budget_period_id := null;
2902: g_gl_actual_periods(l_init_index).long_sequence_no := null;

Line 2925: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop

2921: g_num_actual_periods := 0;
2922: g_num_budget_periods := 0;
2923:
2924: -- Process budget periods for the year being processed.
2925: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop
2926:
2927: if (PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =
2928: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id) then
2929:

Line 2927: if (PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =

2923:
2924: -- Process budget periods for the year being processed.
2925: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop
2926:
2927: if (PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =
2928: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id) then
2929:
2930: -- Extract Budget Balances for all Periods in Current Year
2931:

Line 2928: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id) then

2924: -- Process budget periods for the year being processed.
2925: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop
2926:
2927: if (PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =
2928: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id) then
2929:
2930: -- Extract Budget Balances for all Periods in Current Year
2931:
2932: g_gl_budget_periods(l_init_index).budget_period_id :=

Line 2933: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;

2929:
2930: -- Extract Budget Balances for all Periods in Current Year
2931:
2932: g_gl_budget_periods(l_init_index).budget_period_id :=
2933: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2934: g_gl_budget_periods(l_init_index).long_sequence_no :=
2935: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2936: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2937: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

Line 2935: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;

2931:
2932: g_gl_budget_periods(l_init_index).budget_period_id :=
2933: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2934: g_gl_budget_periods(l_init_index).long_sequence_no :=
2935: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2936: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2937: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2938: g_gl_budget_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2939:

Line 2936: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;

2932: g_gl_budget_periods(l_init_index).budget_period_id :=
2933: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2934: g_gl_budget_periods(l_init_index).long_sequence_no :=
2935: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2936: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2937: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2938: g_gl_budget_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2939:
2940: g_num_budget_periods := g_num_budget_periods + 1;

Line 2937: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

2933: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2934: g_gl_budget_periods(l_init_index).long_sequence_no :=
2935: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2936: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2937: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2938: g_gl_budget_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2939:
2940: g_num_budget_periods := g_num_budget_periods + 1;
2941:

Line 2938: g_gl_budget_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;

2934: g_gl_budget_periods(l_init_index).long_sequence_no :=
2935: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2936: g_gl_budget_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2937: g_gl_budget_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2938: g_gl_budget_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2939:
2940: g_num_budget_periods := g_num_budget_periods + 1;
2941:
2942: -- Extract Actual Balances for all Periods in Current Year

Line 2946: (l_gl_cutoff_period > PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))

2942: -- Extract Actual Balances for all Periods in Current Year
2943: -- upto the GL Cutoff Date
2944:
2945: if ((l_gl_cutoff_period is null) or
2946: (l_gl_cutoff_period > PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))
2947: then
2948:
2949: g_gl_actual_periods(l_init_index).budget_period_id :=
2950: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;

Line 2950: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;

2946: (l_gl_cutoff_period > PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))
2947: then
2948:
2949: g_gl_actual_periods(l_init_index).budget_period_id :=
2950: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2951: g_gl_actual_periods(l_init_index).long_sequence_no :=
2952: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2953: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2954: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

Line 2952: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;

2948:
2949: g_gl_actual_periods(l_init_index).budget_period_id :=
2950: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2951: g_gl_actual_periods(l_init_index).long_sequence_no :=
2952: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2953: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2954: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2955: g_gl_actual_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2956:

Line 2953: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;

2949: g_gl_actual_periods(l_init_index).budget_period_id :=
2950: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2951: g_gl_actual_periods(l_init_index).long_sequence_no :=
2952: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2953: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2954: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2955: g_gl_actual_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2956:
2957: g_num_actual_periods := g_num_actual_periods + 1;

Line 2954: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

2950: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2951: g_gl_actual_periods(l_init_index).long_sequence_no :=
2952: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2953: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2954: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2955: g_gl_actual_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2956:
2957: g_num_actual_periods := g_num_actual_periods + 1;
2958:

Line 2955: g_gl_actual_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;

2951: g_gl_actual_periods(l_init_index).long_sequence_no :=
2952: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2953: g_gl_actual_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2954: g_gl_actual_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2955: g_gl_actual_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2956:
2957: g_num_actual_periods := g_num_actual_periods + 1;
2958:
2959: else

Line 2963: g_alloc_periods(l_init_index).budget_period_id := PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;

2959: else
2960:
2961: -- Bug#2529886: Get information about CY period beyond
2962: -- the GL Cutoff Date.
2963: g_alloc_periods(l_init_index).budget_period_id := PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2964: g_alloc_periods(l_init_index).long_sequence_no := PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2965: g_alloc_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2966: g_alloc_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2967: g_alloc_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;

Line 2964: g_alloc_periods(l_init_index).long_sequence_no := PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;

2960:
2961: -- Bug#2529886: Get information about CY period beyond
2962: -- the GL Cutoff Date.
2963: g_alloc_periods(l_init_index).budget_period_id := PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2964: g_alloc_periods(l_init_index).long_sequence_no := PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2965: g_alloc_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2966: g_alloc_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2967: g_alloc_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2968: -- Bug#2529886: End

Line 2965: g_alloc_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;

2961: -- Bug#2529886: Get information about CY period beyond
2962: -- the GL Cutoff Date.
2963: g_alloc_periods(l_init_index).budget_period_id := PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2964: g_alloc_periods(l_init_index).long_sequence_no := PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2965: g_alloc_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2966: g_alloc_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2967: g_alloc_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2968: -- Bug#2529886: End
2969:

Line 2966: g_alloc_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

2962: -- the GL Cutoff Date.
2963: g_alloc_periods(l_init_index).budget_period_id := PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2964: g_alloc_periods(l_init_index).long_sequence_no := PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2965: g_alloc_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2966: g_alloc_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2967: g_alloc_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2968: -- Bug#2529886: End
2969:
2970: end if;

Line 2967: g_alloc_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;

2963: g_alloc_periods(l_init_index).budget_period_id := PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
2964: g_alloc_periods(l_init_index).long_sequence_no := PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
2965: g_alloc_periods(l_init_index).start_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
2966: g_alloc_periods(l_init_index).end_date := PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
2967: g_alloc_periods(l_init_index).budget_year_id := PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id;
2968: -- Bug#2529886: End
2969:
2970: end if;
2971:

Line 2985: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,

2981: ( p_return_status => l_return_status,
2982: p_ccid => l_ccids.ccid(l_ccid_index),
2983: p_account_type => l_account_type,
2984: p_budget_year_id =>
2985: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
2986: p_year_name =>
2987: PSB_WS_ACCT1.g_budget_years(l_year_index).year_name,
2988: p_year_start_date =>
2989: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

Line 2987: PSB_WS_ACCT1.g_budget_years(l_year_index).year_name,

2983: p_account_type => l_account_type,
2984: p_budget_year_id =>
2985: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
2986: p_year_name =>
2987: PSB_WS_ACCT1.g_budget_years(l_year_index).year_name,
2988: p_year_start_date =>
2989: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
2990: p_year_end_date =>
2991: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,

Line 2989: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

2985: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
2986: p_year_name =>
2987: PSB_WS_ACCT1.g_budget_years(l_year_index).year_name,
2988: p_year_start_date =>
2989: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
2990: p_year_end_date =>
2991: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
2992: p_budget_year_type =>
2993: PSB_WS_ACCT1.g_budget_years(l_year_index).year_type,

Line 2991: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,

2987: PSB_WS_ACCT1.g_budget_years(l_year_index).year_name,
2988: p_year_start_date =>
2989: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
2990: p_year_end_date =>
2991: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
2992: p_budget_year_type =>
2993: PSB_WS_ACCT1.g_budget_years(l_year_index).year_type,
2994: p_incl_stat_bal => l_incl_stat_bal,
2995: p_incl_trans_bal => l_incl_trans_bal,

Line 2993: PSB_WS_ACCT1.g_budget_years(l_year_index).year_type,

2989: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
2990: p_year_end_date =>
2991: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
2992: p_budget_year_type =>
2993: PSB_WS_ACCT1.g_budget_years(l_year_index).year_type,
2994: p_incl_stat_bal => l_incl_stat_bal,
2995: p_incl_trans_bal => l_incl_trans_bal,
2996: p_incl_adj_period => l_incl_adj_period,
2997: p_set_of_books_id => l_set_of_books_id,

Line 3046: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,

3042: p_start_stage_seq => l_current_stage_seq,
3043: p_budget_group_id => c_BudGrp_Rec.budget_group_id,
3044: p_stage_set_id => l_stage_set_id,
3045: p_budget_year_id =>
3046: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
3047: p_ccid => l_ccids.ccid(l_ccid_index),
3048: p_currency_code => l_func_currency
3049: ) ;
3050: --

Line 3068: if l_num_accounts > PSB_WS_ACCT1.g_checkpoint_save then

3064: -- End processing all budget years for the CCID.
3065:
3066: l_num_accounts := l_num_accounts + 1;
3067:
3068: if l_num_accounts > PSB_WS_ACCT1.g_checkpoint_save then
3069: commit work;
3070: l_num_accounts := 0;
3071: end if;
3072:

Line 3252: l_mapped_ccid := PSB_WS_ACCT1.Map_Account

3248:
3249:
3250: BEGIN
3251:
3252: l_mapped_ccid := PSB_WS_ACCT1.Map_Account
3253: (p_flex_mapping_set_id => p_flex_mapping_set_id,
3254: p_ccid => p_ccid,
3255: p_budget_year_type_id => p_budget_year_type_id);
3256:

Line 3390: if p_flex_code <> nvl(PSB_WS_ACCT1.g_flex_code, 0) then

3386:
3387: -- Cache the number of Segments and the application column names for the
3388: -- Segments for the Chart of Accounts
3389:
3390: if p_flex_code <> nvl(PSB_WS_ACCT1.g_flex_code, 0) then
3391: begin
3392:
3393: PSB_WS_ACCT1.Flex_Info
3394: (p_flex_code => p_flex_code,

Line 3393: PSB_WS_ACCT1.Flex_Info

3389:
3390: if p_flex_code <> nvl(PSB_WS_ACCT1.g_flex_code, 0) then
3391: begin
3392:
3393: PSB_WS_ACCT1.Flex_Info
3394: (p_flex_code => p_flex_code,
3395: p_return_status => l_return_status);
3396:
3397: if l_return_status <> FND_API.G_RET_STS_SUCCESS then

Line 3411: n_segments => PSB_WS_ACCT1.g_num_segs,

3407: (application_short_name => 'SQLGL',
3408: key_flex_code => 'GL#',
3409: structure_number => p_flex_code,
3410: combination_id => p_ccid,
3411: n_segments => PSB_WS_ACCT1.g_num_segs,
3412: segments => l_ccid_val) then
3413:
3414: FND_MSG_PUB.Add;
3415: raise FND_API.G_EXC_ERROR;

Line 3444: for l_init_index in 1..PSB_WS_ACCT1.g_num_segs loop

3440: l_line_total := 0;
3441:
3442: l_ccid_found := FALSE;
3443:
3444: for l_init_index in 1..PSB_WS_ACCT1.g_num_segs loop
3445: l_seg_val(l_init_index) := null;
3446: end loop;
3447:
3448: l_num_lines := l_num_lines + 1;

Line 3639: for l_index in 1..PSB_WS_ACCT1.g_num_segs loop

3635:
3636: elsif l_type2 then
3637: begin
3638:
3639: for l_index in 1..PSB_WS_ACCT1.g_num_segs loop
3640:
3641: if ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT1') and
3642: (c_Formula_Rec.segment1 is not null)) then
3643: l_seg_val(l_index) := c_Formula_Rec.segment1;

Line 3641: if ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT1') and

3637: begin
3638:
3639: for l_index in 1..PSB_WS_ACCT1.g_num_segs loop
3640:
3641: if ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT1') and
3642: (c_Formula_Rec.segment1 is not null)) then
3643: l_seg_val(l_index) := c_Formula_Rec.segment1;
3644:
3645: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT2') and

Line 3645: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT2') and

3641: if ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT1') and
3642: (c_Formula_Rec.segment1 is not null)) then
3643: l_seg_val(l_index) := c_Formula_Rec.segment1;
3644:
3645: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT2') and
3646: (c_Formula_Rec.segment2 is not null)) then
3647: l_seg_val(l_index) := c_Formula_Rec.segment2;
3648:
3649: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT3') and

Line 3649: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT3') and

3645: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT2') and
3646: (c_Formula_Rec.segment2 is not null)) then
3647: l_seg_val(l_index) := c_Formula_Rec.segment2;
3648:
3649: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT3') and
3650: (c_Formula_Rec.segment3 is not null)) then
3651: l_seg_val(l_index) := c_Formula_Rec.segment3;
3652:
3653: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT4') and

Line 3653: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT4') and

3649: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT3') and
3650: (c_Formula_Rec.segment3 is not null)) then
3651: l_seg_val(l_index) := c_Formula_Rec.segment3;
3652:
3653: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT4') and
3654: (c_Formula_Rec.segment4 is not null)) then
3655: l_seg_val(l_index) := c_Formula_Rec.segment4;
3656:
3657: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT5') and

Line 3657: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT5') and

3653: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT4') and
3654: (c_Formula_Rec.segment4 is not null)) then
3655: l_seg_val(l_index) := c_Formula_Rec.segment4;
3656:
3657: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT5') and
3658: (c_Formula_Rec.segment5 is not null)) then
3659: l_seg_val(l_index) := c_Formula_Rec.segment5;
3660:
3661: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT6') and

Line 3661: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT6') and

3657: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT5') and
3658: (c_Formula_Rec.segment5 is not null)) then
3659: l_seg_val(l_index) := c_Formula_Rec.segment5;
3660:
3661: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT6') and
3662: (c_Formula_Rec.segment6 is not null)) then
3663: l_seg_val(l_index) := c_Formula_Rec.segment6;
3664:
3665: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT7') and

Line 3665: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT7') and

3661: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT6') and
3662: (c_Formula_Rec.segment6 is not null)) then
3663: l_seg_val(l_index) := c_Formula_Rec.segment6;
3664:
3665: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT7') and
3666: (c_Formula_Rec.segment7 is not null)) then
3667: l_seg_val(l_index) := c_Formula_Rec.segment7;
3668:
3669: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT8') and

Line 3669: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT8') and

3665: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT7') and
3666: (c_Formula_Rec.segment7 is not null)) then
3667: l_seg_val(l_index) := c_Formula_Rec.segment7;
3668:
3669: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT8') and
3670: (c_Formula_Rec.segment8 is not null)) then
3671: l_seg_val(l_index) := c_Formula_Rec.segment8;
3672:
3673: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT9') and

Line 3673: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT9') and

3669: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT8') and
3670: (c_Formula_Rec.segment8 is not null)) then
3671: l_seg_val(l_index) := c_Formula_Rec.segment8;
3672:
3673: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT9') and
3674: (c_Formula_Rec.segment9 is not null)) then
3675: l_seg_val(l_index) := c_Formula_Rec.segment9;
3676:
3677: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT10') and

Line 3677: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT10') and

3673: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT9') and
3674: (c_Formula_Rec.segment9 is not null)) then
3675: l_seg_val(l_index) := c_Formula_Rec.segment9;
3676:
3677: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT10') and
3678: (c_Formula_Rec.segment10 is not null)) then
3679: l_seg_val(l_index) := c_Formula_Rec.segment10;
3680:
3681: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT11') and

Line 3681: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT11') and

3677: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT10') and
3678: (c_Formula_Rec.segment10 is not null)) then
3679: l_seg_val(l_index) := c_Formula_Rec.segment10;
3680:
3681: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT11') and
3682: (c_Formula_Rec.segment11 is not null)) then
3683: l_seg_val(l_index) := c_Formula_Rec.segment11;
3684:
3685: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT12') and

Line 3685: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT12') and

3681: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT11') and
3682: (c_Formula_Rec.segment11 is not null)) then
3683: l_seg_val(l_index) := c_Formula_Rec.segment11;
3684:
3685: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT12') and
3686: (c_Formula_Rec.segment12 is not null)) then
3687: l_seg_val(l_index) := c_Formula_Rec.segment12;
3688:
3689: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT13') and

Line 3689: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT13') and

3685: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT12') and
3686: (c_Formula_Rec.segment12 is not null)) then
3687: l_seg_val(l_index) := c_Formula_Rec.segment12;
3688:
3689: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT13') and
3690: (c_Formula_Rec.segment13 is not null)) then
3691: l_seg_val(l_index) := c_Formula_Rec.segment13;
3692:
3693: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT14') and

Line 3693: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT14') and

3689: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT13') and
3690: (c_Formula_Rec.segment13 is not null)) then
3691: l_seg_val(l_index) := c_Formula_Rec.segment13;
3692:
3693: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT14') and
3694: (c_Formula_Rec.segment14 is not null)) then
3695: l_seg_val(l_index) := c_Formula_Rec.segment14;
3696:
3697: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT15') and

Line 3697: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT15') and

3693: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT14') and
3694: (c_Formula_Rec.segment14 is not null)) then
3695: l_seg_val(l_index) := c_Formula_Rec.segment14;
3696:
3697: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT15') and
3698: (c_Formula_Rec.segment15 is not null)) then
3699: l_seg_val(l_index) := c_Formula_Rec.segment15;
3700:
3701: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT16') and

Line 3701: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT16') and

3697: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT15') and
3698: (c_Formula_Rec.segment15 is not null)) then
3699: l_seg_val(l_index) := c_Formula_Rec.segment15;
3700:
3701: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT16') and
3702: (c_Formula_Rec.segment16 is not null)) then
3703: l_seg_val(l_index) := c_Formula_Rec.segment16;
3704:
3705: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT17') and

Line 3705: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT17') and

3701: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT16') and
3702: (c_Formula_Rec.segment16 is not null)) then
3703: l_seg_val(l_index) := c_Formula_Rec.segment16;
3704:
3705: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT17') and
3706: (c_Formula_Rec.segment17 is not null)) then
3707: l_seg_val(l_index) := c_Formula_Rec.segment17;
3708:
3709: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT18') and

Line 3709: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT18') and

3705: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT17') and
3706: (c_Formula_Rec.segment17 is not null)) then
3707: l_seg_val(l_index) := c_Formula_Rec.segment17;
3708:
3709: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT18') and
3710: (c_Formula_Rec.segment18 is not null)) then
3711: l_seg_val(l_index) := c_Formula_Rec.segment18;
3712:
3713: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT19') and

Line 3713: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT19') and

3709: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT18') and
3710: (c_Formula_Rec.segment18 is not null)) then
3711: l_seg_val(l_index) := c_Formula_Rec.segment18;
3712:
3713: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT19') and
3714: (c_Formula_Rec.segment19 is not null)) then
3715: l_seg_val(l_index) := c_Formula_Rec.segment19;
3716:
3717: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT20') and

Line 3717: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT20') and

3713: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT19') and
3714: (c_Formula_Rec.segment19 is not null)) then
3715: l_seg_val(l_index) := c_Formula_Rec.segment19;
3716:
3717: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT20') and
3718: (c_Formula_Rec.segment20 is not null)) then
3719: l_seg_val(l_index) := c_Formula_Rec.segment20;
3720:
3721: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT21') and

Line 3721: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT21') and

3717: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT20') and
3718: (c_Formula_Rec.segment20 is not null)) then
3719: l_seg_val(l_index) := c_Formula_Rec.segment20;
3720:
3721: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT21') and
3722: (c_Formula_Rec.segment21 is not null)) then
3723: l_seg_val(l_index) := c_Formula_Rec.segment21;
3724:
3725: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT22') and

Line 3725: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT22') and

3721: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT21') and
3722: (c_Formula_Rec.segment21 is not null)) then
3723: l_seg_val(l_index) := c_Formula_Rec.segment21;
3724:
3725: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT22') and
3726: (c_Formula_Rec.segment22 is not null)) then
3727: l_seg_val(l_index) := c_Formula_Rec.segment22;
3728:
3729: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT23') and

Line 3729: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT23') and

3725: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT22') and
3726: (c_Formula_Rec.segment22 is not null)) then
3727: l_seg_val(l_index) := c_Formula_Rec.segment22;
3728:
3729: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT23') and
3730: (c_Formula_Rec.segment23 is not null)) then
3731: l_seg_val(l_index) := c_Formula_Rec.segment23;
3732:
3733: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT24') and

Line 3733: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT24') and

3729: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT23') and
3730: (c_Formula_Rec.segment23 is not null)) then
3731: l_seg_val(l_index) := c_Formula_Rec.segment23;
3732:
3733: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT24') and
3734: (c_Formula_Rec.segment24 is not null)) then
3735: l_seg_val(l_index) := c_Formula_Rec.segment24;
3736:
3737: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT25') and

Line 3737: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT25') and

3733: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT24') and
3734: (c_Formula_Rec.segment24 is not null)) then
3735: l_seg_val(l_index) := c_Formula_Rec.segment24;
3736:
3737: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT25') and
3738: (c_Formula_Rec.segment25 is not null)) then
3739: l_seg_val(l_index) := c_Formula_Rec.segment25;
3740:
3741: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT26') and

Line 3741: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT26') and

3737: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT25') and
3738: (c_Formula_Rec.segment25 is not null)) then
3739: l_seg_val(l_index) := c_Formula_Rec.segment25;
3740:
3741: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT26') and
3742: (c_Formula_Rec.segment26 is not null)) then
3743: l_seg_val(l_index) := c_Formula_Rec.segment26;
3744:
3745: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT27') and

Line 3745: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT27') and

3741: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT26') and
3742: (c_Formula_Rec.segment26 is not null)) then
3743: l_seg_val(l_index) := c_Formula_Rec.segment26;
3744:
3745: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT27') and
3746: (c_Formula_Rec.segment27 is not null)) then
3747: l_seg_val(l_index) := c_Formula_Rec.segment27;
3748:
3749: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT28') and

Line 3749: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT28') and

3745: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT27') and
3746: (c_Formula_Rec.segment27 is not null)) then
3747: l_seg_val(l_index) := c_Formula_Rec.segment27;
3748:
3749: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT28') and
3750: (c_Formula_Rec.segment28 is not null)) then
3751: l_seg_val(l_index) := c_Formula_Rec.segment28;
3752:
3753: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT29') and

Line 3753: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT29') and

3749: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT28') and
3750: (c_Formula_Rec.segment28 is not null)) then
3751: l_seg_val(l_index) := c_Formula_Rec.segment28;
3752:
3753: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT29') and
3754: (c_Formula_Rec.segment29 is not null)) then
3755: l_seg_val(l_index) := c_Formula_Rec.segment29;
3756:
3757: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT30') and

Line 3757: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT30') and

3753: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT29') and
3754: (c_Formula_Rec.segment29 is not null)) then
3755: l_seg_val(l_index) := c_Formula_Rec.segment29;
3756:
3757: elsif ((PSB_WS_ACCT1.g_seg_name(l_index) = 'SEGMENT30') and
3758: (c_Formula_Rec.segment30 is not null)) then
3759: l_seg_val(l_index) := c_Formula_Rec.segment30;
3760:
3761: else

Line 3777: (n_segments => PSB_WS_ACCT1.g_num_segs,

3773: key_flex_code => 'GL#',
3774: structure_number => p_flex_code);
3775:
3776: l_concat_segments := FND_FLEX_EXT.Concatenate_Segments
3777: (n_segments => PSB_WS_ACCT1.g_num_segs,
3778: segments => l_seg_val,
3779: delimiter => l_flex_delimiter);
3780:
3781: if not FND_FLEX_KEYVAL.Validate_Segs

Line 4170: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop

4166: l_compound_annually := FND_API.G_TRUE;
4167: end if;
4168: end loop;
4169:
4170: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop
4171: g_period_amount(l_init_index) := null;
4172: end loop;
4173:
4174: for c_AcctLine_Rec in c_AcctLine loop

Line 4186: PSB_WS_ACCT1.Check_CCID_Type

4182: begin
4183:
4184: l_code_combination_id := c_AcctLine_Rec.code_combination_id;
4185:
4186: PSB_WS_ACCT1.Check_CCID_Type
4187: (p_api_version => 1.0,
4188: p_return_status => l_return_status,
4189: p_ccid_type => l_ccid_type,
4190: p_flex_code => l_flex_code,

Line 4261: PSB_WS_ACCT1.Create_Account_Dist

4257: end if;
4258:
4259: -- Create Account Distribution for the CCID
4260:
4261: PSB_WS_ACCT1.Create_Account_Dist
4262: (p_api_version => 1.0,
4263: p_return_status => l_return_status,
4264: p_worksheet_id => p_worksheet_id,
4265: p_distribute_flag => FND_API.G_TRUE,

Line 4285: PSB_WS_ACCT1.Create_Note

4281:
4282: -- Bug#4571412
4283: -- Added parameters to make the call in
4284: -- sync wih it's definition.
4285: PSB_WS_ACCT1.Create_Note
4286: ( p_return_status => l_return_status,
4287: p_account_line_id => c_AcctLine_Rec.account_line_id,
4288: p_note => l_note,
4289: p_chart_of_accounts_id => l_flex_code,

Line 4658: if l_budget_calendar_id <> nvl(PSB_WS_ACCT1.g_budget_calendar_id,

4654: end if;
4655:
4656: end if;
4657:
4658: if l_budget_calendar_id <> nvl(PSB_WS_ACCT1.g_budget_calendar_id,
4659: FND_API.G_MISS_NUM)
4660: then
4661:
4662: PSB_WS_ACCT1.Cache_Budget_Calendar

Line 4662: PSB_WS_ACCT1.Cache_Budget_Calendar

4658: if l_budget_calendar_id <> nvl(PSB_WS_ACCT1.g_budget_calendar_id,
4659: FND_API.G_MISS_NUM)
4660: then
4661:
4662: PSB_WS_ACCT1.Cache_Budget_Calendar
4663: ( p_return_status => l_return_status,
4664: p_budget_calendar_id => l_budget_calendar_id
4665: ) ;
4666:

Line 4674: l_num_budget_years := least(ceil(months_between(nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date),

4670:
4671: end if;
4672:
4673: -- Number of Budget Years to project
4674: l_num_budget_years := least(ceil(months_between(nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date),
4675: nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_pp)) / 12),
4676: nvl(p_num_proposed_years, PSB_WS_ACCT1.g_max_num_years));
4677:
4678: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop

Line 4675: nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_pp)) / 12),

4671: end if;
4672:
4673: -- Number of Budget Years to project
4674: l_num_budget_years := least(ceil(months_between(nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date),
4675: nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_pp)) / 12),
4676: nvl(p_num_proposed_years, PSB_WS_ACCT1.g_max_num_years));
4677:
4678: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
4679:

Line 4676: nvl(p_num_proposed_years, PSB_WS_ACCT1.g_max_num_years));

4672:
4673: -- Number of Budget Years to project
4674: l_num_budget_years := least(ceil(months_between(nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date),
4675: nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_pp)) / 12),
4676: nvl(p_num_proposed_years, PSB_WS_ACCT1.g_max_num_years));
4677:
4678: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
4679:
4680: /* Bug No 2640277 Start */

Line 4678: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop

4674: l_num_budget_years := least(ceil(months_between(nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date),
4675: nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_pp)) / 12),
4676: nvl(p_num_proposed_years, PSB_WS_ACCT1.g_max_num_years));
4677:
4678: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
4679:
4680: /* Bug No 2640277 Start */
4681: -- Following condition has been changed
4682:

Line 4683: l_year_start_date := PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;

4679:
4680: /* Bug No 2640277 Start */
4681: -- Following condition has been changed
4682:
4683: l_year_start_date := PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;
4684: l_year_end_date := PSB_WS_ACCT1.g_budget_years(l_year_index).end_date;
4685:
4686: -- for bug 4308904
4687: l_ccid_param_exists := false;

Line 4684: l_year_end_date := PSB_WS_ACCT1.g_budget_years(l_year_index).end_date;

4680: /* Bug No 2640277 Start */
4681: -- Following condition has been changed
4682:
4683: l_year_start_date := PSB_WS_ACCT1.g_budget_years(l_year_index).start_date;
4684: l_year_end_date := PSB_WS_ACCT1.g_budget_years(l_year_index).end_date;
4685:
4686: -- for bug 4308904
4687: l_ccid_param_exists := false;
4688:

Line 4690: if ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP')) and

4686: -- for bug 4308904
4687: l_ccid_param_exists := false;
4688:
4689: /*
4690: if ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP')) and
4691: (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date >= nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy)) and
4692: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <= nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date))) then
4693: */
4694:

Line 4691: (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date >= nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy)) and

4687: l_ccid_param_exists := false;
4688:
4689: /*
4690: if ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP')) and
4691: (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date >= nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy)) and
4692: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <= nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date))) then
4693: */
4694:
4695: if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP'))

Line 4692: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <= nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date))) then

4688:
4689: /*
4690: if ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP')) and
4691: (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date >= nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy)) and
4692: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <= nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date))) then
4693: */
4694:
4695: if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP'))
4696: and (((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) between l_year_start_date and l_year_end_date)

Line 4695: if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP'))

4691: (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date >= nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy)) and
4692: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <= nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date))) then
4693: */
4694:
4695: if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP'))
4696: and (((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) between l_year_start_date and l_year_end_date)
4697: or (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) between l_year_start_date and l_year_end_date)
4698: or ((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) < l_year_start_date)
4699: and (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) > l_year_end_date))))

Line 4696: and (((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) between l_year_start_date and l_year_end_date)

4692: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <= nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date))) then
4693: */
4694:
4695: if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP'))
4696: and (((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) between l_year_start_date and l_year_end_date)
4697: or (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) between l_year_start_date and l_year_end_date)
4698: or ((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) < l_year_start_date)
4699: and (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) > l_year_end_date))))
4700: then

Line 4697: or (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) between l_year_start_date and l_year_end_date)

4693: */
4694:
4695: if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP'))
4696: and (((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) between l_year_start_date and l_year_end_date)
4697: or (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) between l_year_start_date and l_year_end_date)
4698: or ((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) < l_year_start_date)
4699: and (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) > l_year_end_date))))
4700: then
4701: /* Bug No 2640277 End */

Line 4698: or ((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) < l_year_start_date)

4694:
4695: if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP'))
4696: and (((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) between l_year_start_date and l_year_end_date)
4697: or (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) between l_year_start_date and l_year_end_date)
4698: or ((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) < l_year_start_date)
4699: and (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) > l_year_end_date))))
4700: then
4701: /* Bug No 2640277 End */
4702:

Line 4699: and (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) > l_year_end_date))))

4695: if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP'))
4696: and (((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) between l_year_start_date and l_year_end_date)
4697: or (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) between l_year_start_date and l_year_end_date)
4698: or ((nvl(p_ccid_start_period, PSB_WS_ACCT1.g_startdate_cy) < l_year_start_date)
4699: and (nvl(p_ccid_end_period, PSB_WS_ACCT1.g_end_est_date) > l_year_end_date))))
4700: then
4701: /* Bug No 2640277 End */
4702:
4703: begin

Line 4707: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop

4703: begin
4704:
4705: g_running_total := 0;
4706:
4707: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop
4708: g_period_amount(l_init_index) := null;
4709: end loop;
4710:
4711: for l_init_index in 1..g_alloc_periods.Count loop

Line 4721: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop

4717: end loop;
4718:
4719: l_init_index := 1;
4720:
4721: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop
4722:
4723: if PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =
4724: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id
4725: then

Line 4723: if PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =

4719: l_init_index := 1;
4720:
4721: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop
4722:
4723: if PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =
4724: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id
4725: then
4726:
4727: -- Periods over which to allocate should include all Budget Periods

Line 4724: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id

4720:
4721: for l_period_index in 1..PSB_WS_ACCT1.g_num_budget_periods loop
4722:
4723: if PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id =
4724: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id
4725: then
4726:
4727: -- Periods over which to allocate should include all Budget Periods
4728: -- in the PP Budget Years and all Budget Periods upto the GL Cutoff

Line 4731: if ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') or

4727: -- Periods over which to allocate should include all Budget Periods
4728: -- in the PP Budget Years and all Budget Periods upto the GL Cutoff
4729: -- Period in the CY Budget Year
4730:
4731: if ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') or
4732: ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') and
4733: ((l_gl_cutoff_period is null) or
4734: (l_gl_cutoff_period < PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))))
4735: then

Line 4732: ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') and

4728: -- in the PP Budget Years and all Budget Periods upto the GL Cutoff
4729: -- Period in the CY Budget Year
4730:
4731: if ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') or
4732: ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') and
4733: ((l_gl_cutoff_period is null) or
4734: (l_gl_cutoff_period < PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))))
4735: then
4736: g_alloc_periods(l_init_index).budget_period_id :=

Line 4734: (l_gl_cutoff_period < PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))))

4730:
4731: if ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') or
4732: ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') and
4733: ((l_gl_cutoff_period is null) or
4734: (l_gl_cutoff_period < PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))))
4735: then
4736: g_alloc_periods(l_init_index).budget_period_id :=
4737: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
4738: g_alloc_periods(l_init_index).long_sequence_no :=

Line 4737: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;

4733: ((l_gl_cutoff_period is null) or
4734: (l_gl_cutoff_period < PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date))))
4735: then
4736: g_alloc_periods(l_init_index).budget_period_id :=
4737: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
4738: g_alloc_periods(l_init_index).long_sequence_no :=
4739: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
4740: g_alloc_periods(l_init_index).start_date :=
4741: PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;

Line 4739: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;

4735: then
4736: g_alloc_periods(l_init_index).budget_period_id :=
4737: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
4738: g_alloc_periods(l_init_index).long_sequence_no :=
4739: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
4740: g_alloc_periods(l_init_index).start_date :=
4741: PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
4742: g_alloc_periods(l_init_index).end_date :=
4743: PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

Line 4741: PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;

4737: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_period_id;
4738: g_alloc_periods(l_init_index).long_sequence_no :=
4739: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
4740: g_alloc_periods(l_init_index).start_date :=
4741: PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
4742: g_alloc_periods(l_init_index).end_date :=
4743: PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
4744: g_alloc_periods(l_init_index).budget_year_id :=
4745: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id;

Line 4743: PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;

4739: PSB_WS_ACCT1.g_budget_periods(l_period_index).long_sequence_no;
4740: g_alloc_periods(l_init_index).start_date :=
4741: PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
4742: g_alloc_periods(l_init_index).end_date :=
4743: PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
4744: g_alloc_periods(l_init_index).budget_year_id :=
4745: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id;
4746:
4747: l_init_index := l_init_index + 1;

Line 4745: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id;

4741: PSB_WS_ACCT1.g_budget_periods(l_period_index).start_date;
4742: g_alloc_periods(l_init_index).end_date :=
4743: PSB_WS_ACCT1.g_budget_periods(l_period_index).end_date;
4744: g_alloc_periods(l_init_index).budget_year_id :=
4745: PSB_WS_ACCT1.g_budget_periods(l_period_index).budget_year_id;
4746:
4747: l_init_index := l_init_index + 1;
4748: end if;
4749:

Line 4755: IF PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY'

4751:
4752: end loop; /* Budget Period */
4753:
4754: /* Bug 3603538 Start */
4755: IF PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY'
4756: AND
4757: l_year_end_date = l_gl_cutoff_period
4758: THEN
4759: FOR c_Parameter_Rec IN c_Parameter (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

Line 4759: FOR c_Parameter_Rec IN c_Parameter (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

4755: IF PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY'
4756: AND
4757: l_year_end_date = l_gl_cutoff_period
4758: THEN
4759: FOR c_Parameter_Rec IN c_Parameter (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
4760: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date) LOOP
4761:
4762: l_currency_code := c_Parameter_Rec.currency_code;
4763:

Line 4760: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date) LOOP

4756: AND
4757: l_year_end_date = l_gl_cutoff_period
4758: THEN
4759: FOR c_Parameter_Rec IN c_Parameter (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
4760: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date) LOOP
4761:
4762: l_currency_code := c_Parameter_Rec.currency_code;
4763:
4764: END LOOP;

Line 4769: IF PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY'

4765:
4766: END IF;
4767: /* Bug 3603538 End */
4768:
4769: IF PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY'
4770: AND
4771: l_year_end_date <> l_gl_cutoff_period
4772: THEN
4773: -- Added the above condition as part of Bug fix 3469514

Line 4777: for c_Parameter_Rec in c_Parameter (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

4773: -- Added the above condition as part of Bug fix 3469514
4774: begin
4775:
4776: -- Find all CCIDs that are applicable for the CY
4777: for c_Parameter_Rec in c_Parameter (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
4778: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date) loop
4779: -- Set the local variable.
4780: l_cy_parameter_exists := TRUE;
4781:

Line 4778: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date) loop

4774: begin
4775:
4776: -- Find all CCIDs that are applicable for the CY
4777: for c_Parameter_Rec in c_Parameter (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
4778: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date) loop
4779: -- Set the local variable.
4780: l_cy_parameter_exists := TRUE;
4781:
4782: -- for bug 4308904

Line 4794: l_compound_factor := greatest(ceil(months_between(PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

4790: (c_Parameter_Rec.parameter_compound_annually = 'N')) then
4791: l_compound_annually := FND_API.G_FALSE;
4792: else
4793: l_compound_annually := FND_API.G_TRUE;
4794: l_compound_factor := greatest(ceil(months_between(PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
4795: c_Parameter_Rec.effective_start_date) / 12), 0) + 1;
4796: end if;
4797:
4798: -- Parse the Parameter Formulae and compute a YTD running total to

Line 4870: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id,

4866: ( p_return_status => l_return_status,
4867: p_worksheet_id => p_worksheet_id,
4868: p_flex_mapping_set_id => l_flex_mapping_set_id,
4869: p_budget_year_type_id =>
4870: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id,
4871: p_allocrule_set_id => l_allocrule_set_id,
4872: p_budget_calendar_id => l_budget_calendar_id,
4873: p_ccid => p_ccid,
4874: p_ytd_amount => g_running_total,

Line 4881: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

4877: p_allocation_type => l_allocation_type,
4878: -- Bug#2342169: Added the following parameter.
4879: p_rounding_factor => l_rounding_factor,
4880: p_effective_start_date =>
4881: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
4882: p_effective_end_date =>
4883: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
4884: p_budget_periods => g_alloc_periods,
4885: p_period_amount => g_period_amount

Line 4883: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,

4879: p_rounding_factor => l_rounding_factor,
4880: p_effective_start_date =>
4881: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
4882: p_effective_end_date =>
4883: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
4884: p_budget_periods => g_alloc_periods,
4885: p_period_amount => g_period_amount
4886: ) ;
4887:

Line 4911: PSB_WS_ACCT1.Create_Account_Dist

4907:
4908:
4909:
4910: -- Create Account Distribution for the CCID
4911: PSB_WS_ACCT1.Create_Account_Dist
4912: (p_api_version => 1.0,
4913: p_return_status => l_return_status,
4914: p_account_line_id => l_account_line_id,
4915: p_worksheet_id => p_worksheet_id,

Line 4926: p_budget_year_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,

4922: p_stage_set_id => p_stage_set_id,
4923: p_start_stage_seq => l_start_stage_seq,
4924: p_current_stage_seq => p_current_stage_seq,
4925: p_budget_group_id => p_budget_group_id,
4926: p_budget_year_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
4927: p_flex_mapping_set_id => l_flex_mapping_set_id,
4928: p_map_accounts => TRUE,
4929: p_ccid => p_ccid,
4930: p_currency_code => nvl(l_currency_code, l_func_currency),

Line 4947: l_mapped_ccid := PSB_WS_ACCT1.Map_Account

4943:
4944: IF nvl(l_flex_mapping_set_id, FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
4945: BEGIN
4946:
4947: l_mapped_ccid := PSB_WS_ACCT1.Map_Account
4948: (p_flex_mapping_set_id => l_flex_mapping_set_id,
4949: p_ccid => p_ccid,
4950: p_budget_year_type_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id);
4951:

Line 4950: p_budget_year_type_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id);

4946:
4947: l_mapped_ccid := PSB_WS_ACCT1.Map_Account
4948: (p_flex_mapping_set_id => l_flex_mapping_set_id,
4949: p_ccid => p_ccid,
4950: p_budget_year_type_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id);
4951:
4952: END;
4953: ELSE
4954: l_mapped_ccid := p_ccid;

Line 4957: PSB_WS_ACCT1.Copy_CY_Estimates

4953: ELSE
4954: l_mapped_ccid := p_ccid;
4955: END IF;
4956:
4957: PSB_WS_ACCT1.Copy_CY_Estimates
4958: (p_return_status => l_return_status,
4959: p_worksheet_id => p_worksheet_id,
4960: p_service_package_id => p_service_package_id,
4961: p_rounding_factor => l_rounding_factor,

Line 4965: p_budget_year_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,

4961: p_rounding_factor => l_rounding_factor,
4962: p_start_stage_seq => p_current_stage_seq,
4963: p_budget_group_id => p_budget_group_id,
4964: p_stage_set_id => p_stage_set_id,
4965: p_budget_year_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
4966: p_ccid => l_mapped_ccid,
4967: p_currency_code => nvl(l_currency_code, l_func_currency));
4968:
4969: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 4985: ELSIF (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') THEN

4981: END;
4982:
4983: -- If Pos Budgeting is enabled, CCID is of type 'NON_PERSONNEL_SERVICES'
4984:
4985: ELSIF (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') THEN
4986: BEGIN
4987:
4988: IF l_num_proposed_years < l_num_budget_years THEN
4989: BEGIN

Line 4993: for c_Parameter_Rec in c_Parameter (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

4989: BEGIN
4990:
4991: -- Find all Parameters that are applicable for the PP Budget Year
4992:
4993: for c_Parameter_Rec in c_Parameter (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
4994: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date) loop
4995:
4996: l_currency_code := c_Parameter_Rec.currency_code;
4997:

Line 4994: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date) loop

4990:
4991: -- Find all Parameters that are applicable for the PP Budget Year
4992:
4993: for c_Parameter_Rec in c_Parameter (PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
4994: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date) loop
4995:
4996: l_currency_code := c_Parameter_Rec.currency_code;
4997:
4998: -- for bug 4308904

Line 5008: l_compound_factor := greatest(ceil(months_between(PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

5004: (c_Parameter_Rec.parameter_compound_annually = 'N')) THEN
5005: l_compound_annually := FND_API.G_FALSE;
5006: ELSE
5007: l_compound_annually := FND_API.G_TRUE;
5008: l_compound_factor := greatest(ceil(months_between(PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
5009: c_Parameter_Rec.effective_start_date) / 12), 0) + 1;
5010: END IF;
5011:
5012: -- Parse the Parameter Formulae and compute a running total for the

Line 5051: IF (l_num_allocated_years <= least(l_num_budget_years, nvl(l_num_years_to_allocate, PSB_WS_ACCT1.g_max_num_years)))

5047: END IF;
5048:
5049: /* Bug 4308904 Start */
5050:
5051: IF (l_num_allocated_years <= least(l_num_budget_years, nvl(l_num_years_to_allocate, PSB_WS_ACCT1.g_max_num_years)))
5052: THEN
5053: begin
5054:
5055: -- Bug#3401175: Support Profile type allocation rules for PP years.

Line 5076: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id,

5072: ( p_return_status => l_return_status,
5073: p_worksheet_id => p_worksheet_id,
5074: p_flex_mapping_set_id => l_flex_mapping_set_id,
5075: p_budget_year_type_id =>
5076: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id,
5077: p_allocrule_set_id => l_allocrule_set_id,
5078: p_budget_calendar_id => l_budget_calendar_id,
5079: p_ccid => p_ccid,
5080: p_ytd_amount => g_running_total,

Line 5087: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

5083: p_allocation_type => l_allocation_type,
5084: -- Bug#2342169: Added the following parameter.
5085: p_rounding_factor => l_rounding_factor,
5086: p_effective_start_date =>
5087: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
5088: p_effective_end_date =>
5089: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
5090: p_budget_periods => g_alloc_periods,
5091: p_period_amount => g_period_amount

Line 5089: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,

5085: p_rounding_factor => l_rounding_factor,
5086: p_effective_start_date =>
5087: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
5088: p_effective_end_date =>
5089: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
5090: p_budget_periods => g_alloc_periods,
5091: p_period_amount => g_period_amount
5092: ) ;
5093:

Line 5121: PSB_WS_ACCT1.Create_Account_Dist

5117: THEN
5118: BEGIN
5119:
5120: -- Create Account Distribution for the CCID
5121: PSB_WS_ACCT1.Create_Account_Dist
5122: (p_api_version => 1.0,
5123: p_return_status => l_return_status,
5124: p_account_line_id => l_account_line_id,
5125: p_worksheet_id => p_worksheet_id,

Line 5136: p_budget_year_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,

5132: p_stage_set_id => p_stage_set_id,
5133: p_start_stage_seq => l_start_stage_seq,
5134: p_current_stage_seq => p_current_stage_seq,
5135: p_budget_group_id => p_budget_group_id,
5136: p_budget_year_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
5137: p_flex_mapping_set_id => l_flex_mapping_set_id,
5138: p_map_accounts => TRUE,
5139: p_ccid => p_ccid,
5140: p_currency_code => nvl(l_currency_code, l_func_currency),

Line 5176: (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY')

5172:
5173: IF not l_ccid_param_exists THEN
5174: IF (
5175: (
5176: (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY')
5177: AND
5178: l_year_end_date <> l_gl_cutoff_period
5179: -- Added the above condition as part of Bug fix 3469514
5180: )

Line 5183: (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP')

5179: -- Added the above condition as part of Bug fix 3469514
5180: )
5181: OR
5182: (
5183: (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP')
5184: AND
5185: (l_num_allocated_years <= least(l_num_budget_years, nvl(l_num_years_to_allocate, PSB_WS_ACCT1.g_max_num_years)))
5186: )
5187: ) THEN

Line 5185: (l_num_allocated_years <= least(l_num_budget_years, nvl(l_num_years_to_allocate, PSB_WS_ACCT1.g_max_num_years)))

5181: OR
5182: (
5183: (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP')
5184: AND
5185: (l_num_allocated_years <= least(l_num_budget_years, nvl(l_num_years_to_allocate, PSB_WS_ACCT1.g_max_num_years)))
5186: )
5187: ) THEN
5188: begin
5189:

Line 5190: if PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY' then

5186: )
5187: ) THEN
5188: begin
5189:
5190: if PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY' then
5191:
5192: -- Bug#3126462: Support Percent type allocation rules for CY estimates
5193: -- No need to hardcode allocation type to Profile. Process all types.
5194: --l_allocation_type := 'PROFILE';

Line 5229: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id,

5225: ( p_return_status => l_return_status,
5226: p_worksheet_id => p_worksheet_id,
5227: p_flex_mapping_set_id => l_flex_mapping_set_id,
5228: p_budget_year_type_id =>
5229: PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id,
5230: p_allocrule_set_id => l_allocrule_set_id,
5231: p_budget_calendar_id => l_budget_calendar_id,
5232: p_ccid => p_ccid,
5233: p_ytd_amount => g_running_total,

Line 5244: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,

5240: -- Bug#2342169: Added the following parameter.
5241: p_rounding_factor => l_rounding_factor,
5242: --
5243: p_effective_start_date =>
5244: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
5245: p_effective_end_date =>
5246: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
5247: p_budget_periods => g_alloc_periods,
5248: p_period_amount => g_period_amount

Line 5246: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,

5242: --
5243: p_effective_start_date =>
5244: PSB_WS_ACCT1.g_budget_years(l_year_index).start_date,
5245: p_effective_end_date =>
5246: PSB_WS_ACCT1.g_budget_years(l_year_index).end_date,
5247: p_budget_periods => g_alloc_periods,
5248: p_period_amount => g_period_amount
5249: ) ;
5250: --

Line 5265: --if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP')) then

5261: end if;
5262:
5263:
5264:
5265: --if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP')) then
5266: if ( ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') AND
5267: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <> l_gl_cutoff_period)) OR
5268: (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') ) then
5269:

Line 5266: if ( ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') AND

5262:
5263:
5264:
5265: --if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP')) then
5266: if ( ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') AND
5267: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <> l_gl_cutoff_period)) OR
5268: (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') ) then
5269:
5270:

Line 5267: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <> l_gl_cutoff_period)) OR

5263:
5264:
5265: --if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP')) then
5266: if ( ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') AND
5267: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <> l_gl_cutoff_period)) OR
5268: (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') ) then
5269:
5270:
5271: begin

Line 5268: (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') ) then

5264:
5265: --if (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type in ('CY', 'PP')) then
5266: if ( ((PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') AND
5267: (PSB_WS_ACCT1.g_budget_years(l_year_index).end_date <> l_gl_cutoff_period)) OR
5268: (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'PP') ) then
5269:
5270:
5271: begin
5272:

Line 5294: -- TO_CHAR(PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id)

5290: begin
5291:
5292: --pd('3: Call Create_Account_Dist=> ccid=' || TO_CHAR(p_ccid) ||
5293: -- ', p_budget_year_id=' ||
5294: -- TO_CHAR(PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id)
5295: -- || ', p_ytd_amount=' || TO_CHAR(g_running_total));
5296:
5297: -- Create Account Distribution for the CCID
5298: PSB_WS_ACCT1.Create_Account_Dist

Line 5298: PSB_WS_ACCT1.Create_Account_Dist

5294: -- TO_CHAR(PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id)
5295: -- || ', p_ytd_amount=' || TO_CHAR(g_running_total));
5296:
5297: -- Create Account Distribution for the CCID
5298: PSB_WS_ACCT1.Create_Account_Dist
5299: (p_api_version => 1.0,
5300: p_return_status => l_return_status,
5301: p_account_line_id => l_account_line_id,
5302: p_worksheet_id => p_worksheet_id,

Line 5313: p_budget_year_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,

5309: p_stage_set_id => p_stage_set_id,
5310: p_start_stage_seq => l_start_stage_seq,
5311: p_current_stage_seq => p_current_stage_seq,
5312: p_budget_group_id => p_budget_group_id,
5313: p_budget_year_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
5314: p_flex_mapping_set_id => l_flex_mapping_set_id,
5315: p_map_accounts => TRUE,
5316: p_ccid => p_ccid,
5317: p_currency_code => nvl(l_currency_code, l_func_currency),

Line 5345: IF (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') THEN

5341: -- for bug 4308904
5342: IF not l_ccid_param_exists THEN
5343:
5344:
5345: IF (PSB_WS_ACCT1.g_budget_years(l_year_index).year_type = 'CY') THEN
5346: -- AND l_cy_parameter_exists THEN
5347: -- Commented the above condition as part of bug fix 3469514
5348:
5349: begin

Line 5354: l_mapped_ccid := PSB_WS_ACCT1.Map_Account

5350:
5351: if nvl(l_flex_mapping_set_id, FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM then
5352: begin
5353:
5354: l_mapped_ccid := PSB_WS_ACCT1.Map_Account
5355: (p_flex_mapping_set_id => l_flex_mapping_set_id,
5356: p_ccid => p_ccid,
5357: p_budget_year_type_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id);
5358:

Line 5357: p_budget_year_type_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id);

5353:
5354: l_mapped_ccid := PSB_WS_ACCT1.Map_Account
5355: (p_flex_mapping_set_id => l_flex_mapping_set_id,
5356: p_ccid => p_ccid,
5357: p_budget_year_type_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_type_id);
5358:
5359: end;
5360: else
5361: l_mapped_ccid := p_ccid;

Line 5364: PSB_WS_ACCT1.Copy_CY_Estimates

5360: else
5361: l_mapped_ccid := p_ccid;
5362: end if;
5363:
5364: PSB_WS_ACCT1.Copy_CY_Estimates
5365: (p_return_status => l_return_status,
5366: p_worksheet_id => p_worksheet_id,
5367: p_service_package_id => p_service_package_id,
5368: p_rounding_factor => l_rounding_factor,

Line 5372: p_budget_year_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,

5368: p_rounding_factor => l_rounding_factor,
5369: p_start_stage_seq => p_current_stage_seq,
5370: p_budget_group_id => p_budget_group_id,
5371: p_stage_set_id => p_stage_set_id,
5372: p_budget_year_id => PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id,
5373: p_ccid => l_mapped_ccid,
5374: p_currency_code => nvl(l_currency_code, l_func_currency));
5375:
5376: if l_return_status <> FND_API.G_RET_STS_SUCCESS then

Line 5710: p_budget_periods IN PSB_WS_ACCT1.g_budgetperiod_tbl_type,

5706: p_rounding_factor IN NUMBER,
5707: /* Bug No 2342169 End */
5708: p_effective_start_date IN DATE,
5709: p_effective_end_date IN DATE,
5710: p_budget_periods IN PSB_WS_ACCT1.g_budgetperiod_tbl_type,
5711: p_period_amount OUT NOCOPY PSB_WS_ACCT1.g_prdamt_tbl_type
5712: ) IS
5713:
5714: cursor c_AllocRule is

Line 5711: p_period_amount OUT NOCOPY PSB_WS_ACCT1.g_prdamt_tbl_type

5707: /* Bug No 2342169 End */
5708: p_effective_start_date IN DATE,
5709: p_effective_end_date IN DATE,
5710: p_budget_periods IN PSB_WS_ACCT1.g_budgetperiod_tbl_type,
5711: p_period_amount OUT NOCOPY PSB_WS_ACCT1.g_prdamt_tbl_type
5712: ) IS
5713:
5714: cursor c_AllocRule is
5715: /* Bug 3458191

Line 5781: l_period_amount PSB_WS_ACCT1.g_prdamt_tbl_type;

5777: sql_alloc VARCHAR2(3000);
5778: cur_alloc INTEGER;
5779: num_alloc INTEGER;
5780:
5781: l_period_amount PSB_WS_ACCT1.g_prdamt_tbl_type;
5782: l_num_periods NUMBER := 0;
5783:
5784: -- Bug#3126462: Support Percent type allocation rules for CY estimates
5785: l_weight NUMBER := 0;

Line 5792: for l_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop

5788: l_mapped_ccid NUMBER;
5789:
5790: BEGIN
5791:
5792: for l_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop
5793: l_period_amount(l_index) := null;
5794: p_period_amount(l_index) := null;
5795: end loop;
5796:

Line 5811: l_mapped_ccid := PSB_WS_ACCT1.Map_Account

5807: l_year_category_type := c_budyr_type_rec.year_category_type;
5808: end loop;
5809: /* Bug No 2354918 End */
5810:
5811: l_mapped_ccid := PSB_WS_ACCT1.Map_Account
5812: (p_flex_mapping_set_id => p_flex_mapping_set_id,
5813: p_ccid => p_ccid,
5814: p_budget_year_type_id => p_budget_year_type_id);
5815:

Line 5891: PSB_WS_Acct1.g_cy_num_periods )

5887: --
5888:
5889: -- Find weight for the estimate periods from the allocation rule.
5890: FOR c_AllocPct_Rec IN c_AllocPct ( c_AllocRule_Rec.allocrule_id,
5891: PSB_WS_Acct1.g_cy_num_periods )
5892: LOOP
5893:
5894: -- Check if period percent is applicable for estimate periods.
5895: IF c_AllocPct_Rec.period_num >= p_budget_periods(1).long_sequence_no

Line 5913: PSB_WS_Acct1.g_cy_num_periods)

5909: ELSE
5910:
5911: -- Now process period allocation for the current allocation rule.
5912: FOR c_AllocPct_Rec IN c_AllocPct (c_AllocRule_Rec.allocrule_id,
5913: PSB_WS_Acct1.g_cy_num_periods)
5914: LOOP
5915:
5916: -- Check if period allocation is for estimate periods.
5917: IF c_AllocPct_Rec.period_num >= p_budget_periods(1).long_sequence_no

Line 6150: l_period_amount PSB_WS_ACCT1.g_prdamt_tbl_type;

6146: p_budget_group_id IN NUMBER := FND_API.G_MISS_NUM
6147: ) IS
6148:
6149: l_ytd_amount NUMBER;
6150: l_period_amount PSB_WS_ACCT1.g_prdamt_tbl_type;
6151: l_init_index PLS_INTEGER;
6152:
6153: /* Bug No 2354918 Start */
6154: l_running_total NUMBER := 0;

Line 6194: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop

6190: -- proration. Note for PP years, p_cy_ytd_amount will always be 0.
6191: l_old_ytd_amount := p_old_ytd_amount - p_cy_ytd_amount ;
6192: -- Bug#3128597: End
6193:
6194: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop
6195: l_period_amount(l_init_index) := null;
6196: end loop;
6197:
6198: /* Bug No 2354918 Start */

Line 6210: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop

6206: for c_WAL_Rec in c_WAL loop
6207: /* Bug No 2354918 Start */
6208: l_budget_year_id := c_WAL_Rec.budget_year_id;
6209:
6210: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
6211: if PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id = l_budget_year_id then
6212:
6213: l_last_period_index := PSB_WS_ACCT1.g_budget_years(l_year_index).last_period_index;
6214:

Line 6211: if PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id = l_budget_year_id then

6207: /* Bug No 2354918 Start */
6208: l_budget_year_id := c_WAL_Rec.budget_year_id;
6209:
6210: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
6211: if PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id = l_budget_year_id then
6212:
6213: l_last_period_index := PSB_WS_ACCT1.g_budget_years(l_year_index).last_period_index;
6214:
6215: end if;

Line 6213: l_last_period_index := PSB_WS_ACCT1.g_budget_years(l_year_index).last_period_index;

6209:
6210: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
6211: if PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id = l_budget_year_id then
6212:
6213: l_last_period_index := PSB_WS_ACCT1.g_budget_years(l_year_index).last_period_index;
6214:
6215: end if;
6216: end loop;
6217: /* Bug No 2354918 End */

Line 6222: if 1 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6218:
6219: if c_WAL_Rec.period1_amount is null then
6220: l_period_amount(1) := null;
6221: else
6222: if 1 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6223: l_period_amount(1) := c_WAL_Rec.period1_amount +
6224: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period1_amount / l_old_ytd_amount);
6225: else
6226: l_period_amount(1) := c_WAL_Rec.period1_amount;

Line 6233: if 2 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6229:
6230: if c_WAL_Rec.period2_amount is null then
6231: l_period_amount(2) := null;
6232: else
6233: if 2 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6234: l_period_amount(2) := c_WAL_Rec.period2_amount +
6235: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period2_amount / l_old_ytd_amount);
6236: else
6237: l_period_amount(2) := c_WAL_Rec.period2_amount;

Line 6244: if 3 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6240:
6241: if c_WAL_Rec.period3_amount is null then
6242: l_period_amount(3) := null;
6243: else
6244: if 3 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6245: l_period_amount(3) := c_WAL_Rec.period3_amount +
6246: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period3_amount / l_old_ytd_amount);
6247: else
6248: l_period_amount(3) := c_WAL_Rec.period3_amount;

Line 6255: if 4 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6251:
6252: if c_WAL_Rec.period4_amount is null then
6253: l_period_amount(4) := null;
6254: else
6255: if 4 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6256: l_period_amount(4) := c_WAL_Rec.period4_amount +
6257: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period4_amount / l_old_ytd_amount);
6258: else
6259: l_period_amount(4) := c_WAL_Rec.period4_amount;

Line 6266: if 5 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6262:
6263: if c_WAL_Rec.period5_amount is null then
6264: l_period_amount(5) := null;
6265: else
6266: if 5 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6267: l_period_amount(5) := c_WAL_Rec.period5_amount +
6268: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period5_amount / l_old_ytd_amount);
6269: else
6270: l_period_amount(5) := c_WAL_Rec.period5_amount;

Line 6277: if 6 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6273:
6274: if c_WAL_Rec.period6_amount is null then
6275: l_period_amount(6) := null;
6276: else
6277: if 6 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6278: l_period_amount(6) := c_WAL_Rec.period6_amount +
6279: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period6_amount / l_old_ytd_amount);
6280: else
6281: l_period_amount(6) := c_WAL_Rec.period6_amount;

Line 6288: if 7 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6284:
6285: if c_WAL_Rec.period7_amount is null then
6286: l_period_amount(7) := null;
6287: else
6288: if 7 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6289: l_period_amount(7) := c_WAL_Rec.period7_amount +
6290: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period7_amount / l_old_ytd_amount);
6291: else
6292: l_period_amount(7) := c_WAL_Rec.period7_amount;

Line 6299: if 8 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6295:
6296: if c_WAL_Rec.period8_amount is null then
6297: l_period_amount(8) := null;
6298: else
6299: if 8 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6300: l_period_amount(8) := c_WAL_Rec.period8_amount +
6301: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period8_amount / l_old_ytd_amount);
6302: else
6303: l_period_amount(8) := c_WAL_Rec.period8_amount;

Line 6310: if 9 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6306:
6307: if c_WAL_Rec.period9_amount is null then
6308: l_period_amount(9) := null;
6309: else
6310: if 9 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6311: l_period_amount(9) := c_WAL_Rec.period9_amount +
6312: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period9_amount / l_old_ytd_amount);
6313: else
6314: l_period_amount(9) := c_WAL_Rec.period9_amount;

Line 6321: if 10 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6317:
6318: if c_WAL_Rec.period10_amount is null then
6319: l_period_amount(10) := null;
6320: else
6321: if 10 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6322: l_period_amount(10) := c_WAL_Rec.period10_amount +
6323: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period10_amount / l_old_ytd_amount);
6324: else
6325: l_period_amount(10) := c_WAL_Rec.period10_amount;

Line 6332: if 11 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6328:
6329: if c_WAL_Rec.period11_amount is null then
6330: l_period_amount(11) := null;
6331: else
6332: if 11 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6333: l_period_amount(11) := c_WAL_Rec.period11_amount +
6334: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period11_amount / l_old_ytd_amount);
6335: else
6336: l_period_amount(11) := c_WAL_Rec.period11_amount;

Line 6343: if 12 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6339:
6340: if c_WAL_Rec.period12_amount is null then
6341: l_period_amount(12) := null;
6342: else
6343: if 12 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6344: l_period_amount(12) := c_WAL_Rec.period12_amount +
6345: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period12_amount / l_old_ytd_amount);
6346: else
6347: l_period_amount(12) := c_WAL_Rec.period12_amount;

Line 6354: if 13 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6350:
6351: if c_WAL_Rec.period13_amount is null then
6352: l_period_amount(13) := null;
6353: else
6354: if 13 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6355: l_period_amount(13) := c_WAL_Rec.period13_amount +
6356: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period13_amount / l_old_ytd_amount);
6357: else
6358: l_period_amount(13) := c_WAL_Rec.period13_amount;

Line 6365: if 14 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6361:
6362: if c_WAL_Rec.period14_amount is null then
6363: l_period_amount(14) := null;
6364: else
6365: if 14 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6366: l_period_amount(14) := c_WAL_Rec.period14_amount +
6367: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period14_amount / l_old_ytd_amount);
6368: else
6369: l_period_amount(14) := c_WAL_Rec.period14_amount;

Line 6376: if 15 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6372:
6373: if c_WAL_Rec.period15_amount is null then
6374: l_period_amount(15) := null;
6375: else
6376: if 15 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6377: l_period_amount(15) := c_WAL_Rec.period15_amount +
6378: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period15_amount / l_old_ytd_amount);
6379: else
6380: l_period_amount(15) := c_WAL_Rec.period15_amount;

Line 6387: if 16 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6383:
6384: if c_WAL_Rec.period16_amount is null then
6385: l_period_amount(16) := null;
6386: else
6387: if 16 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6388: l_period_amount(16) := c_WAL_Rec.period16_amount +
6389: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period16_amount / l_old_ytd_amount);
6390: else
6391: l_period_amount(16) := c_WAL_Rec.period16_amount;

Line 6398: if 17 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6394:
6395: if c_WAL_Rec.period17_amount is null then
6396: l_period_amount(17) := null;
6397: else
6398: if 17 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6399: l_period_amount(17) := c_WAL_Rec.period17_amount +
6400: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period17_amount / l_old_ytd_amount);
6401: else
6402: l_period_amount(17) := c_WAL_Rec.period17_amount;

Line 6409: if 18 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6405:
6406: if c_WAL_Rec.period18_amount is null then
6407: l_period_amount(18) := null;
6408: else
6409: if 18 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6410: l_period_amount(18) := c_WAL_Rec.period18_amount +
6411: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period18_amount / l_old_ytd_amount);
6412: else
6413: l_period_amount(18) := c_WAL_Rec.period18_amount;

Line 6420: if 19 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6416:
6417: if c_WAL_Rec.period19_amount is null then
6418: l_period_amount(19) := null;
6419: else
6420: if 19 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6421: l_period_amount(19) := c_WAL_Rec.period19_amount +
6422: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period19_amount / l_old_ytd_amount);
6423: else
6424: l_period_amount(19) := c_WAL_Rec.period19_amount;

Line 6431: if 20 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6427:
6428: if c_WAL_Rec.period20_amount is null then
6429: l_period_amount(20) := null;
6430: else
6431: if 20 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6432: l_period_amount(20) := c_WAL_Rec.period20_amount +
6433: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period20_amount / l_old_ytd_amount);
6434: else
6435: l_period_amount(20) := c_WAL_Rec.period20_amount;

Line 6442: if 21 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6438:
6439: if c_WAL_Rec.period21_amount is null then
6440: l_period_amount(21) := null;
6441: else
6442: if 21 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6443: l_period_amount(21) := c_WAL_Rec.period21_amount +
6444: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period21_amount / l_old_ytd_amount);
6445: else
6446: l_period_amount(21) := c_WAL_Rec.period21_amount;

Line 6453: if 22 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6449:
6450: if c_WAL_Rec.period22_amount is null then
6451: l_period_amount(22) := null;
6452: else
6453: if 22 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6454: l_period_amount(22) := c_WAL_Rec.period22_amount +
6455: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period22_amount / l_old_ytd_amount);
6456: else
6457: l_period_amount(22) := c_WAL_Rec.period22_amount;

Line 6464: if 23 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6460:
6461: if c_WAL_Rec.period23_amount is null then
6462: l_period_amount(23) := null;
6463: else
6464: if 23 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6465: l_period_amount(23) := c_WAL_Rec.period23_amount +
6466: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period23_amount / l_old_ytd_amount);
6467: else
6468: l_period_amount(23) := c_WAL_Rec.period23_amount;

Line 6475: if 24 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6471:
6472: if c_WAL_Rec.period24_amount is null then
6473: l_period_amount(24) := null;
6474: else
6475: if 24 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6476: l_period_amount(24) := c_WAL_Rec.period24_amount +
6477: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period24_amount / l_old_ytd_amount);
6478: else
6479: l_period_amount(24) := c_WAL_Rec.period24_amount;

Line 6486: if 25 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6482:
6483: if c_WAL_Rec.period25_amount is null then
6484: l_period_amount(25) := null;
6485: else
6486: if 25 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6487: l_period_amount(25) := c_WAL_Rec.period25_amount +
6488: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period25_amount / l_old_ytd_amount);
6489: else
6490: l_period_amount(25) := c_WAL_Rec.period25_amount;

Line 6497: if 26 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6493:
6494: if c_WAL_Rec.period26_amount is null then
6495: l_period_amount(26) := null;
6496: else
6497: if 26 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6498: l_period_amount(26) := c_WAL_Rec.period26_amount +
6499: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period26_amount / l_old_ytd_amount);
6500: else
6501: l_period_amount(26) := c_WAL_Rec.period26_amount;

Line 6508: if 27 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6504:
6505: if c_WAL_Rec.period27_amount is null then
6506: l_period_amount(27) := null;
6507: else
6508: if 27 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6509: l_period_amount(27) := c_WAL_Rec.period27_amount +
6510: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period27_amount / l_old_ytd_amount);
6511: else
6512: l_period_amount(27) := c_WAL_Rec.period27_amount;

Line 6519: if 28 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6515:
6516: if c_WAL_Rec.period28_amount is null then
6517: l_period_amount(28) := null;
6518: else
6519: if 28 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6520: l_period_amount(28) := c_WAL_Rec.period28_amount +
6521: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period28_amount / l_old_ytd_amount);
6522: else
6523: l_period_amount(28) := c_WAL_Rec.period28_amount;

Line 6530: if 29 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6526:
6527: if c_WAL_Rec.period29_amount is null then
6528: l_period_amount(29) := null;
6529: else
6530: if 29 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6531: l_period_amount(29) := c_WAL_Rec.period29_amount +
6532: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period29_amount / l_old_ytd_amount);
6533: else
6534: l_period_amount(29) := c_WAL_Rec.period29_amount;

Line 6541: if 30 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6537:
6538: if c_WAL_Rec.period30_amount is null then
6539: l_period_amount(30) := null;
6540: else
6541: if 30 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6542: l_period_amount(30) := c_WAL_Rec.period30_amount +
6543: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period30_amount / l_old_ytd_amount);
6544: else
6545: l_period_amount(30) := c_WAL_Rec.period30_amount;

Line 6552: if 31 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6548:
6549: if c_WAL_Rec.period31_amount is null then
6550: l_period_amount(31) := null;
6551: else
6552: if 31 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6553: l_period_amount(31) := c_WAL_Rec.period31_amount +
6554: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period31_amount / l_old_ytd_amount);
6555: else
6556: l_period_amount(31) := c_WAL_Rec.period31_amount;

Line 6563: if 32 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6559:
6560: if c_WAL_Rec.period32_amount is null then
6561: l_period_amount(32) := null;
6562: else
6563: if 32 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6564: l_period_amount(32) := c_WAL_Rec.period32_amount +
6565: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period32_amount / l_old_ytd_amount);
6566: else
6567: l_period_amount(32) := c_WAL_Rec.period32_amount;

Line 6574: if 33 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6570:
6571: if c_WAL_Rec.period33_amount is null then
6572: l_period_amount(33) := null;
6573: else
6574: if 33 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6575: l_period_amount(33) := c_WAL_Rec.period33_amount +
6576: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period33_amount / l_old_ytd_amount);
6577: else
6578: l_period_amount(33) := c_WAL_Rec.period33_amount;

Line 6585: if 34 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6581:
6582: if c_WAL_Rec.period34_amount is null then
6583: l_period_amount(34) := null;
6584: else
6585: if 34 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6586: l_period_amount(34) := c_WAL_Rec.period34_amount +
6587: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period34_amount / l_old_ytd_amount);
6588: else
6589: l_period_amount(34) := c_WAL_Rec.period34_amount;

Line 6596: if 35 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6592:
6593: if c_WAL_Rec.period35_amount is null then
6594: l_period_amount(35) := null;
6595: else
6596: if 35 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6597: l_period_amount(35) := c_WAL_Rec.period35_amount +
6598: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period35_amount / l_old_ytd_amount);
6599: else
6600: l_period_amount(35) := c_WAL_Rec.period35_amount;

Line 6607: if 36 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6603:
6604: if c_WAL_Rec.period36_amount is null then
6605: l_period_amount(36) := null;
6606: else
6607: if 36 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6608: l_period_amount(36) := c_WAL_Rec.period36_amount +
6609: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period36_amount / l_old_ytd_amount);
6610: else
6611: l_period_amount(36) := c_WAL_Rec.period36_amount;

Line 6618: if 37 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6614:
6615: if c_WAL_Rec.period37_amount is null then
6616: l_period_amount(37) := null;
6617: else
6618: if 37 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6619: l_period_amount(37) := c_WAL_Rec.period37_amount +
6620: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period37_amount / l_old_ytd_amount);
6621: else
6622: l_period_amount(37) := c_WAL_Rec.period37_amount;

Line 6629: if 38 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6625:
6626: if c_WAL_Rec.period38_amount is null then
6627: l_period_amount(38) := null;
6628: else
6629: if 38 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6630: l_period_amount(38) := c_WAL_Rec.period38_amount +
6631: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period38_amount / l_old_ytd_amount);
6632: else
6633: l_period_amount(38) := c_WAL_Rec.period38_amount;

Line 6640: if 39 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6636:
6637: if c_WAL_Rec.period39_amount is null then
6638: l_period_amount(39) := null;
6639: else
6640: if 39 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6641: l_period_amount(39) := c_WAL_Rec.period39_amount +
6642: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period39_amount / l_old_ytd_amount);
6643: else
6644: l_period_amount(39) := c_WAL_Rec.period39_amount;

Line 6651: if 40 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6647:
6648: if c_WAL_Rec.period40_amount is null then
6649: l_period_amount(40) := null;
6650: else
6651: if 40 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6652: l_period_amount(40) := c_WAL_Rec.period40_amount +
6653: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period40_amount / l_old_ytd_amount);
6654: else
6655: l_period_amount(40) := c_WAL_Rec.period40_amount;

Line 6662: if 41 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6658:
6659: if c_WAL_Rec.period41_amount is null then
6660: l_period_amount(41) := null;
6661: else
6662: if 41 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6663: l_period_amount(41) := c_WAL_Rec.period41_amount +
6664: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period41_amount / l_old_ytd_amount);
6665: else
6666: l_period_amount(41) := c_WAL_Rec.period41_amount;

Line 6673: if 42 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6669:
6670: if c_WAL_Rec.period42_amount is null then
6671: l_period_amount(42) := null;
6672: else
6673: if 42 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6674: l_period_amount(42) := c_WAL_Rec.period42_amount +
6675: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period42_amount / l_old_ytd_amount);
6676: else
6677: l_period_amount(42) := c_WAL_Rec.period42_amount;

Line 6684: if 43 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6680:
6681: if c_WAL_Rec.period43_amount is null then
6682: l_period_amount(43) := null;
6683: else
6684: if 43 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6685: l_period_amount(43) := c_WAL_Rec.period43_amount +
6686: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period43_amount / l_old_ytd_amount);
6687: else
6688: l_period_amount(43) := c_WAL_Rec.period43_amount;

Line 6695: if 44 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6691:
6692: if c_WAL_Rec.period44_amount is null then
6693: l_period_amount(44) := null;
6694: else
6695: if 44 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6696: l_period_amount(44) := c_WAL_Rec.period44_amount +
6697: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period44_amount / l_old_ytd_amount);
6698: else
6699: l_period_amount(44) := c_WAL_Rec.period44_amount;

Line 6706: if 45 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6702:
6703: if c_WAL_Rec.period45_amount is null then
6704: l_period_amount(45) := null;
6705: else
6706: if 45 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6707: l_period_amount(45) := c_WAL_Rec.period45_amount +
6708: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period45_amount / l_old_ytd_amount);
6709: else
6710: l_period_amount(45) := c_WAL_Rec.period45_amount;

Line 6717: if 46 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6713:
6714: if c_WAL_Rec.period46_amount is null then
6715: l_period_amount(46) := null;
6716: else
6717: if 46 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6718: l_period_amount(46) := c_WAL_Rec.period46_amount +
6719: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period46_amount / l_old_ytd_amount);
6720: else
6721: l_period_amount(46) := c_WAL_Rec.period46_amount;

Line 6728: if 47 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6724:
6725: if c_WAL_Rec.period47_amount is null then
6726: l_period_amount(47) := null;
6727: else
6728: if 47 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6729: l_period_amount(47) := c_WAL_Rec.period47_amount +
6730: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period47_amount / l_old_ytd_amount);
6731: else
6732: l_period_amount(47) := c_WAL_Rec.period47_amount;

Line 6739: if 48 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6735:
6736: if c_WAL_Rec.period48_amount is null then
6737: l_period_amount(48) := null;
6738: else
6739: if 48 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6740: l_period_amount(48) := c_WAL_Rec.period48_amount +
6741: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period48_amount / l_old_ytd_amount);
6742: else
6743: l_period_amount(48) := c_WAL_Rec.period48_amount;

Line 6750: if 49 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6746:
6747: if c_WAL_Rec.period49_amount is null then
6748: l_period_amount(49) := null;
6749: else
6750: if 49 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6751: l_period_amount(49) := c_WAL_Rec.period49_amount +
6752: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period49_amount / l_old_ytd_amount);
6753: else
6754: l_period_amount(49) := c_WAL_Rec.period49_amount;

Line 6761: if 50 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6757:
6758: if c_WAL_Rec.period50_amount is null then
6759: l_period_amount(50) := null;
6760: else
6761: if 50 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6762: l_period_amount(50) := c_WAL_Rec.period50_amount +
6763: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period50_amount / l_old_ytd_amount);
6764: else
6765: l_period_amount(50) := c_WAL_Rec.period50_amount;

Line 6772: if 51 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6768:
6769: if c_WAL_Rec.period51_amount is null then
6770: l_period_amount(51) := null;
6771: else
6772: if 51 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6773: l_period_amount(51) := c_WAL_Rec.period51_amount +
6774: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period51_amount / l_old_ytd_amount);
6775: else
6776: l_period_amount(51) := c_WAL_Rec.period51_amount;

Line 6783: if 52 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6779:
6780: if c_WAL_Rec.period52_amount is null then
6781: l_period_amount(52) := null;
6782: else
6783: if 52 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6784: l_period_amount(52) := c_WAL_Rec.period52_amount +
6785: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period52_amount / l_old_ytd_amount);
6786: else
6787: l_period_amount(52) := c_WAL_Rec.period52_amount;

Line 6794: if 53 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6790:
6791: if c_WAL_Rec.period53_amount is null then
6792: l_period_amount(53) := null;
6793: else
6794: if 53 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6795: l_period_amount(53) := c_WAL_Rec.period53_amount +
6796: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period53_amount / l_old_ytd_amount);
6797: else
6798: l_period_amount(53) := c_WAL_Rec.period53_amount;

Line 6805: if 54 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6801:
6802: if c_WAL_Rec.period54_amount is null then
6803: l_period_amount(54) := null;
6804: else
6805: if 54 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6806: l_period_amount(54) := c_WAL_Rec.period54_amount +
6807: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period54_amount / l_old_ytd_amount);
6808: else
6809: l_period_amount(54) := c_WAL_Rec.period54_amount;

Line 6816: if 55 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6812:
6813: if c_WAL_Rec.period55_amount is null then
6814: l_period_amount(55) := null;
6815: else
6816: if 55 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6817: l_period_amount(55) := c_WAL_Rec.period55_amount +
6818: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period55_amount / l_old_ytd_amount);
6819: else
6820: l_period_amount(55) := c_WAL_Rec.period55_amount;

Line 6827: if 56 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6823:
6824: if c_WAL_Rec.period56_amount is null then
6825: l_period_amount(56) := null;
6826: else
6827: if 56 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6828: l_period_amount(56) := c_WAL_Rec.period56_amount +
6829: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period56_amount / l_old_ytd_amount);
6830: else
6831: l_period_amount(56) := c_WAL_Rec.period56_amount;

Line 6838: if 57 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6834:
6835: if c_WAL_Rec.period57_amount is null then
6836: l_period_amount(57) := null;
6837: else
6838: if 57 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6839: l_period_amount(57) := c_WAL_Rec.period57_amount +
6840: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period57_amount / l_old_ytd_amount);
6841: else
6842: l_period_amount(57) := c_WAL_Rec.period57_amount;

Line 6849: if 58 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6845:
6846: if c_WAL_Rec.period58_amount is null then
6847: l_period_amount(58) := null;
6848: else
6849: if 58 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6850: l_period_amount(58) := c_WAL_Rec.period58_amount +
6851: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period58_amount / l_old_ytd_amount);
6852: else
6853: l_period_amount(58) := c_WAL_Rec.period58_amount;

Line 6860: if 59 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6856:
6857: if c_WAL_Rec.period59_amount is null then
6858: l_period_amount(59) := null;
6859: else
6860: if 59 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6861: l_period_amount(59) := c_WAL_Rec.period59_amount +
6862: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period59_amount / l_old_ytd_amount);
6863: else
6864: l_period_amount(59) := c_WAL_Rec.period59_amount;

Line 6871: if 60 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6867:
6868: if c_WAL_Rec.period60_amount is null then
6869: l_period_amount(60) := null;
6870: else
6871: if 60 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6872: l_period_amount(60) := c_WAL_Rec.period60_amount +
6873: ((p_new_ytd_amount - p_old_ytd_amount) * c_WAL_Rec.period60_amount / l_old_ytd_amount);
6874: else
6875: l_period_amount(60) := c_WAL_Rec.period60_amount;

Line 6915: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop

6911:
6912: /* Bug No 2354918 Start */
6913: l_budget_year_id := c_WAL_Rec.budget_year_id;
6914:
6915: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
6916: if PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id = l_budget_year_id then
6917:
6918: l_last_period_index := PSB_WS_ACCT1.g_budget_years(l_year_index).last_period_index;
6919:

Line 6916: if PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id = l_budget_year_id then

6912: /* Bug No 2354918 Start */
6913: l_budget_year_id := c_WAL_Rec.budget_year_id;
6914:
6915: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
6916: if PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id = l_budget_year_id then
6917:
6918: l_last_period_index := PSB_WS_ACCT1.g_budget_years(l_year_index).last_period_index;
6919:
6920: end if;

Line 6918: l_last_period_index := PSB_WS_ACCT1.g_budget_years(l_year_index).last_period_index;

6914:
6915: for l_year_index in 1..PSB_WS_ACCT1.g_num_budget_years loop
6916: if PSB_WS_ACCT1.g_budget_years(l_year_index).budget_year_id = l_budget_year_id then
6917:
6918: l_last_period_index := PSB_WS_ACCT1.g_budget_years(l_year_index).last_period_index;
6919:
6920: end if;
6921: end loop;
6922: /* Bug No 2354918 End */

Line 6927: if 1 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6923:
6924: if c_WAL_Rec.period1_amount is null then
6925: l_period_amount(1) := null;
6926: else
6927: if 1 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6928: l_period_amount(1) := ROUND((c_WAL_Rec.period1_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
6929: c_WAL_Rec.Period1_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
6930: else
6931: l_period_amount(1) := c_WAL_Rec.period1_amount;

Line 6938: if 2 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6934:
6935: if c_WAL_Rec.period2_amount is null then
6936: l_period_amount(2) := null;
6937: else
6938: if 2 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6939: l_period_amount(2) := ROUND((c_WAL_Rec.period2_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
6940: c_WAL_Rec.Period2_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
6941: else
6942: l_period_amount(2) := c_WAL_Rec.period2_amount;

Line 6949: if 3 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6945:
6946: if c_WAL_Rec.period3_amount is null then
6947: l_period_amount(3) := null;
6948: else
6949: if 3 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6950: l_period_amount(3) := ROUND((c_WAL_Rec.period3_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
6951: c_WAL_Rec.Period3_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
6952: else
6953: l_period_amount(3) := c_WAL_Rec.period3_amount;

Line 6960: if 4 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6956:
6957: if c_WAL_Rec.period4_amount is null then
6958: l_period_amount(4) := null;
6959: else
6960: if 4 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6961: l_period_amount(4) := ROUND((c_WAL_Rec.period4_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
6962: c_WAL_Rec.Period4_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
6963: else
6964: l_period_amount(4) := c_WAL_Rec.period4_amount;

Line 6971: if 5 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6967:
6968: if c_WAL_Rec.period5_amount is null then
6969: l_period_amount(5) := null;
6970: else
6971: if 5 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6972: l_period_amount(5) := ROUND((c_WAL_Rec.period5_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
6973: c_WAL_Rec.Period5_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
6974: else
6975: l_period_amount(5) := c_WAL_Rec.period5_amount;

Line 6982: if 6 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6978:
6979: if c_WAL_Rec.period6_amount is null then
6980: l_period_amount(6) := null;
6981: else
6982: if 6 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6983: l_period_amount(6) := ROUND((c_WAL_Rec.period6_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
6984: c_WAL_Rec.Period6_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
6985: else
6986: l_period_amount(6) := c_WAL_Rec.period6_amount;

Line 6993: if 7 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

6989:
6990: if c_WAL_Rec.period7_amount is null then
6991: l_period_amount(7) := null;
6992: else
6993: if 7 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
6994: l_period_amount(7) := ROUND((c_WAL_Rec.period7_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
6995: c_WAL_Rec.Period7_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
6996: else
6997: l_period_amount(7) := c_WAL_Rec.period7_amount;

Line 7004: if 8 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7000:
7001: if c_WAL_Rec.period8_amount is null then
7002: l_period_amount(8) := null;
7003: else
7004: if 8 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7005: l_period_amount(8) := ROUND((c_WAL_Rec.period8_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7006: c_WAL_Rec.Period8_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7007: else
7008: l_period_amount(8) := c_WAL_Rec.period8_amount;

Line 7015: if 9 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7011:
7012: if c_WAL_Rec.period9_amount is null then
7013: l_period_amount(9) := null;
7014: else
7015: if 9 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7016: l_period_amount(9) := ROUND((c_WAL_Rec.period9_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7017: c_WAL_Rec.Period9_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7018: else
7019: l_period_amount(9) := c_WAL_Rec.period9_amount;

Line 7026: if 10 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7022:
7023: if c_WAL_Rec.period10_amount is null then
7024: l_period_amount(10) := null;
7025: else
7026: if 10 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7027: l_period_amount(10) := ROUND((c_WAL_Rec.period10_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7028: c_WAL_Rec.Period10_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7029: else
7030: l_period_amount(10) := c_WAL_Rec.period10_amount;

Line 7037: if 11 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7033:
7034: if c_WAL_Rec.period11_amount is null then
7035: l_period_amount(11) := null;
7036: else
7037: if 11 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7038: l_period_amount(11) := ROUND((c_WAL_Rec.period11_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7039: c_WAL_Rec.Period11_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7040: else
7041: l_period_amount(11) := c_WAL_Rec.period11_amount;

Line 7048: if 12 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7044:
7045: if c_WAL_Rec.period12_amount is null then
7046: l_period_amount(12) := null;
7047: else
7048: if 12 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7049: l_period_amount(12) := ROUND((c_WAL_Rec.period12_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7050: c_WAL_Rec.Period12_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7051: else
7052: l_period_amount(12) := c_WAL_Rec.period12_amount;

Line 7059: if 13 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7055:
7056: if c_WAL_Rec.period13_amount is null then
7057: l_period_amount(13) := null;
7058: else
7059: if 13 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7060: l_period_amount(13) := ROUND((c_WAL_Rec.period13_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7061: c_WAL_Rec.Period13_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7062: else
7063: l_period_amount(13) := c_WAL_Rec.period13_amount;

Line 7070: if 14 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7066:
7067: if c_WAL_Rec.period14_amount is null then
7068: l_period_amount(14) := null;
7069: else
7070: if 14 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7071: l_period_amount(14) := ROUND((c_WAL_Rec.period14_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7072: c_WAL_Rec.Period14_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7073: else
7074: l_period_amount(14) := c_WAL_Rec.period14_amount;

Line 7081: if 15 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7077:
7078: if c_WAL_Rec.period15_amount is null then
7079: l_period_amount(15) := null;
7080: else
7081: if 15 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7082: l_period_amount(15) := ROUND((c_WAL_Rec.period15_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7083: c_WAL_Rec.Period15_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7084: else
7085: l_period_amount(15) := c_WAL_Rec.period15_amount;

Line 7092: if 16 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7088:
7089: if c_WAL_Rec.period16_amount is null then
7090: l_period_amount(16) := null;
7091: else
7092: if 16 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7093: l_period_amount(16) := ROUND((c_WAL_Rec.period16_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7094: c_WAL_Rec.Period16_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7095: else
7096: l_period_amount(16) := c_WAL_Rec.period16_amount;

Line 7103: if 17 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7099:
7100: if c_WAL_Rec.period17_amount is null then
7101: l_period_amount(17) := null;
7102: else
7103: if 17 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7104: l_period_amount(17) := ROUND((c_WAL_Rec.period17_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7105: c_WAL_Rec.Period17_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7106: else
7107: l_period_amount(17) := c_WAL_Rec.period17_amount;

Line 7114: if 18 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7110:
7111: if c_WAL_Rec.period18_amount is null then
7112: l_period_amount(18) := null;
7113: else
7114: if 18 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7115: l_period_amount(18) := ROUND((c_WAL_Rec.period18_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7116: c_WAL_Rec.Period18_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7117: else
7118: l_period_amount(18) := c_WAL_Rec.period18_amount;

Line 7125: if 19 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7121:
7122: if c_WAL_Rec.period19_amount is null then
7123: l_period_amount(19) := null;
7124: else
7125: if 19 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7126: l_period_amount(19) := ROUND((c_WAL_Rec.period19_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7127: c_WAL_Rec.Period19_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7128: else
7129: l_period_amount(19) := c_WAL_Rec.period19_amount;

Line 7136: if 20 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7132:
7133: if c_WAL_Rec.period20_amount is null then
7134: l_period_amount(20) := null;
7135: else
7136: if 20 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7137: l_period_amount(20) := ROUND((c_WAL_Rec.period20_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7138: c_WAL_Rec.Period20_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7139: else
7140: l_period_amount(20) := c_WAL_Rec.period20_amount;

Line 7147: if 21 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7143:
7144: if c_WAL_Rec.period21_amount is null then
7145: l_period_amount(21) := null;
7146: else
7147: if 21 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7148: l_period_amount(21) := ROUND((c_WAL_Rec.period21_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7149: c_WAL_Rec.Period21_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7150: else
7151: l_period_amount(21) := c_WAL_Rec.period21_amount;

Line 7158: if 22 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7154:
7155: if c_WAL_Rec.period22_amount is null then
7156: l_period_amount(22) := null;
7157: else
7158: if 22 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7159: l_period_amount(22) := ROUND((c_WAL_Rec.period22_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7160: c_WAL_Rec.Period22_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7161: else
7162: l_period_amount(22) := c_WAL_Rec.period22_amount;

Line 7169: if 23 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7165:
7166: if c_WAL_Rec.period23_amount is null then
7167: l_period_amount(23) := null;
7168: else
7169: if 23 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7170: l_period_amount(23) := ROUND((c_WAL_Rec.period23_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7171: c_WAL_Rec.Period23_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7172: else
7173: l_period_amount(23) := c_WAL_Rec.period23_amount;

Line 7180: if 24 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7176:
7177: if c_WAL_Rec.period24_amount is null then
7178: l_period_amount(24) := null;
7179: else
7180: if 24 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7181: l_period_amount(24) := ROUND((c_WAL_Rec.period24_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7182: c_WAL_Rec.Period24_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7183: else
7184: l_period_amount(24) := c_WAL_Rec.period24_amount;

Line 7191: if 25 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7187:
7188: if c_WAL_Rec.period25_amount is null then
7189: l_period_amount(25) := null;
7190: else
7191: if 25 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7192: l_period_amount(25) := ROUND((c_WAL_Rec.period25_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7193: c_WAL_Rec.Period25_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7194: else
7195: l_period_amount(25) := c_WAL_Rec.period25_amount;

Line 7202: if 26 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7198:
7199: if c_WAL_Rec.period26_amount is null then
7200: l_period_amount(26) := null;
7201: else
7202: if 26 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7203: l_period_amount(26) := ROUND((c_WAL_Rec.period26_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7204: c_WAL_Rec.Period26_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7205: else
7206: l_period_amount(26) := c_WAL_Rec.period26_amount;

Line 7213: if 27 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7209:
7210: if c_WAL_Rec.period27_amount is null then
7211: l_period_amount(27) := null;
7212: else
7213: if 27 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7214: l_period_amount(27) := ROUND((c_WAL_Rec.period27_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7215: c_WAL_Rec.Period27_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7216: else
7217: l_period_amount(27) := c_WAL_Rec.period27_amount;

Line 7224: if 28 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7220:
7221: if c_WAL_Rec.period28_amount is null then
7222: l_period_amount(28) := null;
7223: else
7224: if 28 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7225: l_period_amount(28) := ROUND((c_WAL_Rec.period28_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7226: c_WAL_Rec.Period28_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7227: else
7228: l_period_amount(28) := c_WAL_Rec.period28_amount;

Line 7235: if 29 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7231:
7232: if c_WAL_Rec.period29_amount is null then
7233: l_period_amount(29) := null;
7234: else
7235: if 29 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7236: l_period_amount(29) := ROUND((c_WAL_Rec.period29_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7237: c_WAL_Rec.Period29_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7238: else
7239: l_period_amount(29) := c_WAL_Rec.period29_amount;

Line 7246: if 30 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7242:
7243: if c_WAL_Rec.period30_amount is null then
7244: l_period_amount(30) := null;
7245: else
7246: if 30 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7247: l_period_amount(30) := ROUND((c_WAL_Rec.period30_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7248: c_WAL_Rec.Period30_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7249: else
7250: l_period_amount(30) := c_WAL_Rec.period30_amount;

Line 7257: if 31 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7253:
7254: if c_WAL_Rec.period31_amount is null then
7255: l_period_amount(31) := null;
7256: else
7257: if 31 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7258: l_period_amount(31) := ROUND((c_WAL_Rec.period31_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7259: c_WAL_Rec.Period31_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7260: else
7261: l_period_amount(31) := c_WAL_Rec.period31_amount;

Line 7268: if 32 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7264:
7265: if c_WAL_Rec.period32_amount is null then
7266: l_period_amount(32) := null;
7267: else
7268: if 32 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7269: l_period_amount(32) := ROUND((c_WAL_Rec.period32_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7270: c_WAL_Rec.Period32_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7271: else
7272: l_period_amount(32) := c_WAL_Rec.period32_amount;

Line 7279: if 33 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7275:
7276: if c_WAL_Rec.period33_amount is null then
7277: l_period_amount(33) := null;
7278: else
7279: if 33 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7280: l_period_amount(33) := ROUND((c_WAL_Rec.period33_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7281: c_WAL_Rec.Period33_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7282: else
7283: l_period_amount(33) := c_WAL_Rec.period33_amount;

Line 7290: if 34 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7286:
7287: if c_WAL_Rec.period34_amount is null then
7288: l_period_amount(34) := null;
7289: else
7290: if 34 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7291: l_period_amount(34) := ROUND((c_WAL_Rec.period34_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7292: c_WAL_Rec.Period34_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7293: else
7294: l_period_amount(34) := c_WAL_Rec.period34_amount;

Line 7301: if 35 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7297:
7298: if c_WAL_Rec.period35_amount is null then
7299: l_period_amount(35) := null;
7300: else
7301: if 35 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7302: l_period_amount(35) := ROUND((c_WAL_Rec.period35_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7303: c_WAL_Rec.Period35_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7304: else
7305: l_period_amount(35) := c_WAL_Rec.period35_amount;

Line 7312: if 36 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7308:
7309: if c_WAL_Rec.period36_amount is null then
7310: l_period_amount(36) := null;
7311: else
7312: if 36 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7313: l_period_amount(36) := ROUND((c_WAL_Rec.period36_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7314: c_WAL_Rec.Period36_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7315: else
7316: l_period_amount(36) := c_WAL_Rec.period36_amount;

Line 7323: if 37 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7319:
7320: if c_WAL_Rec.period37_amount is null then
7321: l_period_amount(37) := null;
7322: else
7323: if 37 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7324: l_period_amount(37) := ROUND((c_WAL_Rec.period37_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7325: c_WAL_Rec.Period37_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7326: else
7327: l_period_amount(37) := c_WAL_Rec.period37_amount;

Line 7334: if 38 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7330:
7331: if c_WAL_Rec.period38_amount is null then
7332: l_period_amount(38) := null;
7333: else
7334: if 38 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7335: l_period_amount(38) := ROUND((c_WAL_Rec.period38_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7336: c_WAL_Rec.Period38_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7337: else
7338: l_period_amount(38) := c_WAL_Rec.period38_amount;

Line 7345: if 39 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7341:
7342: if c_WAL_Rec.period39_amount is null then
7343: l_period_amount(39) := null;
7344: else
7345: if 39 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7346: l_period_amount(39) := ROUND((c_WAL_Rec.period39_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7347: c_WAL_Rec.Period39_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7348: else
7349: l_period_amount(39) := c_WAL_Rec.period39_amount;

Line 7356: if 40 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7352:
7353: if c_WAL_Rec.period40_amount is null then
7354: l_period_amount(40) := null;
7355: else
7356: if 40 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7357: l_period_amount(40) := ROUND((c_WAL_Rec.period40_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7358: c_WAL_Rec.Period40_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7359: else
7360: l_period_amount(40) := c_WAL_Rec.period40_amount;

Line 7367: if 41 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7363:
7364: if c_WAL_Rec.period41_amount is null then
7365: l_period_amount(41) := null;
7366: else
7367: if 41 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7368: l_period_amount(41) := ROUND((c_WAL_Rec.period41_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7369: c_WAL_Rec.Period41_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7370: else
7371: l_period_amount(41) := c_WAL_Rec.period41_amount;

Line 7378: if 42 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7374:
7375: if c_WAL_Rec.period42_amount is null then
7376: l_period_amount(42) := null;
7377: else
7378: if 42 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7379: l_period_amount(42) := ROUND((c_WAL_Rec.period42_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7380: c_WAL_Rec.Period42_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7381: else
7382: l_period_amount(42) := c_WAL_Rec.period42_amount;

Line 7389: if 43 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7385:
7386: if c_WAL_Rec.period43_amount is null then
7387: l_period_amount(43) := null;
7388: else
7389: if 43 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7390: l_period_amount(43) := ROUND((c_WAL_Rec.period43_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7391: c_WAL_Rec.Period43_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7392: else
7393: l_period_amount(43) := c_WAL_Rec.period43_amount;

Line 7400: if 44 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7396:
7397: if c_WAL_Rec.period44_amount is null then
7398: l_period_amount(44) := null;
7399: else
7400: if 44 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7401: l_period_amount(44) := ROUND((c_WAL_Rec.period44_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7402: c_WAL_Rec.Period44_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7403: else
7404: l_period_amount(44) := c_WAL_Rec.period44_amount;

Line 7411: if 45 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7407:
7408: if c_WAL_Rec.period45_amount is null then
7409: l_period_amount(45) := null;
7410: else
7411: if 45 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7412: l_period_amount(45) := ROUND((c_WAL_Rec.period45_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7413: c_WAL_Rec.Period45_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7414: else
7415: l_period_amount(45) := c_WAL_Rec.period45_amount;

Line 7422: if 46 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7418:
7419: if c_WAL_Rec.period46_amount is null then
7420: l_period_amount(46) := null;
7421: else
7422: if 46 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7423: l_period_amount(46) := ROUND((c_WAL_Rec.period46_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7424: c_WAL_Rec.Period46_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7425: else
7426: l_period_amount(46) := c_WAL_Rec.period46_amount;

Line 7433: if 47 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7429:
7430: if c_WAL_Rec.period47_amount is null then
7431: l_period_amount(47) := null;
7432: else
7433: if 47 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7434: l_period_amount(47) := ROUND((c_WAL_Rec.period47_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7435: c_WAL_Rec.Period47_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7436: else
7437: l_period_amount(47) := c_WAL_Rec.period47_amount;

Line 7444: if 48 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7440:
7441: if c_WAL_Rec.period48_amount is null then
7442: l_period_amount(48) := null;
7443: else
7444: if 48 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7445: l_period_amount(48) := ROUND((c_WAL_Rec.period48_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7446: c_WAL_Rec.Period48_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7447: else
7448: l_period_amount(48) := c_WAL_Rec.period48_amount;

Line 7455: if 49 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7451:
7452: if c_WAL_Rec.period49_amount is null then
7453: l_period_amount(49) := null;
7454: else
7455: if 49 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7456: l_period_amount(49) := ROUND((c_WAL_Rec.period49_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7457: c_WAL_Rec.Period49_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7458: else
7459: l_period_amount(49) := c_WAL_Rec.period49_amount;

Line 7466: if 50 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7462:
7463: if c_WAL_Rec.period50_amount is null then
7464: l_period_amount(50) := null;
7465: else
7466: if 50 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7467: l_period_amount(50) := ROUND((c_WAL_Rec.period50_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7468: c_WAL_Rec.Period50_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7469: else
7470: l_period_amount(50) := c_WAL_Rec.period50_amount;

Line 7477: if 51 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7473:
7474: if c_WAL_Rec.period51_amount is null then
7475: l_period_amount(51) := null;
7476: else
7477: if 51 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7478: l_period_amount(51) := ROUND((c_WAL_Rec.period51_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7479: c_WAL_Rec.Period51_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7480: else
7481: l_period_amount(51) := c_WAL_Rec.period51_amount;

Line 7488: if 52 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7484:
7485: if c_WAL_Rec.period52_amount is null then
7486: l_period_amount(52) := null;
7487: else
7488: if 52 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7489: l_period_amount(52) := ROUND((c_WAL_Rec.period52_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7490: c_WAL_Rec.Period52_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7491: else
7492: l_period_amount(52) := c_WAL_Rec.period52_amount;

Line 7499: if 53 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7495:
7496: if c_WAL_Rec.period53_amount is null then
7497: l_period_amount(53) := null;
7498: else
7499: if 53 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7500: l_period_amount(53) := ROUND((c_WAL_Rec.period53_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7501: c_WAL_Rec.Period53_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7502: else
7503: l_period_amount(53) := c_WAL_Rec.period53_amount;

Line 7510: if 54 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7506:
7507: if c_WAL_Rec.period54_amount is null then
7508: l_period_amount(54) := null;
7509: else
7510: if 54 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7511: l_period_amount(54) := ROUND((c_WAL_Rec.period54_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7512: c_WAL_Rec.Period54_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7513: else
7514: l_period_amount(54) := c_WAL_Rec.period54_amount;

Line 7521: if 55 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7517:
7518: if c_WAL_Rec.period55_amount is null then
7519: l_period_amount(55) := null;
7520: else
7521: if 55 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7522: l_period_amount(55) := ROUND((c_WAL_Rec.period55_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7523: c_WAL_Rec.Period55_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7524: else
7525: l_period_amount(55) := c_WAL_Rec.period55_amount;

Line 7532: if 56 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7528:
7529: if c_WAL_Rec.period56_amount is null then
7530: l_period_amount(56) := null;
7531: else
7532: if 56 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7533: l_period_amount(56) := ROUND((c_WAL_Rec.period56_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7534: c_WAL_Rec.Period56_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7535: else
7536: l_period_amount(56) := c_WAL_Rec.period56_amount;

Line 7543: if 57 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7539:
7540: if c_WAL_Rec.period57_amount is null then
7541: l_period_amount(57) := null;
7542: else
7543: if 57 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7544: l_period_amount(57) := ROUND((c_WAL_Rec.period57_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7545: c_WAL_Rec.Period57_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7546: else
7547: l_period_amount(57) := c_WAL_Rec.period57_amount;

Line 7554: if 58 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7550:
7551: if c_WAL_Rec.period58_amount is null then
7552: l_period_amount(58) := null;
7553: else
7554: if 58 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7555: l_period_amount(58) := ROUND((c_WAL_Rec.period58_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7556: c_WAL_Rec.Period58_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7557: else
7558: l_period_amount(58) := c_WAL_Rec.period58_amount;

Line 7565: if 59 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7561:
7562: if c_WAL_Rec.period59_amount is null then
7563: l_period_amount(59) := null;
7564: else
7565: if 59 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7566: l_period_amount(59) := ROUND((c_WAL_Rec.period59_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7567: c_WAL_Rec.Period59_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7568: else
7569: l_period_amount(59) := c_WAL_Rec.period59_amount;

Line 7576: if 60 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then

7572:
7573: if c_WAL_Rec.period60_amount is null then
7574: l_period_amount(60) := null;
7575: else
7576: if 60 between PSB_WS_ACCT1.g_cy_start_index and l_last_period_index then
7577: l_period_amount(60) := ROUND((c_WAL_Rec.period60_amount + ((p_new_ytd_amount - p_old_ytd_amount) *
7578: c_WAL_Rec.Period60_Amount / l_old_ytd_amount)) / p_rounding_factor) * p_rounding_factor;
7579: else
7580: l_period_amount(60) := c_WAL_Rec.period60_amount;

Line 7614: PSB_WS_ACCT1.Create_Account_Dist

7610: end if;
7611:
7612: -- Call Create_Account_Dist to update Period Amounts for the Account Line
7613:
7614: PSB_WS_ACCT1.Create_Account_Dist
7615: (p_api_version => 1.0,
7616: p_return_status => l_return_status,
7617: p_worksheet_id => p_worksheet_id,
7618: p_account_line_id => p_account_line_id,

Line 7670: l_period_amount PSB_WS_ACCT1.g_prdamt_tbl_type;

7666: ) IS
7667:
7668: first_time BOOLEAN;
7669:
7670: l_period_amount PSB_WS_ACCT1.g_prdamt_tbl_type;
7671:
7672: sql_sumbgroup VARCHAR2(1000);
7673: cur_sumbgroup INTEGER;
7674: num_sumbgroup INTEGER;

Line 7800: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop

7796: g_summary_ccid := c_SumCCID_Rec.summary_code_combination_id;
7797:
7798: first_time := TRUE;
7799:
7800: for l_init_index in 1..PSB_WS_ACCT1.g_max_num_amounts loop
7801: l_period_amount(l_init_index) := 0;
7802: end loop;
7803:
7804: for l_init_index in 1..l_bgroups_tbl.Count loop

Line 7945: PSB_WS_ACCT1.Create_Account_Dist

7941: l_period_amount(9) := c_SumCCID_Rec.p9_amt; l_period_amount(10) := c_SumCCID_Rec.p10_amt;
7942: l_period_amount(11) := c_SumCCID_Rec.p11_amt; l_period_amount(12) := c_SumCCID_Rec.p12_amt;
7943:
7944: -- Create Account Distributions for the Summary CCID
7945: PSB_WS_ACCT1.Create_Account_Dist
7946: (p_api_version => 1.0,
7947: p_return_status => l_return_status,
7948: p_account_line_id => l_account_line_id,
7949: p_worksheet_id => p_worksheet_id,

Line 7975: if l_num_accounts > PSB_WS_ACCT1.g_checkpoint_save then

7971: end if;
7972:
7973: l_num_accounts := l_num_accounts + 1;
7974:
7975: if l_num_accounts > PSB_WS_ACCT1.g_checkpoint_save then
7976: commit work;
7977: l_num_accounts := 0;
7978: end if;
7979: