DBA Data[Home] [Help]

PACKAGE BODY: APPS.MSD_ARCHIVE_PLAN

Source


1 PACKAGE BODY MSD_ARCHIVE_PLAN AS
2 /* $Header: msdarchb.pls 120.1 2005/11/01 11:43:09 ziahmed noship $ */
3 
4 PROCEDURE archive_plan(errbuf out NOCOPY varchar2,retcode out NOCOPY varchar2,
5                        p_demand_plan_id in number) is
6   v_cmd varchar2(4000);
7 begin
8   retcode := '0';
9 
10   v_cmd := 'aw attach ODPCODE ro; call pl.archive('''|| p_demand_plan_id||''')';
11   msd_common_utilities.DBMS_AW_INTERP_SILENT(v_cmd);
12 
13   exception
14     when others then
15       errbuf := substr(SQLERRM,1,150);
16       fnd_file.put_line(fnd_file.log, 'Error in archive process: see batch log for details');
17       fnd_file.put_line(fnd_file.log, substr(SQLERRM, 1, 1000));
18       retcode := '-1';
19 
20 end archive_plan;
21 
22 
23 PROCEDURE restore_plan(errbuf out NOCOPY varchar2,retcode out NOCOPY varchar2,
24                        p_demand_plan_id in number) is
25   v_cmd varchar2(4000);
26 begin
27   retcode := '0';
28 
29   v_cmd := 'aw attach ODPCODE ro; call pl.restore('''||p_demand_plan_id||''')';
30   msd_common_utilities.DBMS_AW_INTERP_SILENT(v_cmd);
31 
32   exception
33     when others then
34       errbuf := substr(SQLERRM,1,150);
35       fnd_file.put_line(fnd_file.log, 'Error in restore process: see batch log for details');
36       fnd_file.put_line(fnd_file.log, substr(SQLERRM, 1, 1000));
37       retcode := '-1';
38 
39 end restore_plan;
40 
41 end MSD_ARCHIVE_PLAN;