1: package body ams_actmetric_pvt_w as
2: /* $Header: amswamtb.pls 120.2 2006/03/23 04:12 mayjain 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: rosetta_g_mistake_date_high date := to_date('01/01/+4710', 'MM/DD/SYYYY');
21: if n=b then return a; end if;
22: return n;
23: end;
24:
25: procedure rosetta_table_copy_in_p1(t out nocopy ams_actmetric_pvt.currency_table, a0 JTF_NUMBER_TABLE) as
26: ddindx binary_integer; indx binary_integer;
27: begin
28: if a0 is null then
29: t := null;
27: begin
28: if a0 is null then
29: t := null;
30: elsif a0.count = 0 then
31: t := ams_actmetric_pvt.currency_table();
32: else
33: if a0.count > 0 then
34: t := ams_actmetric_pvt.currency_table();
35: t.extend(a0.count);
30: elsif a0.count = 0 then
31: t := ams_actmetric_pvt.currency_table();
32: else
33: if a0.count > 0 then
34: t := ams_actmetric_pvt.currency_table();
35: t.extend(a0.count);
36: indx := a0.first;
37: ddindx := 1;
38: while true loop
45: end loop;
46: end if;
47: end if;
48: end rosetta_table_copy_in_p1;
49: procedure rosetta_table_copy_out_p1(t ams_actmetric_pvt.currency_table, a0 out nocopy JTF_NUMBER_TABLE) as
50: ddindx binary_integer; indx binary_integer;
51: begin
52: if t is null then
53: a0 := null;
70: end if;
71: end if;
72: end rosetta_table_copy_out_p1;
73:
74: procedure rosetta_table_copy_in_p28(t out nocopy ams_actmetric_pvt.result_table, a0 JTF_DATE_TABLE
75: , a1 JTF_VARCHAR2_TABLE_100
76: , a2 JTF_NUMBER_TABLE
77: , a3 JTF_NUMBER_TABLE
78: ) as
78: ) as
79: ddindx binary_integer; indx binary_integer;
80: begin
81: if a0 is not null and a0.count=0 then
82: t := ams_actmetric_pvt.result_table();
83: elsif a0 is not null and a0.count > 0 then
84: if a0.count > 0 then
85: t := ams_actmetric_pvt.result_table();
86: t.extend(a0.count);
81: if a0 is not null and a0.count=0 then
82: t := ams_actmetric_pvt.result_table();
83: elsif a0 is not null and a0.count > 0 then
84: if a0.count > 0 then
85: t := ams_actmetric_pvt.result_table();
86: t.extend(a0.count);
87: indx := a0.first;
88: ddindx := 1;
89: while true loop
99: end loop;
100: end if;
101: end if;
102: end rosetta_table_copy_in_p28;
103: procedure rosetta_table_copy_out_p28(t ams_actmetric_pvt.result_table, a0 out nocopy JTF_DATE_TABLE
104: , a1 out nocopy JTF_VARCHAR2_TABLE_100
105: , a2 out nocopy JTF_NUMBER_TABLE
106: , a3 out nocopy JTF_NUMBER_TABLE
107: ) as
224: , p0_a77 in out nocopy VARCHAR2
225: )
226:
227: as
228: ddx_act_metric_rec ams_actmetric_pvt.act_metric_rec_type;
229: ddindx binary_integer; indx binary_integer;
230: begin
231:
232: -- copy data to the local IN or IN-OUT args, if any
309: ddx_act_metric_rec.basis_year := rosetta_g_miss_num_map(p0_a76);
310: ddx_act_metric_rec.ex_start_node := p0_a77;
311:
312: -- here's the delegated call to the old PL/SQL routine
313: ams_actmetric_pvt.init_actmetric_rec(ddx_act_metric_rec);
314:
315: -- copy data back from the local variables to OUT or IN-OUT args, if any
316: p0_a0 := rosetta_g_miss_num_map(ddx_act_metric_rec.activity_metric_id);
317: p0_a1 := ddx_act_metric_rec.last_update_date;
481: , p7_a77 VARCHAR2 := fnd_api.g_miss_char
482: )
483:
484: as
485: ddp_act_metric_rec ams_actmetric_pvt.act_metric_rec_type;
486: ddindx binary_integer; indx binary_integer;
487: begin
488:
489: -- copy data to the local IN or IN-OUT args, if any
574: ddp_act_metric_rec.ex_start_node := p7_a77;
575:
576:
577: -- here's the delegated call to the old PL/SQL routine
578: ams_actmetric_pvt.create_actmetric(p_api_version,
579: p_init_msg_list,
580: p_commit,
581: p_validation_level,
582: x_return_status,
683: , p7_a77 VARCHAR2 := fnd_api.g_miss_char
684: )
685:
686: as
687: ddp_act_metric_rec ams_actmetric_pvt.act_metric_rec_type;
688: ddindx binary_integer; indx binary_integer;
689: begin
690:
691: -- copy data to the local IN or IN-OUT args, if any
775: ddp_act_metric_rec.basis_year := rosetta_g_miss_num_map(p7_a76);
776: ddp_act_metric_rec.ex_start_node := p7_a77;
777:
778: -- here's the delegated call to the old PL/SQL routine
779: ams_actmetric_pvt.update_actmetric(p_api_version,
780: p_init_msg_list,
781: p_commit,
782: p_validation_level,
783: x_return_status,
881: , p6_a77 VARCHAR2 := fnd_api.g_miss_char
882: )
883:
884: as
885: ddp_act_metric_rec ams_actmetric_pvt.act_metric_rec_type;
886: ddindx binary_integer; indx binary_integer;
887: begin
888:
889: -- copy data to the local IN or IN-OUT args, if any
972: ddp_act_metric_rec.basis_year := rosetta_g_miss_num_map(p6_a76);
973: ddp_act_metric_rec.ex_start_node := p6_a77;
974:
975: -- here's the delegated call to the old PL/SQL routine
976: ams_actmetric_pvt.validate_actmetric(p_api_version,
977: p_init_msg_list,
978: p_validation_level,
979: x_return_status,
980: x_msg_count,
1072: , p0_a77 VARCHAR2 := fnd_api.g_miss_char
1073: )
1074:
1075: as
1076: ddp_act_metric_rec ams_actmetric_pvt.act_metric_rec_type;
1077: ddindx binary_integer; indx binary_integer;
1078: begin
1079:
1080: -- copy data to the local IN or IN-OUT args, if any
1159:
1160:
1161:
1162: -- here's the delegated call to the old PL/SQL routine
1163: ams_actmetric_pvt.validate_actmetric_items(ddp_act_metric_rec,
1164: p_validation_mode,
1165: x_return_status);
1166:
1167: -- copy data back from the local variables to OUT or IN-OUT args, if any
1328: , p1_a77 VARCHAR2 := fnd_api.g_miss_char
1329: )
1330:
1331: as
1332: ddp_act_metric_rec ams_actmetric_pvt.act_metric_rec_type;
1333: ddp_complete_rec ams_actmetric_pvt.act_metric_rec_type;
1334: ddindx binary_integer; indx binary_integer;
1335: begin
1336:
1329: )
1330:
1331: as
1332: ddp_act_metric_rec ams_actmetric_pvt.act_metric_rec_type;
1333: ddp_complete_rec ams_actmetric_pvt.act_metric_rec_type;
1334: ddindx binary_integer; indx binary_integer;
1335: begin
1336:
1337: -- copy data to the local IN or IN-OUT args, if any
1494: ddp_complete_rec.ex_start_node := p1_a77;
1495:
1496:
1497: -- here's the delegated call to the old PL/SQL routine
1498: ams_actmetric_pvt.validate_actmetric_record(ddp_act_metric_rec,
1499: ddp_complete_rec,
1500: x_return_status);
1501:
1502: -- copy data back from the local variables to OUT or IN-OUT args, if any
1662: , p0_a77 VARCHAR2 := fnd_api.g_miss_char
1663: )
1664:
1665: as
1666: ddp_act_metric_rec ams_actmetric_pvt.act_metric_rec_type;
1667: ddx_complete_rec ams_actmetric_pvt.act_metric_rec_type;
1668: ddindx binary_integer; indx binary_integer;
1669: begin
1670:
1663: )
1664:
1665: as
1666: ddp_act_metric_rec ams_actmetric_pvt.act_metric_rec_type;
1667: ddx_complete_rec ams_actmetric_pvt.act_metric_rec_type;
1668: ddindx binary_integer; indx binary_integer;
1669: begin
1670:
1671: -- copy data to the local IN or IN-OUT args, if any
1827: ddx_complete_rec.basis_year := rosetta_g_miss_num_map(p1_a76);
1828: ddx_complete_rec.ex_start_node := p1_a77;
1829:
1830: -- here's the delegated call to the old PL/SQL routine
1831: ams_actmetric_pvt.complete_actmetric_rec(ddp_act_metric_rec,
1832: ddx_complete_rec);
1833:
1834: -- copy data back from the local variables to OUT or IN-OUT args, if any
1835:
1936:
1937:
1938:
1939: -- here's the delegated call to the old PL/SQL routine
1940: ams_actmetric_pvt.convert_currency(x_return_status,
1941: p_from_currency,
1942: p_to_currency,
1943: ddp_conv_date,
1944: p_from_amount,
1981:
1982:
1983:
1984: -- here's the delegated call to the old PL/SQL routine
1985: ams_actmetric_pvt.convert_currency2(x_return_status,
1986: p_from_currency,
1987: p_to_currency,
1988: ddp_conv_date,
1989: p_from_amount,
2012: )
2013:
2014: as
2015: ddp_conv_date date;
2016: ddp_amounts ams_actmetric_pvt.currency_table;
2017: ddindx binary_integer; indx binary_integer;
2018: begin
2019:
2020: -- copy data to the local IN or IN-OUT args, if any
2022:
2023:
2024: ddp_conv_date := rosetta_g_miss_date_in_map(p_conv_date);
2025:
2026: ams_actmetric_pvt_w.rosetta_table_copy_in_p1(ddp_amounts, p_amounts);
2027:
2028:
2029: -- here's the delegated call to the old PL/SQL routine
2030: ams_actmetric_pvt.convert_currency_vector(x_return_status,
2026: ams_actmetric_pvt_w.rosetta_table_copy_in_p1(ddp_amounts, p_amounts);
2027:
2028:
2029: -- here's the delegated call to the old PL/SQL routine
2030: ams_actmetric_pvt.convert_currency_vector(x_return_status,
2031: p_from_currency,
2032: p_to_currency,
2033: ddp_conv_date,
2034: ddp_amounts,
2038:
2039:
2040:
2041:
2042: ams_actmetric_pvt_w.rosetta_table_copy_out_p1(ddp_amounts, p_amounts);
2043:
2044: end;
2045:
2046: procedure convert_currency_object(x_return_status out nocopy VARCHAR2
2052: )
2053:
2054: as
2055: ddp_conv_date date;
2056: ddp_amounts ams_actmetric_pvt.currency_table;
2057: ddindx binary_integer; indx binary_integer;
2058: begin
2059:
2060: -- copy data to the local IN or IN-OUT args, if any
2062:
2063:
2064: ddp_conv_date := rosetta_g_miss_date_in_map(p_conv_date);
2065:
2066: ams_actmetric_pvt_w.rosetta_table_copy_in_p1(ddp_amounts, p_amounts);
2067:
2068:
2069: -- here's the delegated call to the old PL/SQL routine
2070: ams_actmetric_pvt.convert_currency_object(x_return_status,
2066: ams_actmetric_pvt_w.rosetta_table_copy_in_p1(ddp_amounts, p_amounts);
2067:
2068:
2069: -- here's the delegated call to the old PL/SQL routine
2070: ams_actmetric_pvt.convert_currency_object(x_return_status,
2071: p_object_id,
2072: p_object_type,
2073: ddp_conv_date,
2074: ddp_amounts,
2078:
2079:
2080:
2081:
2082: ams_actmetric_pvt_w.rosetta_table_copy_out_p1(ddp_amounts, p_amounts);
2083:
2084: end;
2085:
2086: procedure get_results(p_api_version NUMBER
2104:
2105: as
2106: ddp_from_date date;
2107: ddp_to_date date;
2108: ddx_result_table ams_actmetric_pvt.result_table;
2109: ddindx binary_integer; indx binary_integer;
2110: begin
2111:
2112: -- copy data to the local IN or IN-OUT args, if any
2126:
2127:
2128:
2129: -- here's the delegated call to the old PL/SQL routine
2130: ams_actmetric_pvt.get_results(p_api_version,
2131: p_init_msg_list,
2132: x_return_status,
2133: x_msg_count,
2134: x_msg_data,
2155:
2156:
2157:
2158:
2159: ams_actmetric_pvt_w.rosetta_table_copy_out_p28(ddx_result_table, p13_a0
2160: , p13_a1
2161: , p13_a2
2162: , p13_a3
2163: );
2162: , p13_a3
2163: );
2164: end;
2165:
2166: end ams_actmetric_pvt_w;