DBA Data[Home] [Help]

PACKAGE BODY: APPS.PN_RXI_REP

Source


1 package body PN_RXI_REP as
2   -- $Header: PNRXPRGB.pls 115.3 2002/11/15 20:59:45 stripath ship $
3 
4   PROCEDURE purge (
5     errbuf                  out NOCOPY             varchar2 ,
6     retcode                 out NOCOPY             varchar2   ,
7     p_report_name           in              varchar2   ,
8     p_date_from             in              varchar2   ,
9     p_date_to               in              varchar2  )
10 
11   IS
12 
13   l_date_from     date;
14   l_date_to       date;
15 
16   BEGIN
17 
18     pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge(+)');
19 
20        l_date_from := fnd_date.canonical_to_date(nvl(p_date_from,'0001/01/01 00:00:00'));
21        l_date_to := fnd_date.canonical_to_date(nvl(p_date_to,'4712/12/31 00:00:00'));
22 
23     IF (p_report_name = 'SPALOC') THEN
24 
25      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleting PN_SPACE_ASSIGN_LOC_ITF');
26 
27      delete PN_SPACE_ASSIGN_LOC_ITF
28      where creation_date between l_date_from and l_date_to;
29 
30      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleted PN_SPACE_ASSIGN_LOC_ITF');
31 
32     ELSIF (p_report_name = 'SPALEA') THEN
33 
34      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleting PN_SPACE_ASSIGN_LEASE_ITF');
35 
36      delete PN_SPACE_ASSIGN_LEASE_ITF
37      where creation_date between l_date_from and l_date_to;
38 
39      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleted PN_SPACE_ASSIGN_LEASE_ITF');
40 
41     ELSIF (p_report_name = 'SPULOC') THEN
42 
43      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleting PN_SPACE_UTIL_LOC_ITF');
44 
45      delete PN_SPACE_UTIL_LOC_ITF
46      where creation_date between l_date_from and l_date_to;
47 
48      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleted PN_SPACE_UTIL_LOC_ITF');
49 
50     ELSIF (p_report_name = 'SPULEA') THEN
51 
52      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleting PN_SPACE_UTIL_LEASE_ITF');
53 
54      delete PN_SPACE_UTIL_LEASE_ITF
55      where creation_date between l_date_from and l_date_to;
56 
57      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleted PN_SPACE_UTIL_LEASE_ITF');
58 
59     ELSIF (p_report_name = 'RRLEXP') THEN
60 
61      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleting PN_RENT_ROLL_LEASE_EXP_ITF');
62 
63      delete PN_RENT_ROLL_LEASE_EXP_ITF
64      where creation_date between l_date_from and l_date_to;
65 
66      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleted PN_RENT_ROLL_LEASE_EXP_ITF');
67 
68     ELSIF (p_report_name = 'LEAOPT') THEN
69 
70      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleting PN_LEASE_OPTIONS_ITF');
71 
72      delete PN_LEASE_OPTIONS_ITF
73      where creation_date between l_date_from and l_date_to;
74 
75      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleted PN_LEASE_OPTIONS_ITF');
76 
77     ELSIF (p_report_name = 'MILEST') THEN
78 
79      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleting PN_MILESTONES_ITF');
80 
81      delete PN_MILESTONES_ITF
82      where creation_date between l_date_from and l_date_to;
83 
84      pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge - deleted PN_MILESTONES_ITF');
85 
86     END IF;
87     pnp_debug_pkg.put_log_msg('pnp_rxi_rep.purge(-)');
88 
89      exception
90      when others then
91       retcode:=2;
92       errbuf:=substr(SQLERRM,1,235);
93       RAISE;
94    END purge;
95 
96 -------------------------------
97 -- End of Package
98 -------------------------------
99 END PN_RXI_REP;