2
3 TYPE T_ref_cursor IS REF CURSOR;
4 procedure REPORT_NORMAL (
5 pv_errbuff OUT VARCHAR2,
6 pn_retcode OUT NUMBER,
7 setofbooksid in number,
8 pass in varchar2, --是否显示未过帐信息
9 kmcc in number,
10 start_period in varchar2 default null,
11 end_period in varchar2 default null,
12 start_kjkm in varchar2 default null,
13 end_kjkm in varchar2 default null,
14 zcx_type in number,
15 start_segment in varchar2 default null,
16 end_segment in varchar2 default null,
17 company in varchar2 default null,
18 o_rcResult out REPORT_PKG.T_REF_CURSOR) as
19
20 pl_start_period date;
21 pl_end_period date;
22 pl_start_kjkm number;
23 pl_end_kjkm number;
24 amount number;
25 amount_dr number;
26 amount_cr number;
27 sum_dr number;
28 sum_cr number;
29 i number;
30 j number;
31 cursor o_rcResult(kjkm number, bankid varchar2, periodname varchar2, kmlen number) is
32 select hb.default_effective_date, --时间
33 b.status, --过帐状态
34 c.concatenated_segments, --八段组合
35 hb.doc_sequence_value, --凭证号
36 b.description, --摘要
37 hb.name, --说明
38 b.entered_dr, --本行借贷值
39 b.entered_cr
40 from gl_je_lines b,
41 gl_je_headers hb,
42 gl_code_combinations_kfv c--,
43 --org_organization_definitions ood
44 where hb.actual_flag = 'A'
45 and b.status in ('P', decode(upper(pass), 'Y', 'U', 'P'))
46 and b.je_header_id = hb.je_header_id
47 and c.summary_flag = 'N'
48 and c.enabled_flag = 'Y'
49 and substr(c.segment3, 1, kmlen) = to_char(kjkm)
50 and b.period_name = periodname
51 and decode(zcx_type,2,c.segment2,6,c.segment6,7,c.segment7,1) = decode(bankid, null, decode(zcx_type,2,c.segment2,6,c.segment6,7,c.segment7,1), bankid)
52 and setofbooksid = b.set_of_books_id
53 and b.set_of_books_id=hb.set_of_books_id
54 and c.code_combination_id = b.code_combination_id
55 and c.segment1=nvl(company,c.segment1)
56 order by hb.default_effective_date, b.je_header_id, b.je_line_num;
57
58
59 begin
60 for v2 in c_mxz(v.flex_value, null, w.period_name, kmcc) loop
61 j := j + 1;
62 amount := amount + nvl(v2.entered_dr, 0) -
63 nvl(v2.entered_cr, 0);
64 sum_dr := sum_dr + nvl(v2.entered_dr, 0);
65 sum_cr := sum_cr + nvl(v2.entered_cr, 0);
66 dbms_output.put_line( nvl(to_char(v2.default_effective_date, 'YYYY-MON-DD')));
67 end loop;
68 end;
69 end REPORT_PKG;
70 /
Warning: Package body created with compilation errors
SQL> show errors;
Errors for PACKAGE BODY APPS.REPORT_PKG:
LINE/COL ERROR
-------- -----------------------------------------------------
4/1 PLS-00410: RECORD,TABLE 或参数列表中的字段不允许重复
4/1 PL/SQL: Item ignored
3 个解决方案
#1
有没有变量名和字段名或表名相同??
#2
11111111111
#3
友情up
#1
有没有变量名和字段名或表名相同??
#2
11111111111
#3
友情up