1 PACKAGE xla_cmp_adr_pkg AUTHID CURRENT_USER AS
2 /* $Header: xlacpadr.pkh 120.12 2005/03/29 14:35:09 kboussem ship $ */
3 /*===========================================================================+
4 | Copyright (c) 2001-2002 Oracle Corporation |
5 | Redwood Shores, CA, USA |
6 | All rights reserved. |
7 +============================================================================+
8 | PACKAGE NAME |
9 | xla_cmp_adr_pkg |
10 | |
11 | DESCRIPTION |
12 | This is a XLA private package, which contains all the logic required |
13 | to generate ADR procedures from AMB specifcations |
14 | |
15 | |
16 | HISTORY |
17 | 25-JUN-2002 K.Boussema Created |
18 | 25-FEB-2003 K.Boussema Added 'dbdrv' command |
19 | 13-MAR-2003 K.Boussema Made changes for the new bulk approach of the|
20 | accounting engine |
21 | 19-MAR-2003 K.Boussema Added amb_context_code column |
22 | 17-APR-2003 K.Boussema Included error messages |
23 | 17-JUL-2003 K.Boussema Reviewd the code |
24 | 24-JUL-2003 K.Boussema Updated the error messages |
25 | 18-DEC-2003 K.Boussema Changed to fix bug 3042840,3307761,3268940 |
26 | 3310291 and 3320689 |
27 | 01-JUN-2004 A.Quaglia Added build_adrs_for_tab. |
28 | 07-Mar-2005 K.Boussema Changed for ADR-enhancements. |
29 +===========================================================================*/
30
31 --Public record types
32 --This is for mapping the source name to parameter names
33 TYPE gt_table_of_adr_sources IS TABLE OF VARCHAR2(30)
34 INDEX BY BINARY_INTEGER;
35
36 --public procedures in this package may receive a list of ADRs to compile
37 TYPE gt_rec_adr_in IS RECORD
38 (
39 application_id NUMBER
40 ,segment_rule_type_code VARCHAR2(1)
41 ,segment_rule_code VARCHAR2(30)
42 ,amb_context_code VARCHAR2(30)
43 );
44 TYPE gt_table_of_adrs_in IS TABLE OF gt_rec_adr_in
45 INDEX BY BINARY_INTEGER;
46
47 --public procedures in this package might need to return additional
48 --information about the compiled ADRs
49 TYPE gt_rec_adr_out IS RECORD
50 (
51 adr_function_name VARCHAR2(30)
52 ,adr_hash_id NUMBER
53 ,table_of_sources gt_table_of_adr_sources
54 );
55 TYPE gt_table_of_adrs_out IS TABLE OF gt_rec_adr_out
56 INDEX BY BINARY_INTEGER;
57
58
59 /*------------------------------------------------------------+
60 | |
61 | Public Function |
62 | |
63 | GenerateADR |
64 | |
65 | Generates the ADR functions AcctDerRule_XXX()from the AMB |
66 | Account Derivation Rules assigned to the AAD. |
67 | It returns TRUE if all the ADR are generated successfully, |
68 | FALSE otherwise |
69 | |
70 +------------------------------------------------------------*/
71
72 FUNCTION GenerateADR(
73 p_product_rule_code IN VARCHAR2
74 , p_product_rule_type_code IN VARCHAR2
75 , p_application_id IN NUMBER
76 , p_amb_context_code IN VARCHAR2
77 , p_package_name IN VARCHAR2
78 , p_rec_aad_objects IN OUT NOCOPY xla_cmp_source_pkg.t_rec_aad_objects
79 , p_rec_sources IN OUT NOCOPY xla_cmp_source_pkg.t_rec_sources
80 , p_package_body OUT NOCOPY DBMS_SQL.VARCHAR2S
81 )
82 RETURN BOOLEAN
83 ;
84
85
86 /*------------------------------------------------------------+
87 | |
88 | Public TAB Function |
89 | |
90 | build_adrs_for_tab |
91 | |
92 | |
93 +------------------------------------------------------------*/
94
95 FUNCTION build_adrs_for_tab
96 (
97 p_table_of_adrs_in IN gt_table_of_adrs_in
98 ,x_table_of_adrs_out OUT NOCOPY gt_table_of_adrs_out
99 ,x_adr_specs_text OUT NOCOPY CLOB
100 ,x_adr_bodies_text OUT NOCOPY CLOB
101 )
102 RETURN BOOLEAN
103 ;
104
105
106 END xla_cmp_adr_pkg; -- end of package spec