DBA Data[Home] [Help]

PACKAGE BODY: APPS.AMS_EVENT_OBJECTS_COPY_PVT_W

Source


1 package body ams_event_objects_copy_pvt_w as
2   /* $Header: amsweocb.pls 115.6 2003/07/30 08:38:18 anchaudh ship $ */
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 
23   procedure copy_event_header(p_api_version  NUMBER
24     , p_init_msg_list  VARCHAR2
25     , p_commit  VARCHAR2
26     , p_validation_level  NUMBER
27     , x_return_status out nocopy  VARCHAR2
28     , x_msg_count out nocopy  NUMBER
29     , x_msg_data out nocopy  VARCHAR2
30     , p_source_object_id  NUMBER
31     , p_attributes_table JTF_VARCHAR2_TABLE_100
32     , p9_a0 JTF_VARCHAR2_TABLE_100
33     , p9_a1 JTF_VARCHAR2_TABLE_4000
34     , x_new_object_id out nocopy  NUMBER
35     , x_custom_setup_id out nocopy  NUMBER
36   )
37 
38   as
39     ddp_attributes_table ams_cpyutility_pvt.copy_attributes_table_type;
40     ddp_copy_columns_table ams_cpyutility_pvt.copy_columns_table_type;
41     ddindx binary_integer; indx binary_integer;
42   begin
43 
44     -- copy data to the local IN or IN-OUT args, if any
45 
46 
47 
48 
49 
50 
51 
52 
53     ams_cpyutility_pvt_w.rosetta_table_copy_in_p0(ddp_attributes_table, p_attributes_table);
54 
55     ams_cpyutility_pvt_w.rosetta_table_copy_in_p2(ddp_copy_columns_table, p9_a0
56       , p9_a1
57       );
58 
59 
60 
61     -- here's the delegated call to the old PL/SQL routine
62     ams_event_objects_copy_pvt.copy_event_header(p_api_version,
63       p_init_msg_list,
64       p_commit,
65       p_validation_level,
66       x_return_status,
67       x_msg_count,
68       x_msg_data,
69       p_source_object_id,
70       ddp_attributes_table,
71       ddp_copy_columns_table,
72       x_new_object_id,
73       x_custom_setup_id);
74 
75     -- copy data back from the local variables to OUT or IN-OUT args, if any
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87   end;
88 
89 end ams_event_objects_copy_pvt_w;