The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT to_number(nvl(b.attribute_value, a.attribute_value)) attribute_value
FROM (SELECT jrp.organization_id organization_id,
acc.attribute_value attribute_value,
jrp.regime_org_id
FROM jai_rgm_parties jrp,
jai_rgm_registrations jrr,
jai_rgm_definitions jrg,
jai_rgm_registrations acc
WHERE 1 = 1
AND jrg.regime_id = jrp.regime_id
AND jrg.regime_id = cn_regime_id --
AND jrg.regime_id = jrr.regime_id
AND acc.attribute_code = pv_account_type
AND jrr.registration_type = 'TAX_TYPES'
AND acc.registration_type = 'ACCOUNTS'
AND acc.parent_registration_id = jrr.registration_id
AND jrr.attribute_code = pv_tax_type_code --'CVD', tax type code
AND JRP.LOCATION_ID = pn_location_id
) a,
(SELECT jrp.organization_id organization_id,
jpr.attribute_value attribute_value,
jrp.regime_org_id
FROM jai_rgm_parties jrp,
jai_rgm_registrations jrr,
jai_rgm_registrations acc,
jai_rgm_party_regns jpr,
jai_rgm_definitions jrg
WHERE jrg.regime_id = jrp.regime_id
AND jrg.regime_id = cn_regime_id
AND jrg.regime_id = jrr.regime_id
AND acc.attribute_code = pv_account_type
AND jrr.registration_type = 'TAX_TYPES'
AND acc.registration_type = 'ACCOUNTS'
AND acc.parent_registration_id = jrr.registration_id
AND jrr.attribute_code = pv_tax_type_code
AND jrp.regime_org_id = jpr.regime_org_id
AND jpr.registration_id = acc.registration_id
AND jrp.location_id = pn_location_id) b
WHERE a.organization_id = b.organization_id(+)
AND a.organization_id = pn_organization_id;
SELECT
acc.attribute_value attribute_value
FROM
jai_rgm_registrations jrr,
jai_rgm_definitions jrg,
jai_rgm_registrations acc
WHERE 1 = 1
AND jrg.regime_id = cn_regime_id
AND jrg.regime_id = jrr.regime_id
AND acc.attribute_code = pv_account_type --'PAID_PAYABLES'
AND jrr.registration_type = 'TAX_TYPES'
AND acc.registration_type = 'ACCOUNTS'
AND acc.parent_registration_id = jrr.registration_id
AND jrr.attribute_code = pv_tax_type_code ;--'ADDITIONAL_CUSTOMS'
SELECT regime_id
INTO ln_regime_id
FROM jai_rgm_definitions
WHERE regime_code = jai_constants.customs_regime;
SELECT to_number(attribute_value)
FROM jai_rgm_registrations
WHERE regime_id = cn_regime_id
AND registration_type = 'ACCOUNTS'
AND attribute_code = 'DEPB';
SELECT regime_id
INTO ln_regime_id
FROM jai_rgm_definitions
WHERE regime_code = 'CUSTOMS';
SELECT ai.invoice_id,
ai.application_id,
ai.product_table,
ai.reference_key1,
ai.reference_key2,
ai.reference_key3,
ai.reference_key4,
ai.reference_key5
FROM ap_invoices_all ai, ap_invoice_payments_all aip
WHERE ai.invoice_id = aip.invoice_id
AND aip.check_id = pn_check_id;
SELECT 'APPLIED' boe_status, jbh.boe_id
FROM jai_cmn_boe_hdrs jbh
WHERE jbh.boe_id = pn_boe_id
-- AND jbh.status = 'APPLIED' Comment out the condition for bug#12673597.
AND nvl(jbh.amount_applied, 0) > 0;
SELECT ai.application_id,
ai.product_table,
ai.reference_key1,
ai.reference_key2,
ai.reference_key3,
ai.reference_key4,
ai.reference_key5
FROM ap_invoices_all ai, ap_invoice_payments_all aip
WHERE ai.invoice_id = aip.invoice_id
AND aip.check_id = pn_check_id;
UPDATE JAI_CMN_BOE_HDRS hdr
SET hdr.status = 'CANCELLED'
,hdr.BOE_AMOUNT = 0
,hdr.AMOUNT_APPLIED = 0
,hdr.AMOUNT_WRITTEN_OFF = 0
,hdr.DEPB_AMOUNT = 0
,hdr.last_update_date = SYSDATE
,hdr.last_update_login = fnd_global.login_id
,hdr.last_updated_by = fnd_global.user_id
WHERE hdr.boe_id = pn_boe_id;
UPDATE JAI_BOE_ROUNDINGS jbr
SET jbr.TAX_AMOUNT = 0
,jbr.TOTAL_AMOUNT = 0
,jbr.last_update_date = SYSDATE
,jbr.last_update_login = fnd_global.login_id
,jbr.last_updated_by = fnd_global.user_id
WHERE jbr.boe_id = pn_boe_id;
UPDATE JAI_BOE_DETAILS jbd
SET jbd.quantity = 0
,jbd.line_amount = 0
,jbd.tax_amount = 0
,jbd.assessable_value = 0
,jbd.last_update_date = SYSDATE
,jbd.last_update_login = fnd_global.login_id
,jbd.last_updated_by = fnd_global.user_id
WHERE jbd.boe_id = pn_boe_id;
UPDATE JAI_BOE_DETAIL_TAXES jbdt
SET jbdt.tax_amount = 0
,jbdt.base_tax_amount = 0
,jbdt.func_tax_amount = 0
,jbdt.applied_amount = 0
,jbdt.assessable_value = 0
,jbdt.last_update_date = SYSDATE
,jbdt.last_update_login = fnd_global.login_id
,jbdt.last_updated_by = fnd_global.user_id
WHERE EXISTS
(
SELECT 'x'
FROM JAI_BOE_DETAILS jbd
WHERE jbd.boe_detail_id = jbdt.boe_detail_id
AND jbd.boe_id = pn_boe_id
);
'UPDATE TABLE in jai_boe_general_pkg.cancelled error:' ||
Sqlcode||Sqlerrm);