获取科目的描述 创建科目

xla_oa_functions_pkg.get_ccid_description(gcc.chart_of_accounts_id,
                                                   gcc.code_combination_id)  --这个api会截断
 gl_flexfields_pkg.get_concat_description( chart_of_accounts_id,
                                                   code_combination_id,
                                                    'N')
 
  • 1
  • 2
  • 3
  • 4
  • 5

获取科目的描述

 SELECT 
gl_flexfields_pkg.get_description_sql(gcc.chart_of_accounts_id, 1, gcc.segment1),
          gcc.concatenated_segments,
          xla_oa_functions_pkg.get_ccid_description(gcc.chart_of_accounts_id,
                                                    gcc.code_combination_id)
     FROM gl_code_combinations_kfv gcc
          where ROWNUM =1
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

创建科目

DECLARE
  l_message VARCHAR2(222);
BEGIN
    SELECT gcck.code_combination_id
      INTO l_code_combination_id
      FROM gl_code_combinations_kfv gcck
     WHERE gcck.concatenated_segments = l_segment;
  
  EXCEPTION
    WHEN OTHERS THEN
      --取COA ID
      /*SELECT a.chart_of_accounts_id
      INTO l_chart_of_accounts_id
      FROM gl_sets_of_books a
      WHERE a.set_of_books_id = fnd_profile.VALUE('GL_SET_OF_BKS_ID');*/
    
      --不存在组合时创建组合
      l_code_combination_id := fnd_flex_ext.get_ccid('SQLGL',
                                                     'GL#',
                                                     101 /*l_chart_of_accounts_id*/,
                                                     fnd_date.date_to_canonical(SYSDATE),
                                                     l_segment);
  l_message := FND_FLEX_EXT.GET_MESSAGE;
  END;
posted @ 2021-12-15 08:46  shu'sblog  阅读(110)  评论(0编辑  收藏  举报