DBA Data[Home] [Help]

PACKAGE BODY: APPS.OKL_ACCRUAL_DEPRN_ADJ_PUB_W

Source


1 package body okl_accrual_deprn_adj_pub_w as
2   /* $Header: OKLUADAB.pls 115.1 2003/10/08 17:47:10 sgiyer 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   function submit_deprn_adjustment(x_return_status out nocopy  VARCHAR2
23     , x_msg_count out nocopy  NUMBER
24     , x_msg_data out nocopy  VARCHAR2
25     , p_api_version  NUMBER
26     , p_batch_name  VARCHAR2
27     , p_date_from  date
28     , p_date_to  date
29   ) return number
30 
31   as
32     ddp_date_from date;
33     ddp_date_to date;
34     ddindx binary_integer; indx binary_integer;
35     ddrosetta_retval number;
36   begin
37 
38     -- copy data to the local IN or IN-OUT args, if any
39 
40 
41 
42 
43 
44     ddp_date_from := rosetta_g_miss_date_in_map(p_date_from);
45 
46     ddp_date_to := rosetta_g_miss_date_in_map(p_date_to);
47 
48     -- here's the delegated call to the old PL/SQL routine
49     ddrosetta_retval := okl_accrual_deprn_adj_pub.submit_deprn_adjustment(x_return_status,
50       x_msg_count,
51       x_msg_data,
52       p_api_version,
53       p_batch_name,
54       ddp_date_from,
55       ddp_date_to);
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     return ddrosetta_retval;
66   end;
67 
68 end okl_accrual_deprn_adj_pub_w;