DBA Data[Home] [Help]

PACKAGE BODY: APPS.OKL_CASH_RULES_SUMRY_PVT_W

Source


1 package body okl_cash_rules_sumry_pvt_w as
2   /* $Header: OKLECSYB.pls 115.0 2002/12/24 01:13:55 bvaghela 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_p13(t out nocopy okl_cash_rules_sumry_pvt.okl_cash_rl_sumry_tbl_type, a0 JTF_NUMBER_TABLE
23     ) as
24     ddindx binary_integer; indx binary_integer;
25   begin
26   if a0 is not null and a0.count > 0 then
27       if a0.count > 0 then
28         indx := a0.first;
29         ddindx := 1;
30         while true loop
31           t(ddindx).id := rosetta_g_miss_num_map(a0(indx));
32           ddindx := ddindx+1;
33           if a0.last =indx
34             then exit;
35           end if;
36           indx := a0.next(indx);
37         end loop;
38       end if;
39    end if;
40   end rosetta_table_copy_in_p13;
41   procedure rosetta_table_copy_out_p13(t okl_cash_rules_sumry_pvt.okl_cash_rl_sumry_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
42     ) as
43     ddindx binary_integer; indx binary_integer;
44   begin
45   if t is null or t.count = 0 then
46     a0 := JTF_NUMBER_TABLE();
47   else
48       a0 := JTF_NUMBER_TABLE();
49       if t.count > 0 then
50         a0.extend(t.count);
51         ddindx := t.first;
52         indx := 1;
53         while true loop
54           a0(indx) := rosetta_g_miss_num_map(t(ddindx).id);
55           indx := indx+1;
56           if t.last =ddindx
57             then exit;
58           end if;
59           ddindx := t.next(ddindx);
60         end loop;
61       end if;
62    end if;
63   end rosetta_table_copy_out_p13;
64 
65   procedure handle_cash_rl_sumry(p_api_version  NUMBER
66     , p_init_msg_list  VARCHAR2
67     , x_return_status out nocopy  VARCHAR2
68     , x_msg_count out nocopy  NUMBER
69     , x_msg_data out nocopy  VARCHAR2
70     , p5_a0 JTF_NUMBER_TABLE
71   )
72 
73   as
74     ddp_cash_rl_tbl okl_cash_rules_sumry_pvt.okl_cash_rl_sumry_tbl_type;
75     ddindx binary_integer; indx binary_integer;
76   begin
77 
78     -- copy data to the local IN or IN-OUT args, if any
79 
80 
81 
82 
83 
84     okl_cash_rules_sumry_pvt_w.rosetta_table_copy_in_p13(ddp_cash_rl_tbl, p5_a0
85       );
86 
87     -- here's the delegated call to the old PL/SQL routine
88     okl_cash_rules_sumry_pvt.handle_cash_rl_sumry(p_api_version,
89       p_init_msg_list,
90       x_return_status,
91       x_msg_count,
92       x_msg_data,
93       ddp_cash_rl_tbl);
94 
95     -- copy data back from the local variables to OUT or IN-OUT args, if any
96 
97 
98 
99 
100 
101   end;
102 
103 end okl_cash_rules_sumry_pvt_w;