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,
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,