The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'Success'
INTO l_dummy_code
FROM hr_organization_units hou,
hr_locations_all hl
WHERE hou.organization_id = p_warehouse_id
AND hl.location_id = hou.location_id
AND hl.global_attribute1 IS NOT NULL;
SELECT global_attribute8, global_attribute9
INTO l_contributor_class, l_use_site_prof
FROM hz_cust_acct_sites
WHERE cust_acct_site_id = p_address_id;
SELECT count(*)
INTO l_count
FROM JL_ZZ_AR_TX_CUS_CLS
WHERE address_id = p_address_id
AND tax_attr_class_code = l_contributor_class;
SELECT count(*)
INTO l_count
FROM JL_ZZ_AR_TX_ATT_CLS
WHERE tax_attr_class_type = 'CONTRIBUTOR_CLASS'
AND tax_attribute_type = 'CONTRIBUTOR_ATTRIBUTE'
AND tax_attr_class_code = l_contributor_class;
SELECT 'Sucess'
INTO l_dummy_code
FROM fnd_lookups
WHERE lookup_code = p_product_fiscal_class
AND lookup_type = 'JLZZ_AR_TX_FISCAL_CLASS_CODE'
AND enabled_flag = 'Y'
AND sysdate between nvl(start_date_active,sysdate)
and nvl(end_date_active,sysdate);
SELECT delimiter
INTO l_delimiter
FROM zx_fc_types_b
WHERE classification_type_code ='TRX_BUSINESS_CATEGORY';
SELECT 'Sucess'
INTO l_dummy_code
FROM fnd_lookups
WHERE lookup_code = l_trx_business_category
AND lookup_type = 'TRANSACTION_CLASS'
AND enabled_flag = 'Y'
AND sysdate BETWEEN nvl(start_date_active,sysdate)
AND nvl(end_date_active,sysdate);
SELECT FND_NUMBER.canonical_to_number (p_line_attribute11)
INTO l_dummy_code
FROM sys.dual;
SELECT FND_NUMBER.canonical_to_number (p_line_attribute12)
INTO l_dummy_code
FROM sys.dual;
SELECT 'Success'
INTO dummy_code
FROM fnd_lookups
WHERE lookup_code = p_header_attribute1
AND lookup_type = 'JLBR_INTEREST_PENALTY_TYPE'
AND enabled_flag = 'Y'
AND nvl(start_date_active,sysdate) <= sysdate
AND nvl(end_date_active,sysdate+1) >= sysdate;
SELECT 'Success'
INTO dummy_code
FROM dual
WHERE to_number (p_header_attribute3) >= 0;
SELECT 'Success'
INTO dummy_code
FROM fnd_lookups
WHERE lookup_code = p_header_attribute4
AND lookup_type = 'JLBR_INTEREST_FORMULA'
AND enabled_flag = 'Y'
AND nvl(start_date_active,sysdate) <= sysdate
AND nvl(end_date_active,sysdate+1) >= sysdate;
SELECT 'Success'
INTO dummy_code
FROM dual
WHERE to_number (p_header_attribute5) >= 0;
SELECT 'Success'
INTO dummy_code
FROM fnd_lookups
WHERE lookup_code = p_header_attribute6
AND lookup_type = 'JLBR_INTEREST_PENALTY_TYPE'
AND enabled_flag = 'Y'
AND nvl(start_date_active,sysdate) <= sysdate
AND nvl(end_date_active,sysdate+1) >= sysdate;
SELECT return_context
INTO x_return_context
FROM oe_order_lines a, ra_interface_lines_gt b
WHERE a.line_id = b.interface_line_attribute6
AND b.interface_line_id = p_interface_line_id;
SELECT FND_NUMBER.canonical_to_number(nvl (p_header_attribute9, 999))
-- Bug 9085547 End
INTO dummy_code
FROM sys.dual;
SELECT FND_NUMBER.canonical_to_number(nvl (p_header_attribute10, 999))
-- Bug 9085547 End
INTO dummy_code
FROM sys.dual;
SELECT FND_NUMBER.canonical_to_number(nvl (p_header_attribute11, 999))
-- Bug 9085547 End
INTO dummy_code
FROM sys.dual;
SELECT FND_NUMBER.canonical_to_number(nvl (p_header_attribute13, 999))
-- Bug 9085547 End
INTO dummy_code
FROM sys.dual;
SELECT FND_NUMBER.canonical_to_number(nvl(p_header_attribute16, 999))
INTO dummy_code
FROM sys.dual;
SELECT FND_NUMBER.canonical_to_number(nvl(p_header_attribute17, 999))
INTO dummy_code
FROM sys.dual;
SELECT 'Success'
INTO dummy_code
FROM jl_br_ap_operations
WHERE cfo_code = p_line_attribute1;
SELECT 'Success'
INTO dummy_code
FROM fnd_lookups
WHERE lookup_code = p_line_attribute4
AND lookup_type = 'JLBR_ITEM_ORIGIN'
AND nvl (end_date_active, sysdate + 1) > sysdate;
SELECT 'Success'
INTO dummy_code
FROM fnd_lookups
WHERE lookup_code = p_line_attribute5
AND lookup_type = 'JLBR_ITEM_FISCAL_TYPE'
AND nvl (end_date_active, sysdate + 1) > sysdate;
SELECT 'Success'
INTO dummy_code
FROM fnd_lookups
WHERE lookup_code = p_line_attribute6
AND lookup_type = 'JLBR_ITEM_FEDERAL_SITUATION'
AND nvl (end_date_active, sysdate + 1) > sysdate;
SELECT 'Success'
INTO dummy_code
FROM fnd_lookups
WHERE lookup_code = p_line_attribute7
AND lookup_type = 'JLBR_ITEM_STATE_SITUATION'
AND nvl (end_date_active, sysdate + 1) > sysdate;
SELECT interface_line_id
, interface_line_context
, interface_line_attribute3
, interface_line_attribute6 -- BUG 11825724
, cust_trx_type_id trx_type
, trx_date
, nvl(orig_system_ship_address_id , orig_system_bill_address_id)
orig_system_address_id
, line_type
, memo_line_id
, inventory_item_id
, header_gdf_attribute1
, header_gdf_attribute2
, header_gdf_attribute3
, header_gdf_attribute4
, header_gdf_attribute5
, header_gdf_attribute6
, header_gdf_attribute7
, header_gdf_attribute8
, header_gdf_attribute9
, header_gdf_attribute10
, header_gdf_attribute11
, header_gdf_attribute12
, header_gdf_attribute13
, header_gdf_attribute14
, header_gdf_attribute15
, header_gdf_attribute16
, header_gdf_attribute17
, line_gdf_attribute1
, line_gdf_attribute2
, line_gdf_attribute3
-- nipatel commented out because the columns below will not be added to ra_interface_lines
-- , product_fisc_classification
-- , product_category
-- , trx_business_category
, line_gdf_attribute4
, line_gdf_attribute5
, line_gdf_attribute6
, line_gdf_attribute7
, line_gdf_attribute8
, line_gdf_attribute9
, line_gdf_attribute10
, line_gdf_attribute11
, line_gdf_attribute12
, warehouse_id
, batch_source_name
, trx_number
FROM ra_interface_lines_gt
WHERE request_id = c_request_id
ORDER BY trx_date;
SELECT ROWID INTO l_rowid FROM ra_interface_lines_all
WHERE interface_line_id = trx_line_record.interface_line_id;
SELECT global_attribute12,
global_attribute13,
global_attribute14,
global_attribute15,
global_attribute16,
global_attribute17,
global_attribute18,
global_attribute19
INTO l_tow_veh_plate_num2,
l_tow_veh_plate_state_code2,
l_tow_veh_plate_num3,
l_tow_veh_plate_state_code3,
l_tow_veh_plate_num4,
l_tow_veh_plate_state_code4,
l_tow_veh_plate_num5,
l_tow_veh_plate_state_code5
FROM wsh_new_deliveries
WHERE name = trx_line_record.interface_line_attribute3;
SELECT fnd_date.canonical_to_date(ol.global_attribute16) --service_execution_date
INTO l_service_exec_date
FROM oe_order_lines ol,
mtl_system_items msi
WHERE line_id = trx_line_record.interface_line_attribute6
AND msi.inventory_item_id(+) = trx_line_record.inventory_item_id
AND msi.organization_id = l_so_org_id;
SELECT count(*) INTO l_count FROM JL_BR_INTERFACE_LINES_EXTS
WHERE JL_BR_INTERFACE_LINK_ID = l_rowid;
INSERT INTO JL_BR_INTERFACE_LINES_EXTS (JL_BR_INTERFACE_LINK_ID,
HEADER_GDF_ATTRIBUTE31,
HEADER_GDF_ATTRIBUTE32,
HEADER_GDF_ATTRIBUTE33,
HEADER_GDF_ATTRIBUTE34,
HEADER_GDF_ATTRIBUTE35,
HEADER_GDF_ATTRIBUTE36,
HEADER_GDF_ATTRIBUTE37,
HEADER_GDF_ATTRIBUTE38,
HEADER_GDF_ATTRIBUTE39,--BUG 11825724
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN,
CREATION_DATE,
CREATED_BY
)
VALUES (l_rowid,
l_tow_veh_plate_num2,
l_tow_veh_plate_state_code2,
l_tow_veh_plate_num3,
l_tow_veh_plate_state_code3,
l_tow_veh_plate_num4,
l_tow_veh_plate_state_code4,
l_tow_veh_plate_num5,
l_tow_veh_plate_state_code5,
l_service_exec_date,--BUG 11825724
SYSDATE,
FND_GLOBAL.USER_ID,
FND_GLOBAL.LOGIN_ID,
SYSDATE,
FND_GLOBAL.USER_ID
);
update ra_customer_trx
set status_trx ='VD'
where customer_trx_id in (select trx.previous_customer_trx_id
from ra_customer_trx trx,
ra_cust_trx_types trx_type
where trx.cust_trx_type_id = trx_type.cust_trx_type_id
and trx.request_id = p_request_id
and trx_type.type = 'CM'
and trx_type.default_status = 'VD'
and trx.previous_customer_trx_id is not null);