DBA Data[Home] [Help]

PACKAGE BODY: APPS.OKL_REVERSAL_PUB_W

Source


1 package body okl_reversal_pub_w as
2   /* $Header: OKLUREVB.pls 120.1 2005/07/18 15:57:47 viselvar 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 reverse_entries(p_api_version  NUMBER
23     , p_init_msg_list  VARCHAR2
24     , x_return_status out nocopy  VARCHAR2
25     , x_msg_count out nocopy  NUMBER
26     , x_msg_data out nocopy  VARCHAR2
27     , p_source_id  NUMBER
28     , p_source_table  VARCHAR2
29     , p_acct_date  date
30   )
31 
32   as
33     ddp_acct_date date;
34     ddindx binary_integer; indx binary_integer;
35   begin
36 
37     -- copy data to the local IN or IN-OUT args, if any
38 
39 
40 
41 
42 
43 
44 
45     ddp_acct_date := rosetta_g_miss_date_in_map(p_acct_date);
46 
47     -- here's the delegated call to the old PL/SQL routine
48     okl_reversal_pub.reverse_entries(p_api_version,
49       p_init_msg_list,
50       x_return_status,
51       x_msg_count,
52       x_msg_data,
53       p_source_id,
54       p_source_table,
55       ddp_acct_date);
56 
57     -- copy data back from the local variables to OUT or IN-OUT args, if any
58 
59 
60 
61 
62 
63 
64 
65   end;
66 
67   procedure reverse_entries(p_api_version  NUMBER
68     , p_init_msg_list  VARCHAR2
69     , x_return_status out nocopy  VARCHAR2
70     , x_msg_count out nocopy  NUMBER
71     , x_msg_data out nocopy  VARCHAR2
72     , p_source_table  VARCHAR2
73     , p_acct_date  date
74     , p_source_id_tbl JTF_NUMBER_TABLE
75   )
76 
77   as
78     ddp_acct_date date;
79     ddp_source_id_tbl okl_reversal_pub.source_id_tbl_type;
80     ddindx binary_integer; indx binary_integer;
81   begin
82 
83     -- copy data to the local IN or IN-OUT args, if any
84 
85 
86 
87 
88 
89 
90     ddp_acct_date := rosetta_g_miss_date_in_map(p_acct_date);
91 
92     okl_reversal_pvt_w.rosetta_table_copy_in_p0(ddp_source_id_tbl, p_source_id_tbl);
93 
94     -- here's the delegated call to the old PL/SQL routine
95     okl_reversal_pub.reverse_entries(p_api_version,
96       p_init_msg_list,
97       x_return_status,
98       x_msg_count,
99       x_msg_data,
100       p_source_table,
101       ddp_acct_date,
102       ddp_source_id_tbl);
103 
104     -- copy data back from the local variables to OUT or IN-OUT args, if any
105 
106 
107 
108 
109 
110 
111 
112   end;
113 
114 end okl_reversal_pub_w;