Interface_GL通过gl_interface导⼊⽇记账(案例)摘⾃:
⼀、基本参考
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
reference group2 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_ated_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_ference1 := 'reference1';
17 rec_ference2 := 'reference2';
18 rec_ference10 := 'reference10';
19 rec_gl_journal.currency_code := 'USD';
20 --dr
21 rec_de_combination_id := 17021;
22 rec_d_dr := 10;
23 rec_gl_journal.accounted_dr := 10;
24 rec_d_cr := NULL;
25 rec_gl_journal.accounted_cr := NULL;
26 INSERT INTO gl_interface VALUES rec_gl_journal;
27 --cr
28 rec_de_combination_id := 16902;
29 rec_d_dr := NULL;
30 rec_gl_journal.accounted_dr := NULL;
31 rec_d_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
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论