DECLARE
l_ccid NUMBER;
l_msg VARCHAR2(1000);
l_chart_of_account_id NUMBER;
l_set_of_book_id NUMBER;
BEGIN
l_set_of_book_id := fnd_profile.value('GL_SET_OF_BKS_ID'); SELECT gsob.chart_of_accounts_id
INTO l_chart_of_account_id
FROM gl_sets_of_books gsob
WHERE gsob.set_of_books_id = 1001; dbms_output.put_line('l_set_of_book_id: '||l_set_of_book_id||
', l_chart_of_account_id: '||l_chart_of_account_id); -- get the code combination id according to the concatenated segments
-- 已存在的组合,返回CCID,不存在的组合,自动创建并返回CCID
l_ccid := fnd_flex_ext.get_ccid(application_short_name => 'SQLGL',
key_flex_code => 'GL#',
structure_number => l_chart_of_account_id,
validation_date => to_char(SYSDATE,
'DD-MON-YYYY'),
concatenated_segments => 'B21.50800.01000.000.000000.01002.000.0100'); IF l_ccid = 0 THEN
-- get the error message
l_msg := fnd_message.get; -- output the error message
dbms_output.put_line(l_msg);
ELSE
-- output the code combination id
dbms_output.put_line(l_ccid);
END IF; END;

最新文章

  1. sha512散列(C语言)
  2. nginx的笔记
  3. 编写shell管理脚本(二)
  4. java 集合(list、set、map)的特点
  5. AOT
  6. JavaScript下拉框去除重复内容
  7. find_cmd函数分析
  8. 《第一行代码》学习笔记12-UI(1)
  9. Quartz 2D - 图形上下文(Graphics Contexts)
  10. Repeated Substring Pattern Leetcode
  11. cv::Mat类之type成员
  12. 02-安装linux系统
  13. Cisco NTP配置
  14. Airtest Project的探索和使用
  15. R绘图 第八篇:绘制饼图(ggplot2)
  16. PAT 甲级 1021 Deepest Root
  17. Cognos11中通过URL访问report的设置
  18. jdbc批处理
  19. Mysql 数据库数值类型详解
  20. C++ 智能指针学习

热门文章

  1. 【Leetcode链表】移除链表元素(203)
  2. 洛谷 P2568 GCD(莫比乌斯反演)
  3. Java练习 SDUT-3338_计算各种图形的周长(接口与多态)
  4. AtCoder Beginner Contest 078 C HSI
  5. Tcp之双向通信
  6. 快递查询API接口集成,有需要的可以直接用
  7. oracle函数 userenv(parameter)
  8. 【HAOI2015】树上染色
  9. AtCoder Regular Contest 059
  10. dynamic_cast, static_cast, const_cast, reinterprt_cast浅析