211: group_processing boolean := FALSE;
212: --
213: cursor csr_status is
214: select pabl.batch_line_status status
215: from pay_adjust_batch_lines pabl
216: where pabl.batch_id = p_batch_id
217: and pabl.batch_group_id = p_batch_group_id
218: union
219: select batch_group_status status
317: l_proc varchar2(72) := 'PAY_BATCH_BALANCE_ADJ_PKG.PURGE';
318: --
319: cursor csr_batch_lines is
320: select pabl.batch_line_id
321: from pay_adjust_batch_lines pabl
322: where pabl.batch_id = p_batch_id
323: and pabl.batch_group_id = nvl(p_batch_group_id, pabl.batch_group_id) ;
324: --
325: cursor csr_batch_groups is
353: -- Delete the batch line
354: --
355:
356: delete
357: from pay_adjust_batch_lines
358: where batch_line_id = cssr.batch_line_id;
359:
360: end loop;
361:
508: update pay_adjust_batch_groups
509: set batch_group_status = 'U'
510: where batch_group_id = lcsr.batch_group_id;
511:
512: update pay_adjust_batch_lines
513: set batch_line_status = 'U'
514: where batch_group_id = lcsr.batch_group_id;
515:
516: commit;
649:
650: --
651: cursor csr_batch_lines(p_arg_batch_group_id pay_adjust_batch_groups.batch_group_id%type) is
652: select *
653: from pay_adjust_batch_lines
654: where batch_id = p_batch_id
655: and batch_group_id = p_arg_batch_group_id;
656: --
657:
674:
675: for group_csr in csr_batch_groups loop
676: begin
677:
678: update pay_adjust_batch_lines
679: set batch_line_status = 'U'
680: where batch_group_id = group_csr.batch_group_id;
681:
682: update pay_adjust_batch_groups
907: end if;
908:
909: for i in 1..l_count loop
910: -- for each error message
911: update pay_adjust_batch_lines
912: set batch_line_status = 'E'
913: where batch_line_id = l_message_source_id_tbl(i)
914: and batch_group_id = group_csr.batch_group_id;
915: end loop;
921: */
922:
923: if (l_line_error = FALSE) then
924: ---
925: update pay_adjust_batch_lines
926: set batch_line_status = p_batch_process_mode
927: where batch_line_status = 'U'
928: and batch_group_id = group_csr.batch_group_id;
929: --
932: where batch_group_id = group_csr.batch_group_id;
933: ---
934: elsif (l_line_error = TRUE) then
935: ---
936: update pay_adjust_batch_lines
937: set batch_line_status = 'V'
938: where batch_line_status = 'U'
939: and batch_group_id = group_csr.batch_group_id;
940: --