1. updating profile value API by FND_PROFILE.SAVE
FND_PROFILE.SAVE(,
,
,
,
);
e x:
updating a value at the responsibility level
v_boolean := FND_PROFILE.save
( x_name => 'profile_option_name'
, x_value => profile value
, x_level_name => 'RESP'
, x_level_value => l_resp_id --responsibility_id
, x_level_value_app_id => l_resp_app_id --application id
) ;
2. update the value set 更新values set value
--fetch value set value
SELECT TO_DATE (ffvt.description, 'DD/MM/YYYY HH24:MI:SS')
INTO v_dte_last_run_time
FROM fnd_flex_value_sets ffvs,
fnd_flex_values ffv,
fnd_flex_values_tl ffvt
WHERE ffvs.flex_value_set_name = v_chr_run_dte_vset_name
AND ffvs.flex_value_set_id = ffv.flex_value_set_id
AND NVL (ffv.enabled_flag, 'N') = 'Y'
AND TRUNC (v_dte_sysdate) BETWEEN NVL (ffv.start_date_active,
TRUNC (v_dte_sysdate - 1)
)
AND NVL (ffv.end_date_active,
TRUNC (v_dte_sysdate + 1)
)
AND ffv.flex_value = i_chr_inv_code
AND ffvt.LANGUAGE = USERENV ('Lang')
AND ffvt.flex_value_id = ffv.flex_value_id;
fnd_flex_val_api.update_independent_vset_value
(p_flex_value_set_name => v_chr_run_dte_vset_name, --value set name
p_flex_value => i_chr_inv_code, --value set value
p_description => v_chr_sysdate, --value set description
p_enabled_flag => NULL,
p_start_date_active => NULL,
p_end_date_active => NULL,
p_summary_flag => NULL,
p_structured_hierarchy_level => NULL,
p_hierarchy_level => NULL,
x_storage_value => v_chr_storage_value --varcahr2(2000)
);
3. update the lookup 更新Lookup
fnd_lookup_values_pkg.update_row
(x_lookup_type => 'lookup type name', --fnd_lookup_types
x_security_group_id => v_num_sec_grp_id, --fnd_lookup_types
x_view_application_id => v_num_view_app_id, --fnd_lookup_types
x_lookup_code => v_chr_ou_name, --lookup code
x_tag => NULL,
x_attribute_category => NULL,
x_attribute1 => NULL,
x_attribute2 => NULL,
x_attribute3 => NULL,
x_attribute4 => NULL,
x_enabled_flag => 'Y',
x_start_date_active => v_dte_create, --creation date of lookup
x_end_date_active => NULL,
x_territory_code => 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_meaning => v_chr_ou_name, --lookup meaning
x_description => v_chr_seq_description, --lookup dscription
x_last_update_date => g_dte_sysdate, --sysdate
x_last_updated_by => g_num_user_id, --user id
x_last_update_login => g_num_login_id --login id
);
FND_PROFILE.SAVE(,
,
,
,
);
e x:
updating a value at the responsibility level
v_boolean := FND_PROFILE.save
( x_name => 'profile_option_name'
, x_value => profile value
, x_level_name => 'RESP'
, x_level_value => l_resp_id --responsibility_id
, x_level_value_app_id => l_resp_app_id --application id
) ;
2. update the value set 更新values set value
--fetch value set value
SELECT TO_DATE (ffvt.description, 'DD/MM/YYYY HH24:MI:SS')
INTO v_dte_last_run_time
FROM fnd_flex_value_sets ffvs,
fnd_flex_values ffv,
fnd_flex_values_tl ffvt
WHERE ffvs.flex_value_set_name = v_chr_run_dte_vset_name
AND ffvs.flex_value_set_id = ffv.flex_value_set_id
AND NVL (ffv.enabled_flag, 'N') = 'Y'
AND TRUNC (v_dte_sysdate) BETWEEN NVL (ffv.start_date_active,
TRUNC (v_dte_sysdate - 1)
)
AND NVL (ffv.end_date_active,
TRUNC (v_dte_sysdate + 1)
)
AND ffv.flex_value = i_chr_inv_code
AND ffvt.LANGUAGE = USERENV ('Lang')
AND ffvt.flex_value_id = ffv.flex_value_id;
fnd_flex_val_api.update_independent_vset_value
(p_flex_value_set_name => v_chr_run_dte_vset_name, --value set name
p_flex_value => i_chr_inv_code, --value set value
p_description => v_chr_sysdate, --value set description
p_enabled_flag => NULL,
p_start_date_active => NULL,
p_end_date_active => NULL,
p_summary_flag => NULL,
p_structured_hierarchy_level => NULL,
p_hierarchy_level => NULL,
x_storage_value => v_chr_storage_value --varcahr2(2000)
);
3. update the lookup 更新Lookup
fnd_lookup_values_pkg.update_row
(x_lookup_type => 'lookup type name', --fnd_lookup_types
x_security_group_id => v_num_sec_grp_id, --fnd_lookup_types
x_view_application_id => v_num_view_app_id, --fnd_lookup_types
x_lookup_code => v_chr_ou_name, --lookup code
x_tag => NULL,
x_attribute_category => NULL,
x_attribute1 => NULL,
x_attribute2 => NULL,
x_attribute3 => NULL,
x_attribute4 => NULL,
x_enabled_flag => 'Y',
x_start_date_active => v_dte_create, --creation date of lookup
x_end_date_active => NULL,
x_territory_code => 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_meaning => v_chr_ou_name, --lookup meaning
x_description => v_chr_seq_description, --lookup dscription
x_last_update_date => g_dte_sysdate, --sysdate
x_last_updated_by => g_num_user_id, --user id
x_last_update_login => g_num_login_id --login id
);
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13975809/viewspace-1734688/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13975809/viewspace-1734688/