DBA Data[Home] [Help]

PACKAGE BODY: APPS.CSC_ACTION_ASSEMBLER_PVT_W

Source


1 package body csc_action_assembler_pvt_w as
2   /* $Header: cscwpotb.pls 115.1 2003/03/05 21:54:03 jamose noship $ */
3   rosetta_g_mistake_date date := to_date('01/01/+4713', 'MM/DD/SYYYY');
4   rosetta_g_miss_date date := to_date('01/01/-4712', 'MM/DD/SYYYY');
5 
6   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
7   function rosetta_g_miss_date_in_map(d date) return date as
8   begin
9     if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
10     return d;
11   end;
12 
13   procedure rosetta_table_copy_in_p1(t out nocopy csc_action_assembler_pvt.results_tab_type, a0 JTF_VARCHAR2_TABLE_1000
14     , a1 JTF_VARCHAR2_TABLE_1000
15     , a2 JTF_VARCHAR2_TABLE_1800
16     ) as
17     ddindx binary_integer; indx binary_integer;
18   begin
19   if a0 is not null and a0.count > 0 then
20       if a0.count > 0 then
21         indx := a0.first;
22         ddindx := 1;
23         while true loop
24           t(ddindx).name := a0(indx);
25           t(ddindx).type := a1(indx);
26           t(ddindx).description := a2(indx);
27           ddindx := ddindx+1;
28           if a0.last =indx
29             then exit;
30           end if;
31           indx := a0.next(indx);
32         end loop;
33       end if;
34    end if;
35   end rosetta_table_copy_in_p1;
36   procedure rosetta_table_copy_out_p1(t csc_action_assembler_pvt.results_tab_type, a0 out nocopy JTF_VARCHAR2_TABLE_1000
37     , a1 out nocopy JTF_VARCHAR2_TABLE_1000
38     , a2 out nocopy JTF_VARCHAR2_TABLE_1800
39     ) as
40     ddindx binary_integer; indx binary_integer;
41   begin
42   if t is null or t.count = 0 then
43     a0 := JTF_VARCHAR2_TABLE_1000();
44     a1 := JTF_VARCHAR2_TABLE_1000();
45     a2 := JTF_VARCHAR2_TABLE_1800();
46   else
47       a0 := JTF_VARCHAR2_TABLE_1000();
48       a1 := JTF_VARCHAR2_TABLE_1000();
49       a2 := JTF_VARCHAR2_TABLE_1800();
50       if t.count > 0 then
51         a0.extend(t.count);
52         a1.extend(t.count);
53         a2.extend(t.count);
54         ddindx := t.first;
55         indx := 1;
56         while true loop
57           a0(indx) := t(ddindx).name;
58           a1(indx) := t(ddindx).type;
59           a2(indx) := t(ddindx).description;
60           indx := indx+1;
61           if t.last =ddindx
62             then exit;
63           end if;
64           ddindx := t.next(ddindx);
65         end loop;
66       end if;
67    end if;
68   end rosetta_table_copy_out_p1;
69 
70   procedure enable_plan_and_get_outcomes(p_party_id  NUMBER
71     , p_cust_account_id  NUMBER
72     , p_end_user_type  VARCHAR2
73     , p_application_short_name  VARCHAR2
74     , p4_a0 JTF_VARCHAR2_TABLE_200
75     , p4_a1 JTF_VARCHAR2_TABLE_300
76     , p5_a0 out nocopy JTF_VARCHAR2_TABLE_1000
77     , p5_a1 out nocopy JTF_VARCHAR2_TABLE_1000
78     , p5_a2 out nocopy JTF_VARCHAR2_TABLE_1800
79   )
80 
81   as
82     ddp_msg_tbl okc_aq_pvt.msg_tab_typ;
83     ddx_results_tbl csc_action_assembler_pvt.results_tab_type;
84     ddindx binary_integer; indx binary_integer;
85   begin
86 
87     -- copy data to the local IN or IN-OUT args, if any
88 
89 
90 
91 
92     okc_aq_pvt_w.rosetta_table_copy_in_p1(ddp_msg_tbl, p4_a0
93       , p4_a1
94       );
95 
96 
97     -- here's the delegated call to the old PL/SQL routine
98     csc_action_assembler_pvt.enable_plan_and_get_outcomes(p_party_id,
99       p_cust_account_id,
100       p_end_user_type,
101       p_application_short_name,
102       ddp_msg_tbl,
103       ddx_results_tbl);
104 
105     -- copy data back from the local variables to OUT or IN-OUT args, if any
106 
107 
108 
109 
110 
111     csc_action_assembler_pvt_w.rosetta_table_copy_out_p1(ddx_results_tbl, p5_a0
112       , p5_a1
113       , p5_a2
114       );
115   end;
116 
117   procedure get_outcomes(p_api_version_number  NUMBER
118     , p_init_msg_list  VARCHAR2
119     , p_action_id  NUMBER
120     , p_application_short_name  VARCHAR2
121     , p4_a0 JTF_VARCHAR2_TABLE_200
122     , p4_a1 JTF_VARCHAR2_TABLE_300
123     , x_return_status out nocopy  VARCHAR2
124     , x_msg_count out nocopy  NUMBER
125     , x_msg_data out nocopy  VARCHAR2
126     , p8_a0 in out nocopy JTF_VARCHAR2_TABLE_1000
127     , p8_a1 in out nocopy JTF_VARCHAR2_TABLE_1000
128     , p8_a2 in out nocopy JTF_VARCHAR2_TABLE_1800
129   )
130 
131   as
132     ddp_msg_tbl okc_aq_pvt.msg_tab_typ;
133     ddx_results_tbl csc_action_assembler_pvt.results_tab_type;
134     ddindx binary_integer; indx binary_integer;
135   begin
136 
137     -- copy data to the local IN or IN-OUT args, if any
138 
139 
140 
141 
142     okc_aq_pvt_w.rosetta_table_copy_in_p1(ddp_msg_tbl, p4_a0
143       , p4_a1
144       );
145 
146 
147 
148 
149     csc_action_assembler_pvt_w.rosetta_table_copy_in_p1(ddx_results_tbl, p8_a0
150       , p8_a1
151       , p8_a2
152       );
153 
154     -- here's the delegated call to the old PL/SQL routine
155     csc_action_assembler_pvt.get_outcomes(p_api_version_number,
156       p_init_msg_list,
157       p_action_id,
158       p_application_short_name,
159       ddp_msg_tbl,
160       x_return_status,
161       x_msg_count,
162       x_msg_data,
163       ddx_results_tbl);
164 
165     -- copy data back from the local variables to OUT or IN-OUT args, if any
166 
167 
168 
169 
170 
171 
172 
173 
174     csc_action_assembler_pvt_w.rosetta_table_copy_out_p1(ddx_results_tbl, p8_a0
175       , p8_a1
176       , p8_a2
177       );
178   end;
179 
180 end csc_action_assembler_pvt_w;