The following lines contain the word 'select', 'insert', 'update' or 'delete':
FND_API.g_entity_tbl.DELETE;
-- e.g. updating a header and inserting a line for this same header,
-- then the clear_dependents should be TRUE for header but
-- clear_dependents should be FALSE for line. Since process order
-- accepts one control record per call, the user cannot set it
-- based on the operation.
-- Therefore, even if the operation is controlled, set the
-- clear_dependents flag based on the operation
-- NEW(03/01/2000): BUT set it only if operation is CREATE as
-- private callers may want to set clear_dependents to FALSE even
-- if operation is UPDATE for performance reasons
-- From the UI (sales order form), this setting is overridden
-- as form calls with clear_dependents TRUE even for CREATE
-- operation as the user changes attributes (e.g. enters an item
-- , the attributes dependent on item should be cleared) and
-- the record is not yet posted.
IF (p_control_rec.default_attributes) THEN
IF NOT (OE_GLOBALS.G_UI_FLAG) THEN
IF p_operation = G_OPR_CREATE THEN
l_control_rec.clear_dependents := FALSE;
ELSIF p_operation = G_OPR_UPDATE THEN
l_control_rec.check_security:= TRUE;
ELSIF p_operation = G_OPR_DELETE THEN
l_control_rec.check_security:= TRUE;
/*SELECT NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1,1), ' ', NULL,
SUBSTRB(USERENV('CLIENT_INFO'),1,10))),-99) INTO
l_org_id FROM DUAL;*/
SELECT APPLICATION_ID
INTO l_appl_id
FROM FND_RESPONSIBILITY
WHERE RESPONSIBILITY_ID = p_resp_id;
SELECT 'Y'
INTO l_exists
FROM iby_creditcard ic1
WHERE ic1.INSTRID = p_instrument_id_new
AND ic1.cc_number_hash1 = (SELECT cc_number_hash1
FROM iby_creditcard ic2
WHERE ic2.INSTRID = p_instrument_id_old)
AND ic1.cc_number_hash2 = (SELECT cc_number_hash2
FROM iby_creditcard ic3
WHERE ic3.INSTRID = p_instrument_id_old);
SELECT cc_number_hash1, cc_number_hash2
INTO l_hash1_old, l_hash2_old
FROM iby_creditcard
WHERE INSTRID = p_instrument_id_old;
SELECT cc_number_hash1, cc_number_hash2
INTO l_hash1_new, l_hash2_new
FROM iby_creditcard
WHERE INSTRID = p_instrument_id_new;