The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'YES' INTO l_exist
FROM fnd_descr_flex_contexts
WHERE application_id = 7003
AND descriptive_flexfield_name like 'JG_RA_CUSTOMER_TRX_LINES'
AND descriptive_flex_context_code like '%ARXTWMAI.REGISTER_INFO%'
AND substr(descriptive_flex_context_code, 4, 2) = l_country_code;
Select l.trx_number
,l.customer_trx_id
From ra_customer_trx_all l
Where l.request_id = x_request_id
And l.complete_flag = 'Y'
And l.customer_trx_id Is Not Null;
Select l.trx_number
,l.customer_trx_id
,global_attribute16
,nvl(l.cust_trx_type_id,0)
From ra_customer_trx_all l
Where l.request_id = x_request_id
And l.complete_flag = 'Y'
And l.customer_trx_id Is Not Null;
SELECT substr(global_attribute2,1,4),
substr(global_attribute3,1,1),
auto_trx_numbering_flag,
global_attribute8,
global_attribute9,
nvl(decode(batch_source_type, 'INV', to_number(global_attribute1),
batch_source_id),0), --bug 10038807
nvl(legal_entity_id,0) --bug 10038807
FROM ra_batch_sources_all
WHERE batch_source_id = p_batch_source_id
AND org_id = p_org_id;
SELECT auto_trx_numbering_flag , copy_doc_number_flag -- 9090969
FROM ra_batch_sources_all
WHERE batch_source_id = l_batch_source_id
and org_id = l_org_id;
SELECT rbc_1.global_attribute1 imp_batch_source_id
FROM ra_batch_sources_all rbc_1
WHERE rbc_1.batch_source_id = p_batch_source_id
AND rbc_1.org_id = p_org_id;
Select To_number(cr.argument3)
Into l_batch_source_id
From fnd_concurrent_requests cr
Where request_id = p_request_id;
SELECT COPY_DOC_NUMBER_FLAG INTO l_copy_doc_num_flag FROM RA_BATCH_SOURCES_ALL
WHERE BATCH_SOURCE_ID = l_batch_source_id
AND ORG_ID = l_org_id;
Update ra_customer_trx_all
Set trx_number = trx_number(j)
Where customer_trx_id = customer_trx_id(j)
and request_id = p_request_id;
SELECT to_number(cr.argument3)
INTO l_batch_source_id
FROM fnd_concurrent_requests cr
WHERE request_id = p_request_id;
SELECT B.batch_source_id INTO temp1
FROM ra_customer_trx_all A, ra_customer_trx_all B
WHERE A.RECURRED_FROM_TRX_NUMBER = B.trx_number
AND A.trx_number = trx_number(1) AND B.ORG_ID = f_org_id and rownum =1;
SELECT GLOBAL_ATTRIBUTE1 INTO temp2
FROM RA_BATCH_SOURCES_ALL WHERE BATCH_SOURCE_ID = temp1;
UPDATE ra_customer_trx_all
SET trx_number = trx_number(j),
global_attribute16 = global_attribute16(j), --bug 10038807
global_attribute17 = l_cai_num,
global_attribute18 = l_cai_due_date
WHERE customer_trx_id = customer_trx_id(j)
AND request_id = p_request_id;
Select to_number(cr.argument3)
Into l_batch_source_id
From fnd_concurrent_requests cr
Where request_id = p_request_id;
/*Select B.batch_source_id
into temp1
From ra_customer_trx_all A, ra_customer_trx_all B
Where A.recurred_from_trx_number = B.trx_number
And A.trx_number = trx_number(1) AND B.ORG_ID = f_org_id and rownum =1;*/
Select batch_source_ID INTO temp1 from ra_customer_trx_all
where customer_trx_id = customer_trx_id(1);
Select GLOBAL_ATTRIBUTE1
Into temp2
From RA_BATCH_SOURCES_ALL
Where BATCH_SOURCE_ID = temp1;
UPDATE ra_customer_trx_all
SET trx_number = trx_number(j)
WHERE customer_trx_id = customer_trx_id(j)
AND request_id = p_request_id;
SELECT l.customer_trx_id
FROM ra_customer_trx_all l
WHERE l.request_id = p_request_id
--And l.complete_flag = 'Y'
AND l.customer_trx_id IS NOT NULL;
SELECT A.customer_trx_line_id line_id, B.cust_trx_line_gl_dist_id dist_id
FROM ra_customer_trx_lines_all A ,ra_cust_trx_line_gl_dist_all B
WHERE A.customer_trx_id = p_trx_id AND
A.customer_trx_line_id = B.customer_trx_line_id
AND ROWNUM = 1;
SELECT TO_NUMBER(cr.argument3) INTO l_batch_source_id
FROM fnd_concurrent_requests cr
WHERE request_id = p_request_id;
SELECT COPY_DOC_NUMBER_FLAG INTO l_copy_doc_num_flag FROM RA_BATCH_SOURCES_ALL
WHERE BATCH_SOURCE_ID = l_batch_source_id
AND ORG_ID = l_org_id;
SELECT name INTO l_batch_source_name
FROM RA_BATCH_SOURCES_ALL
WHERE batch_source_id = l_batch_source_id;
l_debug_loc := 'Inserting into Interface Error over limit transactions';
INSERT INTO ra_interface_errors(
interface_line_id,
--interface_distribution_id, --bug 8306469
message_text,
org_id)
VALUES(
C_Reject_Entry_Rec.line_id,
--C_Reject_Entry_Rec.dist_id,
l_message_text,
l_org_id);
Select l.trx_number,l.batch_source_id
From ra_customer_trx_all l
Where l.customer_trx_id = x_trx_id
And l.complete_flag = 'Y'
And l.customer_trx_id Is Not Null;
Select auto_trx_numbering_flag,copy_doc_number_flag
From ra_batch_sources_all
Where batch_source_id = p_batch_source_id
And org_id = p_org_id;
Select Batch_Source_Type
From ra_batch_sources_all
Where batch_source_id = p_batch_source_id
And org_id = p_org_id;
Select substr(global_attribute2,1,4),
substr(global_attribute3,1,1),
auto_trx_numbering_flag,
global_attribute8,
global_attribute9,
nvl(legal_entity_id,0)
From ra_batch_sources_all
Where batch_source_id = p_batch_source_id
And org_id = p_org_id;
Select l.trx_number,
l.batch_source_id,
nvl(l.cust_trx_type_id,0)
From ra_customer_trx_all l
Where l.customer_trx_id = x_trx_id
And l.complete_flag = 'Y';
Update ra_customer_trx_all
Set trx_number = l_seq_number
Where customer_trx_id = p_trx_id;
Update ra_customer_trx_all
Set trx_number = l_trx_number,
global_attribute16 = l_num_bar_code,
global_attribute17 = l_cai_num,
global_attribute18 = l_cai_due_date
Where customer_trx_id = p_trx_id;
SELECT DISTINCT l.batch_source_name, l.org_id
FROM ra_interface_lines l
WHERE l.request_id = p_request_id
AND l.interface_status IS NULL;
SELECT l.interface_line_id, trunc(nvl(l.trx_date,SYSDATE)) trx_date
FROM ra_interface_lines l
WHERE l.request_id = p_request_id
AND l.interface_status IS NULL
AND l.batch_source_name = p_bs_name
AND l.org_id = p_org_id;
SELECT b.batch_source_id
INTO l_batch_source_id
FROM RA_BATCH_SOURCES_ALL b
WHERE b.name = batch_source_name(i)
AND b.org_id = org_id(i);
SELECT TRUNC(NVL(MAX(r.TRX_DATE),SYSDATE))
INTO l_max_trx_date
FROM RA_CUSTOMER_TRX_ALL r
WHERE r.batch_source_id in (
SELECT b.batch_source_id
FROM RA_BATCH_SOURCES_ALL b
WHERE b.batch_source_id = l_batch_source_id
AND b.org_id = org_id(i)
UNION
SELECT c.batch_source_id
FROM RA_BATCH_SOURCES_ALL c
WHERE c.global_attribute1 = l_batch_source_id
AND c.batch_source_type = 'INV'
AND c.org_id = org_id(i))
AND r.org_id = org_id(i);
UPDATE ra_interface_lines_all
SET Trx_Date = trunc(SYSDATE)
WHERE interface_line_id = C_Trx_Interface_Rec.interface_line_id
AND org_id = org_id(i);
fnd_file.put_line(fnd_file.log, 'Updated TRX_DATE with SYSDATE...');
RAISE_APPLICATION_ERROR(- 20999,'Error during update of TRX_DATE on AI pre-processing - '|| SQLCODE ||' -ERROR- '|| SQLERRM);