The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_update_name varchar2(30) := x_script_name || 'UpgCard';
is select /*+ ROWID (aca) */ card_id, card_number,
(case when (p.employee_number is not null
or p.npw_number is not null) then party_id end) as person_party_id,
card_program_id,
card_reference_id,
card_expiration_date,
cardmember_name
from ap_cards_all aca,
per_all_people_f p
where trunc(sysdate) between p.effective_start_date(+) and p.effective_end_date(+)
and aca.employee_id = p.person_id(+)
and (card_number is not null
or cardmember_name is not null
or card_expiration_date is not null)
and aca.rowid between p_start_rowid and p_end_rowid;
ad_parallel_updates_pkg.initialize_rowid_range(
ad_parallel_updates_pkg.ROWID_RANGE,
l_table_owner,
l_table_name,
l_update_name,
l_worker_id,
l_num_workers,
l_batch_size, 0);
ad_parallel_updates_pkg.get_rowid_range(
l_start_rowid,
l_end_rowid,
l_any_rows_to_process,
l_batch_size,
true);
iby_fndcpt_setup_pub.update_card(1.0,NULL,'F',x_return_status,x_msg_count,x_msg_data, p_card_instrument,x_response);
update ap_cards_all
set card_reference_id = v_instr_id(k)
, card_number = null
, cardmember_name = null
, card_expiration_date = null
, last_update_date = sysdate
, last_updated_by = l_user_id
where card_id = h_card_id(k)
and v_return_status(k) = 'S';
ad_parallel_updates_pkg.processed_rowid_range(
l_rows_processed,
l_end_rowid);
ad_parallel_updates_pkg.get_rowid_range(
l_start_rowid,
l_end_rowid,
l_any_rows_to_process,
l_batch_size,
FALSE);
Purpose : For the cards which were successfully migrated during R12 and PADSS, update
ap_credit_card_trxns_all for those card numbers.
*/
PROCEDURE Upgrade_Trxns
(x_errbuf OUT NOCOPY VARCHAR2,
x_retcode OUT NOCOPY VARCHAR2,
x_batch_size IN NUMBER,
x_worker_id IN NUMBER,
x_num_workers IN NUMBER,
x_script_name IN VARCHAR2
)
IS
l_start_rowid rowid;
l_update_name varchar2(30) := x_script_name || 'UpgTrxn';
ad_parallel_updates_pkg.initialize_rowid_range(
ad_parallel_updates_pkg.ROWID_RANGE,
l_table_owner,
l_table_name,
l_update_name,
l_worker_id,
l_num_workers,
l_batch_size, 0);
ad_parallel_updates_pkg.get_rowid_range(
l_start_rowid,
l_end_rowid,
l_any_rows_to_process,
l_batch_size,
true);
update /*+ ROWID (aca) */ ap_credit_card_trxns_all aca
set
card_number = null
, last_update_date = sysdate
, last_updated_by = l_user_id
where
card_number is not null
and card_id is not null
and card_id > 0
and aca.rowid between l_start_rowid and l_end_rowid;
ad_parallel_updates_pkg.processed_rowid_range(
l_rows_processed,
l_end_rowid);
ad_parallel_updates_pkg.get_rowid_range(
l_start_rowid,
l_end_rowid,
l_any_rows_to_process,
l_batch_size,
FALSE);