The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT flex_value_id,
enabled_flag
FROM fnd_flex_values
WHERE flex_value = p_flex_value
AND flex_value_set_id = p_vset_id;
x_flex_val_tbl.delete;
SELECT count(*)
INTO l_count
FROM fnd_id_flex_segments fs,
fnd_flex_value_sets vs
WHERE fs.enabled_flag = 'Y'
AND fs.application_id = 101
AND fs.id_flex_code = 'GL#'
AND fs.flex_value_set_id = vs.flex_value_set_id
AND vs.flex_value_set_id = p_vset_id;
SELECT MAXIMUM_SIZE
INTO l_vset_max_size
FROM FND_FLEX_VALUE_SETS
WHERE FLEX_VALUE_SET_ID =p_vset_id;
SELECT count(*)
INTO l_count
FROM fnd_id_flex_segments s,
fnd_segment_attribute_values sav,
fnd_segment_attribute_types sat
WHERE s.application_id = sav.application_id
AND s.id_flex_code = sav.id_flex_code
AND s.id_flex_num = sav.id_flex_num
AND s.enabled_flag = 'Y'
AND s.flex_value_set_id = p_vset_id
AND s.application_column_name = sav.application_column_name
AND sav.application_id = sat.application_id
AND sav.id_flex_code = sat.id_flex_code
AND sav.attribute_value = 'Y'
AND sav.segment_attribute_type = sat.segment_attribute_type
AND sat.application_id = 101
AND sat.id_flex_code = 'GL#'
AND sat.unique_flag = 'Y'
AND sat.segment_attribute_type = 'GL_ACCOUNT';
g_action := 'Flex-value Insert';
g_action := 'Flex-value insert';
SELECT fnd_flex_values_s.nextval
INTO l_next_id
FROM dual;
itg_debug_pub.Add('Inserting flex value row.' ,1);
g_action := 'Flex-value insert';
FND_FLEX_VALUES_PKG.insert_row(
x_rowid => l_rowid,
x_flex_value_id => l_next_id,
x_flex_value_set_id => p_vset_id,
x_flex_value => p_flex_value,
x_enabled_flag => p_enabled_flag,
x_summary_flag => 'N',
x_start_date_active => p_effective_date,
x_end_date_active => p_expiration_date,
x_parent_flex_value_low => NULL,
x_parent_flex_value_high => NULL,
x_structured_hierarchy_level => NULL,
x_hierarchy_level => NULL,
x_compiled_value_attributes => l_comp_attrs,
x_value_category => NULL,
x_flex_value_meaning => p_flex_value,
x_description => p_flex_desc,
x_creation_date => l_creation_date,
x_created_by => FND_GLOBAL.user_id,
x_last_update_date => l_creation_date,
x_last_updated_by => FND_GLOBAL.user_id,
x_last_update_login => FND_GLOBAL.login_id,
x_attribute_sort_order => NULL,
/* Why didn't the flex people default these to NULL??? */
x_attribute1 => NULL, x_attribute2 => NULL, x_attribute3 => NULL,
x_attribute4 => NULL, x_attribute5 => NULL, x_attribute6 => NULL,
x_attribute7 => NULL, x_attribute8 => NULL, x_attribute9 => NULL,
x_attribute10 => NULL, x_attribute11 => NULL, x_attribute12 => NULL,
x_attribute13 => NULL, x_attribute14 => NULL, x_attribute15 => NULL,
x_attribute16 => NULL, x_attribute17 => NULL, x_attribute18 => NULL,
x_attribute19 => NULL, x_attribute20 => NULL, x_attribute21 => NULL,
x_attribute22 => NULL, x_attribute23 => NULL, x_attribute24 => NULL,
x_attribute25 => NULL, x_attribute26 => NULL, x_attribute27 => NULL,
x_attribute28 => NULL, x_attribute29 => NULL, x_attribute30 => NULL,
x_attribute31 => NULL, x_attribute32 => NULL, x_attribute33 => NULL,
x_attribute34 => NULL, x_attribute35 => NULL, x_attribute36 => NULL,
x_attribute37 => NULL, x_attribute38 => NULL, x_attribute39 => NULL,
x_attribute40 => NULL, x_attribute41 => NULL, x_attribute42 => NULL,
x_attribute43 => NULL, x_attribute44 => NULL, x_attribute45 => NULL,
x_attribute46 => NULL, x_attribute47 => NULL, x_attribute48 => NULL,
x_attribute49 => NULL, x_attribute50 => NULL
);
ITG_MSG.flex_insert_fail(p_flex_value);
p_update_date IN DATE := NULL,
p_effective_date IN DATE,
p_expiration_date IN DATE,
p_enabled_flag IN VARCHAR2
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'Change_FlexValue';
l_update_date DATE;
g_action := 'Flex-value update';
itg_debug_pub.Add('CFV - p_update_date' ||p_update_date ,1);
ITG_MSG.flex_update_fail_novalue(p_flex_value);
g_action := 'Flex-value update';
l_update_date := nvl(p_update_date, SYSDATE);
UPDATE fnd_flex_values
SET start_date_active = nvl(p_effective_date, start_date_active),
end_date_active = nvl(p_expiration_date, end_date_active),
enabled_flag = p_enabled_flag,
last_update_date = l_update_date,
last_updated_by = FND_GLOBAL.user_id
WHERE flex_value_id = l_value_id;
ITG_MSG.flex_update_fail_novalue(p_flex_value);
UPDATE fnd_flex_values_tl
SET description = p_flex_desc,
last_update_date = l_update_date,
last_updated_by = FND_GLOBAL.user_id
WHERE flex_value_id = l_value_id
AND userenv('LANG') in (LANGUAGE, SOURCE_LANG);
ITG_MSG.flex_update_fail_notl(p_flex_value);
p_update_date => p_action_date,
p_effective_date => p_effective_date,
p_expiration_date => p_expiration_date,
p_enabled_flag => p_enabled_flag);