EBS动态创建账户组合实现
目的:使用程序动态创建账户组合。如果账户组合存在的话,返回存在的ID,不存在的话就动态创建账户组合并返回id。
实现步骤:
1. 得到账簿的CHART_OF_ACCOUNTS_ID
2. 得到账户弹性域分隔符
3. 调用标准的API得到账户组合id
具体实现如下:
1. 得到账簿的CHART_OF_ACCOUNTS_ID实现code:
SELECT sob.chart_of_accounts_id INTO l_id_flex_num FROM financials_system_params_all fsp, gl_sets_of_books sob WHERE org_id = p_org_id AND sob.set_of_books_id = fsp.set_of_books_id;
2. 得到账户弹性域分隔符实现code:
SELECT concatenated_segment_delimiter INTO l_segment_delimiter FROM fnd_id_flex_structures WHERE application_id = 101 AND id_flex_code = 'GL#' AND id_flex_num = l_id_flex_num;
3. 调用标准的API得到账户组合id实现code:
l_concatenated_segments := l_segment1 || l_segment_delimiter || p_segment2 || l_segment_delimiter || p_segment3 || l_segment_delimiter || l_segment4 || l_segment_delimiter || l_segment5 || l_segment_delimiter || l_segment6 || l_segment_delimiter || l_segment7 || l_segment_delimiter || l_segment8 || l_segment_delimiter || l_segment9 || l_segment_delimiter || l_segment10 || l_segment_delimiter || l_segment11 || l_segment_delimiter || l_segment12 || l_segment_delimiter || l_segment13 || l_segment_delimiter || l_segment14 || l_segment_delimiter || l_segment15 || l_segment_delimiter || l_segment16 || l_segment_delimiter || l_segment17 || l_segment_delimiter || l_segment18 || l_segment_delimiter || l_segment19 || l_segment_delimiter || l_segment20 || l_segment_delimiter || l_segment21 || l_segment_delimiter || l_segment22 || l_segment_delimiter || l_segment23 || l_segment_delimiter || l_segment24 || l_segment_delimiter || l_segment25 || l_segment_delimiter || l_segment26 || l_segment_delimiter || l_segment27 || l_segment_delimiter || l_segment28 || l_segment_delimiter || l_segment29 || l_segment_delimiter || l_segment30 || l_segment_delimiter; l_gcc_account_id := apps.fnd_flex_ext.get_ccid(application_short_name => 'SQLGL', key_flex_code => 'GL#', structure_number => l_id_flex_num, validation_date => to_char(SYSDATE, apps.fnd_flex_ext.DATE_FORMAT), concatenated_segments => x_concatenated_seg); fnd_file.PUT_LINE(fnd_file.log, 'l_gcc_account_id:' || l_gcc_account_id); IF l_gcc_account_id = 0 THEN RETURN NULL; END IF;
注意 :如果账户ID返回0,表示没有创建成功。
错误原因:传入的参数不正确或者账户组合没有通过验证。
>更多相关文章
- 11-06Hadoop是目前大数据领域最主流的一套技术体系
- 11-06大数据和人工智能:三个真实世界的用例
- 11-06为什么说,大数据与行业专家是“共生”关系?
- 11-06Python数据可视化:箱线图多种库画法
- 11-06这种思路讲解HDFS你肯定没见过?快速入门Hadoop必备
- 11-06媲美Pandas的数据分析工具包Datatable
首页推荐
佛山市东联科技有限公司一直秉承“一切以用户价值为依归
- 01-11全球最受赞誉公司揭晓:苹果连续九年第一
- 12-09罗伯特·莫里斯:让黑客真正变黑
- 12-09谁闯入了中国网络?揭秘美国绝密黑客小组TA
- 12-09警示:iOS6 惊现“闪退”BUG
- 12-05亚马逊推出新一代基础模型 任意模态生成大模
- 12-05OpenAI拓展欧洲业务 将在苏黎世设立办公室
- 12-05微软质疑美国联邦贸易委员会泄露信息 督促其
- 12-05联交所取消宝宝树上市地位 宝宝树:不会对公
- 12-04企业微信致歉:文档打开异常已完成修复
相关文章
24小时热门资讯
24小时回复排行
热门推荐
最新资讯
操作系统
黑客防御