declare p_coa_id NUMBER := 50388; p_conca_segments VARCHAR2(30) := '9003.0.9001030108.0.0.0.0.0'; l_ccid NUMBER; l_create_result BOOLEAN; BEGIN BEGIN fnd_global.apps_initialize(user_id => 1736, resp_id => 51038, resp_appl_id => 20004); --mo_global.set_policy_context(p_access_mode => 'S', p_org_id => 1991); END; BEGIN l_create_result := fnd_flex_keyval.validate_segs(operation => 'CHECK_COMBINATION',--CREATE_COMBINATION 可以创建账户组合 appl_short_name => 'SQLGL', key_flex_code => 'GL#', structure_number => p_coa_id, concat_segments => p_conca_segments); IF (l_create_result) THEN -- l_ccid := fnd_flex_keyval.combination_id; null; ELSE dbms_output.put_line(fnd_flex_keyval.error_message); --输出报错信息 END IF; EXCEPTION WHEN OTHERS THEN NULL; END; dbms_output.put_line('l_ccid:' || l_ccid); END;