49:
50: CURSOR check_status is
51: select 1 from dual
52: where exists ( select 'X'
53: from fa_mass_update_batch_details
54: where batch_id = v_batch_id
55: and status_code IN ('P', 'R' ) );
56: BEGIN
57: if(x_retire_status = 'DELETED') then
121: if v_err_code <> '0' then
122: delete from fa_mass_update_batch_headers
123: where batch_id = v_batch_id;
124:
125: delete from fa_mass_update_batch_details
126: where batch_id = v_batch_id;
127:
128: raise_application_error(-20000, v_err_code);
129: else
130: -- success
131: delete from fa_mass_update_batch_headers
132: where batch_id = v_batch_id;
133:
134: delete from fa_mass_update_batch_details
135: where batch_id = v_batch_id;
136: end if;
137:
138: end if; -- v_dummy