DBA Data[Home] [Help]

PACKAGE BODY: APPS.OKL_TRANS_PRICING_PARAMS_PVT_W

Source


1 package body okl_trans_pricing_params_pvt_w as
2   /* $Header: OKLESPMB.pls 120.2 2005/10/30 03:16:47 appldev 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   function rosetta_g_miss_num_map(n number) return number as
14     a number := fnd_api.g_miss_num;
15     b number := 0-1962.0724;
16   begin
17     if n=a then return b; end if;
18     if n=b then return a; end if;
19     return n;
20   end;
21 
22   procedure rosetta_table_copy_in_p36(t out nocopy okl_trans_pricing_params_pvt.tpp_tbl_type, a0 JTF_NUMBER_TABLE
23     , a1 JTF_VARCHAR2_TABLE_500
24     ) as
25     ddindx binary_integer; indx binary_integer;
26   begin
27   if a0 is not null and a0.count > 0 then
28       if a0.count > 0 then
29         indx := a0.first;
30         ddindx := 1;
31         while true loop
32           t(ddindx).gtp_id := rosetta_g_miss_num_map(a0(indx));
33           t(ddindx).parameter_value := a1(indx);
34           ddindx := ddindx+1;
35           if a0.last =indx
36             then exit;
37           end if;
38           indx := a0.next(indx);
39         end loop;
40       end if;
41    end if;
42   end rosetta_table_copy_in_p36;
43   procedure rosetta_table_copy_out_p36(t okl_trans_pricing_params_pvt.tpp_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
44     , a1 out nocopy JTF_VARCHAR2_TABLE_500
45     ) as
46     ddindx binary_integer; indx binary_integer;
47   begin
48   if t is null or t.count = 0 then
49     a0 := JTF_NUMBER_TABLE();
50     a1 := JTF_VARCHAR2_TABLE_500();
51   else
52       a0 := JTF_NUMBER_TABLE();
53       a1 := JTF_VARCHAR2_TABLE_500();
54       if t.count > 0 then
55         a0.extend(t.count);
56         a1.extend(t.count);
57         ddindx := t.first;
58         indx := 1;
59         while true loop
60           a0(indx) := rosetta_g_miss_num_map(t(ddindx).gtp_id);
61           a1(indx) := t(ddindx).parameter_value;
62           indx := indx+1;
63           if t.last =ddindx
64             then exit;
65           end if;
66           ddindx := t.next(ddindx);
67         end loop;
68       end if;
69    end if;
70   end rosetta_table_copy_out_p36;
71 
72   procedure create_trans_pricing_params(p_api_version  NUMBER
73     , p_init_msg_list  VARCHAR2
74     , x_return_status out nocopy  VARCHAR2
75     , x_msg_count out nocopy  NUMBER
76     , x_msg_data out nocopy  VARCHAR2
77     , p_chr_id  NUMBER
78     , p_gts_id  NUMBER
79     , p_sif_id  NUMBER
80     , p5_a0  NUMBER := 0-1962.0724
81     , p5_a1  VARCHAR2 := fnd_api.g_miss_char
82   )
83 
84   as
85     ddp_tpp_rec okl_trans_pricing_params_pvt.tpp_rec_type;
86     ddindx binary_integer; indx binary_integer;
87   begin
88 
89     -- copy data to the local IN or IN-OUT args, if any
90 
91 
92 
93 
94 
95     ddp_tpp_rec.gtp_id := rosetta_g_miss_num_map(p5_a0);
96     ddp_tpp_rec.parameter_value := p5_a1;
97 
98 
99 
100 
101     -- here's the delegated call to the old PL/SQL routine
102     okl_trans_pricing_params_pvt.create_trans_pricing_params(p_api_version,
103       p_init_msg_list,
104       x_return_status,
105       x_msg_count,
106       x_msg_data,
107       ddp_tpp_rec,
108       p_chr_id,
109       p_gts_id,
110       p_sif_id);
111 
112     -- copy data back from the local variables to OUT or IN-OUT args, if any
113 
114 
115 
116 
117 
118 
119 
120 
121   end;
122 
123   procedure create_trans_pricing_params(p_api_version  NUMBER
124     , p_init_msg_list  VARCHAR2
125     , x_return_status out nocopy  VARCHAR2
126     , x_msg_count out nocopy  NUMBER
127     , x_msg_data out nocopy  VARCHAR2
128     , p5_a0 JTF_NUMBER_TABLE
129     , p5_a1 JTF_VARCHAR2_TABLE_500
130     , p_chr_id  NUMBER
131     , p_gts_id  NUMBER
132     , p_sif_id  NUMBER
133   )
134 
135   as
136     ddp_tpp_tbl okl_trans_pricing_params_pvt.tpp_tbl_type;
137     ddindx binary_integer; indx binary_integer;
138   begin
139 
140     -- copy data to the local IN or IN-OUT args, if any
141 
142 
143 
144 
145 
146     okl_trans_pricing_params_pvt_w.rosetta_table_copy_in_p36(ddp_tpp_tbl, p5_a0
147       , p5_a1
148       );
149 
150 
151 
152 
153     -- here's the delegated call to the old PL/SQL routine
154     okl_trans_pricing_params_pvt.create_trans_pricing_params(p_api_version,
155       p_init_msg_list,
156       x_return_status,
157       x_msg_count,
158       x_msg_data,
159       ddp_tpp_tbl,
160       p_chr_id,
161       p_gts_id,
162       p_sif_id);
163 
164     -- copy data back from the local variables to OUT or IN-OUT args, if any
165 
166 
167 
168 
169 
170 
171 
172 
173   end;
174 
175 end okl_trans_pricing_params_pvt_w;