Create Programmatically Flex value for a particular Value set
By Jag - October 26, 2014
Create FND Flex values for a Flex Value Set API Name.Oracle Apps Technical
DECLARE
x_str_value VARCHAR2 (2000);
lv_message VARCHAR2 (2000);
lv_user_id NUMBER := &p_user_id;
lv_resp_id NUMBER := &p_resp_id;
lv_resp_appl_id NUMBER := &p_resp_appl_id;
lv_flex_vs_name VARCHAR2 (60) := '&p_flex_value_set_name';
lv_flex_value VARCHAR2 (60) := '&p_flex_value';
lv_flex_value_desc VARCHAR2 (60) := '&p_flex_value_desc';
BEGIN
--Initialize required if this block is run from within Oracle database
fnd_global.apps_initialize (user_id => lv_user_id,
resp_id => lv_resp_id,
resp_appl_id => lv_resp_appl_id);
fnd_flex_val_api.create_independent_vset_value (
p_flex_value_set_name => lv_flex_vs_name,
p_flex_value => lv_flex_value,
p_description => lv_flex_value_desc,
p_enabled_flag => 'Y',
x_storage_value => x_str_value);
DBMS_OUTPUT.put_line (x_str_value);
EXCEPTION
WHEN OTHERS
THEN
v_message := fnd_flex_val_api.MESSAGE;
DBMS_OUTPUT.put_line (lv_message);
END;
0 comments