-- Created on 2011-9-29 by WANG JUAN
declare
l_rowid VARCHAR2(100);
p_flex_value_set_id NUMBER;
p_iv_flex_value VARCHAR2(100) := '73293980103';
p_iv_flex_value_meaning VARCHAR2(100) := 'TEST';
p_on_flex_value_id NUMBER;
l_count NUMBER;
BEGIN
BEGIN
SELECT b.flex_value_set_id
INTO p_flex_value_set_id
FROM fnd_flex_value_sets b
WHERE b.flex_value_set_name = 'PC_CUSVEN';
EXCEPTION
WHEN no_data_found THEN
dbms_output.put_line('沒有找到對應的彈性域ID');
WHEN OTHERS THEN
dbms_output.put_line('獲取彈性域ID時出錯!');
END;
--判斷編號是否存在於SEGMENT5字段中
SELECT COUNT(*)
INTO l_count
FROM fnd_flex_values_vl fvl
WHERE fvl.flex_value = p_iv_flex_value;
IF l_count = 0 THEN
SELECT fnd_flex_values_s.nextval
INTO p_on_flex_value_id
FROM dual;
fnd_flex_values_pkg.insert_row(x_rowid => l_rowid,
x_flex_value_id => p_on_flex_value_id,
x_attribute_sort_order => NULL,
x_flex_value_set_id => p_flex_value_set_id,
x_flex_value => p_iv_flex_value,
x_enabled_flag => 'Y',
x_summary_flag => 'N',
x_start_date_active => NULL,
x_end_date_active => NULL,
x_parent_flex_value_low => NULL,
x_parent_flex_value_high => NULL,
x_structured_hierarchy_level => NULL,
x_compiled_value_attributes => NULL,
x_hierarchy_level => 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_flex_value_meaning => p_iv_flex_value,
x_description => p_iv_flex_value_meaning,
x_creation_date => SYSDATE,
x_created_by => -1,
x_last_update_date => SYSDATE,
x_last_updated_by => -1,
x_last_update_login => -1);
ELSE
dbms_output.put_line('該編號已存在於SEGMENT5中,無需再次導入!');
END IF;
end;
新增會計科目值集內容
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
.NET中結構與類的區別
riran
2019-02-23 12:57:35
python 基礎(三)
ROMMEL_X
2019-02-23 00:40:03
php中0,'',null,false,true,FLASE,TREU,array()的相等恆等學習
dyfhyf
2019-02-23 00:32:13
保存view到本地圖片
wutongkege
2019-02-23 00:20:32
ringtone播放自定義的聲音
wutongkege
2019-02-23 00:20:32
使用flex進行網易雲音樂界面構建和佈局解析(1)
麪包理想
2019-02-23 00:25:48
Flex入門
weijie@java
2019-02-23 00:11:40
用flex製作視頻播放器
weijie@java
2019-02-23 00:11:38
推薦一個國外用Flex製作播放器的源碼
weijie@java
2019-02-23 00:11:37
15款非常有用的Adobe Flex教程
心海新航
2019-02-23 00:10:09
PHP獲取上週、本週、上月、本月、本季度、上季度時間方法大全
老K8
2019-02-23 00:13:53
【C++】 淺析異常
Vs呂小布
2019-02-23 00:33:41
s2sh整合中出現的問題以及解決方法
迷途的蝴蝶
2019-02-23 00:29:40
selenium的常見異常
小新愛測試
2019-02-23 00:18:01