1 PACKAGE MSC_ATP_PEG AUTHID CURRENT_USER AS
2 /* $Header: MSCAPEGS.pls 120.1 2007/12/12 10:19:02 sbnaik ship $ */
3 /* Procedures for CTO Re-architecture and Resource Capacity Enhancements */
4
5 -- Some global variables used during processing.
6 G_SUCCESS CONSTANT NUMBER := 0;
7 G_WARNING CONSTANT NUMBER := 1;
8 G_ERROR CONSTANT NUMBER := 2;
9
10 -- These procedures serve as interfaces between ATP Simplified Pegging
11 -- and other modules. This is called after the plan run.
12
13 PROCEDURE post_plan_pegging(
14 ERRBUF OUT NoCopy VARCHAR2,
15 RETCODE OUT NoCopy NUMBER,
16 p_plan_id IN NUMBER);
17
18 -- This procedure is still being retained as a public procedure
19 -- until testing is completed.
20 -- This procedure is the main procedure that creates the ATP simplified pegging
21 -- after plan run.
22
23 PROCEDURE Generate_Simplified_Pegging(p_plan_id IN NUMBER,
24 p_share_partition IN VARCHAR2,
25 p_applsys_schema IN VARCHAR2,
26 RETCODE OUT NoCopy NUMBER
27 );
28 -- x_return_status is not used as it is redundant.
29 -- Here the convention corresponds to procedures that
30 -- run as a part of post plan process.
31
32 -- Procedure that creates offset demands, supplies and resource_requirements
33 -- during ATP process when dealing with pre-scheduled ATO models, configuration items.
34 PROCEDURE Add_Offset_Data (
35 p_identifier IN NUMBER,
36 p_config_line_id IN NUMBER,
37 p_plan_id IN NUMBER,
38 p_refresh_number IN NUMBER,
39 p_order_number IN NUMBER,
40 p_demand_source_type IN NUMBER,--cmro
41 x_inv_item_id OUT NoCopy MRP_ATP_PUB.Number_Arr,
42 x_demand_id OUT NoCopy MRP_ATP_PUB.Number_Arr,
43 x_supply_id OUT NoCopy MRP_ATP_PUB.Number_Arr,
44 x_res_transactions OUT NoCopy MRP_ATP_PUB.Number_Arr,
45 x_demand_instance_id OUT NoCopy MRP_ATP_PUB.Number_Arr, --Bug 3629191
46 x_supply_instance_id OUT NoCopy MRP_ATP_PUB.Number_Arr, --Bug 3629191
47 x_res_instance_id OUT NoCopy MRP_ATP_PUB.Number_Arr, --Bug 3629191
48 x_return_status OUT NoCopy VARCHAR2
49 );
50
51 -- Procedure that removes offset demands, supplies and resource_requirements
52 -- during ATP process when dealing with pre-scheduled ATO models, configuration items.
53 PROCEDURE Remove_Offset_Data (
54 --p_identifiers IN MRP_ATP_PUB.Number_Arr,
55 --p_plan_ids IN MRP_ATP_PUB.Number_Arr,
56 p_inv_item_ids IN MRP_ATP_PUB.Number_Arr,
57 p_del_demand_ids IN MRP_ATP_PUB.Number_Arr,
58 p_del_supply_ids IN MRP_ATP_PUB.Number_Arr,
59 p_del_resrc_reqs IN MRP_ATP_PUB.Number_Arr,
60 p_demand_source_type IN MRP_ATP_PUB.Number_Arr,--cmro
61 p_atp_peg_demands_plan_ids IN MRP_ATP_PUB.Number_Arr, --Bug 3629191
62 p_atp_peg_supplies_plan_ids IN MRP_ATP_PUB.Number_Arr, --Bug 3629191
63 p_atp_peg_res_reqs_plan_ids IN MRP_ATP_PUB.Number_Arr, --Bug 3629191
64 x_return_status OUT NoCopy VARCHAR2
65 );
66
67 -- Creates the simplified ATP Pegging for
68 -- ATP scheduling, un_scheduling,re-scheduling request.
69
70 PROCEDURE Create_Atp_Pegging(
71 p_identifier IN NUMBER,
72 p_instance_id IN NUMBER,
73 p_old_plan_id IN NUMBER,
74 p_model_order_line_id IN NUMBER,
75 p_config_order_line_id IN NUMBER,
76 p_demand_source_type IN NUMBER,--cmro
77 x_return_status OUT NoCopy VARCHAR2
78 );
79
80
81 END MSC_ATP_PEG;