[Home] [Help]
22:
23: begin
24: X_success := FALSE;
25:
26: delete from fa_massadd_distributions
27: where mass_addition_id = X_mass_addition_id;
28:
29: open dist_defaults;
30: loop
34: if (dist_defaults%NOTFOUND) then exit; end if;
35:
36: h_dist_units := X_total_units * h_unit_percentage / 100;
37:
38: select fa_massadd_distributions_s.nextval
39: into h_massadd_dist_id from dual;
40:
41: insert into fa_massadd_distributions (
42: massadd_dist_id, mass_addition_id, units,
37:
38: select fa_massadd_distributions_s.nextval
39: into h_massadd_dist_id from dual;
40:
41: insert into fa_massadd_distributions (
42: massadd_dist_id, mass_addition_id, units,
43: deprn_expense_ccid, location_id, employee_id) values (
44: h_massadd_dist_id, X_mass_addition_id, h_dist_units,
45: h_ccid, h_location_id, h_employee_id);