加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

通过CCID获得各个段的描述的方法

发布时间:2020-12-15 04:49:32 所属栏目:百科 来源:网络整理
导读:gl_code_combination 是存放会计科目组合的键弹性域的表单。 该表单中没有字段的描述,一个段一个段的加描述太麻烦了。 我通常都是通过以下的方法来获得描述 sql 语句上: SELECT gl_flexfields_pkg.get_description_sql(char_of_account_id,1,gcc.segment1)

gl_code_combination 是存放会计科目组合的键弹性域的表单。
该表单中没有字段的描述,一个段一个段的加描述太麻烦了。
我通常都是通过以下的方法来获得描述

sql语句上:
SELECT gl_flexfields_pkg.get_description_sql(&char_of_account_id,1,gcc.segment1) seg1,
???????gl_flexfields_pkg.get_description_sql(&char_of_account_id,2,gcc.segment2) seg2,3,gcc.segment3) seg3,4,gcc.segment4) seg4,5,gcc.segment5) seg5,6,gcc.segment6) seg6
FROM gl_code_combinations gcc
WHERE gcc.code_combination_id = &code_combination_id;

form上: ??declare ??????????l_char_id number; ??????????l_account varchar2(300); ??????????l_desc varchar2(500); ??????????l_flex_return varchar2(480); ??????????l_num number; ??begin ?????? ???????dbms_application_info.set_client_info(122); ????????--==Get structure_number ????????????select gl.chart_of_accounts_id ??????????????into l_char_id ??????????????from gl_sets_of_books gl,???????????? ???????????????????fnd_currencies fnd,??????????????????? ???????????????????ap_system_parameters asp,???????????????????gl_daily_conversion_types gdct,???????????????????financials_system_parameters fsp,???????????????????ap_terms??apt ?????????????WHERE gl.set_of_books_id = asp.set_of_books_id ???????????????????AND gl.currency_Code = fnd.currency_code ???????????????????AND asp.default_exchange_rate_type = gdct.conversion_type(+) ???????????????????AND asp.prepayment_terms_id = apt.term_id(+); ????????--==Get the CCID ??????????l_account := '11.000000.212101.0000.0000.0000'; ??????????l_num :=fnd_flex_ext.get_ccid( ????????????????????????????????????????application_short_name => 'SQLGL',????????????????????????????????????????key_flex_code => 'GL#',????????????????????????????????????????structure_number => 101,????????????????????????????????????????validation_date => to_char(sysdate,'YYYY-MM-DD'),????????????????????????????????????????concatenated_segments => l_account ???????????????????????????????????????); ??????????dbms_output.put_line(l_num); ???????--==Get segment conbination ???????????l_flex_return := FND_FLEX_EXT.GET_SEGS( ???????????????????????????????????????APPLICATION_SHORT_NAME => 'SQLGL',??????????????????????????????????????KEY_FLEX_CODE??????????=> 'GL#',??????????????????????????????????????STRUCTURE_NUMBER???????=> l_char_id,??????????????????????????????????????COMBINATION_ID?????????=> l_num); ??????????dbms_output.put_line(l_flex_return); ???????--==Get segment description ???????????if (FND_FLEX_KEYVAL.validate_ccid( ????????????????appl_short_name => 'SQLGL',????????????????key_flex_code => 'GL#',????????????????structure_number => l_char_id,????????????????????????????????????????????????????combination_id => l_num,????????????????????????????????????????????????????displayable?????????=> 'ALL',????????????????????????????????????????????????????data_set????????=> NULL,????????????????????????????????????????????????????vrule????????????????=> NULL,????????????????????????????????????????????????????--security????????=> 'IGNORE',????????????????????????????????????????????????????get_columns????????=> NULL,????????????????????????????????????????????????????resp_appl_id????????=> NULL,????????????????????????????????????????????????????resp_id????????????????=> NULL,????????????????????????????????????????????????????user_id????????????????=> NULL) ???????????????) Then??????? ???????????????l_desc := FND_FLEX_KEYVAL.concatenated_descriptions; ???????????end if; ??????????dbms_output.put_line(l_desc); ??end;

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读