1 PACKAGE MSD_WS_DEM_RENAME_FORECAST AS
2 /* $Header: MSDWDRFS.pls 120.7.12010000.1 2008/05/01 18:20:14 appldev ship $ */
3
4 /*** CONSTANTS ***/
5 C_DUMMY_SCENARIO_ID_OFFSET NUMBER := 8888888;
6 C_ASSOCIATE_PARAMETER VARCHAR2(100) := 'Assign Plan Name';
7
8
9
10 /*** PROCEDURES & FUNCTIONS ***
11 * ASSIGN_PLAN_NAME_TO_FORECAST
12 * GET_PLAN_SCENARIO_MEMBER_ID
13 * REFRESH_MVIEW
14 */
15
16 /*
17 * Procedure Name - ASSIGN_PLAN_NAME_TO_FORECAST
18 * This procedure assigns a user specified name to the forecast
19 * uploaded from Demantra into the MSD_DP_SCN_ENTRIES_DENORM table.
20 *
21 * Parameters -
22 * NewPlanName - Name to be assigned to the recently exported
23 * forecast output.
24 * DataProfileName - Name of the Data Profile used to export
25 * forecast out of Demantra
26 *
27 * Given the parameter NewPlanName, create (or replace) an entry in the table MSD_DP_SCENARIOS.
28 * Demand Plan Id - (Hardcoded to) 5555555
29 * Scenario Id - Sequence starting from 8888888
30 *
31 * Using the DataProfileName, populate the table MSD_DP_SCENARIO_OUTPUT_LEVELS with
32 * the levels at which the forecast has been exported.
33 *
34 * Update the scenario id in the MSD_DP_SCN_ENTRIES_DENORM table to the Scenario Id generated
35 * for the given Plan Name.
36 *
37 * Return Values -
38 * The procedure returns a status. The possible return statuses are:
39 * SUCCESS, ERROR, INVALID_DATA_PROFILE
40 *
41 */
42 PROCEDURE ASSIGN_PLAN_NAME_TO_FORECAST (
43 status OUT NOCOPY VARCHAR2,
44 NewPlanName IN VARCHAR2,
45 DataProfileName IN VARCHAR2,
46 ArchiveFlag IN NUMBER );
47
48 PROCEDURE ASSIGN_PLAN_NAME_PUBLIC (
49 status OUT NOCOPY VARCHAR2,
50 UserName IN VARCHAR2,
51 RespName IN VARCHAR2,
52 RespApplName IN VARCHAR2,
53 SecurityGroupName IN VARCHAR2,
54 Language IN VARCHAR2,
55 NewPlanName IN VARCHAR2,
56 DataProfileName IN VARCHAR2,
57 ArchiveFlag IN NUMBER );
58
59 /*
60 * Procedure Name - ASSIGN_PLAN_NAME_TO_FORECAST
61 * This is made use of in the assign plan name concurrent program
62 */
63
64 PROCEDURE ASSIGN_PLAN_NAME_TO_FORECAST_C (
65 errbuf out NOCOPY varchar2,
66 retcode out NOCOPY varchar2,
67 NewPlanName IN VARCHAR2,
68 DataProfileName IN VARCHAR2,
69 ArchiveFlag IN NUMBER default 1);
70
71 /*
72 * Function Name - GET_PLAN_SCENARIO_MEMBER_ID
73 * Given the id of a supply plan in ASCP, this function gets the plan scenario member id
74 * from Demantra.
75 *
76 * Parameters -
77 * PlanId - ID of the supply plan from the table MSC_PLANS.
78 *
79 * Return Values -
80 * The procedure returns the plan scenario member ID in Demantra. If not found or in case
81 * of any error it returns -1.
82 *
83 */
84 FUNCTION GET_PLAN_SCENARIO_MEMBER_ID (
85 PlanId IN NUMBER )
86 RETURN NUMBER;
87
88 /*
89 * Procedure Name - REFRESH_MVIEW
90 * Given the name of a materialized view, this procedure refreshed the mview
91 *
92 * Parameters -
93 * MviewName - ame of the materialized view
94 *
95 */
96 PROCEDURE REFRESH_MVIEW (
97 MviewName IN VARCHAR2 );
98
99 /*
100 * Procedure Name - DROP_MVIEW
101 * Given the name of a materialized view, this procedure drops the mview
102 *
103 * Parameters -
104 * MviewName - Name of the materialized view
105 *
106 */
107 PROCEDURE drop_mview(
108 mviewname IN VARCHAR2);
109
110 END MSD_WS_DEM_RENAME_FORECAST;