[Home] [Help]
PACKAGE BODY: APPS.OKL_LIKE_KIND_EXCHANGE_PUB_W
Source
1 package body okl_like_kind_exchange_pub_w as
2 /* $Header: OKLULKXB.pls 120.1 2005/07/18 16:44:53 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 create_like_kind_exchange(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_corporate_book VARCHAR2
28 , p_tax_book VARCHAR2
29 , p_comments VARCHAR2
30 , p9_a0 JTF_NUMBER_TABLE
31 , p9_a1 JTF_VARCHAR2_TABLE_2000
32 , p9_a2 JTF_VARCHAR2_TABLE_2000
33 , p9_a3 JTF_NUMBER_TABLE
34 , p9_a4 JTF_NUMBER_TABLE
35 , p9_a5 JTF_DATE_TABLE
36 , p9_a6 JTF_NUMBER_TABLE
37 , p9_a7 JTF_NUMBER_TABLE
38 , p9_a8 JTF_NUMBER_TABLE
39 , p9_a9 JTF_NUMBER_TABLE
40 , p9_a10 JTF_NUMBER_TABLE
41 , p8_a0 NUMBER := 0-1962.0724
42 , p8_a1 VARCHAR2 := fnd_api.g_miss_char
43 , p8_a2 VARCHAR2 := fnd_api.g_miss_char
44 , p8_a3 NUMBER := 0-1962.0724
45 , p8_a4 NUMBER := 0-1962.0724
46 , p8_a5 NUMBER := 0-1962.0724
47 , p8_a6 DATE := fnd_api.g_miss_date
48 , p8_a7 VARCHAR2 := fnd_api.g_miss_char
49 , p8_a8 NUMBER := 0-1962.0724
50 )
51
52 as
53 ddp_rep_asset_rec okl_like_kind_exchange_pub.rep_asset_rec_type;
54 ddp_req_asset_tbl okl_like_kind_exchange_pub.req_asset_tbl_type;
55 ddindx binary_integer; indx binary_integer;
56 begin
57
58 -- copy data to the local IN or IN-OUT args, if any
59
60
61
62
63
64
65
66
67 ddp_rep_asset_rec.rep_asset_id := rosetta_g_miss_num_map(p8_a0);
68 ddp_rep_asset_rec.rep_asset_number := p8_a1;
69 ddp_rep_asset_rec.book_type_code := p8_a2;
70 ddp_rep_asset_rec.asset_category_id := rosetta_g_miss_num_map(p8_a3);
71 ddp_rep_asset_rec.original_cost := rosetta_g_miss_num_map(p8_a4);
72 ddp_rep_asset_rec.current_cost := rosetta_g_miss_num_map(p8_a5);
73 ddp_rep_asset_rec.date_placed_in_service := rosetta_g_miss_date_in_map(p8_a6);
74 ddp_rep_asset_rec.deprn_method := p8_a7;
75 ddp_rep_asset_rec.life_in_months := rosetta_g_miss_num_map(p8_a8);
76
77 okl_like_kind_exchange_pvt_w.rosetta_table_copy_in_p4(ddp_req_asset_tbl, p9_a0
78 , p9_a1
79 , p9_a2
80 , p9_a3
81 , p9_a4
82 , p9_a5
83 , p9_a6
84 , p9_a7
85 , p9_a8
86 , p9_a9
87 , p9_a10
88 );
89
90 -- here's the delegated call to the old PL/SQL routine
91 okl_like_kind_exchange_pub.create_like_kind_exchange(p_api_version,
92 p_init_msg_list,
93 x_return_status,
94 x_msg_count,
95 x_msg_data,
96 p_corporate_book,
97 p_tax_book,
98 p_comments,
99 ddp_rep_asset_rec,
100 ddp_req_asset_tbl);
101
102 -- copy data back from the local variables to OUT or IN-OUT args, if any
103
104
105
106
107
108
109
110
111
112 end;
113
114 end okl_like_kind_exchange_pub_w;