The following lines contain the word 'select', 'insert', 'update' or 'delete':
/* newly inserted descriptive flexfield information is correct. It */
/* will indicate an error if any of the values are invalid, disabled, */
/* expired or not available for the current user because of value */
/* security rules. */
/* */
/* Returns TRUE if all segments of the descriptive flexfield are */
/* valid. otherwise returns FALSE and sets the validation status */
/* codes to indicate the detailed nature of the error. */
/* If this function returns TRUE, the segment information for the */
/* most recently validated flexfield can be retrieved using the data */
/* retrieval functions. If the function returns FALSE, the segment */
/* data will be null, but the error message can be read. */
/* */
/* ARGUMENTS: */
/* =========== */
/* The descriptive flexfield is identified by appl_short_name and */
/* desc_flex_name. Row_id specifies the row that is to be checked. */
/* Ordinarily the row is in the table upon which the descriptive */
/* flexfield is defined. If data_field is not null, the descriptive */
/* flexfield information in the form of concatenated segment ids is */
/* read from that column rather than from the individual segment */
/* columns. If interface_table is not null, the row is retrieved from */
/* that table rather than from the table upon which the descriptive */
/* flexfield is defined. This allows the use of this function with */
/* an interface table where the descriptive flexfield information is */
/* validated on the interface table before being inserted into the */
/* production table. The interface table must contain segment and */
/* context value columns with the same names as those in the table */
/* upon which the descriptive flexfield is defined. Also note it is */
/* an error if the specified row does not exist, or if the specified */
/* data column does not exist in the appropriate table. */
/* The validation date is used to check whether the values are */
/* active for that date. The resp_appl_id, and resp_id arguments */
/* identify the user for the purposes of value security rules. */
/* If these are not specified the values from FND_GLOBAL will */
/* be used. The FND_GLOBAL values are set by the form or by */
/* the concurrent program that starts this database session. */
/* The enabled_activation flag is for internal use only. It is not */
/* supported outside of the Application Object Library. */
/* ------------------------------------------------------------------------ */
FUNCTION check_desc(appl_short_name IN VARCHAR2,
desc_flex_name IN VARCHAR2,
row_id IN ROWID,
data_field IN VARCHAR2 DEFAULT NULL,
interface_table IN VARCHAR2 DEFAULT NULL,
validation_date IN DATE DEFAULT SYSDATE,
enabled_activation IN BOOLEAN DEFAULT TRUE,
resp_appl_id IN NUMBER DEFAULT NULL,
resp_id IN NUMBER DEFAULT NULL)
RETURN BOOLEAN;
update_table => FALSE,
ignore_active => FALSE,
concat_segs => NULL,
vals_not_ids => FALSE,
use_column_def => FALSE,
column_def => dummy_coldef,
rowid_in => row_id,
alt_tbl_name => interface_table,
data_field_name => data_field,
nvalidated => nvalidated,
displayed_vals => value_vals,
stored_vals => value_svals,
segment_ids => value_ids,
descriptions => value_descs,
desc_lengths => value_desclens,
seg_colnames => seg_cols,
seg_coltypes => seg_coltypes,
segment_types => segtypes,
displayed_segs => disp_segs,
seg_delimiter => delim,
v_status => valid_stat,
seg_codes => segcodes,
err_segnum => err_segn);
update_table => FALSE,
ignore_active => (not enabled_activation),
concat_segs => NULL,
vals_not_ids => FALSE,
use_column_def => FALSE,
column_def => dummy_coldef,
rowid_in => row_id,
alt_tbl_name => interface_table,
data_field_name => data_field,
nvalidated => nvalidated,
displayed_vals => value_vals,
stored_vals => value_svals,
segment_ids => value_ids,
descriptions => value_descs,
desc_lengths => value_desclens,
seg_colnames => seg_cols,
seg_coltypes => seg_coltypes,
segment_types => segtypes,
displayed_segs => disp_segs,
seg_delimiter => delim,
v_status => valid_stat,
seg_codes => segcodes,
err_segnum => err_segn);
update_table => FALSE,
ignore_active => (not enabled_activation),
concat_segs => concat_segments,
vals_not_ids => (values_or_ids = 'V'),
use_column_def => FALSE,
column_def => dummy_coldef,
rowid_in => NULL,
alt_tbl_name => NULL,
data_field_name => NULL,
nvalidated => nvalidated,
displayed_vals => value_vals,
stored_vals => value_svals,
segment_ids => value_ids,
descriptions => value_descs,
desc_lengths => value_desclens,
seg_colnames => seg_cols,
seg_coltypes => seg_coltypes,
segment_types => segtypes,
displayed_segs => disp_segs,
seg_delimiter => delim,
v_status => valid_stat,
seg_codes => segcodes,
err_segnum => err_segn);
update_table => FALSE,
ignore_active => (not enabled_activation),
concat_segs => NULL,
vals_not_ids => (values_or_ids = 'V'),
use_column_def => TRUE,
column_def => g_coldef,
rowid_in => NULL,
alt_tbl_name => NULL,
data_field_name => NULL,
nvalidated => nvalidated,
displayed_vals => value_vals,
stored_vals => value_svals,
segment_ids => value_ids,
descriptions => value_descs,
desc_lengths => value_desclens,
seg_colnames => seg_cols,
seg_coltypes => seg_coltypes,
segment_types => segtypes,
displayed_segs => disp_segs,
seg_delimiter => delim,
v_status => valid_stat,
seg_codes => segcodes,
err_segnum => err_segn);
SELECT fdfv.default_context_value
INTO l_default_context_value
FROM fnd_application fa,
fnd_descriptive_flexs_vl fdfv
WHERE fa.application_short_name = p_application_short_name
AND fdfv.application_id = fa.application_id
AND fdfv.descriptive_flexfield_name = p_descriptive_flexfield_name;
SELECT fdfv.default_context_value, fdfv.default_context_field_name
INTO l_default_context_value, l_default_context_field_name
FROM fnd_application fa,
fnd_descriptive_flexs_vl fdfv
WHERE fa.application_short_name = p_application_short_name
AND fdfv.application_id = fa.application_id
AND fdfv.descriptive_flexfield_name = p_descriptive_flexfield_name;
SELECT ctx.descriptive_flex_context_code
INTO l_default_context_value
FROM fnd_application fa,
fnd_descr_flex_contexts ctx
WHERE fa.application_short_name = p_application_short_name
AND fa.application_id = ctx.application_id
AND ctx.descriptive_flexfield_name = p_descriptive_flexfield_name
AND ctx.enabled_flag = 'Y'
AND ctx.descriptive_flex_context_code = bind_val;