本文主要是介绍Open Inerface最简单例子(导入本位币日记帐)(11.5.10.2 PROD环境测试通过),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
脚本如下:
DECLARE
l_iface_rec gl_interface%ROWTYPE;
l_request_id NUMBER;
l_set_of_books_id NUMBER := 1001;
l_user_je_source_name gl_je_sources_tl.user_je_source_name%TYPE := 'Purchasing';
l_user_je_category_name gl_je_categories_tl.user_je_category_name%TYPE := 'Purchases';
l_je_source_name gl_je_sources_tl.je_source_name%TYPE;
l_interface_run_id NUMBER;
BEGIN
fnd_global.apps_initialize(user_id => 1110, resp_id => 50237, resp_appl_id => 20003);
SELECT gl_interface_control_s.NEXTVAL INTO l_iface_rec.group_id FROM dual;
l_iface_rec.status := 'NEW';
l_iface_rec.set_of_books_id := l_set_of_books_id;
l_iface_rec.accounting_date := SYSDATE;
l_iface_rec.date_created := SYSDATE;
l_iface_rec.created_by := fnd_global.user_id;
l_iface_rec.actual_flag := 'A';
l_iface_rec.user_je_source_name := l_user_je_source_name;
l_iface_rec.user_je_category_name := l_user_je_category_name;
l_iface_rec.reference1 := 'Reference1';
l_iface_rec.reference2 := 'Reference2';
l_iface_rec.reference5 := 'Reference5';
l_iface_rec.reference10 := 'Reference10';
l_iface_rec.currency_code := 'CNY';
--dr
l_iface_rec.code_combination_id := 1037;
l_iface_rec.entered_dr := 100;
l_iface_rec.accounted_dr := 100;
l_iface_rec.entered_cr := NULL;
l_iface_rec.accounted_cr := NULL;
INSERT INTO gl_interface VALUES l_iface_rec;
--cr
l_iface_rec.code_combination_id := 1033;
l_iface_rec.entered_dr := NULL;
l_iface_rec.accounted_dr := NULL;
l_iface_rec.entered_cr := 100;
l_iface_rec.accounted_cr := 100;
INSERT INTO gl_interface VALUES l_iface_rec;
--submit request
SELECT MAX(jes.je_source_name)
INTO l_je_source_name
FROM gl_je_sources_vl jes
WHERE jes.user_je_source_name = l_user_je_source_name;
SELECT gl_interface_control_s.NEXTVAL INTO l_interface_run_id FROM dual;
INSERT INTO gl_interface_control
(je_source_name, group_id, interface_run_id, set_of_books_id, status)
VALUES
(l_je_source_name, l_iface_rec.group_id, l_interface_run_id, l_set_of_books_id, 'S');
l_request_id := fnd_request.submit_request('SQLGL',
'GLLEZL',
'',
to_char(SYSDATE, 'YYYY/MM/DD HH24:MI:SS'),
FALSE,
l_interface_run_id,
l_set_of_books_id,
'N',
NULL,
NULL,
'N',
'O',
chr(0));
COMMIT;
dbms_output.put_line('Request ID ' || l_request_id);
END;
这篇关于Open Inerface最简单例子(导入本位币日记帐)(11.5.10.2 PROD环境测试通过)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!