Sunday, 31 August 2014

API TO LOAD VALUES IN TO VALUE SETS

CREATE OR REPLACE PROCEDURE xxcust_load_flex_values
IS
v_start_date_active date := sysdate;
v_error_msg varchar2(1000) := null;
v_who_type fnd_flex_loader_apis.who_type;
v_request_id number;
v_rec_success number;
v_rec_error number;
v_rec_cnt number := 0;
v_user_id number := fnd_global.user_id;
v_login_id number := fnd_global.login_id;
v_req_id number := fnd_global.conc_request_id;
-----------
BEGIN
--
dbms_output.put_line('in begin');
v_who_type.created_by := v_user_id;
v_who_type.creation_date :=sysdate;
v_who_type.last_updated_by := v_user_id;
v_who_type.last_update_date := sysdate;
v_who_type.last_update_login := v_login_id;
--
dbms_output.put_line('after begin');
--
--api to load values
fnd_flex_values_pkg.load_row(
x_flex_value_set_name => 'xx_test_api',
x_parent_flex_value_low => null,
x_flex_value => 'test456',
x_who => v_who_type,
x_enabled_flag => 'y',
x_summary_flag => 'n',
x_start_date_active => v_start_date_active,
x_end_date_active => null,
x_parent_flex_value_high => null,
x_structured_hierarchy_level => null,
x_hierarchy_level =>null,
x_compiled_value_attributes => null,
x_value_category => 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,
x_attribute_sort_order => null,
x_flex_value_meaning => 'test456',
x_description => 'test456');
--
COMMIT;
--
dbms_output.put_line('after commit');
--
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('error is ' || substr(sqlerrm, 1, 1000));
END;

=====================================================================

No comments:

Post a Comment

AP Invoice Notes related Table details in Oracle Fusion

 What is the table that stores the AP Invoice notes? AP notes are stored in ZMM_NOTES table with SOURCE_OBJECT_CODE = 'AP_STANDARD_INVOI...