2014-06-17 BaoXinjian
一、基本参考
1. 接口表和错误信息
(1).gl_interface: 数据会影响gl_je_batches, gl_je_header, gl_je_lines, gl_import_references
(2).gl_interface_contorl: 控制那些Resource资料需要导入
(3).gl_interface_status: 错误信息
2. 并发程式<Journal Import>
==>Program - Import Journals
3. Interface Form
4. 关键参数
二、案例实现
1. 代码简单例子
1 DECLARE 2 rec_gl_journal gl_interface%ROWTYPE; 3 l_group_id gl_interface.GROUP_ID%TYPE; 4 l_interface_run_id gl_interface_control.interface_run_id%TYPE; 5 BEGIN 6 SELECT gl_interface_control_s.NEXTVAL INTO l_group_id FROM DUAL; 7 rec_gl_journal.status := 'NEW'; 8 rec_gl_journal.ledger_id := 1; 9 rec_gl_journal.set_of_books_id := 1; 10 rec_gl_journal.accounting_date := SYSDATE; 11 rec_gl_journal.date_created := SYSDATE; 12 rec_gl_journal.created_by := fnd_global.user_id; 13 rec_gl_journal.actual_flag := 'A'; 14 rec_gl_journal.user_je_source_name := 'Purchasing'; 15 rec_gl_journal.user_je_category_name := 'Receiving'; 16 rec_gl_journal.reference1 := 'reference1'; 17 rec_gl_journal.reference2 := 'reference2'; 18 rec_gl_journal.reference10 := 'reference10'; 19 rec_gl_journal.currency_code := 'USD'; 20 --dr 21 rec_gl_journal.code_combination_id := 17021; 22 rec_gl_journal.entered_dr := 10; 23 rec_gl_journal.accounted_dr := 10; 24 rec_gl_journal.entered_cr := NULL; 25 rec_gl_journal.accounted_cr := NULL; 26 INSERT INTO gl_interface VALUES rec_gl_journal; 27 --cr 28 rec_gl_journal.code_combination_id := 16902; 29 rec_gl_journal.entered_dr := NULL; 30 rec_gl_journal.accounted_dr := NULL; 31 rec_gl_journal.entered_cr := 10; 32 rec_gl_journal.accounted_cr := 10; 33 INSERT INTO gl_interface VALUES rec_gl_journal; 34 SELECT gl_interface_control_s.NEXTVAL INTO l_interface_run_id FROM DUAL; 35 INSERT INTO gl_interface_control 36 (je_source_name, GROUP_ID, interface_run_id, set_of_books_id,status) 37 VALUES ('Purchasing', l_group_id, l_interface_run_id, 1,'S'); 38 COMMIT; 39 END;
2.导入画面
3.Import Jounarl后运行的Output
4.产生的日记账明细及Batch
Thanks and Regards