1 PACKAGE OKS_MASS_UPD_PVT AUTHID CURRENT_USER AS
2 /* $Header: OKSRMUSS.pls 120.0.12020000.2 2013/02/06 09:19:09 spingali noship $ */
3
4 TYPE mass_update_effectivity_rec IS RECORD(
5 line_id number,
6 sub_line_id number,
7 chr_id NUMBER,
8 lse_id NUMBER,
9 line_number VARCHAR2(10),
10 start_date DATE,
11 end_date date);
12
13 TYPE mass_update_effectivity_tbl IS TABLE OF mass_update_effectivity_rec index by binary_integer;
14
15 TYPE mass_update_status_rec is record(
16 line_id number,
17 sub_line_id number,
18 chr_id NUMBER,
19 lse_id NUMBER,
20 line_number VARCHAR2(10),
21 canc_reason_code VARCHAR2(100),
22 old_sts_code VARCHAR2(30),
23 new_sts_code VARCHAR2(30),
24 comments VARCHAR2(2000));
25
26 TYPE mass_update_status_tbl is table of mass_update_status_Rec index by binary_integer;
27
28 TYPE mass_update_price_rec is record(
29 line_id number,
30 sub_line_id number,
31 chr_id NUMBER,
32 lse_id NUMBER,
33 line_number VARCHAR2(10),
34 new_amount number);
35
36 TYPE mass_update_price_tbl is table of mass_update_price_Rec index by binary_integer;
37
38 TYPE err_mu_eff_rec IS RECORD(
39 line_number VARCHAR2(10),
40 error_msg VARCHAR2(1000));
41
42 Type err_mu_eff_tbl is TABLE of err_mu_eff_rec index by binary_integer;
43
44 l_err_mu_eff_tbl err_mu_eff_tbl;
45 l_err_eff_idx NUMBER := 0;
46
47 G_PKG_NAME CONSTANT VARCHAR2(200) := 'OKS_MASS_UPDATE_PVT';
48 G_MODULE CONSTANT VARCHAR2(200) := 'oks.plsql.' || G_PKG_NAME || '.';
49
50
51 --========================================================================
52 -- PROCEDURE : DELETE_CONTRACT_DATA
53 --
54 -- PARAMETERS:
55 -- p_contract_id Id for the Contract Header to be deleted
56 -- x_return_status Return status
57 --
58 -- COMMENT : This procedure deletes the record from the temp tables for contract
59 --========================================================================
60 PROCEDURE DELETE_CONTRACT_DATA(
61 p_contract_id IN NUMBER,
62 x_return_status OUT NOCOPY VARCHAR2);
63
64 /*
65 This procedure is a concurrent program, that trigger mass update wrapper for all
66 the three changes done through mass update UI
67 */
68 PROCEDURE launch_massupd_conc_prog(ERRBUF OUT NOCOPY VARCHAR2,
69 RETCODE OUT NOCOPY NUMBER,
70 p_contract_id IN VARCHAR2);
71
72 /*This procedure is to validate the mass update data prior to submitting the changes,
73 this is called through mass update oa page*/
74
75 PROCEDURE vld_massupd_data_prc(RETCODE OUT NOCOPY NUMBER,
76 p_contract_id IN VARCHAR2);
77
78 /*vld_massupd_status_prc to validate the status change related data*/
79 PROCEDURE vld_massupd_status_prc(p_contract_id IN VARCHAR2,
80 x_return_status out nocopy varchar2);
81
82 /*vld_massupd_eff_prc to validate the effectivity change related data*/
83 PROCEDURE vld_massupd_eff_prc(p_contract_id IN VARCHAR2,
84 x_return_status out nocopy varchar2);
85
86 /* populate_temp_tbl is to populate the temporary tables which is used by mass update oa page
87 This procedure is called from the service contracts authoring form*/
88 PROCEDURE populate_temp_tbl(p_contract_id NUMBER,
89 x_return_status out nocopy varchar2);
90
91 /* Procedure mass_update_price_wrapper is used to retrieve the eligible price change related records
92 as part of concurrent program*/
93 procedure mass_update_price_wrapper(p_contract_id IN VARCHAR2,
94 x_return_status out nocopy varchar2);
95
96 /* Procedure mass_update_status_wrapper is used to retrieve the eligible status change related records
97 as part of concurrent program*/
98 procedure mass_update_status_wrapper(p_contract_id IN VARCHAR2,
99 x_return_status out nocopy varchar2);
100
101 /* Procedure mass_update_eff_wrapper is used to retrieve the eligible effectivity change related records
102 as part of concurrent program*/
103 procedure mass_update_eff_wrapper(p_contract_id IN VARCHAR2,
104 x_return_status out nocopy varchar2);
105
106 /* This procedure mass_update_price_prc is called from mass_update_price_wrapper which will actually
107 perform the updates to the base tables*/
108 procedure mass_update_price_prc(p_mass_update_price_tbl in mass_update_price_tbl,
109 x_return_status out nocopy VARCHAR2,
110 x_msg_data OUT NOCOPY VARCHAR2,
111 x_msg_count OUT NOCOPY NUMBER);
112
113 /* This procedure mass_update_status_prc is called from mass_update_status_wrapper which will actually
114 perform the updates to the base tables*/
115 procedure mass_update_status_prc(p_mass_update_status_tbl in mass_update_status_tbl,
116 x_return_status out nocopy varchar2,
117 x_msg_data OUT NOCOPY VARCHAR2,
118 x_msg_count OUT NOCOPY NUMBER);
119
120 /* This procedure mass_update_effectivity_prc is called from mass_update_eff_wrapper which will actually
121 perform the updates to the base tables*/
122 procedure mass_update_effectivity_prc(p_mass_update_effectivity_tbl in mass_update_effectivity_tbl,
123 x_return_status out nocopy varchar2);
124
125 PROCEDURE mass_update_cascade_sel(p_contract_id NUMBER, x_error_records OUT NOCOPY varchar2);
126
127 PROCEDURE mass_update_submit(p_contract_id IN NUMBER, x_req_id OUT NOCOPY VARCHAR2);
128
129 PROCEDURE delete_changes(p_contract_id NUMBER);
130
131 /*private sub-programs*/
132 FUNCTION OKS_MODEL_CHECK(p_contract_id NUMBER,
133 p_customer_prod_id NUMBER)
134 RETURN VARCHAR2;
135
136 FUNCTION OKS_CONFIG_CHECK(p_contract_id NUMBER,
137 p_customer_prod_id NUMBER)
138 RETURN VARCHAR2;
139
140 FUNCTION OKS_CONFIG_ITEM_CHECK(p_contract_id NUMBER,
141 p_customer_prod_id NUMBER)
142 RETURN VARCHAR2;
143
144 FUNCTION OKS_MODEL_ITEM_CHECK(p_contract_id NUMBER,
145 p_customer_prod_id NUMBER)
146 RETURN VARCHAR2;
147
148
149 END OKS_MASS_UPD_PVT;