The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT claim_id,
object_version_number,
claim_number,
payment_method,
status_code,
user_status_id
FROM ozf_claims
WHERE cust_account_id = NVL(p_cust_account_id , cust_account_id)
AND claim_type_id = NVL(p_claim_type_id , claim_type_id)
AND reason_code_id = NVL(p_reason_code_id , reason_code_id)
AND claim_class = NVL(p_claim_class , claim_class)
AND claim_class IN ('DEDUCTION', 'OVERPAYMENT')
AND status_code in ('OPEN','COMPLETE')
AND write_off_flag = 'T';
SELECT name
FROM ozf_claim_types_all_vl
WHERE claim_type_id = p_claim_type_id;
SELECT name
FROM ozf_reason_codes_all_vl
WHERE reason_code_id = p_reason_code_id;
SELECT meaning
FROM ozf_lookups
WHERE lookup_code = p_claim_class
AND lookup_type = 'OZF_CLAIM_CLASS';
SELECT p.party_name
FROM hz_parties p
, hz_cust_accounts c
WHERE p.party_id = c.party_id
AND c.cust_account_id = p_cust_account_id;
SELECT ou.organization_id org_id
FROM hr_operating_units ou
WHERE mo_global.check_access(ou.organization_id) = 'Y';
--bug#4940880 Update Payment Method
UPDATE ozf_claims
SET payment_method = 'WRITE_OFF'
WHERE cust_account_id = NVL(p_cust_account_id , cust_account_id)
AND claim_type_id = NVL(p_claim_type_id , claim_type_id)
AND reason_code_id = NVL(p_reason_code_id , reason_code_id)
AND claim_class = NVL(p_claim_class , claim_class)
AND claim_class IN ('DEDUCTION', 'OVERPAYMENT')
AND status_code in ('OPEN','COMPLETE')
AND write_off_flag = 'T';
-- Count total records selected for write off.
v_total_writeoff_count := v_total_writeoff_count + 1;
--Call OZF_CLAIM_PVT.Update_Claim to change the status to CLOSE.
OZF_CLAIM_PVT.Update_Claim (
p_api_version => 1.0
,p_init_msg_list => FND_API.g_false
,p_commit => FND_API.g_false
,p_validation_level => FND_API.g_valid_level_full
,x_return_status => l_return_status
,x_msg_data => l_msg_data
,x_msg_count => l_msg_count
,p_claim => l_claim_rec
,p_event => 'UPDATE'
,p_mode => 'AUTO'
,x_object_version_number => l_object_version
);
FND_FILE.PUT_LINE(FND_FILE.LOG, 'Total Number of Claims Selected for Write offs........: '||v_total_writeoff_count);
FND_FILE.PUT_LINE(FND_FILE.OUTPUT, 'Total Number of Claims Selected for Write offs........: '||v_total_writeoff_count);