The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT count(1)
FROM iby_routinginfo a
WHERE
i_rules.ruleName=a.paymentmethodName ;
SELECT COUNT(*) into l_cntBep
FROM iby_bepinfo
WHERE BEPID = i_rules.bepId;
select IBY_PMTMETHOD_S.NextVal INTO l_ruleId from dual;
INSERT INTO iby_routinginfo
(payeeid, bepkey, bepid, paymentmethodid, paymentmethodName, instr_type,
configured, priority, last_update_date, last_updated_by, creation_date,
created_by, last_update_login, hitcounter, object_version_number)
VALUES ( i_rules.payeeId, i_rules.merchantAccount, i_rules.bepId, l_ruleId,
i_rules.ruleName, i_rules.bepInstrType, i_rules.activeStatus,
i_rules.priority, sysdate, fnd_global.user_id, sysdate,
fnd_global.user_id, fnd_global.login_id, i_rules.hitcounter, 1);
INSERT INTO iby_pmtmthd_conditions
(paymentmethodid, parameter_code, operation_code, value,
is_value_string, entry_sequence, condition_name, last_update_date,
last_updated_by, creation_date, created_by, last_update_login,
object_version_number)
VALUES ( l_ruleId, i_conditions(v_count).parameter,
i_conditions(v_count).operation, i_conditions(v_count).value,
i_conditions(v_count).is_value_string,
i_conditions(v_count).entry_seq,
i_conditions(v_count).condition_name, sysdate, fnd_global.user_id,
sysdate, fnd_global.user_id, fnd_global.login_id, 1);
SELECT *
FROM iby_routinginfo a
WHERE i_rules.object_version = a.object_version_number AND
i_rules.ruleName=a.paymentmethodName AND
i_rules.ruleId = a.paymentmethodId
FOR UPDATE ;
UPDATE iby_routinginfo
SET payeeid = i_rules.payeeId, bepkey = i_rules.merchantAccount,
bepid = i_rules.bepid, configured = i_rules.activeStatus,
instr_type = i_rules.bepInstrType, priority = i_rules.priority,
last_update_date = sysdate, last_updated_by = fnd_global.user_id,
last_update_login = fnd_global.login_id,
hitcounter = i_rules.hitcounter,
object_version_number = object_version_number+1
WHERE CURRENT OF c_routingInfo;
DELETE FROM iby_pmtmthd_conditions
WHERE l_ruleId = iby_pmtmthd_conditions.PAYMENTMETHODID ;
** Function: deleteRoutingInfo.
** Purpose: deletes the Routing information in the database.
*/
procedure deleteRoutingInfo ( i_paymentmethodId in
iby_routinginfo.paymentmethodId%type,
i_paymentmethodName in
iby_routinginfo.paymentmethodName%type,
i_version in
iby_routinginfo.object_version_number%type)
is
-- Check whether this method name is already being used
CURSOR c_routingInfo IS
SELECT *
FROM iby_routinginfo a
WHERE i_version = a.object_version_number AND
i_paymentmethodName=a.paymentmethodName AND
i_paymentmethodId = a.paymentmethodId
FOR UPDATE ;
DELETE FROM iby_routinginfo
WHERE CURRENT OF c_routingInfo;
DELETE FROM iby_pmtmthd_conditions a
WHERE a.paymentmethodid = i_paymentmethodId;