The following lines contain the word 'select', 'insert', 'update' or 'delete':
x_chrv_rec.deleted_yn := p_chr_rec.deleted_yn;
x_chrv_rec.last_updated_by := p_chr_rec.last_updated_by;
x_chrv_rec.last_update_date := p_chr_rec.last_update_date;
x_chrv_rec.last_update_login := p_chr_rec.last_update_login;
x_chrv_rec.program_update_date := p_chr_rec.program_update_date;
p_update_mode IN VARCHAR2 ,
x_return_status OUT NOCOPY VARCHAR2 ) is
l_proc VARCHAR2(30) := 'Add_Conversion_data';
p_update_all VARCHAR2(1) ;
p_update_all := 'Y' ;
p_update_all := 'N' ;
p_update_all:= 'X';
If p_update_mode = 'Y' and p_update_all in ('Y','N') then
--get values from DB into record
l_chrv_tbl := set_header_rec(p_contracts_rec, y_return_status);
okc_debug.log('640: Calling update_contract_header');
OKC_CONTRACT_PUB.update_contract_header(
p_api_version => g_api_version,
p_init_msg_list => g_init_msg_list,
x_return_status => l_return_status,
x_msg_count => g_msg_count,
x_msg_data => g_msg_data,
p_chrv_tbl => l_chrv_tbl,
x_chrv_tbl => x_chrv_tbl);
okc_debug.log('635: update_header returns ' || l_return_status);
IF p_update_all = 'Y' THEN
x_return_status := 'A';
Elsif p_update_all ='N' Then
x_return_status := 'U';
p_update_yn VARCHAR2 ) IS
Cursor contracts_csr is
Select CHRB.*
from okc_k_headers_b CHRB, okc_subclasses_b SCS
where CHRB.template_yn='N'
and (CHRB.sts_code in (select code from okc_statuses_b
where ste_code in ('ACTIVE','SIGNED','HOLD'))
OR
CHRB.sts_code in (select code from okc_statuses_b
where ste_code='EXPIRED'
and date_renewed is null))
and CHRB.scs_code = SCS.code
and SCS.cls_code = 'SERVICE'
and authoring_org_id = p_org_id;
p_update_mode_yn VARCHAR2(1);
p_update_mode_yn := nvl(p_update_yn,'N');
fnd_file.put_line(FND_FILE.LOG,' Update Mode :'||p_update_mode_yn);
fnd_file.put_line(FND_FILE.OUTPUT,' Update Mode :'||p_update_mode_yn);
Select currency_code
into l_funct_currency
from okx_set_of_books_v
where set_of_books_id=(select set_of_books_id
from hr_operating_units
where organization_id = p_org_id);
If p_update_mode_yn = 'Y' then
l_report_title:='CONTRACTS PROCESSED FOR EURO CONVERSION';
p_update_mode =>p_update_mode_yn,
x_return_status =>l_return_status);
If p_update_mode_YN = 'Y' Then
If l_return_status='S' Then
k_success_counter := k_success_counter+1;
okc_debug.log('1200: Record Updated ', 2);
okc_debug.log('1100: Record not Updated ', 2);
/* select decode(p_update_mode_yn,'Y',decode(l_return_status,'S','Successful','N',
'No change ','Failed'),decode(l_return_status,'U','Incomplete CVN Rule',
'A','No CVN rule','N','No change required'))
into l_upgrade_status
from dual;*/
select decode(p_update_mode_yn,'Y',decode(l_return_status,'S','Successful','N',
'No change ','Failed'),decode(l_return_status,'U','Incomplete Conversion data',
'A','No Conversion data ','N','No change required'))
into l_upgrade_status
from dual;
If p_update_mode_yn = 'Y' then
fnd_file.put_line(FND_FILE.OUTPUT,'Number of Contracts - Success: '||k_success_counter);