90: null;
91: END api_copy;
92:
93: ---------------------------------------------------------------------------
94: -- FUNCTION get_rec for: OKS_ACTION_TIMES_V
95: ---------------------------------------------------------------------------
96: FUNCTION get_rec (
97: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
98: x_no_data_found OUT NOCOPY BOOLEAN
93: ---------------------------------------------------------------------------
94: -- FUNCTION get_rec for: OKS_ACTION_TIMES_V
95: ---------------------------------------------------------------------------
96: FUNCTION get_rec (
97: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
98: x_no_data_found OUT NOCOPY BOOLEAN
99: ) RETURN oks_action_times_v_rec_type IS
100: CURSOR oks_atv_pk_csr (p_id IN NUMBER) IS
101: SELECT
95: ---------------------------------------------------------------------------
96: FUNCTION get_rec (
97: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
98: x_no_data_found OUT NOCOPY BOOLEAN
99: ) RETURN oks_action_times_v_rec_type IS
100: CURSOR oks_atv_pk_csr (p_id IN NUMBER) IS
101: SELECT
102: ID,
103: COV_ACTION_TYPE_ID,
121: LAST_UPDATED_BY,
122: LAST_UPDATE_DATE,
123: LAST_UPDATE_LOGIN,
124: OBJECT_VERSION_NUMBER
125: FROM Oks_Action_Times_V
126: WHERE oks_action_times_v.id = p_id;
127: l_oks_atv_pk oks_atv_pk_csr%ROWTYPE;
128: l_oks_action_times_v_rec oks_action_times_v_rec_type;
129: BEGIN
122: LAST_UPDATE_DATE,
123: LAST_UPDATE_LOGIN,
124: OBJECT_VERSION_NUMBER
125: FROM Oks_Action_Times_V
126: WHERE oks_action_times_v.id = p_id;
127: l_oks_atv_pk oks_atv_pk_csr%ROWTYPE;
128: l_oks_action_times_v_rec oks_action_times_v_rec_type;
129: BEGIN
130: x_no_data_found := TRUE;
124: OBJECT_VERSION_NUMBER
125: FROM Oks_Action_Times_V
126: WHERE oks_action_times_v.id = p_id;
127: l_oks_atv_pk oks_atv_pk_csr%ROWTYPE;
128: l_oks_action_times_v_rec oks_action_times_v_rec_type;
129: BEGIN
130: x_no_data_found := TRUE;
131: -- Get current database values
132: OPEN oks_atv_pk_csr (p_oks_action_times_v_rec.id);
128: l_oks_action_times_v_rec oks_action_times_v_rec_type;
129: BEGIN
130: x_no_data_found := TRUE;
131: -- Get current database values
132: OPEN oks_atv_pk_csr (p_oks_action_times_v_rec.id);
133: FETCH oks_atv_pk_csr INTO
134: l_oks_action_times_v_rec.id,
135: l_oks_action_times_v_rec.cov_action_type_id,
136: l_oks_action_times_v_rec.cle_id,
130: x_no_data_found := TRUE;
131: -- Get current database values
132: OPEN oks_atv_pk_csr (p_oks_action_times_v_rec.id);
133: FETCH oks_atv_pk_csr INTO
134: l_oks_action_times_v_rec.id,
135: l_oks_action_times_v_rec.cov_action_type_id,
136: l_oks_action_times_v_rec.cle_id,
137: l_oks_action_times_v_rec.dnz_chr_id,
138: l_oks_action_times_v_rec.uom_code,
131: -- Get current database values
132: OPEN oks_atv_pk_csr (p_oks_action_times_v_rec.id);
133: FETCH oks_atv_pk_csr INTO
134: l_oks_action_times_v_rec.id,
135: l_oks_action_times_v_rec.cov_action_type_id,
136: l_oks_action_times_v_rec.cle_id,
137: l_oks_action_times_v_rec.dnz_chr_id,
138: l_oks_action_times_v_rec.uom_code,
139: l_oks_action_times_v_rec.sun_duration,
132: OPEN oks_atv_pk_csr (p_oks_action_times_v_rec.id);
133: FETCH oks_atv_pk_csr INTO
134: l_oks_action_times_v_rec.id,
135: l_oks_action_times_v_rec.cov_action_type_id,
136: l_oks_action_times_v_rec.cle_id,
137: l_oks_action_times_v_rec.dnz_chr_id,
138: l_oks_action_times_v_rec.uom_code,
139: l_oks_action_times_v_rec.sun_duration,
140: l_oks_action_times_v_rec.mon_duration,
133: FETCH oks_atv_pk_csr INTO
134: l_oks_action_times_v_rec.id,
135: l_oks_action_times_v_rec.cov_action_type_id,
136: l_oks_action_times_v_rec.cle_id,
137: l_oks_action_times_v_rec.dnz_chr_id,
138: l_oks_action_times_v_rec.uom_code,
139: l_oks_action_times_v_rec.sun_duration,
140: l_oks_action_times_v_rec.mon_duration,
141: l_oks_action_times_v_rec.tue_duration,
134: l_oks_action_times_v_rec.id,
135: l_oks_action_times_v_rec.cov_action_type_id,
136: l_oks_action_times_v_rec.cle_id,
137: l_oks_action_times_v_rec.dnz_chr_id,
138: l_oks_action_times_v_rec.uom_code,
139: l_oks_action_times_v_rec.sun_duration,
140: l_oks_action_times_v_rec.mon_duration,
141: l_oks_action_times_v_rec.tue_duration,
142: l_oks_action_times_v_rec.wed_duration,
135: l_oks_action_times_v_rec.cov_action_type_id,
136: l_oks_action_times_v_rec.cle_id,
137: l_oks_action_times_v_rec.dnz_chr_id,
138: l_oks_action_times_v_rec.uom_code,
139: l_oks_action_times_v_rec.sun_duration,
140: l_oks_action_times_v_rec.mon_duration,
141: l_oks_action_times_v_rec.tue_duration,
142: l_oks_action_times_v_rec.wed_duration,
143: l_oks_action_times_v_rec.thu_duration,
136: l_oks_action_times_v_rec.cle_id,
137: l_oks_action_times_v_rec.dnz_chr_id,
138: l_oks_action_times_v_rec.uom_code,
139: l_oks_action_times_v_rec.sun_duration,
140: l_oks_action_times_v_rec.mon_duration,
141: l_oks_action_times_v_rec.tue_duration,
142: l_oks_action_times_v_rec.wed_duration,
143: l_oks_action_times_v_rec.thu_duration,
144: l_oks_action_times_v_rec.fri_duration,
137: l_oks_action_times_v_rec.dnz_chr_id,
138: l_oks_action_times_v_rec.uom_code,
139: l_oks_action_times_v_rec.sun_duration,
140: l_oks_action_times_v_rec.mon_duration,
141: l_oks_action_times_v_rec.tue_duration,
142: l_oks_action_times_v_rec.wed_duration,
143: l_oks_action_times_v_rec.thu_duration,
144: l_oks_action_times_v_rec.fri_duration,
145: l_oks_action_times_v_rec.sat_duration,
138: l_oks_action_times_v_rec.uom_code,
139: l_oks_action_times_v_rec.sun_duration,
140: l_oks_action_times_v_rec.mon_duration,
141: l_oks_action_times_v_rec.tue_duration,
142: l_oks_action_times_v_rec.wed_duration,
143: l_oks_action_times_v_rec.thu_duration,
144: l_oks_action_times_v_rec.fri_duration,
145: l_oks_action_times_v_rec.sat_duration,
146: l_oks_action_times_v_rec.security_group_id,
139: l_oks_action_times_v_rec.sun_duration,
140: l_oks_action_times_v_rec.mon_duration,
141: l_oks_action_times_v_rec.tue_duration,
142: l_oks_action_times_v_rec.wed_duration,
143: l_oks_action_times_v_rec.thu_duration,
144: l_oks_action_times_v_rec.fri_duration,
145: l_oks_action_times_v_rec.sat_duration,
146: l_oks_action_times_v_rec.security_group_id,
147: l_oks_action_times_v_rec.program_application_id,
140: l_oks_action_times_v_rec.mon_duration,
141: l_oks_action_times_v_rec.tue_duration,
142: l_oks_action_times_v_rec.wed_duration,
143: l_oks_action_times_v_rec.thu_duration,
144: l_oks_action_times_v_rec.fri_duration,
145: l_oks_action_times_v_rec.sat_duration,
146: l_oks_action_times_v_rec.security_group_id,
147: l_oks_action_times_v_rec.program_application_id,
148: l_oks_action_times_v_rec.program_id,
141: l_oks_action_times_v_rec.tue_duration,
142: l_oks_action_times_v_rec.wed_duration,
143: l_oks_action_times_v_rec.thu_duration,
144: l_oks_action_times_v_rec.fri_duration,
145: l_oks_action_times_v_rec.sat_duration,
146: l_oks_action_times_v_rec.security_group_id,
147: l_oks_action_times_v_rec.program_application_id,
148: l_oks_action_times_v_rec.program_id,
149: l_oks_action_times_v_rec.program_update_date,
142: l_oks_action_times_v_rec.wed_duration,
143: l_oks_action_times_v_rec.thu_duration,
144: l_oks_action_times_v_rec.fri_duration,
145: l_oks_action_times_v_rec.sat_duration,
146: l_oks_action_times_v_rec.security_group_id,
147: l_oks_action_times_v_rec.program_application_id,
148: l_oks_action_times_v_rec.program_id,
149: l_oks_action_times_v_rec.program_update_date,
150: l_oks_action_times_v_rec.request_id,
143: l_oks_action_times_v_rec.thu_duration,
144: l_oks_action_times_v_rec.fri_duration,
145: l_oks_action_times_v_rec.sat_duration,
146: l_oks_action_times_v_rec.security_group_id,
147: l_oks_action_times_v_rec.program_application_id,
148: l_oks_action_times_v_rec.program_id,
149: l_oks_action_times_v_rec.program_update_date,
150: l_oks_action_times_v_rec.request_id,
151: l_oks_action_times_v_rec.created_by,
144: l_oks_action_times_v_rec.fri_duration,
145: l_oks_action_times_v_rec.sat_duration,
146: l_oks_action_times_v_rec.security_group_id,
147: l_oks_action_times_v_rec.program_application_id,
148: l_oks_action_times_v_rec.program_id,
149: l_oks_action_times_v_rec.program_update_date,
150: l_oks_action_times_v_rec.request_id,
151: l_oks_action_times_v_rec.created_by,
152: l_oks_action_times_v_rec.creation_date,
145: l_oks_action_times_v_rec.sat_duration,
146: l_oks_action_times_v_rec.security_group_id,
147: l_oks_action_times_v_rec.program_application_id,
148: l_oks_action_times_v_rec.program_id,
149: l_oks_action_times_v_rec.program_update_date,
150: l_oks_action_times_v_rec.request_id,
151: l_oks_action_times_v_rec.created_by,
152: l_oks_action_times_v_rec.creation_date,
153: l_oks_action_times_v_rec.last_updated_by,
146: l_oks_action_times_v_rec.security_group_id,
147: l_oks_action_times_v_rec.program_application_id,
148: l_oks_action_times_v_rec.program_id,
149: l_oks_action_times_v_rec.program_update_date,
150: l_oks_action_times_v_rec.request_id,
151: l_oks_action_times_v_rec.created_by,
152: l_oks_action_times_v_rec.creation_date,
153: l_oks_action_times_v_rec.last_updated_by,
154: l_oks_action_times_v_rec.last_update_date,
147: l_oks_action_times_v_rec.program_application_id,
148: l_oks_action_times_v_rec.program_id,
149: l_oks_action_times_v_rec.program_update_date,
150: l_oks_action_times_v_rec.request_id,
151: l_oks_action_times_v_rec.created_by,
152: l_oks_action_times_v_rec.creation_date,
153: l_oks_action_times_v_rec.last_updated_by,
154: l_oks_action_times_v_rec.last_update_date,
155: l_oks_action_times_v_rec.last_update_login,
148: l_oks_action_times_v_rec.program_id,
149: l_oks_action_times_v_rec.program_update_date,
150: l_oks_action_times_v_rec.request_id,
151: l_oks_action_times_v_rec.created_by,
152: l_oks_action_times_v_rec.creation_date,
153: l_oks_action_times_v_rec.last_updated_by,
154: l_oks_action_times_v_rec.last_update_date,
155: l_oks_action_times_v_rec.last_update_login,
156: l_oks_action_times_v_rec.object_version_number;
149: l_oks_action_times_v_rec.program_update_date,
150: l_oks_action_times_v_rec.request_id,
151: l_oks_action_times_v_rec.created_by,
152: l_oks_action_times_v_rec.creation_date,
153: l_oks_action_times_v_rec.last_updated_by,
154: l_oks_action_times_v_rec.last_update_date,
155: l_oks_action_times_v_rec.last_update_login,
156: l_oks_action_times_v_rec.object_version_number;
157: x_no_data_found := oks_atv_pk_csr%NOTFOUND;
150: l_oks_action_times_v_rec.request_id,
151: l_oks_action_times_v_rec.created_by,
152: l_oks_action_times_v_rec.creation_date,
153: l_oks_action_times_v_rec.last_updated_by,
154: l_oks_action_times_v_rec.last_update_date,
155: l_oks_action_times_v_rec.last_update_login,
156: l_oks_action_times_v_rec.object_version_number;
157: x_no_data_found := oks_atv_pk_csr%NOTFOUND;
158: CLOSE oks_atv_pk_csr;
151: l_oks_action_times_v_rec.created_by,
152: l_oks_action_times_v_rec.creation_date,
153: l_oks_action_times_v_rec.last_updated_by,
154: l_oks_action_times_v_rec.last_update_date,
155: l_oks_action_times_v_rec.last_update_login,
156: l_oks_action_times_v_rec.object_version_number;
157: x_no_data_found := oks_atv_pk_csr%NOTFOUND;
158: CLOSE oks_atv_pk_csr;
159: RETURN(l_oks_action_times_v_rec);
152: l_oks_action_times_v_rec.creation_date,
153: l_oks_action_times_v_rec.last_updated_by,
154: l_oks_action_times_v_rec.last_update_date,
155: l_oks_action_times_v_rec.last_update_login,
156: l_oks_action_times_v_rec.object_version_number;
157: x_no_data_found := oks_atv_pk_csr%NOTFOUND;
158: CLOSE oks_atv_pk_csr;
159: RETURN(l_oks_action_times_v_rec);
160: END get_rec;
155: l_oks_action_times_v_rec.last_update_login,
156: l_oks_action_times_v_rec.object_version_number;
157: x_no_data_found := oks_atv_pk_csr%NOTFOUND;
158: CLOSE oks_atv_pk_csr;
159: RETURN(l_oks_action_times_v_rec);
160: END get_rec;
161:
162: ------------------------------------------------------------------
163: -- This version of get_rec sets error messages if no data found --
162: ------------------------------------------------------------------
163: -- This version of get_rec sets error messages if no data found --
164: ------------------------------------------------------------------
165: FUNCTION get_rec (
166: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
167: x_return_status OUT NOCOPY VARCHAR2
168: ) RETURN oks_action_times_v_rec_type IS
169: l_oks_action_times_v_rec oks_action_times_v_rec_type;
170: l_row_notfound BOOLEAN := TRUE;
164: ------------------------------------------------------------------
165: FUNCTION get_rec (
166: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
167: x_return_status OUT NOCOPY VARCHAR2
168: ) RETURN oks_action_times_v_rec_type IS
169: l_oks_action_times_v_rec oks_action_times_v_rec_type;
170: l_row_notfound BOOLEAN := TRUE;
171: BEGIN
172: x_return_status := OKC_API.G_RET_STS_SUCCESS;
165: FUNCTION get_rec (
166: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
167: x_return_status OUT NOCOPY VARCHAR2
168: ) RETURN oks_action_times_v_rec_type IS
169: l_oks_action_times_v_rec oks_action_times_v_rec_type;
170: l_row_notfound BOOLEAN := TRUE;
171: BEGIN
172: x_return_status := OKC_API.G_RET_STS_SUCCESS;
173: l_oks_action_times_v_rec := get_rec(p_oks_action_times_v_rec, l_row_notfound);
169: l_oks_action_times_v_rec oks_action_times_v_rec_type;
170: l_row_notfound BOOLEAN := TRUE;
171: BEGIN
172: x_return_status := OKC_API.G_RET_STS_SUCCESS;
173: l_oks_action_times_v_rec := get_rec(p_oks_action_times_v_rec, l_row_notfound);
174: IF (l_row_notfound) THEN
175: OKC_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'ID');
176: x_return_status := OKC_API.G_RET_STS_ERROR;
177: END IF;
174: IF (l_row_notfound) THEN
175: OKC_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'ID');
176: x_return_status := OKC_API.G_RET_STS_ERROR;
177: END IF;
178: RETURN(l_oks_action_times_v_rec);
179: END get_rec;
180: -----------------------------------------------------------
181: -- So we don't have to pass an "l_row_notfound" variable --
182: -----------------------------------------------------------
180: -----------------------------------------------------------
181: -- So we don't have to pass an "l_row_notfound" variable --
182: -----------------------------------------------------------
183: FUNCTION get_rec (
184: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
185: ) RETURN oks_action_times_v_rec_type IS
186: l_row_not_found BOOLEAN := TRUE;
187: BEGIN
188: RETURN(get_rec(p_oks_action_times_v_rec, l_row_not_found));
181: -- So we don't have to pass an "l_row_notfound" variable --
182: -----------------------------------------------------------
183: FUNCTION get_rec (
184: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
185: ) RETURN oks_action_times_v_rec_type IS
186: l_row_not_found BOOLEAN := TRUE;
187: BEGIN
188: RETURN(get_rec(p_oks_action_times_v_rec, l_row_not_found));
189: END get_rec;
184: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
185: ) RETURN oks_action_times_v_rec_type IS
186: l_row_not_found BOOLEAN := TRUE;
187: BEGIN
188: RETURN(get_rec(p_oks_action_times_v_rec, l_row_not_found));
189: END get_rec;
190: ---------------------------------------------------------------------------
191: -- FUNCTION get_rec for: OKS_ACTION_TIMES
192: ---------------------------------------------------------------------------
187: BEGIN
188: RETURN(get_rec(p_oks_action_times_v_rec, l_row_not_found));
189: END get_rec;
190: ---------------------------------------------------------------------------
191: -- FUNCTION get_rec for: OKS_ACTION_TIMES
192: ---------------------------------------------------------------------------
193: FUNCTION get_rec (
194: p_oks_action_times_rec IN oks_action_times_rec_type,
195: x_no_data_found OUT NOCOPY BOOLEAN
190: ---------------------------------------------------------------------------
191: -- FUNCTION get_rec for: OKS_ACTION_TIMES
192: ---------------------------------------------------------------------------
193: FUNCTION get_rec (
194: p_oks_action_times_rec IN oks_action_times_rec_type,
195: x_no_data_found OUT NOCOPY BOOLEAN
196: ) RETURN oks_action_times_rec_type IS
197: CURSOR oks_at_pk_csr (p_id IN NUMBER) IS
198: SELECT
192: ---------------------------------------------------------------------------
193: FUNCTION get_rec (
194: p_oks_action_times_rec IN oks_action_times_rec_type,
195: x_no_data_found OUT NOCOPY BOOLEAN
196: ) RETURN oks_action_times_rec_type IS
197: CURSOR oks_at_pk_csr (p_id IN NUMBER) IS
198: SELECT
199: ID,
200: COV_ACTION_TYPE_ID,
217: LAST_UPDATED_BY,
218: LAST_UPDATE_DATE,
219: LAST_UPDATE_LOGIN,
220: OBJECT_VERSION_NUMBER
221: FROM Oks_Action_Times
222: WHERE oks_action_times.id = p_id;
223: l_oks_at_pk oks_at_pk_csr%ROWTYPE;
224: l_oks_action_times_rec oks_action_times_rec_type;
225: BEGIN
218: LAST_UPDATE_DATE,
219: LAST_UPDATE_LOGIN,
220: OBJECT_VERSION_NUMBER
221: FROM Oks_Action_Times
222: WHERE oks_action_times.id = p_id;
223: l_oks_at_pk oks_at_pk_csr%ROWTYPE;
224: l_oks_action_times_rec oks_action_times_rec_type;
225: BEGIN
226: x_no_data_found := TRUE;
220: OBJECT_VERSION_NUMBER
221: FROM Oks_Action_Times
222: WHERE oks_action_times.id = p_id;
223: l_oks_at_pk oks_at_pk_csr%ROWTYPE;
224: l_oks_action_times_rec oks_action_times_rec_type;
225: BEGIN
226: x_no_data_found := TRUE;
227: -- Get current database values
228: OPEN oks_at_pk_csr (p_oks_action_times_rec.id);
224: l_oks_action_times_rec oks_action_times_rec_type;
225: BEGIN
226: x_no_data_found := TRUE;
227: -- Get current database values
228: OPEN oks_at_pk_csr (p_oks_action_times_rec.id);
229: FETCH oks_at_pk_csr INTO
230: l_oks_action_times_rec.id,
231: l_oks_action_times_rec.cov_action_type_id,
232: l_oks_action_times_rec.cle_id,
226: x_no_data_found := TRUE;
227: -- Get current database values
228: OPEN oks_at_pk_csr (p_oks_action_times_rec.id);
229: FETCH oks_at_pk_csr INTO
230: l_oks_action_times_rec.id,
231: l_oks_action_times_rec.cov_action_type_id,
232: l_oks_action_times_rec.cle_id,
233: l_oks_action_times_rec.dnz_chr_id,
234: l_oks_action_times_rec.uom_code,
227: -- Get current database values
228: OPEN oks_at_pk_csr (p_oks_action_times_rec.id);
229: FETCH oks_at_pk_csr INTO
230: l_oks_action_times_rec.id,
231: l_oks_action_times_rec.cov_action_type_id,
232: l_oks_action_times_rec.cle_id,
233: l_oks_action_times_rec.dnz_chr_id,
234: l_oks_action_times_rec.uom_code,
235: l_oks_action_times_rec.sun_duration,
228: OPEN oks_at_pk_csr (p_oks_action_times_rec.id);
229: FETCH oks_at_pk_csr INTO
230: l_oks_action_times_rec.id,
231: l_oks_action_times_rec.cov_action_type_id,
232: l_oks_action_times_rec.cle_id,
233: l_oks_action_times_rec.dnz_chr_id,
234: l_oks_action_times_rec.uom_code,
235: l_oks_action_times_rec.sun_duration,
236: l_oks_action_times_rec.mon_duration,
229: FETCH oks_at_pk_csr INTO
230: l_oks_action_times_rec.id,
231: l_oks_action_times_rec.cov_action_type_id,
232: l_oks_action_times_rec.cle_id,
233: l_oks_action_times_rec.dnz_chr_id,
234: l_oks_action_times_rec.uom_code,
235: l_oks_action_times_rec.sun_duration,
236: l_oks_action_times_rec.mon_duration,
237: l_oks_action_times_rec.tue_duration,
230: l_oks_action_times_rec.id,
231: l_oks_action_times_rec.cov_action_type_id,
232: l_oks_action_times_rec.cle_id,
233: l_oks_action_times_rec.dnz_chr_id,
234: l_oks_action_times_rec.uom_code,
235: l_oks_action_times_rec.sun_duration,
236: l_oks_action_times_rec.mon_duration,
237: l_oks_action_times_rec.tue_duration,
238: l_oks_action_times_rec.wed_duration,
231: l_oks_action_times_rec.cov_action_type_id,
232: l_oks_action_times_rec.cle_id,
233: l_oks_action_times_rec.dnz_chr_id,
234: l_oks_action_times_rec.uom_code,
235: l_oks_action_times_rec.sun_duration,
236: l_oks_action_times_rec.mon_duration,
237: l_oks_action_times_rec.tue_duration,
238: l_oks_action_times_rec.wed_duration,
239: l_oks_action_times_rec.thu_duration,
232: l_oks_action_times_rec.cle_id,
233: l_oks_action_times_rec.dnz_chr_id,
234: l_oks_action_times_rec.uom_code,
235: l_oks_action_times_rec.sun_duration,
236: l_oks_action_times_rec.mon_duration,
237: l_oks_action_times_rec.tue_duration,
238: l_oks_action_times_rec.wed_duration,
239: l_oks_action_times_rec.thu_duration,
240: l_oks_action_times_rec.fri_duration,
233: l_oks_action_times_rec.dnz_chr_id,
234: l_oks_action_times_rec.uom_code,
235: l_oks_action_times_rec.sun_duration,
236: l_oks_action_times_rec.mon_duration,
237: l_oks_action_times_rec.tue_duration,
238: l_oks_action_times_rec.wed_duration,
239: l_oks_action_times_rec.thu_duration,
240: l_oks_action_times_rec.fri_duration,
241: l_oks_action_times_rec.sat_duration,
234: l_oks_action_times_rec.uom_code,
235: l_oks_action_times_rec.sun_duration,
236: l_oks_action_times_rec.mon_duration,
237: l_oks_action_times_rec.tue_duration,
238: l_oks_action_times_rec.wed_duration,
239: l_oks_action_times_rec.thu_duration,
240: l_oks_action_times_rec.fri_duration,
241: l_oks_action_times_rec.sat_duration,
242: l_oks_action_times_rec.program_application_id,
235: l_oks_action_times_rec.sun_duration,
236: l_oks_action_times_rec.mon_duration,
237: l_oks_action_times_rec.tue_duration,
238: l_oks_action_times_rec.wed_duration,
239: l_oks_action_times_rec.thu_duration,
240: l_oks_action_times_rec.fri_duration,
241: l_oks_action_times_rec.sat_duration,
242: l_oks_action_times_rec.program_application_id,
243: l_oks_action_times_rec.program_id,
236: l_oks_action_times_rec.mon_duration,
237: l_oks_action_times_rec.tue_duration,
238: l_oks_action_times_rec.wed_duration,
239: l_oks_action_times_rec.thu_duration,
240: l_oks_action_times_rec.fri_duration,
241: l_oks_action_times_rec.sat_duration,
242: l_oks_action_times_rec.program_application_id,
243: l_oks_action_times_rec.program_id,
244: l_oks_action_times_rec.program_update_date,
237: l_oks_action_times_rec.tue_duration,
238: l_oks_action_times_rec.wed_duration,
239: l_oks_action_times_rec.thu_duration,
240: l_oks_action_times_rec.fri_duration,
241: l_oks_action_times_rec.sat_duration,
242: l_oks_action_times_rec.program_application_id,
243: l_oks_action_times_rec.program_id,
244: l_oks_action_times_rec.program_update_date,
245: l_oks_action_times_rec.request_id,
238: l_oks_action_times_rec.wed_duration,
239: l_oks_action_times_rec.thu_duration,
240: l_oks_action_times_rec.fri_duration,
241: l_oks_action_times_rec.sat_duration,
242: l_oks_action_times_rec.program_application_id,
243: l_oks_action_times_rec.program_id,
244: l_oks_action_times_rec.program_update_date,
245: l_oks_action_times_rec.request_id,
246: l_oks_action_times_rec.created_by,
239: l_oks_action_times_rec.thu_duration,
240: l_oks_action_times_rec.fri_duration,
241: l_oks_action_times_rec.sat_duration,
242: l_oks_action_times_rec.program_application_id,
243: l_oks_action_times_rec.program_id,
244: l_oks_action_times_rec.program_update_date,
245: l_oks_action_times_rec.request_id,
246: l_oks_action_times_rec.created_by,
247: l_oks_action_times_rec.creation_date,
240: l_oks_action_times_rec.fri_duration,
241: l_oks_action_times_rec.sat_duration,
242: l_oks_action_times_rec.program_application_id,
243: l_oks_action_times_rec.program_id,
244: l_oks_action_times_rec.program_update_date,
245: l_oks_action_times_rec.request_id,
246: l_oks_action_times_rec.created_by,
247: l_oks_action_times_rec.creation_date,
248: l_oks_action_times_rec.last_updated_by,
241: l_oks_action_times_rec.sat_duration,
242: l_oks_action_times_rec.program_application_id,
243: l_oks_action_times_rec.program_id,
244: l_oks_action_times_rec.program_update_date,
245: l_oks_action_times_rec.request_id,
246: l_oks_action_times_rec.created_by,
247: l_oks_action_times_rec.creation_date,
248: l_oks_action_times_rec.last_updated_by,
249: l_oks_action_times_rec.last_update_date,
242: l_oks_action_times_rec.program_application_id,
243: l_oks_action_times_rec.program_id,
244: l_oks_action_times_rec.program_update_date,
245: l_oks_action_times_rec.request_id,
246: l_oks_action_times_rec.created_by,
247: l_oks_action_times_rec.creation_date,
248: l_oks_action_times_rec.last_updated_by,
249: l_oks_action_times_rec.last_update_date,
250: l_oks_action_times_rec.last_update_login,
243: l_oks_action_times_rec.program_id,
244: l_oks_action_times_rec.program_update_date,
245: l_oks_action_times_rec.request_id,
246: l_oks_action_times_rec.created_by,
247: l_oks_action_times_rec.creation_date,
248: l_oks_action_times_rec.last_updated_by,
249: l_oks_action_times_rec.last_update_date,
250: l_oks_action_times_rec.last_update_login,
251: l_oks_action_times_rec.object_version_number;
244: l_oks_action_times_rec.program_update_date,
245: l_oks_action_times_rec.request_id,
246: l_oks_action_times_rec.created_by,
247: l_oks_action_times_rec.creation_date,
248: l_oks_action_times_rec.last_updated_by,
249: l_oks_action_times_rec.last_update_date,
250: l_oks_action_times_rec.last_update_login,
251: l_oks_action_times_rec.object_version_number;
252: x_no_data_found := oks_at_pk_csr%NOTFOUND;
245: l_oks_action_times_rec.request_id,
246: l_oks_action_times_rec.created_by,
247: l_oks_action_times_rec.creation_date,
248: l_oks_action_times_rec.last_updated_by,
249: l_oks_action_times_rec.last_update_date,
250: l_oks_action_times_rec.last_update_login,
251: l_oks_action_times_rec.object_version_number;
252: x_no_data_found := oks_at_pk_csr%NOTFOUND;
253: CLOSE oks_at_pk_csr;
246: l_oks_action_times_rec.created_by,
247: l_oks_action_times_rec.creation_date,
248: l_oks_action_times_rec.last_updated_by,
249: l_oks_action_times_rec.last_update_date,
250: l_oks_action_times_rec.last_update_login,
251: l_oks_action_times_rec.object_version_number;
252: x_no_data_found := oks_at_pk_csr%NOTFOUND;
253: CLOSE oks_at_pk_csr;
254: RETURN(l_oks_action_times_rec);
247: l_oks_action_times_rec.creation_date,
248: l_oks_action_times_rec.last_updated_by,
249: l_oks_action_times_rec.last_update_date,
250: l_oks_action_times_rec.last_update_login,
251: l_oks_action_times_rec.object_version_number;
252: x_no_data_found := oks_at_pk_csr%NOTFOUND;
253: CLOSE oks_at_pk_csr;
254: RETURN(l_oks_action_times_rec);
255: END get_rec;
250: l_oks_action_times_rec.last_update_login,
251: l_oks_action_times_rec.object_version_number;
252: x_no_data_found := oks_at_pk_csr%NOTFOUND;
253: CLOSE oks_at_pk_csr;
254: RETURN(l_oks_action_times_rec);
255: END get_rec;
256:
257: ------------------------------------------------------------------
258: -- This version of get_rec sets error messages if no data found --
257: ------------------------------------------------------------------
258: -- This version of get_rec sets error messages if no data found --
259: ------------------------------------------------------------------
260: FUNCTION get_rec (
261: p_oks_action_times_rec IN oks_action_times_rec_type,
262: x_return_status OUT NOCOPY VARCHAR2
263: ) RETURN oks_action_times_rec_type IS
264: l_oks_action_times_rec oks_action_times_rec_type;
265: l_row_notfound BOOLEAN := TRUE;
259: ------------------------------------------------------------------
260: FUNCTION get_rec (
261: p_oks_action_times_rec IN oks_action_times_rec_type,
262: x_return_status OUT NOCOPY VARCHAR2
263: ) RETURN oks_action_times_rec_type IS
264: l_oks_action_times_rec oks_action_times_rec_type;
265: l_row_notfound BOOLEAN := TRUE;
266: BEGIN
267: x_return_status := OKC_API.G_RET_STS_SUCCESS;
260: FUNCTION get_rec (
261: p_oks_action_times_rec IN oks_action_times_rec_type,
262: x_return_status OUT NOCOPY VARCHAR2
263: ) RETURN oks_action_times_rec_type IS
264: l_oks_action_times_rec oks_action_times_rec_type;
265: l_row_notfound BOOLEAN := TRUE;
266: BEGIN
267: x_return_status := OKC_API.G_RET_STS_SUCCESS;
268: l_oks_action_times_rec := get_rec(p_oks_action_times_rec, l_row_notfound);
264: l_oks_action_times_rec oks_action_times_rec_type;
265: l_row_notfound BOOLEAN := TRUE;
266: BEGIN
267: x_return_status := OKC_API.G_RET_STS_SUCCESS;
268: l_oks_action_times_rec := get_rec(p_oks_action_times_rec, l_row_notfound);
269: IF (l_row_notfound) THEN
270: OKC_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'ID');
271: x_return_status := OKC_API.G_RET_STS_ERROR;
272: END IF;
269: IF (l_row_notfound) THEN
270: OKC_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'ID');
271: x_return_status := OKC_API.G_RET_STS_ERROR;
272: END IF;
273: RETURN(l_oks_action_times_rec);
274: END get_rec;
275: -----------------------------------------------------------
276: -- So we don't have to pass an "l_row_notfound" variable --
277: -----------------------------------------------------------
275: -----------------------------------------------------------
276: -- So we don't have to pass an "l_row_notfound" variable --
277: -----------------------------------------------------------
278: FUNCTION get_rec (
279: p_oks_action_times_rec IN oks_action_times_rec_type
280: ) RETURN oks_action_times_rec_type IS
281: l_row_not_found BOOLEAN := TRUE;
282: BEGIN
283: RETURN(get_rec(p_oks_action_times_rec, l_row_not_found));
276: -- So we don't have to pass an "l_row_notfound" variable --
277: -----------------------------------------------------------
278: FUNCTION get_rec (
279: p_oks_action_times_rec IN oks_action_times_rec_type
280: ) RETURN oks_action_times_rec_type IS
281: l_row_not_found BOOLEAN := TRUE;
282: BEGIN
283: RETURN(get_rec(p_oks_action_times_rec, l_row_not_found));
284: END get_rec;
279: p_oks_action_times_rec IN oks_action_times_rec_type
280: ) RETURN oks_action_times_rec_type IS
281: l_row_not_found BOOLEAN := TRUE;
282: BEGIN
283: RETURN(get_rec(p_oks_action_times_rec, l_row_not_found));
284: END get_rec;
285: ---------------------------------------------------------------------------
286: -- FUNCTION null_out_defaults for: OKS_ACTION_TIMES_V
287: ---------------------------------------------------------------------------
282: BEGIN
283: RETURN(get_rec(p_oks_action_times_rec, l_row_not_found));
284: END get_rec;
285: ---------------------------------------------------------------------------
286: -- FUNCTION null_out_defaults for: OKS_ACTION_TIMES_V
287: ---------------------------------------------------------------------------
288: FUNCTION null_out_defaults (
289: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
290: ) RETURN oks_action_times_v_rec_type IS
285: ---------------------------------------------------------------------------
286: -- FUNCTION null_out_defaults for: OKS_ACTION_TIMES_V
287: ---------------------------------------------------------------------------
288: FUNCTION null_out_defaults (
289: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
290: ) RETURN oks_action_times_v_rec_type IS
291: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
292: BEGIN
293: IF (l_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM ) THEN
286: -- FUNCTION null_out_defaults for: OKS_ACTION_TIMES_V
287: ---------------------------------------------------------------------------
288: FUNCTION null_out_defaults (
289: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
290: ) RETURN oks_action_times_v_rec_type IS
291: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
292: BEGIN
293: IF (l_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM ) THEN
294: l_oks_action_times_v_rec.id := NULL;
287: ---------------------------------------------------------------------------
288: FUNCTION null_out_defaults (
289: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
290: ) RETURN oks_action_times_v_rec_type IS
291: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
292: BEGIN
293: IF (l_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM ) THEN
294: l_oks_action_times_v_rec.id := NULL;
295: END IF;
289: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
290: ) RETURN oks_action_times_v_rec_type IS
291: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
292: BEGIN
293: IF (l_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM ) THEN
294: l_oks_action_times_v_rec.id := NULL;
295: END IF;
296: IF (l_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM ) THEN
297: l_oks_action_times_v_rec.cov_action_type_id := NULL;
290: ) RETURN oks_action_times_v_rec_type IS
291: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
292: BEGIN
293: IF (l_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM ) THEN
294: l_oks_action_times_v_rec.id := NULL;
295: END IF;
296: IF (l_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM ) THEN
297: l_oks_action_times_v_rec.cov_action_type_id := NULL;
298: END IF;
292: BEGIN
293: IF (l_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM ) THEN
294: l_oks_action_times_v_rec.id := NULL;
295: END IF;
296: IF (l_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM ) THEN
297: l_oks_action_times_v_rec.cov_action_type_id := NULL;
298: END IF;
299: IF (l_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM ) THEN
300: l_oks_action_times_v_rec.cle_id := NULL;
293: IF (l_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM ) THEN
294: l_oks_action_times_v_rec.id := NULL;
295: END IF;
296: IF (l_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM ) THEN
297: l_oks_action_times_v_rec.cov_action_type_id := NULL;
298: END IF;
299: IF (l_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM ) THEN
300: l_oks_action_times_v_rec.cle_id := NULL;
301: END IF;
295: END IF;
296: IF (l_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM ) THEN
297: l_oks_action_times_v_rec.cov_action_type_id := NULL;
298: END IF;
299: IF (l_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM ) THEN
300: l_oks_action_times_v_rec.cle_id := NULL;
301: END IF;
302: IF (l_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM ) THEN
303: l_oks_action_times_v_rec.dnz_chr_id := NULL;
296: IF (l_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM ) THEN
297: l_oks_action_times_v_rec.cov_action_type_id := NULL;
298: END IF;
299: IF (l_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM ) THEN
300: l_oks_action_times_v_rec.cle_id := NULL;
301: END IF;
302: IF (l_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM ) THEN
303: l_oks_action_times_v_rec.dnz_chr_id := NULL;
304: END IF;
298: END IF;
299: IF (l_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM ) THEN
300: l_oks_action_times_v_rec.cle_id := NULL;
301: END IF;
302: IF (l_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM ) THEN
303: l_oks_action_times_v_rec.dnz_chr_id := NULL;
304: END IF;
305: IF (l_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR ) THEN
306: l_oks_action_times_v_rec.uom_code := NULL;
299: IF (l_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM ) THEN
300: l_oks_action_times_v_rec.cle_id := NULL;
301: END IF;
302: IF (l_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM ) THEN
303: l_oks_action_times_v_rec.dnz_chr_id := NULL;
304: END IF;
305: IF (l_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR ) THEN
306: l_oks_action_times_v_rec.uom_code := NULL;
307: END IF;
301: END IF;
302: IF (l_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM ) THEN
303: l_oks_action_times_v_rec.dnz_chr_id := NULL;
304: END IF;
305: IF (l_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR ) THEN
306: l_oks_action_times_v_rec.uom_code := NULL;
307: END IF;
308: IF (l_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM ) THEN
309: l_oks_action_times_v_rec.sun_duration := NULL;
302: IF (l_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM ) THEN
303: l_oks_action_times_v_rec.dnz_chr_id := NULL;
304: END IF;
305: IF (l_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR ) THEN
306: l_oks_action_times_v_rec.uom_code := NULL;
307: END IF;
308: IF (l_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM ) THEN
309: l_oks_action_times_v_rec.sun_duration := NULL;
310: END IF;
304: END IF;
305: IF (l_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR ) THEN
306: l_oks_action_times_v_rec.uom_code := NULL;
307: END IF;
308: IF (l_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM ) THEN
309: l_oks_action_times_v_rec.sun_duration := NULL;
310: END IF;
311: IF (l_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM ) THEN
312: l_oks_action_times_v_rec.mon_duration := NULL;
305: IF (l_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR ) THEN
306: l_oks_action_times_v_rec.uom_code := NULL;
307: END IF;
308: IF (l_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM ) THEN
309: l_oks_action_times_v_rec.sun_duration := NULL;
310: END IF;
311: IF (l_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM ) THEN
312: l_oks_action_times_v_rec.mon_duration := NULL;
313: END IF;
307: END IF;
308: IF (l_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM ) THEN
309: l_oks_action_times_v_rec.sun_duration := NULL;
310: END IF;
311: IF (l_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM ) THEN
312: l_oks_action_times_v_rec.mon_duration := NULL;
313: END IF;
314: IF (l_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM ) THEN
315: l_oks_action_times_v_rec.tue_duration := NULL;
308: IF (l_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM ) THEN
309: l_oks_action_times_v_rec.sun_duration := NULL;
310: END IF;
311: IF (l_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM ) THEN
312: l_oks_action_times_v_rec.mon_duration := NULL;
313: END IF;
314: IF (l_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM ) THEN
315: l_oks_action_times_v_rec.tue_duration := NULL;
316: END IF;
310: END IF;
311: IF (l_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM ) THEN
312: l_oks_action_times_v_rec.mon_duration := NULL;
313: END IF;
314: IF (l_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM ) THEN
315: l_oks_action_times_v_rec.tue_duration := NULL;
316: END IF;
317: IF (l_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM ) THEN
318: l_oks_action_times_v_rec.wed_duration := NULL;
311: IF (l_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM ) THEN
312: l_oks_action_times_v_rec.mon_duration := NULL;
313: END IF;
314: IF (l_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM ) THEN
315: l_oks_action_times_v_rec.tue_duration := NULL;
316: END IF;
317: IF (l_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM ) THEN
318: l_oks_action_times_v_rec.wed_duration := NULL;
319: END IF;
313: END IF;
314: IF (l_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM ) THEN
315: l_oks_action_times_v_rec.tue_duration := NULL;
316: END IF;
317: IF (l_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM ) THEN
318: l_oks_action_times_v_rec.wed_duration := NULL;
319: END IF;
320: IF (l_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM ) THEN
321: l_oks_action_times_v_rec.thu_duration := NULL;
314: IF (l_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM ) THEN
315: l_oks_action_times_v_rec.tue_duration := NULL;
316: END IF;
317: IF (l_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM ) THEN
318: l_oks_action_times_v_rec.wed_duration := NULL;
319: END IF;
320: IF (l_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM ) THEN
321: l_oks_action_times_v_rec.thu_duration := NULL;
322: END IF;
316: END IF;
317: IF (l_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM ) THEN
318: l_oks_action_times_v_rec.wed_duration := NULL;
319: END IF;
320: IF (l_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM ) THEN
321: l_oks_action_times_v_rec.thu_duration := NULL;
322: END IF;
323: IF (l_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM ) THEN
324: l_oks_action_times_v_rec.fri_duration := NULL;
317: IF (l_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM ) THEN
318: l_oks_action_times_v_rec.wed_duration := NULL;
319: END IF;
320: IF (l_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM ) THEN
321: l_oks_action_times_v_rec.thu_duration := NULL;
322: END IF;
323: IF (l_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM ) THEN
324: l_oks_action_times_v_rec.fri_duration := NULL;
325: END IF;
319: END IF;
320: IF (l_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM ) THEN
321: l_oks_action_times_v_rec.thu_duration := NULL;
322: END IF;
323: IF (l_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM ) THEN
324: l_oks_action_times_v_rec.fri_duration := NULL;
325: END IF;
326: IF (l_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM ) THEN
327: l_oks_action_times_v_rec.sat_duration := NULL;
320: IF (l_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM ) THEN
321: l_oks_action_times_v_rec.thu_duration := NULL;
322: END IF;
323: IF (l_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM ) THEN
324: l_oks_action_times_v_rec.fri_duration := NULL;
325: END IF;
326: IF (l_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM ) THEN
327: l_oks_action_times_v_rec.sat_duration := NULL;
328: END IF;
322: END IF;
323: IF (l_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM ) THEN
324: l_oks_action_times_v_rec.fri_duration := NULL;
325: END IF;
326: IF (l_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM ) THEN
327: l_oks_action_times_v_rec.sat_duration := NULL;
328: END IF;
329: IF (l_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM ) THEN
330: l_oks_action_times_v_rec.security_group_id := NULL;
323: IF (l_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM ) THEN
324: l_oks_action_times_v_rec.fri_duration := NULL;
325: END IF;
326: IF (l_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM ) THEN
327: l_oks_action_times_v_rec.sat_duration := NULL;
328: END IF;
329: IF (l_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM ) THEN
330: l_oks_action_times_v_rec.security_group_id := NULL;
331: END IF;
325: END IF;
326: IF (l_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM ) THEN
327: l_oks_action_times_v_rec.sat_duration := NULL;
328: END IF;
329: IF (l_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM ) THEN
330: l_oks_action_times_v_rec.security_group_id := NULL;
331: END IF;
332: IF (l_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM ) THEN
333: l_oks_action_times_v_rec.program_application_id := NULL;
326: IF (l_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM ) THEN
327: l_oks_action_times_v_rec.sat_duration := NULL;
328: END IF;
329: IF (l_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM ) THEN
330: l_oks_action_times_v_rec.security_group_id := NULL;
331: END IF;
332: IF (l_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM ) THEN
333: l_oks_action_times_v_rec.program_application_id := NULL;
334: END IF;
328: END IF;
329: IF (l_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM ) THEN
330: l_oks_action_times_v_rec.security_group_id := NULL;
331: END IF;
332: IF (l_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM ) THEN
333: l_oks_action_times_v_rec.program_application_id := NULL;
334: END IF;
335: IF (l_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM ) THEN
336: l_oks_action_times_v_rec.program_id := NULL;
329: IF (l_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM ) THEN
330: l_oks_action_times_v_rec.security_group_id := NULL;
331: END IF;
332: IF (l_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM ) THEN
333: l_oks_action_times_v_rec.program_application_id := NULL;
334: END IF;
335: IF (l_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM ) THEN
336: l_oks_action_times_v_rec.program_id := NULL;
337: END IF;
331: END IF;
332: IF (l_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM ) THEN
333: l_oks_action_times_v_rec.program_application_id := NULL;
334: END IF;
335: IF (l_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM ) THEN
336: l_oks_action_times_v_rec.program_id := NULL;
337: END IF;
338: IF (l_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE ) THEN
339: l_oks_action_times_v_rec.program_update_date := NULL;
332: IF (l_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM ) THEN
333: l_oks_action_times_v_rec.program_application_id := NULL;
334: END IF;
335: IF (l_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM ) THEN
336: l_oks_action_times_v_rec.program_id := NULL;
337: END IF;
338: IF (l_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE ) THEN
339: l_oks_action_times_v_rec.program_update_date := NULL;
340: END IF;
334: END IF;
335: IF (l_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM ) THEN
336: l_oks_action_times_v_rec.program_id := NULL;
337: END IF;
338: IF (l_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE ) THEN
339: l_oks_action_times_v_rec.program_update_date := NULL;
340: END IF;
341: IF (l_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM ) THEN
342: l_oks_action_times_v_rec.request_id := NULL;
335: IF (l_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM ) THEN
336: l_oks_action_times_v_rec.program_id := NULL;
337: END IF;
338: IF (l_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE ) THEN
339: l_oks_action_times_v_rec.program_update_date := NULL;
340: END IF;
341: IF (l_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM ) THEN
342: l_oks_action_times_v_rec.request_id := NULL;
343: END IF;
337: END IF;
338: IF (l_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE ) THEN
339: l_oks_action_times_v_rec.program_update_date := NULL;
340: END IF;
341: IF (l_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM ) THEN
342: l_oks_action_times_v_rec.request_id := NULL;
343: END IF;
344: IF (l_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM ) THEN
345: l_oks_action_times_v_rec.created_by := NULL;
338: IF (l_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE ) THEN
339: l_oks_action_times_v_rec.program_update_date := NULL;
340: END IF;
341: IF (l_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM ) THEN
342: l_oks_action_times_v_rec.request_id := NULL;
343: END IF;
344: IF (l_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM ) THEN
345: l_oks_action_times_v_rec.created_by := NULL;
346: END IF;
340: END IF;
341: IF (l_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM ) THEN
342: l_oks_action_times_v_rec.request_id := NULL;
343: END IF;
344: IF (l_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM ) THEN
345: l_oks_action_times_v_rec.created_by := NULL;
346: END IF;
347: IF (l_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE ) THEN
348: l_oks_action_times_v_rec.creation_date := NULL;
341: IF (l_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM ) THEN
342: l_oks_action_times_v_rec.request_id := NULL;
343: END IF;
344: IF (l_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM ) THEN
345: l_oks_action_times_v_rec.created_by := NULL;
346: END IF;
347: IF (l_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE ) THEN
348: l_oks_action_times_v_rec.creation_date := NULL;
349: END IF;
343: END IF;
344: IF (l_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM ) THEN
345: l_oks_action_times_v_rec.created_by := NULL;
346: END IF;
347: IF (l_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE ) THEN
348: l_oks_action_times_v_rec.creation_date := NULL;
349: END IF;
350: IF (l_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM ) THEN
351: l_oks_action_times_v_rec.last_updated_by := NULL;
344: IF (l_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM ) THEN
345: l_oks_action_times_v_rec.created_by := NULL;
346: END IF;
347: IF (l_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE ) THEN
348: l_oks_action_times_v_rec.creation_date := NULL;
349: END IF;
350: IF (l_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM ) THEN
351: l_oks_action_times_v_rec.last_updated_by := NULL;
352: END IF;
346: END IF;
347: IF (l_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE ) THEN
348: l_oks_action_times_v_rec.creation_date := NULL;
349: END IF;
350: IF (l_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM ) THEN
351: l_oks_action_times_v_rec.last_updated_by := NULL;
352: END IF;
353: IF (l_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE ) THEN
354: l_oks_action_times_v_rec.last_update_date := NULL;
347: IF (l_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE ) THEN
348: l_oks_action_times_v_rec.creation_date := NULL;
349: END IF;
350: IF (l_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM ) THEN
351: l_oks_action_times_v_rec.last_updated_by := NULL;
352: END IF;
353: IF (l_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE ) THEN
354: l_oks_action_times_v_rec.last_update_date := NULL;
355: END IF;
349: END IF;
350: IF (l_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM ) THEN
351: l_oks_action_times_v_rec.last_updated_by := NULL;
352: END IF;
353: IF (l_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE ) THEN
354: l_oks_action_times_v_rec.last_update_date := NULL;
355: END IF;
356: IF (l_oks_action_times_v_rec.last_update_login = OKC_API.G_MISS_NUM ) THEN
357: l_oks_action_times_v_rec.last_update_login := NULL;
350: IF (l_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM ) THEN
351: l_oks_action_times_v_rec.last_updated_by := NULL;
352: END IF;
353: IF (l_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE ) THEN
354: l_oks_action_times_v_rec.last_update_date := NULL;
355: END IF;
356: IF (l_oks_action_times_v_rec.last_update_login = OKC_API.G_MISS_NUM ) THEN
357: l_oks_action_times_v_rec.last_update_login := NULL;
358: END IF;
352: END IF;
353: IF (l_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE ) THEN
354: l_oks_action_times_v_rec.last_update_date := NULL;
355: END IF;
356: IF (l_oks_action_times_v_rec.last_update_login = OKC_API.G_MISS_NUM ) THEN
357: l_oks_action_times_v_rec.last_update_login := NULL;
358: END IF;
359: IF (l_oks_action_times_v_rec.object_version_number = OKC_API.G_MISS_NUM ) THEN
360: l_oks_action_times_v_rec.object_version_number := NULL;
353: IF (l_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE ) THEN
354: l_oks_action_times_v_rec.last_update_date := NULL;
355: END IF;
356: IF (l_oks_action_times_v_rec.last_update_login = OKC_API.G_MISS_NUM ) THEN
357: l_oks_action_times_v_rec.last_update_login := NULL;
358: END IF;
359: IF (l_oks_action_times_v_rec.object_version_number = OKC_API.G_MISS_NUM ) THEN
360: l_oks_action_times_v_rec.object_version_number := NULL;
361: END IF;
355: END IF;
356: IF (l_oks_action_times_v_rec.last_update_login = OKC_API.G_MISS_NUM ) THEN
357: l_oks_action_times_v_rec.last_update_login := NULL;
358: END IF;
359: IF (l_oks_action_times_v_rec.object_version_number = OKC_API.G_MISS_NUM ) THEN
360: l_oks_action_times_v_rec.object_version_number := NULL;
361: END IF;
362: RETURN(l_oks_action_times_v_rec);
363: END null_out_defaults;
356: IF (l_oks_action_times_v_rec.last_update_login = OKC_API.G_MISS_NUM ) THEN
357: l_oks_action_times_v_rec.last_update_login := NULL;
358: END IF;
359: IF (l_oks_action_times_v_rec.object_version_number = OKC_API.G_MISS_NUM ) THEN
360: l_oks_action_times_v_rec.object_version_number := NULL;
361: END IF;
362: RETURN(l_oks_action_times_v_rec);
363: END null_out_defaults;
364: ---------------------------------
358: END IF;
359: IF (l_oks_action_times_v_rec.object_version_number = OKC_API.G_MISS_NUM ) THEN
360: l_oks_action_times_v_rec.object_version_number := NULL;
361: END IF;
362: RETURN(l_oks_action_times_v_rec);
363: END null_out_defaults;
364: ---------------------------------
365: -- Validate_Attributes for: ID --
366: ---------------------------------
418: ---------------------------------------------------------------------------
419: -- FUNCTION Validate_Attributes
420: ---------------------------------------------------------------------------
421: ------------------------------------------------
422: -- Validate_Attributes for:OKS_ACTION_TIMES_V --
423: ------------------------------------------------
424: FUNCTION Validate_Attributes (
425: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
426: ) RETURN VARCHAR2 IS
421: ------------------------------------------------
422: -- Validate_Attributes for:OKS_ACTION_TIMES_V --
423: ------------------------------------------------
424: FUNCTION Validate_Attributes (
425: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
426: ) RETURN VARCHAR2 IS
427: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
428: x_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
429: BEGIN
432: -----------------------------
433: -- ***
434: -- id
435: -- ***
436: validate_id(x_return_status, p_oks_action_times_v_rec.id);
437: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
438: l_return_status := x_return_status;
439: RAISE G_EXCEPTION_HALT_VALIDATION;
440: END IF;
441:
442: -- ***
443: -- object_version_number
444: -- ***
445: validate_object_version_number(x_return_status, p_oks_action_times_v_rec.object_version_number);
446: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
447: l_return_status := x_return_status;
448: RAISE G_EXCEPTION_HALT_VALIDATION;
449: END IF;
465: ---------------------------------------------------------------------------
466: -- PROCEDURE Validate_Record
467: ---------------------------------------------------------------------------
468: --------------------------------------------
469: -- Validate Record for:OKS_ACTION_TIMES_V --
470: --------------------------------------------
471: FUNCTION Validate_Record (
472: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
473: p_db_oks_action_times_v_rec IN oks_action_times_v_rec_type
468: --------------------------------------------
469: -- Validate Record for:OKS_ACTION_TIMES_V --
470: --------------------------------------------
471: FUNCTION Validate_Record (
472: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
473: p_db_oks_action_times_v_rec IN oks_action_times_v_rec_type
474: ) RETURN VARCHAR2 IS
475: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
476: BEGIN
469: -- Validate Record for:OKS_ACTION_TIMES_V --
470: --------------------------------------------
471: FUNCTION Validate_Record (
472: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
473: p_db_oks_action_times_v_rec IN oks_action_times_v_rec_type
474: ) RETURN VARCHAR2 IS
475: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
476: BEGIN
477: RETURN (l_return_status);
476: BEGIN
477: RETURN (l_return_status);
478: END Validate_Record;
479: FUNCTION Validate_Record (
480: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
481: ) RETURN VARCHAR2 IS
482: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
483: l_db_oks_action_times_v_rec oks_action_times_v_rec_type := get_rec(p_oks_action_times_v_rec);
484: BEGIN
479: FUNCTION Validate_Record (
480: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
481: ) RETURN VARCHAR2 IS
482: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
483: l_db_oks_action_times_v_rec oks_action_times_v_rec_type := get_rec(p_oks_action_times_v_rec);
484: BEGIN
485: l_return_status := Validate_Record(p_oks_action_times_v_rec => p_oks_action_times_v_rec,
486: p_db_oks_action_times_v_rec => l_db_oks_action_times_v_rec);
487: RETURN (l_return_status);
481: ) RETURN VARCHAR2 IS
482: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
483: l_db_oks_action_times_v_rec oks_action_times_v_rec_type := get_rec(p_oks_action_times_v_rec);
484: BEGIN
485: l_return_status := Validate_Record(p_oks_action_times_v_rec => p_oks_action_times_v_rec,
486: p_db_oks_action_times_v_rec => l_db_oks_action_times_v_rec);
487: RETURN (l_return_status);
488: END Validate_Record;
489:
482: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
483: l_db_oks_action_times_v_rec oks_action_times_v_rec_type := get_rec(p_oks_action_times_v_rec);
484: BEGIN
485: l_return_status := Validate_Record(p_oks_action_times_v_rec => p_oks_action_times_v_rec,
486: p_db_oks_action_times_v_rec => l_db_oks_action_times_v_rec);
487: RETURN (l_return_status);
488: END Validate_Record;
489:
490: ---------------------------------------------------------------------------
490: ---------------------------------------------------------------------------
491: -- PROCEDURE Migrate
492: ---------------------------------------------------------------------------
493: PROCEDURE migrate (
494: p_from IN oks_action_times_v_rec_type,
495: p_to IN OUT NOCOPY oks_action_times_rec_type
496: ) IS
497: BEGIN
498: p_to.id := p_from.id;
491: -- PROCEDURE Migrate
492: ---------------------------------------------------------------------------
493: PROCEDURE migrate (
494: p_from IN oks_action_times_v_rec_type,
495: p_to IN OUT NOCOPY oks_action_times_rec_type
496: ) IS
497: BEGIN
498: p_to.id := p_from.id;
499: p_to.cov_action_type_id := p_from.cov_action_type_id;
518: p_to.last_update_login := p_from.last_update_login;
519: p_to.object_version_number := p_from.object_version_number;
520: END migrate;
521: PROCEDURE migrate (
522: p_from IN oks_action_times_rec_type,
523: p_to IN OUT NOCOPY oks_action_times_v_rec_type
524: ) IS
525: BEGIN
526: p_to.id := p_from.id;
519: p_to.object_version_number := p_from.object_version_number;
520: END migrate;
521: PROCEDURE migrate (
522: p_from IN oks_action_times_rec_type,
523: p_to IN OUT NOCOPY oks_action_times_v_rec_type
524: ) IS
525: BEGIN
526: p_to.id := p_from.id;
527: p_to.cov_action_type_id := p_from.cov_action_type_id;
549: ---------------------------------------------------------------------------
550: -- PROCEDURE validate_row
551: ---------------------------------------------------------------------------
552: -----------------------------------------
553: -- validate_row for:OKS_ACTION_TIMES_V --
554: -----------------------------------------
555: PROCEDURE validate_row(
556: p_api_version IN NUMBER,
557: p_init_msg_list IN VARCHAR2,
557: p_init_msg_list IN VARCHAR2,
558: x_return_status OUT NOCOPY VARCHAR2,
559: x_msg_count OUT NOCOPY NUMBER,
560: x_msg_data OUT NOCOPY VARCHAR2,
561: p_oks_action_times_v_rec IN oks_action_times_v_rec_type) IS
562:
563: l_api_version CONSTANT NUMBER := 1;
564: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_row';
565: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
562:
563: l_api_version CONSTANT NUMBER := 1;
564: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_row';
565: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
566: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
567: l_oks_action_times_rec oks_action_times_rec_type;
568: l_oks_action_times_rec oks_action_times_rec_type;
569: BEGIN
570: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
563: l_api_version CONSTANT NUMBER := 1;
564: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_row';
565: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
566: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
567: l_oks_action_times_rec oks_action_times_rec_type;
568: l_oks_action_times_rec oks_action_times_rec_type;
569: BEGIN
570: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
571: G_PKG_NAME,
564: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_row';
565: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
566: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
567: l_oks_action_times_rec oks_action_times_rec_type;
568: l_oks_action_times_rec oks_action_times_rec_type;
569: BEGIN
570: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
571: G_PKG_NAME,
572: p_init_msg_list,
579: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
580: RAISE OKC_API.G_EXCEPTION_ERROR;
581: END IF;
582: --- Validate all non-missing attributes (Item Level Validation)
583: l_return_status := Validate_Attributes(l_oks_action_times_v_rec);
584: --- If any errors happen abort API
585: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
586: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
587: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
586: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
587: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
588: RAISE OKC_API.G_EXCEPTION_ERROR;
589: END IF;
590: l_return_status := Validate_Record(l_oks_action_times_v_rec);
591: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
592: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
593: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
594: RAISE OKC_API.G_EXCEPTION_ERROR;
626: '_PVT'
627: );
628: END validate_row;
629: ----------------------------------------------------
630: -- PL/SQL TBL validate_row for:OKS_ACTION_TIMES_V --
631: ----------------------------------------------------
632: PROCEDURE validate_row(
633: p_api_version IN NUMBER,
634: p_init_msg_list IN VARCHAR2,
634: p_init_msg_list IN VARCHAR2,
635: x_return_status OUT NOCOPY VARCHAR2,
636: x_msg_count OUT NOCOPY NUMBER,
637: x_msg_data OUT NOCOPY VARCHAR2,
638: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
639: px_error_tbl IN OUT NOCOPY OKC_API.ERROR_TBL_TYPE) IS
640:
641: l_api_version CONSTANT NUMBER := 1;
642: l_api_name CONSTANT VARCHAR2(30) := 'V_error_tbl_validate_row';
643: i NUMBER := 0;
644: BEGIN
645: OKC_API.init_msg_list(p_init_msg_list);
646: -- Make sure PL/SQL table has records in it before passing
647: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
648: i := p_oks_action_times_v_tbl.FIRST;
649: LOOP
650: DECLARE
651: l_error_rec OKC_API.ERROR_REC_TYPE;
644: BEGIN
645: OKC_API.init_msg_list(p_init_msg_list);
646: -- Make sure PL/SQL table has records in it before passing
647: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
648: i := p_oks_action_times_v_tbl.FIRST;
649: LOOP
650: DECLARE
651: l_error_rec OKC_API.ERROR_REC_TYPE;
652: BEGIN
658: p_init_msg_list => OKC_API.G_FALSE,
659: x_return_status => l_error_rec.error_type,
660: x_msg_count => l_error_rec.msg_count,
661: x_msg_data => l_error_rec.msg_data,
662: p_oks_action_times_v_rec => p_oks_action_times_v_tbl(i));
663: IF (l_error_rec.error_type <> OKC_API.G_RET_STS_SUCCESS) THEN
664: l_error_rec.sqlcode := SQLCODE;
665: load_error_tbl(l_error_rec, px_error_tbl);
666: ELSE
680: l_error_rec.error_type := 'OTHERS';
681: l_error_rec.sqlcode := SQLCODE;
682: load_error_tbl(l_error_rec, px_error_tbl);
683: END;
684: EXIT WHEN (i = p_oks_action_times_v_tbl.LAST);
685: i := p_oks_action_times_v_tbl.NEXT(i);
686: END LOOP;
687: END IF;
688: -- Loop through the error_tbl to find the error with the highest severity
681: l_error_rec.sqlcode := SQLCODE;
682: load_error_tbl(l_error_rec, px_error_tbl);
683: END;
684: EXIT WHEN (i = p_oks_action_times_v_tbl.LAST);
685: i := p_oks_action_times_v_tbl.NEXT(i);
686: END LOOP;
687: END IF;
688: -- Loop through the error_tbl to find the error with the highest severity
689: -- and return it.
722: );
723: END validate_row;
724:
725: ----------------------------------------------------
726: -- PL/SQL TBL validate_row for:OKS_ACTION_TIMES_V --
727: ----------------------------------------------------
728: PROCEDURE validate_row(
729: p_api_version IN NUMBER,
730: p_init_msg_list IN VARCHAR2,
730: p_init_msg_list IN VARCHAR2,
731: x_return_status OUT NOCOPY VARCHAR2,
732: x_msg_count OUT NOCOPY NUMBER,
733: x_msg_data OUT NOCOPY VARCHAR2,
734: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type) IS
735:
736: l_api_version CONSTANT NUMBER := 1;
737: l_api_name CONSTANT VARCHAR2(30) := 'V_tbl_validate_row';
738: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
739: l_error_tbl OKC_API.ERROR_TBL_TYPE;
740: BEGIN
741: OKC_API.init_msg_list(p_init_msg_list);
742: -- Make sure PL/SQL table has records in it before passing
743: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
744: validate_row (
745: p_api_version => p_api_version,
746: p_init_msg_list => OKC_API.G_FALSE,
747: x_return_status => x_return_status,
746: p_init_msg_list => OKC_API.G_FALSE,
747: x_return_status => x_return_status,
748: x_msg_count => x_msg_count,
749: x_msg_data => x_msg_data,
750: p_oks_action_times_v_tbl => p_oks_action_times_v_tbl,
751: px_error_tbl => l_error_tbl);
752: END IF;
753: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
754: EXCEPTION
787: ---------------------------------------------------------------------------
788: -- PROCEDURE insert_row
789: ---------------------------------------------------------------------------
790: -------------------------------------
791: -- insert_row for:OKS_ACTION_TIMES --
792: -------------------------------------
793: PROCEDURE insert_row(
794: p_init_msg_list IN VARCHAR2,
795: x_return_status OUT NOCOPY VARCHAR2,
794: p_init_msg_list IN VARCHAR2,
795: x_return_status OUT NOCOPY VARCHAR2,
796: x_msg_count OUT NOCOPY NUMBER,
797: x_msg_data OUT NOCOPY VARCHAR2,
798: p_oks_action_times_rec IN oks_action_times_rec_type,
799: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type) IS
800:
801: l_api_version CONSTANT NUMBER := 1;
802: l_api_name CONSTANT VARCHAR2(30) := 'B_insert_row';
795: x_return_status OUT NOCOPY VARCHAR2,
796: x_msg_count OUT NOCOPY NUMBER,
797: x_msg_data OUT NOCOPY VARCHAR2,
798: p_oks_action_times_rec IN oks_action_times_rec_type,
799: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type) IS
800:
801: l_api_version CONSTANT NUMBER := 1;
802: l_api_name CONSTANT VARCHAR2(30) := 'B_insert_row';
803: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
800:
801: l_api_version CONSTANT NUMBER := 1;
802: l_api_name CONSTANT VARCHAR2(30) := 'B_insert_row';
803: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
804: l_oks_action_times_rec oks_action_times_rec_type := p_oks_action_times_rec;
805: l_def_oks_action_times_rec oks_action_times_rec_type;
806: -----------------------------------------
807: -- Set_Attributes for:OKS_ACTION_TIMES --
808: -----------------------------------------
801: l_api_version CONSTANT NUMBER := 1;
802: l_api_name CONSTANT VARCHAR2(30) := 'B_insert_row';
803: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
804: l_oks_action_times_rec oks_action_times_rec_type := p_oks_action_times_rec;
805: l_def_oks_action_times_rec oks_action_times_rec_type;
806: -----------------------------------------
807: -- Set_Attributes for:OKS_ACTION_TIMES --
808: -----------------------------------------
809: FUNCTION Set_Attributes (
803: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
804: l_oks_action_times_rec oks_action_times_rec_type := p_oks_action_times_rec;
805: l_def_oks_action_times_rec oks_action_times_rec_type;
806: -----------------------------------------
807: -- Set_Attributes for:OKS_ACTION_TIMES --
808: -----------------------------------------
809: FUNCTION Set_Attributes (
810: p_oks_action_times_rec IN oks_action_times_rec_type,
811: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
806: -----------------------------------------
807: -- Set_Attributes for:OKS_ACTION_TIMES --
808: -----------------------------------------
809: FUNCTION Set_Attributes (
810: p_oks_action_times_rec IN oks_action_times_rec_type,
811: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
812: ) RETURN VARCHAR2 IS
813: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
814: BEGIN
807: -- Set_Attributes for:OKS_ACTION_TIMES --
808: -----------------------------------------
809: FUNCTION Set_Attributes (
810: p_oks_action_times_rec IN oks_action_times_rec_type,
811: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
812: ) RETURN VARCHAR2 IS
813: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
814: BEGIN
815: x_oks_action_times_rec := p_oks_action_times_rec;
811: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
812: ) RETURN VARCHAR2 IS
813: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
814: BEGIN
815: x_oks_action_times_rec := p_oks_action_times_rec;
816: RETURN(l_return_status);
817: END Set_Attributes;
818: BEGIN
819: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
826: RAISE OKC_API.G_EXCEPTION_ERROR;
827: END IF;
828: --- Setting item atributes
829: l_return_status := Set_Attributes(
830: p_oks_action_times_rec, -- IN
831: l_oks_action_times_rec); -- OUT
832: --- If any errors happen abort API
833: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
834: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
827: END IF;
828: --- Setting item atributes
829: l_return_status := Set_Attributes(
830: p_oks_action_times_rec, -- IN
831: l_oks_action_times_rec); -- OUT
832: --- If any errors happen abort API
833: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
834: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
835: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
834: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
835: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
836: RAISE OKC_API.G_EXCEPTION_ERROR;
837: END IF;
838: INSERT INTO OKS_ACTION_TIMES(
839: id,
840: cov_action_type_id,
841: cle_id,
842: dnz_chr_id,
858: last_update_date,
859: last_update_login,
860: object_version_number)
861: VALUES (
862: l_oks_action_times_rec.id,
863: l_oks_action_times_rec.cov_action_type_id,
864: l_oks_action_times_rec.cle_id,
865: l_oks_action_times_rec.dnz_chr_id,
866: l_oks_action_times_rec.uom_code,
859: last_update_login,
860: object_version_number)
861: VALUES (
862: l_oks_action_times_rec.id,
863: l_oks_action_times_rec.cov_action_type_id,
864: l_oks_action_times_rec.cle_id,
865: l_oks_action_times_rec.dnz_chr_id,
866: l_oks_action_times_rec.uom_code,
867: l_oks_action_times_rec.sun_duration,
860: object_version_number)
861: VALUES (
862: l_oks_action_times_rec.id,
863: l_oks_action_times_rec.cov_action_type_id,
864: l_oks_action_times_rec.cle_id,
865: l_oks_action_times_rec.dnz_chr_id,
866: l_oks_action_times_rec.uom_code,
867: l_oks_action_times_rec.sun_duration,
868: l_oks_action_times_rec.mon_duration,
861: VALUES (
862: l_oks_action_times_rec.id,
863: l_oks_action_times_rec.cov_action_type_id,
864: l_oks_action_times_rec.cle_id,
865: l_oks_action_times_rec.dnz_chr_id,
866: l_oks_action_times_rec.uom_code,
867: l_oks_action_times_rec.sun_duration,
868: l_oks_action_times_rec.mon_duration,
869: l_oks_action_times_rec.tue_duration,
862: l_oks_action_times_rec.id,
863: l_oks_action_times_rec.cov_action_type_id,
864: l_oks_action_times_rec.cle_id,
865: l_oks_action_times_rec.dnz_chr_id,
866: l_oks_action_times_rec.uom_code,
867: l_oks_action_times_rec.sun_duration,
868: l_oks_action_times_rec.mon_duration,
869: l_oks_action_times_rec.tue_duration,
870: l_oks_action_times_rec.wed_duration,
863: l_oks_action_times_rec.cov_action_type_id,
864: l_oks_action_times_rec.cle_id,
865: l_oks_action_times_rec.dnz_chr_id,
866: l_oks_action_times_rec.uom_code,
867: l_oks_action_times_rec.sun_duration,
868: l_oks_action_times_rec.mon_duration,
869: l_oks_action_times_rec.tue_duration,
870: l_oks_action_times_rec.wed_duration,
871: l_oks_action_times_rec.thu_duration,
864: l_oks_action_times_rec.cle_id,
865: l_oks_action_times_rec.dnz_chr_id,
866: l_oks_action_times_rec.uom_code,
867: l_oks_action_times_rec.sun_duration,
868: l_oks_action_times_rec.mon_duration,
869: l_oks_action_times_rec.tue_duration,
870: l_oks_action_times_rec.wed_duration,
871: l_oks_action_times_rec.thu_duration,
872: l_oks_action_times_rec.fri_duration,
865: l_oks_action_times_rec.dnz_chr_id,
866: l_oks_action_times_rec.uom_code,
867: l_oks_action_times_rec.sun_duration,
868: l_oks_action_times_rec.mon_duration,
869: l_oks_action_times_rec.tue_duration,
870: l_oks_action_times_rec.wed_duration,
871: l_oks_action_times_rec.thu_duration,
872: l_oks_action_times_rec.fri_duration,
873: l_oks_action_times_rec.sat_duration,
866: l_oks_action_times_rec.uom_code,
867: l_oks_action_times_rec.sun_duration,
868: l_oks_action_times_rec.mon_duration,
869: l_oks_action_times_rec.tue_duration,
870: l_oks_action_times_rec.wed_duration,
871: l_oks_action_times_rec.thu_duration,
872: l_oks_action_times_rec.fri_duration,
873: l_oks_action_times_rec.sat_duration,
874: l_oks_action_times_rec.program_application_id,
867: l_oks_action_times_rec.sun_duration,
868: l_oks_action_times_rec.mon_duration,
869: l_oks_action_times_rec.tue_duration,
870: l_oks_action_times_rec.wed_duration,
871: l_oks_action_times_rec.thu_duration,
872: l_oks_action_times_rec.fri_duration,
873: l_oks_action_times_rec.sat_duration,
874: l_oks_action_times_rec.program_application_id,
875: l_oks_action_times_rec.program_id,
868: l_oks_action_times_rec.mon_duration,
869: l_oks_action_times_rec.tue_duration,
870: l_oks_action_times_rec.wed_duration,
871: l_oks_action_times_rec.thu_duration,
872: l_oks_action_times_rec.fri_duration,
873: l_oks_action_times_rec.sat_duration,
874: l_oks_action_times_rec.program_application_id,
875: l_oks_action_times_rec.program_id,
876: l_oks_action_times_rec.program_update_date,
869: l_oks_action_times_rec.tue_duration,
870: l_oks_action_times_rec.wed_duration,
871: l_oks_action_times_rec.thu_duration,
872: l_oks_action_times_rec.fri_duration,
873: l_oks_action_times_rec.sat_duration,
874: l_oks_action_times_rec.program_application_id,
875: l_oks_action_times_rec.program_id,
876: l_oks_action_times_rec.program_update_date,
877: l_oks_action_times_rec.request_id,
870: l_oks_action_times_rec.wed_duration,
871: l_oks_action_times_rec.thu_duration,
872: l_oks_action_times_rec.fri_duration,
873: l_oks_action_times_rec.sat_duration,
874: l_oks_action_times_rec.program_application_id,
875: l_oks_action_times_rec.program_id,
876: l_oks_action_times_rec.program_update_date,
877: l_oks_action_times_rec.request_id,
878: l_oks_action_times_rec.created_by,
871: l_oks_action_times_rec.thu_duration,
872: l_oks_action_times_rec.fri_duration,
873: l_oks_action_times_rec.sat_duration,
874: l_oks_action_times_rec.program_application_id,
875: l_oks_action_times_rec.program_id,
876: l_oks_action_times_rec.program_update_date,
877: l_oks_action_times_rec.request_id,
878: l_oks_action_times_rec.created_by,
879: l_oks_action_times_rec.creation_date,
872: l_oks_action_times_rec.fri_duration,
873: l_oks_action_times_rec.sat_duration,
874: l_oks_action_times_rec.program_application_id,
875: l_oks_action_times_rec.program_id,
876: l_oks_action_times_rec.program_update_date,
877: l_oks_action_times_rec.request_id,
878: l_oks_action_times_rec.created_by,
879: l_oks_action_times_rec.creation_date,
880: l_oks_action_times_rec.last_updated_by,
873: l_oks_action_times_rec.sat_duration,
874: l_oks_action_times_rec.program_application_id,
875: l_oks_action_times_rec.program_id,
876: l_oks_action_times_rec.program_update_date,
877: l_oks_action_times_rec.request_id,
878: l_oks_action_times_rec.created_by,
879: l_oks_action_times_rec.creation_date,
880: l_oks_action_times_rec.last_updated_by,
881: l_oks_action_times_rec.last_update_date,
874: l_oks_action_times_rec.program_application_id,
875: l_oks_action_times_rec.program_id,
876: l_oks_action_times_rec.program_update_date,
877: l_oks_action_times_rec.request_id,
878: l_oks_action_times_rec.created_by,
879: l_oks_action_times_rec.creation_date,
880: l_oks_action_times_rec.last_updated_by,
881: l_oks_action_times_rec.last_update_date,
882: l_oks_action_times_rec.last_update_login,
875: l_oks_action_times_rec.program_id,
876: l_oks_action_times_rec.program_update_date,
877: l_oks_action_times_rec.request_id,
878: l_oks_action_times_rec.created_by,
879: l_oks_action_times_rec.creation_date,
880: l_oks_action_times_rec.last_updated_by,
881: l_oks_action_times_rec.last_update_date,
882: l_oks_action_times_rec.last_update_login,
883: l_oks_action_times_rec.object_version_number);
876: l_oks_action_times_rec.program_update_date,
877: l_oks_action_times_rec.request_id,
878: l_oks_action_times_rec.created_by,
879: l_oks_action_times_rec.creation_date,
880: l_oks_action_times_rec.last_updated_by,
881: l_oks_action_times_rec.last_update_date,
882: l_oks_action_times_rec.last_update_login,
883: l_oks_action_times_rec.object_version_number);
884: -- Set OUT values
877: l_oks_action_times_rec.request_id,
878: l_oks_action_times_rec.created_by,
879: l_oks_action_times_rec.creation_date,
880: l_oks_action_times_rec.last_updated_by,
881: l_oks_action_times_rec.last_update_date,
882: l_oks_action_times_rec.last_update_login,
883: l_oks_action_times_rec.object_version_number);
884: -- Set OUT values
885: x_oks_action_times_rec := l_oks_action_times_rec;
878: l_oks_action_times_rec.created_by,
879: l_oks_action_times_rec.creation_date,
880: l_oks_action_times_rec.last_updated_by,
881: l_oks_action_times_rec.last_update_date,
882: l_oks_action_times_rec.last_update_login,
883: l_oks_action_times_rec.object_version_number);
884: -- Set OUT values
885: x_oks_action_times_rec := l_oks_action_times_rec;
886: x_return_status := l_return_status;
879: l_oks_action_times_rec.creation_date,
880: l_oks_action_times_rec.last_updated_by,
881: l_oks_action_times_rec.last_update_date,
882: l_oks_action_times_rec.last_update_login,
883: l_oks_action_times_rec.object_version_number);
884: -- Set OUT values
885: x_oks_action_times_rec := l_oks_action_times_rec;
886: x_return_status := l_return_status;
887: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
881: l_oks_action_times_rec.last_update_date,
882: l_oks_action_times_rec.last_update_login,
883: l_oks_action_times_rec.object_version_number);
884: -- Set OUT values
885: x_oks_action_times_rec := l_oks_action_times_rec;
886: x_return_status := l_return_status;
887: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
888: EXCEPTION
889: WHEN OKC_API.G_EXCEPTION_ERROR THEN
917: '_PVT'
918: );
919: END insert_row;
920: ----------------------------------------
921: -- insert_row for :OKS_ACTION_TIMES_V --
922: ----------------------------------------
923: PROCEDURE insert_row(
924: p_api_version IN NUMBER,
925: p_init_msg_list IN VARCHAR2,
925: p_init_msg_list IN VARCHAR2,
926: x_return_status OUT NOCOPY VARCHAR2,
927: x_msg_count OUT NOCOPY NUMBER,
928: x_msg_data OUT NOCOPY VARCHAR2,
929: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
930: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type) IS
931:
932: l_api_version CONSTANT NUMBER := 1;
933: l_api_name CONSTANT VARCHAR2(30) := 'V_insert_row';
926: x_return_status OUT NOCOPY VARCHAR2,
927: x_msg_count OUT NOCOPY NUMBER,
928: x_msg_data OUT NOCOPY VARCHAR2,
929: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
930: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type) IS
931:
932: l_api_version CONSTANT NUMBER := 1;
933: l_api_name CONSTANT VARCHAR2(30) := 'V_insert_row';
934: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
931:
932: l_api_version CONSTANT NUMBER := 1;
933: l_api_name CONSTANT VARCHAR2(30) := 'V_insert_row';
934: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
935: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
936: l_def_oks_action_times_v_rec oks_action_times_v_rec_type;
937: l_oks_action_times_rec oks_action_times_rec_type;
938: lx_oks_action_times_rec oks_action_times_rec_type;
939: -------------------------------
932: l_api_version CONSTANT NUMBER := 1;
933: l_api_name CONSTANT VARCHAR2(30) := 'V_insert_row';
934: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
935: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
936: l_def_oks_action_times_v_rec oks_action_times_v_rec_type;
937: l_oks_action_times_rec oks_action_times_rec_type;
938: lx_oks_action_times_rec oks_action_times_rec_type;
939: -------------------------------
940: -- FUNCTION fill_who_columns --
933: l_api_name CONSTANT VARCHAR2(30) := 'V_insert_row';
934: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
935: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
936: l_def_oks_action_times_v_rec oks_action_times_v_rec_type;
937: l_oks_action_times_rec oks_action_times_rec_type;
938: lx_oks_action_times_rec oks_action_times_rec_type;
939: -------------------------------
940: -- FUNCTION fill_who_columns --
941: -------------------------------
934: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
935: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
936: l_def_oks_action_times_v_rec oks_action_times_v_rec_type;
937: l_oks_action_times_rec oks_action_times_rec_type;
938: lx_oks_action_times_rec oks_action_times_rec_type;
939: -------------------------------
940: -- FUNCTION fill_who_columns --
941: -------------------------------
942: FUNCTION fill_who_columns (
939: -------------------------------
940: -- FUNCTION fill_who_columns --
941: -------------------------------
942: FUNCTION fill_who_columns (
943: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
944: ) RETURN oks_action_times_v_rec_type IS
945: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
946: BEGIN
947: l_oks_action_times_v_rec.CREATION_DATE := SYSDATE;
940: -- FUNCTION fill_who_columns --
941: -------------------------------
942: FUNCTION fill_who_columns (
943: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
944: ) RETURN oks_action_times_v_rec_type IS
945: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
946: BEGIN
947: l_oks_action_times_v_rec.CREATION_DATE := SYSDATE;
948: l_oks_action_times_v_rec.CREATED_BY := FND_GLOBAL.USER_ID;
941: -------------------------------
942: FUNCTION fill_who_columns (
943: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
944: ) RETURN oks_action_times_v_rec_type IS
945: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
946: BEGIN
947: l_oks_action_times_v_rec.CREATION_DATE := SYSDATE;
948: l_oks_action_times_v_rec.CREATED_BY := FND_GLOBAL.USER_ID;
949: l_oks_action_times_v_rec.LAST_UPDATE_DATE := l_oks_action_times_v_rec.CREATION_DATE;
943: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
944: ) RETURN oks_action_times_v_rec_type IS
945: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
946: BEGIN
947: l_oks_action_times_v_rec.CREATION_DATE := SYSDATE;
948: l_oks_action_times_v_rec.CREATED_BY := FND_GLOBAL.USER_ID;
949: l_oks_action_times_v_rec.LAST_UPDATE_DATE := l_oks_action_times_v_rec.CREATION_DATE;
950: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
951: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
944: ) RETURN oks_action_times_v_rec_type IS
945: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
946: BEGIN
947: l_oks_action_times_v_rec.CREATION_DATE := SYSDATE;
948: l_oks_action_times_v_rec.CREATED_BY := FND_GLOBAL.USER_ID;
949: l_oks_action_times_v_rec.LAST_UPDATE_DATE := l_oks_action_times_v_rec.CREATION_DATE;
950: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
951: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
952: RETURN(l_oks_action_times_v_rec);
945: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
946: BEGIN
947: l_oks_action_times_v_rec.CREATION_DATE := SYSDATE;
948: l_oks_action_times_v_rec.CREATED_BY := FND_GLOBAL.USER_ID;
949: l_oks_action_times_v_rec.LAST_UPDATE_DATE := l_oks_action_times_v_rec.CREATION_DATE;
950: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
951: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
952: RETURN(l_oks_action_times_v_rec);
953: END fill_who_columns;
946: BEGIN
947: l_oks_action_times_v_rec.CREATION_DATE := SYSDATE;
948: l_oks_action_times_v_rec.CREATED_BY := FND_GLOBAL.USER_ID;
949: l_oks_action_times_v_rec.LAST_UPDATE_DATE := l_oks_action_times_v_rec.CREATION_DATE;
950: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
951: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
952: RETURN(l_oks_action_times_v_rec);
953: END fill_who_columns;
954: -------------------------------------------
947: l_oks_action_times_v_rec.CREATION_DATE := SYSDATE;
948: l_oks_action_times_v_rec.CREATED_BY := FND_GLOBAL.USER_ID;
949: l_oks_action_times_v_rec.LAST_UPDATE_DATE := l_oks_action_times_v_rec.CREATION_DATE;
950: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
951: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
952: RETURN(l_oks_action_times_v_rec);
953: END fill_who_columns;
954: -------------------------------------------
955: -- Set_Attributes for:OKS_ACTION_TIMES_V --
948: l_oks_action_times_v_rec.CREATED_BY := FND_GLOBAL.USER_ID;
949: l_oks_action_times_v_rec.LAST_UPDATE_DATE := l_oks_action_times_v_rec.CREATION_DATE;
950: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
951: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
952: RETURN(l_oks_action_times_v_rec);
953: END fill_who_columns;
954: -------------------------------------------
955: -- Set_Attributes for:OKS_ACTION_TIMES_V --
956: -------------------------------------------
951: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
952: RETURN(l_oks_action_times_v_rec);
953: END fill_who_columns;
954: -------------------------------------------
955: -- Set_Attributes for:OKS_ACTION_TIMES_V --
956: -------------------------------------------
957: FUNCTION Set_Attributes (
958: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
959: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type
954: -------------------------------------------
955: -- Set_Attributes for:OKS_ACTION_TIMES_V --
956: -------------------------------------------
957: FUNCTION Set_Attributes (
958: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
959: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type
960: ) RETURN VARCHAR2 IS
961: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
962: BEGIN
955: -- Set_Attributes for:OKS_ACTION_TIMES_V --
956: -------------------------------------------
957: FUNCTION Set_Attributes (
958: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
959: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type
960: ) RETURN VARCHAR2 IS
961: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
962: BEGIN
963: x_oks_action_times_v_rec := p_oks_action_times_v_rec;
959: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type
960: ) RETURN VARCHAR2 IS
961: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
962: BEGIN
963: x_oks_action_times_v_rec := p_oks_action_times_v_rec;
964: x_oks_action_times_v_rec.OBJECT_VERSION_NUMBER := 1;
965: RETURN(l_return_status);
966: END Set_Attributes;
967: BEGIN
960: ) RETURN VARCHAR2 IS
961: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
962: BEGIN
963: x_oks_action_times_v_rec := p_oks_action_times_v_rec;
964: x_oks_action_times_v_rec.OBJECT_VERSION_NUMBER := 1;
965: RETURN(l_return_status);
966: END Set_Attributes;
967: BEGIN
968: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
976: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
977: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
978: RAISE OKC_API.G_EXCEPTION_ERROR;
979: END IF;
980: l_oks_action_times_v_rec := null_out_defaults(p_oks_action_times_v_rec);
981: -- Set primary key value
982: l_oks_action_times_v_rec.ID := get_seq_id;
983: -- Setting item attributes
984: l_return_Status := Set_Attributes(
978: RAISE OKC_API.G_EXCEPTION_ERROR;
979: END IF;
980: l_oks_action_times_v_rec := null_out_defaults(p_oks_action_times_v_rec);
981: -- Set primary key value
982: l_oks_action_times_v_rec.ID := get_seq_id;
983: -- Setting item attributes
984: l_return_Status := Set_Attributes(
985: l_oks_action_times_v_rec, -- IN
986: l_def_oks_action_times_v_rec); -- OUT
981: -- Set primary key value
982: l_oks_action_times_v_rec.ID := get_seq_id;
983: -- Setting item attributes
984: l_return_Status := Set_Attributes(
985: l_oks_action_times_v_rec, -- IN
986: l_def_oks_action_times_v_rec); -- OUT
987: --- If any errors happen abort API
988: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
989: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
982: l_oks_action_times_v_rec.ID := get_seq_id;
983: -- Setting item attributes
984: l_return_Status := Set_Attributes(
985: l_oks_action_times_v_rec, -- IN
986: l_def_oks_action_times_v_rec); -- OUT
987: --- If any errors happen abort API
988: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
989: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
990: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
989: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
990: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
991: RAISE OKC_API.G_EXCEPTION_ERROR;
992: END IF;
993: l_def_oks_action_times_v_rec := fill_who_columns(l_def_oks_action_times_v_rec);
994: --- Validate all non-missing attributes (Item Level Validation)
995: l_return_status := Validate_Attributes(l_def_oks_action_times_v_rec);
996: --- If any errors happen abort API
997: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
991: RAISE OKC_API.G_EXCEPTION_ERROR;
992: END IF;
993: l_def_oks_action_times_v_rec := fill_who_columns(l_def_oks_action_times_v_rec);
994: --- Validate all non-missing attributes (Item Level Validation)
995: l_return_status := Validate_Attributes(l_def_oks_action_times_v_rec);
996: --- If any errors happen abort API
997: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
998: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
999: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
998: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
999: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1000: RAISE OKC_API.G_EXCEPTION_ERROR;
1001: END IF;
1002: l_return_status := Validate_Record(l_def_oks_action_times_v_rec);
1003: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1004: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1005: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1006: RAISE OKC_API.G_EXCEPTION_ERROR;
1007: END IF;
1008: -----------------------------------------
1009: -- Move VIEW record to "Child" records --
1010: -----------------------------------------
1011: migrate(l_def_oks_action_times_v_rec, l_oks_action_times_rec);
1012: -----------------------------------------------
1013: -- Call the INSERT_ROW for each child record --
1014: -----------------------------------------------
1015: insert_row(
1016: p_init_msg_list,
1017: l_return_status,
1018: x_msg_count,
1019: x_msg_data,
1020: l_oks_action_times_rec,
1021: lx_oks_action_times_rec
1022: );
1023: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1024: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1017: l_return_status,
1018: x_msg_count,
1019: x_msg_data,
1020: l_oks_action_times_rec,
1021: lx_oks_action_times_rec
1022: );
1023: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1024: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1025: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1024: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1025: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1026: RAISE OKC_API.G_EXCEPTION_ERROR;
1027: END IF;
1028: migrate(lx_oks_action_times_rec, l_def_oks_action_times_v_rec);
1029: -- Set OUT values
1030: x_oks_action_times_v_rec := l_def_oks_action_times_v_rec;
1031: x_return_status := l_return_status;
1032: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1026: RAISE OKC_API.G_EXCEPTION_ERROR;
1027: END IF;
1028: migrate(lx_oks_action_times_rec, l_def_oks_action_times_v_rec);
1029: -- Set OUT values
1030: x_oks_action_times_v_rec := l_def_oks_action_times_v_rec;
1031: x_return_status := l_return_status;
1032: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1033: EXCEPTION
1034: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1062: '_PVT'
1063: );
1064: END insert_row;
1065: ------------------------------------------------------
1066: -- PL/SQL TBL insert_row for:OKS_ACTION_TIMES_V_TBL --
1067: ------------------------------------------------------
1068: PROCEDURE insert_row(
1069: p_api_version IN NUMBER,
1070: p_init_msg_list IN VARCHAR2,
1070: p_init_msg_list IN VARCHAR2,
1071: x_return_status OUT NOCOPY VARCHAR2,
1072: x_msg_count OUT NOCOPY NUMBER,
1073: x_msg_data OUT NOCOPY VARCHAR2,
1074: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
1075: x_oks_action_times_v_tbl OUT NOCOPY oks_action_times_v_tbl_type,
1076: px_error_tbl IN OUT NOCOPY OKC_API.ERROR_TBL_TYPE) IS
1077:
1078: l_api_version CONSTANT NUMBER := 1;
1071: x_return_status OUT NOCOPY VARCHAR2,
1072: x_msg_count OUT NOCOPY NUMBER,
1073: x_msg_data OUT NOCOPY VARCHAR2,
1074: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
1075: x_oks_action_times_v_tbl OUT NOCOPY oks_action_times_v_tbl_type,
1076: px_error_tbl IN OUT NOCOPY OKC_API.ERROR_TBL_TYPE) IS
1077:
1078: l_api_version CONSTANT NUMBER := 1;
1079: l_api_name CONSTANT VARCHAR2(30) := 'V_error_tbl_insert_row';
1080: i NUMBER := 0;
1081: BEGIN
1082: OKC_API.init_msg_list(p_init_msg_list);
1083: -- Make sure PL/SQL table has records in it before passing
1084: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
1085: i := p_oks_action_times_v_tbl.FIRST;
1086: LOOP
1087: DECLARE
1088: l_error_rec OKC_API.ERROR_REC_TYPE;
1081: BEGIN
1082: OKC_API.init_msg_list(p_init_msg_list);
1083: -- Make sure PL/SQL table has records in it before passing
1084: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
1085: i := p_oks_action_times_v_tbl.FIRST;
1086: LOOP
1087: DECLARE
1088: l_error_rec OKC_API.ERROR_REC_TYPE;
1089: BEGIN
1095: p_init_msg_list => OKC_API.G_FALSE,
1096: x_return_status => l_error_rec.error_type,
1097: x_msg_count => l_error_rec.msg_count,
1098: x_msg_data => l_error_rec.msg_data,
1099: p_oks_action_times_v_rec => p_oks_action_times_v_tbl(i),
1100: x_oks_action_times_v_rec => x_oks_action_times_v_tbl(i));
1101: IF (l_error_rec.error_type <> OKC_API.G_RET_STS_SUCCESS) THEN
1102: l_error_rec.sqlcode := SQLCODE;
1103: load_error_tbl(l_error_rec, px_error_tbl);
1096: x_return_status => l_error_rec.error_type,
1097: x_msg_count => l_error_rec.msg_count,
1098: x_msg_data => l_error_rec.msg_data,
1099: p_oks_action_times_v_rec => p_oks_action_times_v_tbl(i),
1100: x_oks_action_times_v_rec => x_oks_action_times_v_tbl(i));
1101: IF (l_error_rec.error_type <> OKC_API.G_RET_STS_SUCCESS) THEN
1102: l_error_rec.sqlcode := SQLCODE;
1103: load_error_tbl(l_error_rec, px_error_tbl);
1104: ELSE
1118: l_error_rec.error_type := 'OTHERS';
1119: l_error_rec.sqlcode := SQLCODE;
1120: load_error_tbl(l_error_rec, px_error_tbl);
1121: END;
1122: EXIT WHEN (i = p_oks_action_times_v_tbl.LAST);
1123: i := p_oks_action_times_v_tbl.NEXT(i);
1124: END LOOP;
1125: END IF;
1126: -- Loop through the error_tbl to find the error with the highest severity
1119: l_error_rec.sqlcode := SQLCODE;
1120: load_error_tbl(l_error_rec, px_error_tbl);
1121: END;
1122: EXIT WHEN (i = p_oks_action_times_v_tbl.LAST);
1123: i := p_oks_action_times_v_tbl.NEXT(i);
1124: END LOOP;
1125: END IF;
1126: -- Loop through the error_tbl to find the error with the highest severity
1127: -- and return it.
1160: );
1161: END insert_row;
1162:
1163: ------------------------------------------------------
1164: -- PL/SQL TBL insert_row for:OKS_ACTION_TIMES_V_TBL --
1165: ------------------------------------------------------
1166: -- This procedure is the same as the one above except it does not have a "px_error_tbl" argument.
1167: -- This procedure was create for backward compatibility and simply is a wrapper for the one above.
1168: PROCEDURE insert_row(
1170: p_init_msg_list IN VARCHAR2,
1171: x_return_status OUT NOCOPY VARCHAR2,
1172: x_msg_count OUT NOCOPY NUMBER,
1173: x_msg_data OUT NOCOPY VARCHAR2,
1174: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
1175: x_oks_action_times_v_tbl OUT NOCOPY oks_action_times_v_tbl_type) IS
1176:
1177: l_api_version CONSTANT NUMBER := 1;
1178: l_api_name CONSTANT VARCHAR2(30) := 'V_tbl_insert_row';
1171: x_return_status OUT NOCOPY VARCHAR2,
1172: x_msg_count OUT NOCOPY NUMBER,
1173: x_msg_data OUT NOCOPY VARCHAR2,
1174: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
1175: x_oks_action_times_v_tbl OUT NOCOPY oks_action_times_v_tbl_type) IS
1176:
1177: l_api_version CONSTANT NUMBER := 1;
1178: l_api_name CONSTANT VARCHAR2(30) := 'V_tbl_insert_row';
1179: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1180: l_error_tbl OKC_API.ERROR_TBL_TYPE;
1181: BEGIN
1182: OKC_API.init_msg_list(p_init_msg_list);
1183: -- Make sure PL/SQL table has records in it before passing
1184: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
1185: insert_row (
1186: p_api_version => p_api_version,
1187: p_init_msg_list => OKC_API.G_FALSE,
1188: x_return_status => x_return_status,
1187: p_init_msg_list => OKC_API.G_FALSE,
1188: x_return_status => x_return_status,
1189: x_msg_count => x_msg_count,
1190: x_msg_data => x_msg_data,
1191: p_oks_action_times_v_tbl => p_oks_action_times_v_tbl,
1192: x_oks_action_times_v_tbl => x_oks_action_times_v_tbl,
1193: px_error_tbl => l_error_tbl);
1194: END IF;
1195: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1188: x_return_status => x_return_status,
1189: x_msg_count => x_msg_count,
1190: x_msg_data => x_msg_data,
1191: p_oks_action_times_v_tbl => p_oks_action_times_v_tbl,
1192: x_oks_action_times_v_tbl => x_oks_action_times_v_tbl,
1193: px_error_tbl => l_error_tbl);
1194: END IF;
1195: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1196: EXCEPTION
1229: ---------------------------------------------------------------------------
1230: -- PROCEDURE lock_row
1231: ---------------------------------------------------------------------------
1232: -----------------------------------
1233: -- lock_row for:OKS_ACTION_TIMES --
1234: -----------------------------------
1235: PROCEDURE lock_row(
1236: p_init_msg_list IN VARCHAR2,
1237: x_return_status OUT NOCOPY VARCHAR2,
1236: p_init_msg_list IN VARCHAR2,
1237: x_return_status OUT NOCOPY VARCHAR2,
1238: x_msg_count OUT NOCOPY NUMBER,
1239: x_msg_data OUT NOCOPY VARCHAR2,
1240: p_oks_action_times_rec IN oks_action_times_rec_type) IS
1241:
1242: E_Resource_Busy EXCEPTION;
1243: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1244: CURSOR lock_csr (p_oks_action_times_rec IN oks_action_times_rec_type) IS
1240: p_oks_action_times_rec IN oks_action_times_rec_type) IS
1241:
1242: E_Resource_Busy EXCEPTION;
1243: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1244: CURSOR lock_csr (p_oks_action_times_rec IN oks_action_times_rec_type) IS
1245: SELECT OBJECT_VERSION_NUMBER
1246: FROM OKS_ACTION_TIMES
1247: WHERE ID = p_oks_action_times_rec.id
1248: AND OBJECT_VERSION_NUMBER = p_oks_action_times_rec.object_version_number
1242: E_Resource_Busy EXCEPTION;
1243: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1244: CURSOR lock_csr (p_oks_action_times_rec IN oks_action_times_rec_type) IS
1245: SELECT OBJECT_VERSION_NUMBER
1246: FROM OKS_ACTION_TIMES
1247: WHERE ID = p_oks_action_times_rec.id
1248: AND OBJECT_VERSION_NUMBER = p_oks_action_times_rec.object_version_number
1249: FOR UPDATE OF OBJECT_VERSION_NUMBER NOWAIT;
1250:
1243: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1244: CURSOR lock_csr (p_oks_action_times_rec IN oks_action_times_rec_type) IS
1245: SELECT OBJECT_VERSION_NUMBER
1246: FROM OKS_ACTION_TIMES
1247: WHERE ID = p_oks_action_times_rec.id
1248: AND OBJECT_VERSION_NUMBER = p_oks_action_times_rec.object_version_number
1249: FOR UPDATE OF OBJECT_VERSION_NUMBER NOWAIT;
1250:
1251: CURSOR lchk_csr (p_oks_action_times_rec IN oks_action_times_rec_type) IS
1244: CURSOR lock_csr (p_oks_action_times_rec IN oks_action_times_rec_type) IS
1245: SELECT OBJECT_VERSION_NUMBER
1246: FROM OKS_ACTION_TIMES
1247: WHERE ID = p_oks_action_times_rec.id
1248: AND OBJECT_VERSION_NUMBER = p_oks_action_times_rec.object_version_number
1249: FOR UPDATE OF OBJECT_VERSION_NUMBER NOWAIT;
1250:
1251: CURSOR lchk_csr (p_oks_action_times_rec IN oks_action_times_rec_type) IS
1252: SELECT OBJECT_VERSION_NUMBER
1247: WHERE ID = p_oks_action_times_rec.id
1248: AND OBJECT_VERSION_NUMBER = p_oks_action_times_rec.object_version_number
1249: FOR UPDATE OF OBJECT_VERSION_NUMBER NOWAIT;
1250:
1251: CURSOR lchk_csr (p_oks_action_times_rec IN oks_action_times_rec_type) IS
1252: SELECT OBJECT_VERSION_NUMBER
1253: FROM OKS_ACTION_TIMES
1254: WHERE ID = p_oks_action_times_rec.id;
1255: l_api_version CONSTANT NUMBER := 1;
1249: FOR UPDATE OF OBJECT_VERSION_NUMBER NOWAIT;
1250:
1251: CURSOR lchk_csr (p_oks_action_times_rec IN oks_action_times_rec_type) IS
1252: SELECT OBJECT_VERSION_NUMBER
1253: FROM OKS_ACTION_TIMES
1254: WHERE ID = p_oks_action_times_rec.id;
1255: l_api_version CONSTANT NUMBER := 1;
1256: l_api_name CONSTANT VARCHAR2(30) := 'B_lock_row';
1257: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1250:
1251: CURSOR lchk_csr (p_oks_action_times_rec IN oks_action_times_rec_type) IS
1252: SELECT OBJECT_VERSION_NUMBER
1253: FROM OKS_ACTION_TIMES
1254: WHERE ID = p_oks_action_times_rec.id;
1255: l_api_version CONSTANT NUMBER := 1;
1256: l_api_name CONSTANT VARCHAR2(30) := 'B_lock_row';
1257: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1258: l_object_version_number OKS_ACTION_TIMES.OBJECT_VERSION_NUMBER%TYPE;
1254: WHERE ID = p_oks_action_times_rec.id;
1255: l_api_version CONSTANT NUMBER := 1;
1256: l_api_name CONSTANT VARCHAR2(30) := 'B_lock_row';
1257: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1258: l_object_version_number OKS_ACTION_TIMES.OBJECT_VERSION_NUMBER%TYPE;
1259: lc_object_version_number OKS_ACTION_TIMES.OBJECT_VERSION_NUMBER%TYPE;
1260: l_row_notfound BOOLEAN := FALSE;
1261: lc_row_notfound BOOLEAN := FALSE;
1262: BEGIN
1255: l_api_version CONSTANT NUMBER := 1;
1256: l_api_name CONSTANT VARCHAR2(30) := 'B_lock_row';
1257: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1258: l_object_version_number OKS_ACTION_TIMES.OBJECT_VERSION_NUMBER%TYPE;
1259: lc_object_version_number OKS_ACTION_TIMES.OBJECT_VERSION_NUMBER%TYPE;
1260: l_row_notfound BOOLEAN := FALSE;
1261: lc_row_notfound BOOLEAN := FALSE;
1262: BEGIN
1263: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1269: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1270: RAISE OKC_API.G_EXCEPTION_ERROR;
1271: END IF;
1272: BEGIN
1273: OPEN lock_csr(p_oks_action_times_rec);
1274: FETCH lock_csr INTO l_object_version_number;
1275: l_row_notfound := lock_csr%NOTFOUND;
1276: CLOSE lock_csr;
1277: EXCEPTION
1283: RAISE APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION;
1284: END;
1285:
1286: IF ( l_row_notfound ) THEN
1287: OPEN lchk_csr(p_oks_action_times_rec);
1288: FETCH lchk_csr INTO lc_object_version_number;
1289: lc_row_notfound := lchk_csr%NOTFOUND;
1290: CLOSE lchk_csr;
1291: END IF;
1291: END IF;
1292: IF (lc_row_notfound) THEN
1293: OKC_API.set_message(G_FND_APP,G_FORM_RECORD_DELETED);
1294: RAISE OKC_API.G_EXCEPTION_ERROR;
1295: ELSIF lc_object_version_number > p_oks_action_times_rec.object_version_number THEN
1296: OKC_API.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
1297: RAISE OKC_API.G_EXCEPTION_ERROR;
1298: ELSIF lc_object_version_number <> p_oks_action_times_rec.object_version_number THEN
1299: OKC_API.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
1294: RAISE OKC_API.G_EXCEPTION_ERROR;
1295: ELSIF lc_object_version_number > p_oks_action_times_rec.object_version_number THEN
1296: OKC_API.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
1297: RAISE OKC_API.G_EXCEPTION_ERROR;
1298: ELSIF lc_object_version_number <> p_oks_action_times_rec.object_version_number THEN
1299: OKC_API.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
1300: RAISE OKC_API.G_EXCEPTION_ERROR;
1301: ELSIF lc_object_version_number = -1 THEN
1302: OKC_API.set_message(G_APP_NAME,G_RECORD_LOGICALLY_DELETED);
1336: '_PVT'
1337: );
1338: END lock_row;
1339: --------------------------------------
1340: -- lock_row for: OKS_ACTION_TIMES_V --
1341: --------------------------------------
1342: PROCEDURE lock_row(
1343: p_api_version IN NUMBER,
1344: p_init_msg_list IN VARCHAR2,
1344: p_init_msg_list IN VARCHAR2,
1345: x_return_status OUT NOCOPY VARCHAR2,
1346: x_msg_count OUT NOCOPY NUMBER,
1347: x_msg_data OUT NOCOPY VARCHAR2,
1348: p_oks_action_times_v_rec IN oks_action_times_v_rec_type) IS
1349:
1350: l_api_version CONSTANT NUMBER := 1;
1351: l_api_name CONSTANT VARCHAR2(30) := 'V_lock_row';
1352: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1349:
1350: l_api_version CONSTANT NUMBER := 1;
1351: l_api_name CONSTANT VARCHAR2(30) := 'V_lock_row';
1352: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1353: l_oks_action_times_rec oks_action_times_rec_type;
1354: BEGIN
1355: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1356: G_PKG_NAME,
1357: p_init_msg_list,
1366: END IF;
1367: -----------------------------------------
1368: -- Move VIEW record to "Child" records --
1369: -----------------------------------------
1370: migrate(p_oks_action_times_v_rec, l_oks_action_times_rec);
1371: ---------------------------------------------
1372: -- Call the LOCK_ROW for each child record --
1373: ---------------------------------------------
1374: lock_row(
1375: p_init_msg_list,
1376: l_return_status,
1377: x_msg_count,
1378: x_msg_data,
1379: l_oks_action_times_rec
1380: );
1381: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1382: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1383: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1417: '_PVT'
1418: );
1419: END lock_row;
1420: ----------------------------------------------------
1421: -- PL/SQL TBL lock_row for:OKS_ACTION_TIMES_V_TBL --
1422: ----------------------------------------------------
1423: PROCEDURE lock_row(
1424: p_api_version IN NUMBER,
1425: p_init_msg_list IN VARCHAR2,
1425: p_init_msg_list IN VARCHAR2,
1426: x_return_status OUT NOCOPY VARCHAR2,
1427: x_msg_count OUT NOCOPY NUMBER,
1428: x_msg_data OUT NOCOPY VARCHAR2,
1429: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
1430: px_error_tbl IN OUT NOCOPY OKC_API.ERROR_TBL_TYPE) IS
1431:
1432: l_api_version CONSTANT NUMBER := 1;
1433: l_api_name CONSTANT VARCHAR2(30) := 'V_error_tbl_lock_row';
1434: i NUMBER := 0;
1435: BEGIN
1436: OKC_API.init_msg_list(p_init_msg_list);
1437: -- Make sure PL/SQL table has recrods in it before passing
1438: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
1439: i := p_oks_action_times_v_tbl.FIRST;
1440: LOOP
1441: DECLARE
1442: l_error_rec OKC_API.ERROR_REC_TYPE;
1435: BEGIN
1436: OKC_API.init_msg_list(p_init_msg_list);
1437: -- Make sure PL/SQL table has recrods in it before passing
1438: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
1439: i := p_oks_action_times_v_tbl.FIRST;
1440: LOOP
1441: DECLARE
1442: l_error_rec OKC_API.ERROR_REC_TYPE;
1443: BEGIN
1449: p_init_msg_list => OKC_API.G_FALSE,
1450: x_return_status => l_error_rec.error_type,
1451: x_msg_count => l_error_rec.msg_count,
1452: x_msg_data => l_error_rec.msg_data,
1453: p_oks_action_times_v_rec => p_oks_action_times_v_tbl(i));
1454: IF (l_error_rec.error_type <> OKC_API.G_RET_STS_SUCCESS) THEN
1455: l_error_rec.sqlcode := SQLCODE;
1456: load_error_tbl(l_error_rec, px_error_tbl);
1457: ELSE
1471: l_error_rec.error_type := 'OTHERS';
1472: l_error_rec.sqlcode := SQLCODE;
1473: load_error_tbl(l_error_rec, px_error_tbl);
1474: END;
1475: EXIT WHEN (i = p_oks_action_times_v_tbl.LAST);
1476: i := p_oks_action_times_v_tbl.NEXT(i);
1477: END LOOP;
1478: END IF;
1479: -- Loop through the error_tbl to find the error with the highest severity
1472: l_error_rec.sqlcode := SQLCODE;
1473: load_error_tbl(l_error_rec, px_error_tbl);
1474: END;
1475: EXIT WHEN (i = p_oks_action_times_v_tbl.LAST);
1476: i := p_oks_action_times_v_tbl.NEXT(i);
1477: END LOOP;
1478: END IF;
1479: -- Loop through the error_tbl to find the error with the highest severity
1480: -- and return it.
1512: '_PVT'
1513: );
1514: END lock_row;
1515: ----------------------------------------------------
1516: -- PL/SQL TBL lock_row for:OKS_ACTION_TIMES_V_TBL --
1517: ----------------------------------------------------
1518: PROCEDURE lock_row(
1519: p_api_version IN NUMBER,
1520: p_init_msg_list IN VARCHAR2,
1520: p_init_msg_list IN VARCHAR2,
1521: x_return_status OUT NOCOPY VARCHAR2,
1522: x_msg_count OUT NOCOPY NUMBER,
1523: x_msg_data OUT NOCOPY VARCHAR2,
1524: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type) IS
1525:
1526: l_api_version CONSTANT NUMBER := 1;
1527: l_api_name CONSTANT VARCHAR2(30) := 'V_tbl_lock_row';
1528: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1529: l_error_tbl OKC_API.ERROR_TBL_TYPE;
1530: BEGIN
1531: OKC_API.init_msg_list(p_init_msg_list);
1532: -- Make sure PL/SQL table has recrods in it before passing
1533: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
1534: lock_row(
1535: p_api_version => p_api_version,
1536: p_init_msg_list => OKC_API.G_FALSE,
1537: x_return_status => x_return_status,
1536: p_init_msg_list => OKC_API.G_FALSE,
1537: x_return_status => x_return_status,
1538: x_msg_count => x_msg_count,
1539: x_msg_data => x_msg_data,
1540: p_oks_action_times_v_tbl => p_oks_action_times_v_tbl,
1541: px_error_tbl => l_error_tbl);
1542: END IF;
1543: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1544: EXCEPTION
1576: ---------------------------------------------------------------------------
1577: -- PROCEDURE update_row
1578: ---------------------------------------------------------------------------
1579: -------------------------------------
1580: -- update_row for:OKS_ACTION_TIMES --
1581: -------------------------------------
1582: PROCEDURE update_row(
1583: p_init_msg_list IN VARCHAR2,
1584: x_return_status OUT NOCOPY VARCHAR2,
1583: p_init_msg_list IN VARCHAR2,
1584: x_return_status OUT NOCOPY VARCHAR2,
1585: x_msg_count OUT NOCOPY NUMBER,
1586: x_msg_data OUT NOCOPY VARCHAR2,
1587: p_oks_action_times_rec IN oks_action_times_rec_type,
1588: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type) IS
1589:
1590: l_api_version CONSTANT NUMBER := 1;
1591: l_api_name CONSTANT VARCHAR2(30) := 'B_update_row';
1584: x_return_status OUT NOCOPY VARCHAR2,
1585: x_msg_count OUT NOCOPY NUMBER,
1586: x_msg_data OUT NOCOPY VARCHAR2,
1587: p_oks_action_times_rec IN oks_action_times_rec_type,
1588: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type) IS
1589:
1590: l_api_version CONSTANT NUMBER := 1;
1591: l_api_name CONSTANT VARCHAR2(30) := 'B_update_row';
1592: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1589:
1590: l_api_version CONSTANT NUMBER := 1;
1591: l_api_name CONSTANT VARCHAR2(30) := 'B_update_row';
1592: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1593: l_oks_action_times_rec oks_action_times_rec_type := p_oks_action_times_rec;
1594: l_def_oks_action_times_rec oks_action_times_rec_type;
1595: l_row_notfound BOOLEAN := TRUE;
1596: ----------------------------------
1597: -- FUNCTION populate_new_record --
1590: l_api_version CONSTANT NUMBER := 1;
1591: l_api_name CONSTANT VARCHAR2(30) := 'B_update_row';
1592: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1593: l_oks_action_times_rec oks_action_times_rec_type := p_oks_action_times_rec;
1594: l_def_oks_action_times_rec oks_action_times_rec_type;
1595: l_row_notfound BOOLEAN := TRUE;
1596: ----------------------------------
1597: -- FUNCTION populate_new_record --
1598: ----------------------------------
1596: ----------------------------------
1597: -- FUNCTION populate_new_record --
1598: ----------------------------------
1599: FUNCTION populate_new_record (
1600: p_oks_action_times_rec IN oks_action_times_rec_type,
1601: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
1602: ) RETURN VARCHAR2 IS
1603: l_oks_action_times_rec oks_action_times_rec_type;
1604: l_row_notfound BOOLEAN := TRUE;
1597: -- FUNCTION populate_new_record --
1598: ----------------------------------
1599: FUNCTION populate_new_record (
1600: p_oks_action_times_rec IN oks_action_times_rec_type,
1601: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
1602: ) RETURN VARCHAR2 IS
1603: l_oks_action_times_rec oks_action_times_rec_type;
1604: l_row_notfound BOOLEAN := TRUE;
1605: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1599: FUNCTION populate_new_record (
1600: p_oks_action_times_rec IN oks_action_times_rec_type,
1601: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
1602: ) RETURN VARCHAR2 IS
1603: l_oks_action_times_rec oks_action_times_rec_type;
1604: l_row_notfound BOOLEAN := TRUE;
1605: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1606: BEGIN
1607: x_oks_action_times_rec := p_oks_action_times_rec;
1603: l_oks_action_times_rec oks_action_times_rec_type;
1604: l_row_notfound BOOLEAN := TRUE;
1605: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1606: BEGIN
1607: x_oks_action_times_rec := p_oks_action_times_rec;
1608: -- Get current database values
1609: l_oks_action_times_rec := get_rec(p_oks_action_times_rec, l_return_status);
1610: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
1611: IF (x_oks_action_times_rec.id = OKC_API.G_MISS_NUM)
1605: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1606: BEGIN
1607: x_oks_action_times_rec := p_oks_action_times_rec;
1608: -- Get current database values
1609: l_oks_action_times_rec := get_rec(p_oks_action_times_rec, l_return_status);
1610: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
1611: IF (x_oks_action_times_rec.id = OKC_API.G_MISS_NUM)
1612: THEN
1613: x_oks_action_times_rec.id := l_oks_action_times_rec.id;
1607: x_oks_action_times_rec := p_oks_action_times_rec;
1608: -- Get current database values
1609: l_oks_action_times_rec := get_rec(p_oks_action_times_rec, l_return_status);
1610: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
1611: IF (x_oks_action_times_rec.id = OKC_API.G_MISS_NUM)
1612: THEN
1613: x_oks_action_times_rec.id := l_oks_action_times_rec.id;
1614: END IF;
1615: IF (x_oks_action_times_rec.cov_action_type_id = OKC_API.G_MISS_NUM)
1609: l_oks_action_times_rec := get_rec(p_oks_action_times_rec, l_return_status);
1610: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
1611: IF (x_oks_action_times_rec.id = OKC_API.G_MISS_NUM)
1612: THEN
1613: x_oks_action_times_rec.id := l_oks_action_times_rec.id;
1614: END IF;
1615: IF (x_oks_action_times_rec.cov_action_type_id = OKC_API.G_MISS_NUM)
1616: THEN
1617: x_oks_action_times_rec.cov_action_type_id := l_oks_action_times_rec.cov_action_type_id;
1611: IF (x_oks_action_times_rec.id = OKC_API.G_MISS_NUM)
1612: THEN
1613: x_oks_action_times_rec.id := l_oks_action_times_rec.id;
1614: END IF;
1615: IF (x_oks_action_times_rec.cov_action_type_id = OKC_API.G_MISS_NUM)
1616: THEN
1617: x_oks_action_times_rec.cov_action_type_id := l_oks_action_times_rec.cov_action_type_id;
1618: END IF;
1619: IF (x_oks_action_times_rec.cle_id = OKC_API.G_MISS_NUM)
1613: x_oks_action_times_rec.id := l_oks_action_times_rec.id;
1614: END IF;
1615: IF (x_oks_action_times_rec.cov_action_type_id = OKC_API.G_MISS_NUM)
1616: THEN
1617: x_oks_action_times_rec.cov_action_type_id := l_oks_action_times_rec.cov_action_type_id;
1618: END IF;
1619: IF (x_oks_action_times_rec.cle_id = OKC_API.G_MISS_NUM)
1620: THEN
1621: x_oks_action_times_rec.cle_id := l_oks_action_times_rec.cle_id;
1615: IF (x_oks_action_times_rec.cov_action_type_id = OKC_API.G_MISS_NUM)
1616: THEN
1617: x_oks_action_times_rec.cov_action_type_id := l_oks_action_times_rec.cov_action_type_id;
1618: END IF;
1619: IF (x_oks_action_times_rec.cle_id = OKC_API.G_MISS_NUM)
1620: THEN
1621: x_oks_action_times_rec.cle_id := l_oks_action_times_rec.cle_id;
1622: END IF;
1623: IF (x_oks_action_times_rec.dnz_chr_id = OKC_API.G_MISS_NUM)
1617: x_oks_action_times_rec.cov_action_type_id := l_oks_action_times_rec.cov_action_type_id;
1618: END IF;
1619: IF (x_oks_action_times_rec.cle_id = OKC_API.G_MISS_NUM)
1620: THEN
1621: x_oks_action_times_rec.cle_id := l_oks_action_times_rec.cle_id;
1622: END IF;
1623: IF (x_oks_action_times_rec.dnz_chr_id = OKC_API.G_MISS_NUM)
1624: THEN
1625: x_oks_action_times_rec.dnz_chr_id := l_oks_action_times_rec.dnz_chr_id;
1619: IF (x_oks_action_times_rec.cle_id = OKC_API.G_MISS_NUM)
1620: THEN
1621: x_oks_action_times_rec.cle_id := l_oks_action_times_rec.cle_id;
1622: END IF;
1623: IF (x_oks_action_times_rec.dnz_chr_id = OKC_API.G_MISS_NUM)
1624: THEN
1625: x_oks_action_times_rec.dnz_chr_id := l_oks_action_times_rec.dnz_chr_id;
1626: END IF;
1627: IF (x_oks_action_times_rec.uom_code = OKC_API.G_MISS_CHAR)
1621: x_oks_action_times_rec.cle_id := l_oks_action_times_rec.cle_id;
1622: END IF;
1623: IF (x_oks_action_times_rec.dnz_chr_id = OKC_API.G_MISS_NUM)
1624: THEN
1625: x_oks_action_times_rec.dnz_chr_id := l_oks_action_times_rec.dnz_chr_id;
1626: END IF;
1627: IF (x_oks_action_times_rec.uom_code = OKC_API.G_MISS_CHAR)
1628: THEN
1629: x_oks_action_times_rec.uom_code := l_oks_action_times_rec.uom_code;
1623: IF (x_oks_action_times_rec.dnz_chr_id = OKC_API.G_MISS_NUM)
1624: THEN
1625: x_oks_action_times_rec.dnz_chr_id := l_oks_action_times_rec.dnz_chr_id;
1626: END IF;
1627: IF (x_oks_action_times_rec.uom_code = OKC_API.G_MISS_CHAR)
1628: THEN
1629: x_oks_action_times_rec.uom_code := l_oks_action_times_rec.uom_code;
1630: END IF;
1631: IF (x_oks_action_times_rec.sun_duration = OKC_API.G_MISS_NUM)
1625: x_oks_action_times_rec.dnz_chr_id := l_oks_action_times_rec.dnz_chr_id;
1626: END IF;
1627: IF (x_oks_action_times_rec.uom_code = OKC_API.G_MISS_CHAR)
1628: THEN
1629: x_oks_action_times_rec.uom_code := l_oks_action_times_rec.uom_code;
1630: END IF;
1631: IF (x_oks_action_times_rec.sun_duration = OKC_API.G_MISS_NUM)
1632: THEN
1633: x_oks_action_times_rec.sun_duration := l_oks_action_times_rec.sun_duration;
1627: IF (x_oks_action_times_rec.uom_code = OKC_API.G_MISS_CHAR)
1628: THEN
1629: x_oks_action_times_rec.uom_code := l_oks_action_times_rec.uom_code;
1630: END IF;
1631: IF (x_oks_action_times_rec.sun_duration = OKC_API.G_MISS_NUM)
1632: THEN
1633: x_oks_action_times_rec.sun_duration := l_oks_action_times_rec.sun_duration;
1634: END IF;
1635: IF (x_oks_action_times_rec.mon_duration = OKC_API.G_MISS_NUM)
1629: x_oks_action_times_rec.uom_code := l_oks_action_times_rec.uom_code;
1630: END IF;
1631: IF (x_oks_action_times_rec.sun_duration = OKC_API.G_MISS_NUM)
1632: THEN
1633: x_oks_action_times_rec.sun_duration := l_oks_action_times_rec.sun_duration;
1634: END IF;
1635: IF (x_oks_action_times_rec.mon_duration = OKC_API.G_MISS_NUM)
1636: THEN
1637: x_oks_action_times_rec.mon_duration := l_oks_action_times_rec.mon_duration;
1631: IF (x_oks_action_times_rec.sun_duration = OKC_API.G_MISS_NUM)
1632: THEN
1633: x_oks_action_times_rec.sun_duration := l_oks_action_times_rec.sun_duration;
1634: END IF;
1635: IF (x_oks_action_times_rec.mon_duration = OKC_API.G_MISS_NUM)
1636: THEN
1637: x_oks_action_times_rec.mon_duration := l_oks_action_times_rec.mon_duration;
1638: END IF;
1639: IF (x_oks_action_times_rec.tue_duration = OKC_API.G_MISS_NUM)
1633: x_oks_action_times_rec.sun_duration := l_oks_action_times_rec.sun_duration;
1634: END IF;
1635: IF (x_oks_action_times_rec.mon_duration = OKC_API.G_MISS_NUM)
1636: THEN
1637: x_oks_action_times_rec.mon_duration := l_oks_action_times_rec.mon_duration;
1638: END IF;
1639: IF (x_oks_action_times_rec.tue_duration = OKC_API.G_MISS_NUM)
1640: THEN
1641: x_oks_action_times_rec.tue_duration := l_oks_action_times_rec.tue_duration;
1635: IF (x_oks_action_times_rec.mon_duration = OKC_API.G_MISS_NUM)
1636: THEN
1637: x_oks_action_times_rec.mon_duration := l_oks_action_times_rec.mon_duration;
1638: END IF;
1639: IF (x_oks_action_times_rec.tue_duration = OKC_API.G_MISS_NUM)
1640: THEN
1641: x_oks_action_times_rec.tue_duration := l_oks_action_times_rec.tue_duration;
1642: END IF;
1643: IF (x_oks_action_times_rec.wed_duration = OKC_API.G_MISS_NUM)
1637: x_oks_action_times_rec.mon_duration := l_oks_action_times_rec.mon_duration;
1638: END IF;
1639: IF (x_oks_action_times_rec.tue_duration = OKC_API.G_MISS_NUM)
1640: THEN
1641: x_oks_action_times_rec.tue_duration := l_oks_action_times_rec.tue_duration;
1642: END IF;
1643: IF (x_oks_action_times_rec.wed_duration = OKC_API.G_MISS_NUM)
1644: THEN
1645: x_oks_action_times_rec.wed_duration := l_oks_action_times_rec.wed_duration;
1639: IF (x_oks_action_times_rec.tue_duration = OKC_API.G_MISS_NUM)
1640: THEN
1641: x_oks_action_times_rec.tue_duration := l_oks_action_times_rec.tue_duration;
1642: END IF;
1643: IF (x_oks_action_times_rec.wed_duration = OKC_API.G_MISS_NUM)
1644: THEN
1645: x_oks_action_times_rec.wed_duration := l_oks_action_times_rec.wed_duration;
1646: END IF;
1647: IF (x_oks_action_times_rec.thu_duration = OKC_API.G_MISS_NUM)
1641: x_oks_action_times_rec.tue_duration := l_oks_action_times_rec.tue_duration;
1642: END IF;
1643: IF (x_oks_action_times_rec.wed_duration = OKC_API.G_MISS_NUM)
1644: THEN
1645: x_oks_action_times_rec.wed_duration := l_oks_action_times_rec.wed_duration;
1646: END IF;
1647: IF (x_oks_action_times_rec.thu_duration = OKC_API.G_MISS_NUM)
1648: THEN
1649: x_oks_action_times_rec.thu_duration := l_oks_action_times_rec.thu_duration;
1643: IF (x_oks_action_times_rec.wed_duration = OKC_API.G_MISS_NUM)
1644: THEN
1645: x_oks_action_times_rec.wed_duration := l_oks_action_times_rec.wed_duration;
1646: END IF;
1647: IF (x_oks_action_times_rec.thu_duration = OKC_API.G_MISS_NUM)
1648: THEN
1649: x_oks_action_times_rec.thu_duration := l_oks_action_times_rec.thu_duration;
1650: END IF;
1651: IF (x_oks_action_times_rec.fri_duration = OKC_API.G_MISS_NUM)
1645: x_oks_action_times_rec.wed_duration := l_oks_action_times_rec.wed_duration;
1646: END IF;
1647: IF (x_oks_action_times_rec.thu_duration = OKC_API.G_MISS_NUM)
1648: THEN
1649: x_oks_action_times_rec.thu_duration := l_oks_action_times_rec.thu_duration;
1650: END IF;
1651: IF (x_oks_action_times_rec.fri_duration = OKC_API.G_MISS_NUM)
1652: THEN
1653: x_oks_action_times_rec.fri_duration := l_oks_action_times_rec.fri_duration;
1647: IF (x_oks_action_times_rec.thu_duration = OKC_API.G_MISS_NUM)
1648: THEN
1649: x_oks_action_times_rec.thu_duration := l_oks_action_times_rec.thu_duration;
1650: END IF;
1651: IF (x_oks_action_times_rec.fri_duration = OKC_API.G_MISS_NUM)
1652: THEN
1653: x_oks_action_times_rec.fri_duration := l_oks_action_times_rec.fri_duration;
1654: END IF;
1655: IF (x_oks_action_times_rec.sat_duration = OKC_API.G_MISS_NUM)
1649: x_oks_action_times_rec.thu_duration := l_oks_action_times_rec.thu_duration;
1650: END IF;
1651: IF (x_oks_action_times_rec.fri_duration = OKC_API.G_MISS_NUM)
1652: THEN
1653: x_oks_action_times_rec.fri_duration := l_oks_action_times_rec.fri_duration;
1654: END IF;
1655: IF (x_oks_action_times_rec.sat_duration = OKC_API.G_MISS_NUM)
1656: THEN
1657: x_oks_action_times_rec.sat_duration := l_oks_action_times_rec.sat_duration;
1651: IF (x_oks_action_times_rec.fri_duration = OKC_API.G_MISS_NUM)
1652: THEN
1653: x_oks_action_times_rec.fri_duration := l_oks_action_times_rec.fri_duration;
1654: END IF;
1655: IF (x_oks_action_times_rec.sat_duration = OKC_API.G_MISS_NUM)
1656: THEN
1657: x_oks_action_times_rec.sat_duration := l_oks_action_times_rec.sat_duration;
1658: END IF;
1659: IF (x_oks_action_times_rec.program_application_id = OKC_API.G_MISS_NUM)
1653: x_oks_action_times_rec.fri_duration := l_oks_action_times_rec.fri_duration;
1654: END IF;
1655: IF (x_oks_action_times_rec.sat_duration = OKC_API.G_MISS_NUM)
1656: THEN
1657: x_oks_action_times_rec.sat_duration := l_oks_action_times_rec.sat_duration;
1658: END IF;
1659: IF (x_oks_action_times_rec.program_application_id = OKC_API.G_MISS_NUM)
1660: THEN
1661: x_oks_action_times_rec.program_application_id := l_oks_action_times_rec.program_application_id;
1655: IF (x_oks_action_times_rec.sat_duration = OKC_API.G_MISS_NUM)
1656: THEN
1657: x_oks_action_times_rec.sat_duration := l_oks_action_times_rec.sat_duration;
1658: END IF;
1659: IF (x_oks_action_times_rec.program_application_id = OKC_API.G_MISS_NUM)
1660: THEN
1661: x_oks_action_times_rec.program_application_id := l_oks_action_times_rec.program_application_id;
1662: END IF;
1663: IF (x_oks_action_times_rec.program_id = OKC_API.G_MISS_NUM)
1657: x_oks_action_times_rec.sat_duration := l_oks_action_times_rec.sat_duration;
1658: END IF;
1659: IF (x_oks_action_times_rec.program_application_id = OKC_API.G_MISS_NUM)
1660: THEN
1661: x_oks_action_times_rec.program_application_id := l_oks_action_times_rec.program_application_id;
1662: END IF;
1663: IF (x_oks_action_times_rec.program_id = OKC_API.G_MISS_NUM)
1664: THEN
1665: x_oks_action_times_rec.program_id := l_oks_action_times_rec.program_id;
1659: IF (x_oks_action_times_rec.program_application_id = OKC_API.G_MISS_NUM)
1660: THEN
1661: x_oks_action_times_rec.program_application_id := l_oks_action_times_rec.program_application_id;
1662: END IF;
1663: IF (x_oks_action_times_rec.program_id = OKC_API.G_MISS_NUM)
1664: THEN
1665: x_oks_action_times_rec.program_id := l_oks_action_times_rec.program_id;
1666: END IF;
1667: IF (x_oks_action_times_rec.program_update_date = OKC_API.G_MISS_DATE)
1661: x_oks_action_times_rec.program_application_id := l_oks_action_times_rec.program_application_id;
1662: END IF;
1663: IF (x_oks_action_times_rec.program_id = OKC_API.G_MISS_NUM)
1664: THEN
1665: x_oks_action_times_rec.program_id := l_oks_action_times_rec.program_id;
1666: END IF;
1667: IF (x_oks_action_times_rec.program_update_date = OKC_API.G_MISS_DATE)
1668: THEN
1669: x_oks_action_times_rec.program_update_date := l_oks_action_times_rec.program_update_date;
1663: IF (x_oks_action_times_rec.program_id = OKC_API.G_MISS_NUM)
1664: THEN
1665: x_oks_action_times_rec.program_id := l_oks_action_times_rec.program_id;
1666: END IF;
1667: IF (x_oks_action_times_rec.program_update_date = OKC_API.G_MISS_DATE)
1668: THEN
1669: x_oks_action_times_rec.program_update_date := l_oks_action_times_rec.program_update_date;
1670: END IF;
1671: IF (x_oks_action_times_rec.request_id = OKC_API.G_MISS_NUM)
1665: x_oks_action_times_rec.program_id := l_oks_action_times_rec.program_id;
1666: END IF;
1667: IF (x_oks_action_times_rec.program_update_date = OKC_API.G_MISS_DATE)
1668: THEN
1669: x_oks_action_times_rec.program_update_date := l_oks_action_times_rec.program_update_date;
1670: END IF;
1671: IF (x_oks_action_times_rec.request_id = OKC_API.G_MISS_NUM)
1672: THEN
1673: x_oks_action_times_rec.request_id := l_oks_action_times_rec.request_id;
1667: IF (x_oks_action_times_rec.program_update_date = OKC_API.G_MISS_DATE)
1668: THEN
1669: x_oks_action_times_rec.program_update_date := l_oks_action_times_rec.program_update_date;
1670: END IF;
1671: IF (x_oks_action_times_rec.request_id = OKC_API.G_MISS_NUM)
1672: THEN
1673: x_oks_action_times_rec.request_id := l_oks_action_times_rec.request_id;
1674: END IF;
1675: IF (x_oks_action_times_rec.created_by = OKC_API.G_MISS_NUM)
1669: x_oks_action_times_rec.program_update_date := l_oks_action_times_rec.program_update_date;
1670: END IF;
1671: IF (x_oks_action_times_rec.request_id = OKC_API.G_MISS_NUM)
1672: THEN
1673: x_oks_action_times_rec.request_id := l_oks_action_times_rec.request_id;
1674: END IF;
1675: IF (x_oks_action_times_rec.created_by = OKC_API.G_MISS_NUM)
1676: THEN
1677: x_oks_action_times_rec.created_by := l_oks_action_times_rec.created_by;
1671: IF (x_oks_action_times_rec.request_id = OKC_API.G_MISS_NUM)
1672: THEN
1673: x_oks_action_times_rec.request_id := l_oks_action_times_rec.request_id;
1674: END IF;
1675: IF (x_oks_action_times_rec.created_by = OKC_API.G_MISS_NUM)
1676: THEN
1677: x_oks_action_times_rec.created_by := l_oks_action_times_rec.created_by;
1678: END IF;
1679: IF (x_oks_action_times_rec.creation_date = OKC_API.G_MISS_DATE)
1673: x_oks_action_times_rec.request_id := l_oks_action_times_rec.request_id;
1674: END IF;
1675: IF (x_oks_action_times_rec.created_by = OKC_API.G_MISS_NUM)
1676: THEN
1677: x_oks_action_times_rec.created_by := l_oks_action_times_rec.created_by;
1678: END IF;
1679: IF (x_oks_action_times_rec.creation_date = OKC_API.G_MISS_DATE)
1680: THEN
1681: x_oks_action_times_rec.creation_date := l_oks_action_times_rec.creation_date;
1675: IF (x_oks_action_times_rec.created_by = OKC_API.G_MISS_NUM)
1676: THEN
1677: x_oks_action_times_rec.created_by := l_oks_action_times_rec.created_by;
1678: END IF;
1679: IF (x_oks_action_times_rec.creation_date = OKC_API.G_MISS_DATE)
1680: THEN
1681: x_oks_action_times_rec.creation_date := l_oks_action_times_rec.creation_date;
1682: END IF;
1683: IF (x_oks_action_times_rec.last_updated_by = OKC_API.G_MISS_NUM)
1677: x_oks_action_times_rec.created_by := l_oks_action_times_rec.created_by;
1678: END IF;
1679: IF (x_oks_action_times_rec.creation_date = OKC_API.G_MISS_DATE)
1680: THEN
1681: x_oks_action_times_rec.creation_date := l_oks_action_times_rec.creation_date;
1682: END IF;
1683: IF (x_oks_action_times_rec.last_updated_by = OKC_API.G_MISS_NUM)
1684: THEN
1685: x_oks_action_times_rec.last_updated_by := l_oks_action_times_rec.last_updated_by;
1679: IF (x_oks_action_times_rec.creation_date = OKC_API.G_MISS_DATE)
1680: THEN
1681: x_oks_action_times_rec.creation_date := l_oks_action_times_rec.creation_date;
1682: END IF;
1683: IF (x_oks_action_times_rec.last_updated_by = OKC_API.G_MISS_NUM)
1684: THEN
1685: x_oks_action_times_rec.last_updated_by := l_oks_action_times_rec.last_updated_by;
1686: END IF;
1687: IF (x_oks_action_times_rec.last_update_date = OKC_API.G_MISS_DATE)
1681: x_oks_action_times_rec.creation_date := l_oks_action_times_rec.creation_date;
1682: END IF;
1683: IF (x_oks_action_times_rec.last_updated_by = OKC_API.G_MISS_NUM)
1684: THEN
1685: x_oks_action_times_rec.last_updated_by := l_oks_action_times_rec.last_updated_by;
1686: END IF;
1687: IF (x_oks_action_times_rec.last_update_date = OKC_API.G_MISS_DATE)
1688: THEN
1689: x_oks_action_times_rec.last_update_date := l_oks_action_times_rec.last_update_date;
1683: IF (x_oks_action_times_rec.last_updated_by = OKC_API.G_MISS_NUM)
1684: THEN
1685: x_oks_action_times_rec.last_updated_by := l_oks_action_times_rec.last_updated_by;
1686: END IF;
1687: IF (x_oks_action_times_rec.last_update_date = OKC_API.G_MISS_DATE)
1688: THEN
1689: x_oks_action_times_rec.last_update_date := l_oks_action_times_rec.last_update_date;
1690: END IF;
1691: IF (x_oks_action_times_rec.last_update_login = OKC_API.G_MISS_NUM)
1685: x_oks_action_times_rec.last_updated_by := l_oks_action_times_rec.last_updated_by;
1686: END IF;
1687: IF (x_oks_action_times_rec.last_update_date = OKC_API.G_MISS_DATE)
1688: THEN
1689: x_oks_action_times_rec.last_update_date := l_oks_action_times_rec.last_update_date;
1690: END IF;
1691: IF (x_oks_action_times_rec.last_update_login = OKC_API.G_MISS_NUM)
1692: THEN
1693: x_oks_action_times_rec.last_update_login := l_oks_action_times_rec.last_update_login;
1687: IF (x_oks_action_times_rec.last_update_date = OKC_API.G_MISS_DATE)
1688: THEN
1689: x_oks_action_times_rec.last_update_date := l_oks_action_times_rec.last_update_date;
1690: END IF;
1691: IF (x_oks_action_times_rec.last_update_login = OKC_API.G_MISS_NUM)
1692: THEN
1693: x_oks_action_times_rec.last_update_login := l_oks_action_times_rec.last_update_login;
1694: END IF;
1695: IF (x_oks_action_times_rec.object_version_number = OKC_API.G_MISS_NUM)
1689: x_oks_action_times_rec.last_update_date := l_oks_action_times_rec.last_update_date;
1690: END IF;
1691: IF (x_oks_action_times_rec.last_update_login = OKC_API.G_MISS_NUM)
1692: THEN
1693: x_oks_action_times_rec.last_update_login := l_oks_action_times_rec.last_update_login;
1694: END IF;
1695: IF (x_oks_action_times_rec.object_version_number = OKC_API.G_MISS_NUM)
1696: THEN
1697: x_oks_action_times_rec.object_version_number := l_oks_action_times_rec.object_version_number;
1691: IF (x_oks_action_times_rec.last_update_login = OKC_API.G_MISS_NUM)
1692: THEN
1693: x_oks_action_times_rec.last_update_login := l_oks_action_times_rec.last_update_login;
1694: END IF;
1695: IF (x_oks_action_times_rec.object_version_number = OKC_API.G_MISS_NUM)
1696: THEN
1697: x_oks_action_times_rec.object_version_number := l_oks_action_times_rec.object_version_number;
1698: END IF;
1699: END IF;
1693: x_oks_action_times_rec.last_update_login := l_oks_action_times_rec.last_update_login;
1694: END IF;
1695: IF (x_oks_action_times_rec.object_version_number = OKC_API.G_MISS_NUM)
1696: THEN
1697: x_oks_action_times_rec.object_version_number := l_oks_action_times_rec.object_version_number;
1698: END IF;
1699: END IF;
1700: RETURN(l_return_status);
1701: END populate_new_record;
1699: END IF;
1700: RETURN(l_return_status);
1701: END populate_new_record;
1702: -----------------------------------------
1703: -- Set_Attributes for:OKS_ACTION_TIMES --
1704: -----------------------------------------
1705: FUNCTION Set_Attributes (
1706: p_oks_action_times_rec IN oks_action_times_rec_type,
1707: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
1702: -----------------------------------------
1703: -- Set_Attributes for:OKS_ACTION_TIMES --
1704: -----------------------------------------
1705: FUNCTION Set_Attributes (
1706: p_oks_action_times_rec IN oks_action_times_rec_type,
1707: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
1708: ) RETURN VARCHAR2 IS
1709: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1710: BEGIN
1703: -- Set_Attributes for:OKS_ACTION_TIMES --
1704: -----------------------------------------
1705: FUNCTION Set_Attributes (
1706: p_oks_action_times_rec IN oks_action_times_rec_type,
1707: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
1708: ) RETURN VARCHAR2 IS
1709: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1710: BEGIN
1711: x_oks_action_times_rec := p_oks_action_times_rec;
1707: x_oks_action_times_rec OUT NOCOPY oks_action_times_rec_type
1708: ) RETURN VARCHAR2 IS
1709: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1710: BEGIN
1711: x_oks_action_times_rec := p_oks_action_times_rec;
1712: x_oks_action_times_rec.OBJECT_VERSION_NUMBER := p_oks_action_times_rec.OBJECT_VERSION_NUMBER + 1;
1713: RETURN(l_return_status);
1714: END Set_Attributes;
1715: BEGIN
1708: ) RETURN VARCHAR2 IS
1709: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1710: BEGIN
1711: x_oks_action_times_rec := p_oks_action_times_rec;
1712: x_oks_action_times_rec.OBJECT_VERSION_NUMBER := p_oks_action_times_rec.OBJECT_VERSION_NUMBER + 1;
1713: RETURN(l_return_status);
1714: END Set_Attributes;
1715: BEGIN
1716: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1723: RAISE OKC_API.G_EXCEPTION_ERROR;
1724: END IF;
1725: --- Setting item attributes
1726: l_return_status := Set_Attributes(
1727: p_oks_action_times_rec, -- IN
1728: l_oks_action_times_rec); -- OUT
1729: --- If any errors happen abort API
1730: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1731: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1724: END IF;
1725: --- Setting item attributes
1726: l_return_status := Set_Attributes(
1727: p_oks_action_times_rec, -- IN
1728: l_oks_action_times_rec); -- OUT
1729: --- If any errors happen abort API
1730: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1731: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1732: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1731: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1732: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1733: RAISE OKC_API.G_EXCEPTION_ERROR;
1734: END IF;
1735: l_return_status := populate_new_record(l_oks_action_times_rec, l_def_oks_action_times_rec);
1736: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1737: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1738: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1739: RAISE OKC_API.G_EXCEPTION_ERROR;
1737: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1738: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1739: RAISE OKC_API.G_EXCEPTION_ERROR;
1740: END IF;
1741: UPDATE OKS_ACTION_TIMES
1742: SET COV_ACTION_TYPE_ID = l_def_oks_action_times_rec.cov_action_type_id,
1743: CLE_ID = l_def_oks_action_times_rec.cle_id,
1744: DNZ_CHR_ID = l_def_oks_action_times_rec.dnz_chr_id,
1745: UOM_CODE = l_def_oks_action_times_rec.uom_code,
1738: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1739: RAISE OKC_API.G_EXCEPTION_ERROR;
1740: END IF;
1741: UPDATE OKS_ACTION_TIMES
1742: SET COV_ACTION_TYPE_ID = l_def_oks_action_times_rec.cov_action_type_id,
1743: CLE_ID = l_def_oks_action_times_rec.cle_id,
1744: DNZ_CHR_ID = l_def_oks_action_times_rec.dnz_chr_id,
1745: UOM_CODE = l_def_oks_action_times_rec.uom_code,
1746: SUN_DURATION = l_def_oks_action_times_rec.sun_duration,
1739: RAISE OKC_API.G_EXCEPTION_ERROR;
1740: END IF;
1741: UPDATE OKS_ACTION_TIMES
1742: SET COV_ACTION_TYPE_ID = l_def_oks_action_times_rec.cov_action_type_id,
1743: CLE_ID = l_def_oks_action_times_rec.cle_id,
1744: DNZ_CHR_ID = l_def_oks_action_times_rec.dnz_chr_id,
1745: UOM_CODE = l_def_oks_action_times_rec.uom_code,
1746: SUN_DURATION = l_def_oks_action_times_rec.sun_duration,
1747: MON_DURATION = l_def_oks_action_times_rec.mon_duration,
1740: END IF;
1741: UPDATE OKS_ACTION_TIMES
1742: SET COV_ACTION_TYPE_ID = l_def_oks_action_times_rec.cov_action_type_id,
1743: CLE_ID = l_def_oks_action_times_rec.cle_id,
1744: DNZ_CHR_ID = l_def_oks_action_times_rec.dnz_chr_id,
1745: UOM_CODE = l_def_oks_action_times_rec.uom_code,
1746: SUN_DURATION = l_def_oks_action_times_rec.sun_duration,
1747: MON_DURATION = l_def_oks_action_times_rec.mon_duration,
1748: TUE_DURATION = l_def_oks_action_times_rec.tue_duration,
1741: UPDATE OKS_ACTION_TIMES
1742: SET COV_ACTION_TYPE_ID = l_def_oks_action_times_rec.cov_action_type_id,
1743: CLE_ID = l_def_oks_action_times_rec.cle_id,
1744: DNZ_CHR_ID = l_def_oks_action_times_rec.dnz_chr_id,
1745: UOM_CODE = l_def_oks_action_times_rec.uom_code,
1746: SUN_DURATION = l_def_oks_action_times_rec.sun_duration,
1747: MON_DURATION = l_def_oks_action_times_rec.mon_duration,
1748: TUE_DURATION = l_def_oks_action_times_rec.tue_duration,
1749: WED_DURATION = l_def_oks_action_times_rec.wed_duration,
1742: SET COV_ACTION_TYPE_ID = l_def_oks_action_times_rec.cov_action_type_id,
1743: CLE_ID = l_def_oks_action_times_rec.cle_id,
1744: DNZ_CHR_ID = l_def_oks_action_times_rec.dnz_chr_id,
1745: UOM_CODE = l_def_oks_action_times_rec.uom_code,
1746: SUN_DURATION = l_def_oks_action_times_rec.sun_duration,
1747: MON_DURATION = l_def_oks_action_times_rec.mon_duration,
1748: TUE_DURATION = l_def_oks_action_times_rec.tue_duration,
1749: WED_DURATION = l_def_oks_action_times_rec.wed_duration,
1750: THU_DURATION = l_def_oks_action_times_rec.thu_duration,
1743: CLE_ID = l_def_oks_action_times_rec.cle_id,
1744: DNZ_CHR_ID = l_def_oks_action_times_rec.dnz_chr_id,
1745: UOM_CODE = l_def_oks_action_times_rec.uom_code,
1746: SUN_DURATION = l_def_oks_action_times_rec.sun_duration,
1747: MON_DURATION = l_def_oks_action_times_rec.mon_duration,
1748: TUE_DURATION = l_def_oks_action_times_rec.tue_duration,
1749: WED_DURATION = l_def_oks_action_times_rec.wed_duration,
1750: THU_DURATION = l_def_oks_action_times_rec.thu_duration,
1751: FRI_DURATION = l_def_oks_action_times_rec.fri_duration,
1744: DNZ_CHR_ID = l_def_oks_action_times_rec.dnz_chr_id,
1745: UOM_CODE = l_def_oks_action_times_rec.uom_code,
1746: SUN_DURATION = l_def_oks_action_times_rec.sun_duration,
1747: MON_DURATION = l_def_oks_action_times_rec.mon_duration,
1748: TUE_DURATION = l_def_oks_action_times_rec.tue_duration,
1749: WED_DURATION = l_def_oks_action_times_rec.wed_duration,
1750: THU_DURATION = l_def_oks_action_times_rec.thu_duration,
1751: FRI_DURATION = l_def_oks_action_times_rec.fri_duration,
1752: SAT_DURATION = l_def_oks_action_times_rec.sat_duration,
1745: UOM_CODE = l_def_oks_action_times_rec.uom_code,
1746: SUN_DURATION = l_def_oks_action_times_rec.sun_duration,
1747: MON_DURATION = l_def_oks_action_times_rec.mon_duration,
1748: TUE_DURATION = l_def_oks_action_times_rec.tue_duration,
1749: WED_DURATION = l_def_oks_action_times_rec.wed_duration,
1750: THU_DURATION = l_def_oks_action_times_rec.thu_duration,
1751: FRI_DURATION = l_def_oks_action_times_rec.fri_duration,
1752: SAT_DURATION = l_def_oks_action_times_rec.sat_duration,
1753: PROGRAM_APPLICATION_ID = l_def_oks_action_times_rec.program_application_id,
1746: SUN_DURATION = l_def_oks_action_times_rec.sun_duration,
1747: MON_DURATION = l_def_oks_action_times_rec.mon_duration,
1748: TUE_DURATION = l_def_oks_action_times_rec.tue_duration,
1749: WED_DURATION = l_def_oks_action_times_rec.wed_duration,
1750: THU_DURATION = l_def_oks_action_times_rec.thu_duration,
1751: FRI_DURATION = l_def_oks_action_times_rec.fri_duration,
1752: SAT_DURATION = l_def_oks_action_times_rec.sat_duration,
1753: PROGRAM_APPLICATION_ID = l_def_oks_action_times_rec.program_application_id,
1754: PROGRAM_ID = l_def_oks_action_times_rec.program_id,
1747: MON_DURATION = l_def_oks_action_times_rec.mon_duration,
1748: TUE_DURATION = l_def_oks_action_times_rec.tue_duration,
1749: WED_DURATION = l_def_oks_action_times_rec.wed_duration,
1750: THU_DURATION = l_def_oks_action_times_rec.thu_duration,
1751: FRI_DURATION = l_def_oks_action_times_rec.fri_duration,
1752: SAT_DURATION = l_def_oks_action_times_rec.sat_duration,
1753: PROGRAM_APPLICATION_ID = l_def_oks_action_times_rec.program_application_id,
1754: PROGRAM_ID = l_def_oks_action_times_rec.program_id,
1755: PROGRAM_UPDATE_DATE = l_def_oks_action_times_rec.program_update_date,
1748: TUE_DURATION = l_def_oks_action_times_rec.tue_duration,
1749: WED_DURATION = l_def_oks_action_times_rec.wed_duration,
1750: THU_DURATION = l_def_oks_action_times_rec.thu_duration,
1751: FRI_DURATION = l_def_oks_action_times_rec.fri_duration,
1752: SAT_DURATION = l_def_oks_action_times_rec.sat_duration,
1753: PROGRAM_APPLICATION_ID = l_def_oks_action_times_rec.program_application_id,
1754: PROGRAM_ID = l_def_oks_action_times_rec.program_id,
1755: PROGRAM_UPDATE_DATE = l_def_oks_action_times_rec.program_update_date,
1756: REQUEST_ID = l_def_oks_action_times_rec.request_id,
1749: WED_DURATION = l_def_oks_action_times_rec.wed_duration,
1750: THU_DURATION = l_def_oks_action_times_rec.thu_duration,
1751: FRI_DURATION = l_def_oks_action_times_rec.fri_duration,
1752: SAT_DURATION = l_def_oks_action_times_rec.sat_duration,
1753: PROGRAM_APPLICATION_ID = l_def_oks_action_times_rec.program_application_id,
1754: PROGRAM_ID = l_def_oks_action_times_rec.program_id,
1755: PROGRAM_UPDATE_DATE = l_def_oks_action_times_rec.program_update_date,
1756: REQUEST_ID = l_def_oks_action_times_rec.request_id,
1757: CREATED_BY = l_def_oks_action_times_rec.created_by,
1750: THU_DURATION = l_def_oks_action_times_rec.thu_duration,
1751: FRI_DURATION = l_def_oks_action_times_rec.fri_duration,
1752: SAT_DURATION = l_def_oks_action_times_rec.sat_duration,
1753: PROGRAM_APPLICATION_ID = l_def_oks_action_times_rec.program_application_id,
1754: PROGRAM_ID = l_def_oks_action_times_rec.program_id,
1755: PROGRAM_UPDATE_DATE = l_def_oks_action_times_rec.program_update_date,
1756: REQUEST_ID = l_def_oks_action_times_rec.request_id,
1757: CREATED_BY = l_def_oks_action_times_rec.created_by,
1758: CREATION_DATE = l_def_oks_action_times_rec.creation_date,
1751: FRI_DURATION = l_def_oks_action_times_rec.fri_duration,
1752: SAT_DURATION = l_def_oks_action_times_rec.sat_duration,
1753: PROGRAM_APPLICATION_ID = l_def_oks_action_times_rec.program_application_id,
1754: PROGRAM_ID = l_def_oks_action_times_rec.program_id,
1755: PROGRAM_UPDATE_DATE = l_def_oks_action_times_rec.program_update_date,
1756: REQUEST_ID = l_def_oks_action_times_rec.request_id,
1757: CREATED_BY = l_def_oks_action_times_rec.created_by,
1758: CREATION_DATE = l_def_oks_action_times_rec.creation_date,
1759: LAST_UPDATED_BY = l_def_oks_action_times_rec.last_updated_by,
1752: SAT_DURATION = l_def_oks_action_times_rec.sat_duration,
1753: PROGRAM_APPLICATION_ID = l_def_oks_action_times_rec.program_application_id,
1754: PROGRAM_ID = l_def_oks_action_times_rec.program_id,
1755: PROGRAM_UPDATE_DATE = l_def_oks_action_times_rec.program_update_date,
1756: REQUEST_ID = l_def_oks_action_times_rec.request_id,
1757: CREATED_BY = l_def_oks_action_times_rec.created_by,
1758: CREATION_DATE = l_def_oks_action_times_rec.creation_date,
1759: LAST_UPDATED_BY = l_def_oks_action_times_rec.last_updated_by,
1760: LAST_UPDATE_DATE = l_def_oks_action_times_rec.last_update_date,
1753: PROGRAM_APPLICATION_ID = l_def_oks_action_times_rec.program_application_id,
1754: PROGRAM_ID = l_def_oks_action_times_rec.program_id,
1755: PROGRAM_UPDATE_DATE = l_def_oks_action_times_rec.program_update_date,
1756: REQUEST_ID = l_def_oks_action_times_rec.request_id,
1757: CREATED_BY = l_def_oks_action_times_rec.created_by,
1758: CREATION_DATE = l_def_oks_action_times_rec.creation_date,
1759: LAST_UPDATED_BY = l_def_oks_action_times_rec.last_updated_by,
1760: LAST_UPDATE_DATE = l_def_oks_action_times_rec.last_update_date,
1761: LAST_UPDATE_LOGIN = l_def_oks_action_times_rec.last_update_login,
1754: PROGRAM_ID = l_def_oks_action_times_rec.program_id,
1755: PROGRAM_UPDATE_DATE = l_def_oks_action_times_rec.program_update_date,
1756: REQUEST_ID = l_def_oks_action_times_rec.request_id,
1757: CREATED_BY = l_def_oks_action_times_rec.created_by,
1758: CREATION_DATE = l_def_oks_action_times_rec.creation_date,
1759: LAST_UPDATED_BY = l_def_oks_action_times_rec.last_updated_by,
1760: LAST_UPDATE_DATE = l_def_oks_action_times_rec.last_update_date,
1761: LAST_UPDATE_LOGIN = l_def_oks_action_times_rec.last_update_login,
1762: OBJECT_VERSION_NUMBER = l_def_oks_action_times_rec.object_version_number
1755: PROGRAM_UPDATE_DATE = l_def_oks_action_times_rec.program_update_date,
1756: REQUEST_ID = l_def_oks_action_times_rec.request_id,
1757: CREATED_BY = l_def_oks_action_times_rec.created_by,
1758: CREATION_DATE = l_def_oks_action_times_rec.creation_date,
1759: LAST_UPDATED_BY = l_def_oks_action_times_rec.last_updated_by,
1760: LAST_UPDATE_DATE = l_def_oks_action_times_rec.last_update_date,
1761: LAST_UPDATE_LOGIN = l_def_oks_action_times_rec.last_update_login,
1762: OBJECT_VERSION_NUMBER = l_def_oks_action_times_rec.object_version_number
1763: WHERE ID = l_def_oks_action_times_rec.id;
1756: REQUEST_ID = l_def_oks_action_times_rec.request_id,
1757: CREATED_BY = l_def_oks_action_times_rec.created_by,
1758: CREATION_DATE = l_def_oks_action_times_rec.creation_date,
1759: LAST_UPDATED_BY = l_def_oks_action_times_rec.last_updated_by,
1760: LAST_UPDATE_DATE = l_def_oks_action_times_rec.last_update_date,
1761: LAST_UPDATE_LOGIN = l_def_oks_action_times_rec.last_update_login,
1762: OBJECT_VERSION_NUMBER = l_def_oks_action_times_rec.object_version_number
1763: WHERE ID = l_def_oks_action_times_rec.id;
1764:
1757: CREATED_BY = l_def_oks_action_times_rec.created_by,
1758: CREATION_DATE = l_def_oks_action_times_rec.creation_date,
1759: LAST_UPDATED_BY = l_def_oks_action_times_rec.last_updated_by,
1760: LAST_UPDATE_DATE = l_def_oks_action_times_rec.last_update_date,
1761: LAST_UPDATE_LOGIN = l_def_oks_action_times_rec.last_update_login,
1762: OBJECT_VERSION_NUMBER = l_def_oks_action_times_rec.object_version_number
1763: WHERE ID = l_def_oks_action_times_rec.id;
1764:
1765: x_oks_action_times_rec := l_oks_action_times_rec;
1758: CREATION_DATE = l_def_oks_action_times_rec.creation_date,
1759: LAST_UPDATED_BY = l_def_oks_action_times_rec.last_updated_by,
1760: LAST_UPDATE_DATE = l_def_oks_action_times_rec.last_update_date,
1761: LAST_UPDATE_LOGIN = l_def_oks_action_times_rec.last_update_login,
1762: OBJECT_VERSION_NUMBER = l_def_oks_action_times_rec.object_version_number
1763: WHERE ID = l_def_oks_action_times_rec.id;
1764:
1765: x_oks_action_times_rec := l_oks_action_times_rec;
1766: x_return_status := l_return_status;
1759: LAST_UPDATED_BY = l_def_oks_action_times_rec.last_updated_by,
1760: LAST_UPDATE_DATE = l_def_oks_action_times_rec.last_update_date,
1761: LAST_UPDATE_LOGIN = l_def_oks_action_times_rec.last_update_login,
1762: OBJECT_VERSION_NUMBER = l_def_oks_action_times_rec.object_version_number
1763: WHERE ID = l_def_oks_action_times_rec.id;
1764:
1765: x_oks_action_times_rec := l_oks_action_times_rec;
1766: x_return_status := l_return_status;
1767: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1761: LAST_UPDATE_LOGIN = l_def_oks_action_times_rec.last_update_login,
1762: OBJECT_VERSION_NUMBER = l_def_oks_action_times_rec.object_version_number
1763: WHERE ID = l_def_oks_action_times_rec.id;
1764:
1765: x_oks_action_times_rec := l_oks_action_times_rec;
1766: x_return_status := l_return_status;
1767: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1768: EXCEPTION
1769: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1797: '_PVT'
1798: );
1799: END update_row;
1800: ---------------------------------------
1801: -- update_row for:OKS_ACTION_TIMES_V --
1802: ---------------------------------------
1803: PROCEDURE update_row(
1804: p_api_version IN NUMBER,
1805: p_init_msg_list IN VARCHAR2,
1805: p_init_msg_list IN VARCHAR2,
1806: x_return_status OUT NOCOPY VARCHAR2,
1807: x_msg_count OUT NOCOPY NUMBER,
1808: x_msg_data OUT NOCOPY VARCHAR2,
1809: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
1810: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type) IS
1811:
1812: l_api_version CONSTANT NUMBER := 1;
1813: l_api_name CONSTANT VARCHAR2(30) := 'V_update_row';
1806: x_return_status OUT NOCOPY VARCHAR2,
1807: x_msg_count OUT NOCOPY NUMBER,
1808: x_msg_data OUT NOCOPY VARCHAR2,
1809: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
1810: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type) IS
1811:
1812: l_api_version CONSTANT NUMBER := 1;
1813: l_api_name CONSTANT VARCHAR2(30) := 'V_update_row';
1814: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1811:
1812: l_api_version CONSTANT NUMBER := 1;
1813: l_api_name CONSTANT VARCHAR2(30) := 'V_update_row';
1814: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1815: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1816: l_def_oks_action_times_v_rec oks_action_times_v_rec_type;
1817: l_db_oks_action_times_v_rec oks_action_times_v_rec_type;
1818: l_oks_action_times_rec oks_action_times_rec_type;
1819: lx_oks_action_times_rec oks_action_times_rec_type;
1812: l_api_version CONSTANT NUMBER := 1;
1813: l_api_name CONSTANT VARCHAR2(30) := 'V_update_row';
1814: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1815: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1816: l_def_oks_action_times_v_rec oks_action_times_v_rec_type;
1817: l_db_oks_action_times_v_rec oks_action_times_v_rec_type;
1818: l_oks_action_times_rec oks_action_times_rec_type;
1819: lx_oks_action_times_rec oks_action_times_rec_type;
1820: -------------------------------
1813: l_api_name CONSTANT VARCHAR2(30) := 'V_update_row';
1814: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1815: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1816: l_def_oks_action_times_v_rec oks_action_times_v_rec_type;
1817: l_db_oks_action_times_v_rec oks_action_times_v_rec_type;
1818: l_oks_action_times_rec oks_action_times_rec_type;
1819: lx_oks_action_times_rec oks_action_times_rec_type;
1820: -------------------------------
1821: -- FUNCTION fill_who_columns --
1814: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1815: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1816: l_def_oks_action_times_v_rec oks_action_times_v_rec_type;
1817: l_db_oks_action_times_v_rec oks_action_times_v_rec_type;
1818: l_oks_action_times_rec oks_action_times_rec_type;
1819: lx_oks_action_times_rec oks_action_times_rec_type;
1820: -------------------------------
1821: -- FUNCTION fill_who_columns --
1822: -------------------------------
1815: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1816: l_def_oks_action_times_v_rec oks_action_times_v_rec_type;
1817: l_db_oks_action_times_v_rec oks_action_times_v_rec_type;
1818: l_oks_action_times_rec oks_action_times_rec_type;
1819: lx_oks_action_times_rec oks_action_times_rec_type;
1820: -------------------------------
1821: -- FUNCTION fill_who_columns --
1822: -------------------------------
1823: FUNCTION fill_who_columns (
1820: -------------------------------
1821: -- FUNCTION fill_who_columns --
1822: -------------------------------
1823: FUNCTION fill_who_columns (
1824: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
1825: ) RETURN oks_action_times_v_rec_type IS
1826: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1827: BEGIN
1828: l_oks_action_times_v_rec.LAST_UPDATE_DATE := SYSDATE;
1821: -- FUNCTION fill_who_columns --
1822: -------------------------------
1823: FUNCTION fill_who_columns (
1824: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
1825: ) RETURN oks_action_times_v_rec_type IS
1826: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1827: BEGIN
1828: l_oks_action_times_v_rec.LAST_UPDATE_DATE := SYSDATE;
1829: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
1822: -------------------------------
1823: FUNCTION fill_who_columns (
1824: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
1825: ) RETURN oks_action_times_v_rec_type IS
1826: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1827: BEGIN
1828: l_oks_action_times_v_rec.LAST_UPDATE_DATE := SYSDATE;
1829: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
1830: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
1824: p_oks_action_times_v_rec IN oks_action_times_v_rec_type
1825: ) RETURN oks_action_times_v_rec_type IS
1826: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1827: BEGIN
1828: l_oks_action_times_v_rec.LAST_UPDATE_DATE := SYSDATE;
1829: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
1830: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
1831: RETURN(l_oks_action_times_v_rec);
1832: END fill_who_columns;
1825: ) RETURN oks_action_times_v_rec_type IS
1826: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1827: BEGIN
1828: l_oks_action_times_v_rec.LAST_UPDATE_DATE := SYSDATE;
1829: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
1830: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
1831: RETURN(l_oks_action_times_v_rec);
1832: END fill_who_columns;
1833: ----------------------------------
1826: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
1827: BEGIN
1828: l_oks_action_times_v_rec.LAST_UPDATE_DATE := SYSDATE;
1829: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
1830: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
1831: RETURN(l_oks_action_times_v_rec);
1832: END fill_who_columns;
1833: ----------------------------------
1834: -- FUNCTION populate_new_record --
1827: BEGIN
1828: l_oks_action_times_v_rec.LAST_UPDATE_DATE := SYSDATE;
1829: l_oks_action_times_v_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
1830: l_oks_action_times_v_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
1831: RETURN(l_oks_action_times_v_rec);
1832: END fill_who_columns;
1833: ----------------------------------
1834: -- FUNCTION populate_new_record --
1835: ----------------------------------
1833: ----------------------------------
1834: -- FUNCTION populate_new_record --
1835: ----------------------------------
1836: FUNCTION populate_new_record (
1837: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
1838: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type
1839: ) RETURN VARCHAR2 IS
1840: l_row_notfound BOOLEAN := TRUE;
1841: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1834: -- FUNCTION populate_new_record --
1835: ----------------------------------
1836: FUNCTION populate_new_record (
1837: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
1838: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type
1839: ) RETURN VARCHAR2 IS
1840: l_row_notfound BOOLEAN := TRUE;
1841: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1842: BEGIN
1839: ) RETURN VARCHAR2 IS
1840: l_row_notfound BOOLEAN := TRUE;
1841: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1842: BEGIN
1843: x_oks_action_times_v_rec := p_oks_action_times_v_rec;
1844: -- Get current database values
1845: -- NOTE: Never assign the OBJECT_VERSION_NUMBER. Force the user to pass it
1846: -- so it may be verified through LOCK_ROW.
1847: l_db_oks_action_times_v_rec := get_rec(p_oks_action_times_v_rec, l_return_status);
1843: x_oks_action_times_v_rec := p_oks_action_times_v_rec;
1844: -- Get current database values
1845: -- NOTE: Never assign the OBJECT_VERSION_NUMBER. Force the user to pass it
1846: -- so it may be verified through LOCK_ROW.
1847: l_db_oks_action_times_v_rec := get_rec(p_oks_action_times_v_rec, l_return_status);
1848: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
1849: IF (x_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM)
1850: THEN
1851: x_oks_action_times_v_rec.id := l_db_oks_action_times_v_rec.id;
1845: -- NOTE: Never assign the OBJECT_VERSION_NUMBER. Force the user to pass it
1846: -- so it may be verified through LOCK_ROW.
1847: l_db_oks_action_times_v_rec := get_rec(p_oks_action_times_v_rec, l_return_status);
1848: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
1849: IF (x_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM)
1850: THEN
1851: x_oks_action_times_v_rec.id := l_db_oks_action_times_v_rec.id;
1852: END IF;
1853: IF (x_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM)
1847: l_db_oks_action_times_v_rec := get_rec(p_oks_action_times_v_rec, l_return_status);
1848: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
1849: IF (x_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM)
1850: THEN
1851: x_oks_action_times_v_rec.id := l_db_oks_action_times_v_rec.id;
1852: END IF;
1853: IF (x_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM)
1854: THEN
1855: x_oks_action_times_v_rec.cov_action_type_id := l_db_oks_action_times_v_rec.cov_action_type_id;
1849: IF (x_oks_action_times_v_rec.id = OKC_API.G_MISS_NUM)
1850: THEN
1851: x_oks_action_times_v_rec.id := l_db_oks_action_times_v_rec.id;
1852: END IF;
1853: IF (x_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM)
1854: THEN
1855: x_oks_action_times_v_rec.cov_action_type_id := l_db_oks_action_times_v_rec.cov_action_type_id;
1856: END IF;
1857: IF (x_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM)
1851: x_oks_action_times_v_rec.id := l_db_oks_action_times_v_rec.id;
1852: END IF;
1853: IF (x_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM)
1854: THEN
1855: x_oks_action_times_v_rec.cov_action_type_id := l_db_oks_action_times_v_rec.cov_action_type_id;
1856: END IF;
1857: IF (x_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM)
1858: THEN
1859: x_oks_action_times_v_rec.cle_id := l_db_oks_action_times_v_rec.cle_id;
1853: IF (x_oks_action_times_v_rec.cov_action_type_id = OKC_API.G_MISS_NUM)
1854: THEN
1855: x_oks_action_times_v_rec.cov_action_type_id := l_db_oks_action_times_v_rec.cov_action_type_id;
1856: END IF;
1857: IF (x_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM)
1858: THEN
1859: x_oks_action_times_v_rec.cle_id := l_db_oks_action_times_v_rec.cle_id;
1860: END IF;
1861: IF (x_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM)
1855: x_oks_action_times_v_rec.cov_action_type_id := l_db_oks_action_times_v_rec.cov_action_type_id;
1856: END IF;
1857: IF (x_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM)
1858: THEN
1859: x_oks_action_times_v_rec.cle_id := l_db_oks_action_times_v_rec.cle_id;
1860: END IF;
1861: IF (x_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM)
1862: THEN
1863: x_oks_action_times_v_rec.dnz_chr_id := l_db_oks_action_times_v_rec.dnz_chr_id;
1857: IF (x_oks_action_times_v_rec.cle_id = OKC_API.G_MISS_NUM)
1858: THEN
1859: x_oks_action_times_v_rec.cle_id := l_db_oks_action_times_v_rec.cle_id;
1860: END IF;
1861: IF (x_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM)
1862: THEN
1863: x_oks_action_times_v_rec.dnz_chr_id := l_db_oks_action_times_v_rec.dnz_chr_id;
1864: END IF;
1865: IF (x_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR)
1859: x_oks_action_times_v_rec.cle_id := l_db_oks_action_times_v_rec.cle_id;
1860: END IF;
1861: IF (x_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM)
1862: THEN
1863: x_oks_action_times_v_rec.dnz_chr_id := l_db_oks_action_times_v_rec.dnz_chr_id;
1864: END IF;
1865: IF (x_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR)
1866: THEN
1867: x_oks_action_times_v_rec.uom_code := l_db_oks_action_times_v_rec.uom_code;
1861: IF (x_oks_action_times_v_rec.dnz_chr_id = OKC_API.G_MISS_NUM)
1862: THEN
1863: x_oks_action_times_v_rec.dnz_chr_id := l_db_oks_action_times_v_rec.dnz_chr_id;
1864: END IF;
1865: IF (x_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR)
1866: THEN
1867: x_oks_action_times_v_rec.uom_code := l_db_oks_action_times_v_rec.uom_code;
1868: END IF;
1869: IF (x_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM)
1863: x_oks_action_times_v_rec.dnz_chr_id := l_db_oks_action_times_v_rec.dnz_chr_id;
1864: END IF;
1865: IF (x_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR)
1866: THEN
1867: x_oks_action_times_v_rec.uom_code := l_db_oks_action_times_v_rec.uom_code;
1868: END IF;
1869: IF (x_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM)
1870: THEN
1871: x_oks_action_times_v_rec.sun_duration := l_db_oks_action_times_v_rec.sun_duration;
1865: IF (x_oks_action_times_v_rec.uom_code = OKC_API.G_MISS_CHAR)
1866: THEN
1867: x_oks_action_times_v_rec.uom_code := l_db_oks_action_times_v_rec.uom_code;
1868: END IF;
1869: IF (x_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM)
1870: THEN
1871: x_oks_action_times_v_rec.sun_duration := l_db_oks_action_times_v_rec.sun_duration;
1872: END IF;
1873: IF (x_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM)
1867: x_oks_action_times_v_rec.uom_code := l_db_oks_action_times_v_rec.uom_code;
1868: END IF;
1869: IF (x_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM)
1870: THEN
1871: x_oks_action_times_v_rec.sun_duration := l_db_oks_action_times_v_rec.sun_duration;
1872: END IF;
1873: IF (x_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM)
1874: THEN
1875: x_oks_action_times_v_rec.mon_duration := l_db_oks_action_times_v_rec.mon_duration;
1869: IF (x_oks_action_times_v_rec.sun_duration = OKC_API.G_MISS_NUM)
1870: THEN
1871: x_oks_action_times_v_rec.sun_duration := l_db_oks_action_times_v_rec.sun_duration;
1872: END IF;
1873: IF (x_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM)
1874: THEN
1875: x_oks_action_times_v_rec.mon_duration := l_db_oks_action_times_v_rec.mon_duration;
1876: END IF;
1877: IF (x_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM)
1871: x_oks_action_times_v_rec.sun_duration := l_db_oks_action_times_v_rec.sun_duration;
1872: END IF;
1873: IF (x_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM)
1874: THEN
1875: x_oks_action_times_v_rec.mon_duration := l_db_oks_action_times_v_rec.mon_duration;
1876: END IF;
1877: IF (x_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM)
1878: THEN
1879: x_oks_action_times_v_rec.tue_duration := l_db_oks_action_times_v_rec.tue_duration;
1873: IF (x_oks_action_times_v_rec.mon_duration = OKC_API.G_MISS_NUM)
1874: THEN
1875: x_oks_action_times_v_rec.mon_duration := l_db_oks_action_times_v_rec.mon_duration;
1876: END IF;
1877: IF (x_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM)
1878: THEN
1879: x_oks_action_times_v_rec.tue_duration := l_db_oks_action_times_v_rec.tue_duration;
1880: END IF;
1881: IF (x_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM)
1875: x_oks_action_times_v_rec.mon_duration := l_db_oks_action_times_v_rec.mon_duration;
1876: END IF;
1877: IF (x_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM)
1878: THEN
1879: x_oks_action_times_v_rec.tue_duration := l_db_oks_action_times_v_rec.tue_duration;
1880: END IF;
1881: IF (x_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM)
1882: THEN
1883: x_oks_action_times_v_rec.wed_duration := l_db_oks_action_times_v_rec.wed_duration;
1877: IF (x_oks_action_times_v_rec.tue_duration = OKC_API.G_MISS_NUM)
1878: THEN
1879: x_oks_action_times_v_rec.tue_duration := l_db_oks_action_times_v_rec.tue_duration;
1880: END IF;
1881: IF (x_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM)
1882: THEN
1883: x_oks_action_times_v_rec.wed_duration := l_db_oks_action_times_v_rec.wed_duration;
1884: END IF;
1885: IF (x_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM)
1879: x_oks_action_times_v_rec.tue_duration := l_db_oks_action_times_v_rec.tue_duration;
1880: END IF;
1881: IF (x_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM)
1882: THEN
1883: x_oks_action_times_v_rec.wed_duration := l_db_oks_action_times_v_rec.wed_duration;
1884: END IF;
1885: IF (x_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM)
1886: THEN
1887: x_oks_action_times_v_rec.thu_duration := l_db_oks_action_times_v_rec.thu_duration;
1881: IF (x_oks_action_times_v_rec.wed_duration = OKC_API.G_MISS_NUM)
1882: THEN
1883: x_oks_action_times_v_rec.wed_duration := l_db_oks_action_times_v_rec.wed_duration;
1884: END IF;
1885: IF (x_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM)
1886: THEN
1887: x_oks_action_times_v_rec.thu_duration := l_db_oks_action_times_v_rec.thu_duration;
1888: END IF;
1889: IF (x_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM)
1883: x_oks_action_times_v_rec.wed_duration := l_db_oks_action_times_v_rec.wed_duration;
1884: END IF;
1885: IF (x_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM)
1886: THEN
1887: x_oks_action_times_v_rec.thu_duration := l_db_oks_action_times_v_rec.thu_duration;
1888: END IF;
1889: IF (x_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM)
1890: THEN
1891: x_oks_action_times_v_rec.fri_duration := l_db_oks_action_times_v_rec.fri_duration;
1885: IF (x_oks_action_times_v_rec.thu_duration = OKC_API.G_MISS_NUM)
1886: THEN
1887: x_oks_action_times_v_rec.thu_duration := l_db_oks_action_times_v_rec.thu_duration;
1888: END IF;
1889: IF (x_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM)
1890: THEN
1891: x_oks_action_times_v_rec.fri_duration := l_db_oks_action_times_v_rec.fri_duration;
1892: END IF;
1893: IF (x_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM)
1887: x_oks_action_times_v_rec.thu_duration := l_db_oks_action_times_v_rec.thu_duration;
1888: END IF;
1889: IF (x_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM)
1890: THEN
1891: x_oks_action_times_v_rec.fri_duration := l_db_oks_action_times_v_rec.fri_duration;
1892: END IF;
1893: IF (x_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM)
1894: THEN
1895: x_oks_action_times_v_rec.sat_duration := l_db_oks_action_times_v_rec.sat_duration;
1889: IF (x_oks_action_times_v_rec.fri_duration = OKC_API.G_MISS_NUM)
1890: THEN
1891: x_oks_action_times_v_rec.fri_duration := l_db_oks_action_times_v_rec.fri_duration;
1892: END IF;
1893: IF (x_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM)
1894: THEN
1895: x_oks_action_times_v_rec.sat_duration := l_db_oks_action_times_v_rec.sat_duration;
1896: END IF;
1897: IF (x_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM)
1891: x_oks_action_times_v_rec.fri_duration := l_db_oks_action_times_v_rec.fri_duration;
1892: END IF;
1893: IF (x_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM)
1894: THEN
1895: x_oks_action_times_v_rec.sat_duration := l_db_oks_action_times_v_rec.sat_duration;
1896: END IF;
1897: IF (x_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM)
1898: THEN
1899: x_oks_action_times_v_rec.security_group_id := l_db_oks_action_times_v_rec.security_group_id;
1893: IF (x_oks_action_times_v_rec.sat_duration = OKC_API.G_MISS_NUM)
1894: THEN
1895: x_oks_action_times_v_rec.sat_duration := l_db_oks_action_times_v_rec.sat_duration;
1896: END IF;
1897: IF (x_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM)
1898: THEN
1899: x_oks_action_times_v_rec.security_group_id := l_db_oks_action_times_v_rec.security_group_id;
1900: END IF;
1901: IF (x_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM)
1895: x_oks_action_times_v_rec.sat_duration := l_db_oks_action_times_v_rec.sat_duration;
1896: END IF;
1897: IF (x_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM)
1898: THEN
1899: x_oks_action_times_v_rec.security_group_id := l_db_oks_action_times_v_rec.security_group_id;
1900: END IF;
1901: IF (x_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM)
1902: THEN
1903: x_oks_action_times_v_rec.program_application_id := l_db_oks_action_times_v_rec.program_application_id;
1897: IF (x_oks_action_times_v_rec.security_group_id = OKC_API.G_MISS_NUM)
1898: THEN
1899: x_oks_action_times_v_rec.security_group_id := l_db_oks_action_times_v_rec.security_group_id;
1900: END IF;
1901: IF (x_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM)
1902: THEN
1903: x_oks_action_times_v_rec.program_application_id := l_db_oks_action_times_v_rec.program_application_id;
1904: END IF;
1905: IF (x_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM)
1899: x_oks_action_times_v_rec.security_group_id := l_db_oks_action_times_v_rec.security_group_id;
1900: END IF;
1901: IF (x_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM)
1902: THEN
1903: x_oks_action_times_v_rec.program_application_id := l_db_oks_action_times_v_rec.program_application_id;
1904: END IF;
1905: IF (x_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM)
1906: THEN
1907: x_oks_action_times_v_rec.program_id := l_db_oks_action_times_v_rec.program_id;
1901: IF (x_oks_action_times_v_rec.program_application_id = OKC_API.G_MISS_NUM)
1902: THEN
1903: x_oks_action_times_v_rec.program_application_id := l_db_oks_action_times_v_rec.program_application_id;
1904: END IF;
1905: IF (x_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM)
1906: THEN
1907: x_oks_action_times_v_rec.program_id := l_db_oks_action_times_v_rec.program_id;
1908: END IF;
1909: IF (x_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE)
1903: x_oks_action_times_v_rec.program_application_id := l_db_oks_action_times_v_rec.program_application_id;
1904: END IF;
1905: IF (x_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM)
1906: THEN
1907: x_oks_action_times_v_rec.program_id := l_db_oks_action_times_v_rec.program_id;
1908: END IF;
1909: IF (x_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE)
1910: THEN
1911: x_oks_action_times_v_rec.program_update_date := l_db_oks_action_times_v_rec.program_update_date;
1905: IF (x_oks_action_times_v_rec.program_id = OKC_API.G_MISS_NUM)
1906: THEN
1907: x_oks_action_times_v_rec.program_id := l_db_oks_action_times_v_rec.program_id;
1908: END IF;
1909: IF (x_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE)
1910: THEN
1911: x_oks_action_times_v_rec.program_update_date := l_db_oks_action_times_v_rec.program_update_date;
1912: END IF;
1913: IF (x_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM)
1907: x_oks_action_times_v_rec.program_id := l_db_oks_action_times_v_rec.program_id;
1908: END IF;
1909: IF (x_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE)
1910: THEN
1911: x_oks_action_times_v_rec.program_update_date := l_db_oks_action_times_v_rec.program_update_date;
1912: END IF;
1913: IF (x_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM)
1914: THEN
1915: x_oks_action_times_v_rec.request_id := l_db_oks_action_times_v_rec.request_id;
1909: IF (x_oks_action_times_v_rec.program_update_date = OKC_API.G_MISS_DATE)
1910: THEN
1911: x_oks_action_times_v_rec.program_update_date := l_db_oks_action_times_v_rec.program_update_date;
1912: END IF;
1913: IF (x_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM)
1914: THEN
1915: x_oks_action_times_v_rec.request_id := l_db_oks_action_times_v_rec.request_id;
1916: END IF;
1917: IF (x_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM)
1911: x_oks_action_times_v_rec.program_update_date := l_db_oks_action_times_v_rec.program_update_date;
1912: END IF;
1913: IF (x_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM)
1914: THEN
1915: x_oks_action_times_v_rec.request_id := l_db_oks_action_times_v_rec.request_id;
1916: END IF;
1917: IF (x_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM)
1918: THEN
1919: x_oks_action_times_v_rec.created_by := l_db_oks_action_times_v_rec.created_by;
1913: IF (x_oks_action_times_v_rec.request_id = OKC_API.G_MISS_NUM)
1914: THEN
1915: x_oks_action_times_v_rec.request_id := l_db_oks_action_times_v_rec.request_id;
1916: END IF;
1917: IF (x_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM)
1918: THEN
1919: x_oks_action_times_v_rec.created_by := l_db_oks_action_times_v_rec.created_by;
1920: END IF;
1921: IF (x_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE)
1915: x_oks_action_times_v_rec.request_id := l_db_oks_action_times_v_rec.request_id;
1916: END IF;
1917: IF (x_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM)
1918: THEN
1919: x_oks_action_times_v_rec.created_by := l_db_oks_action_times_v_rec.created_by;
1920: END IF;
1921: IF (x_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE)
1922: THEN
1923: x_oks_action_times_v_rec.creation_date := l_db_oks_action_times_v_rec.creation_date;
1917: IF (x_oks_action_times_v_rec.created_by = OKC_API.G_MISS_NUM)
1918: THEN
1919: x_oks_action_times_v_rec.created_by := l_db_oks_action_times_v_rec.created_by;
1920: END IF;
1921: IF (x_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE)
1922: THEN
1923: x_oks_action_times_v_rec.creation_date := l_db_oks_action_times_v_rec.creation_date;
1924: END IF;
1925: IF (x_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM)
1919: x_oks_action_times_v_rec.created_by := l_db_oks_action_times_v_rec.created_by;
1920: END IF;
1921: IF (x_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE)
1922: THEN
1923: x_oks_action_times_v_rec.creation_date := l_db_oks_action_times_v_rec.creation_date;
1924: END IF;
1925: IF (x_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM)
1926: THEN
1927: x_oks_action_times_v_rec.last_updated_by := l_db_oks_action_times_v_rec.last_updated_by;
1921: IF (x_oks_action_times_v_rec.creation_date = OKC_API.G_MISS_DATE)
1922: THEN
1923: x_oks_action_times_v_rec.creation_date := l_db_oks_action_times_v_rec.creation_date;
1924: END IF;
1925: IF (x_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM)
1926: THEN
1927: x_oks_action_times_v_rec.last_updated_by := l_db_oks_action_times_v_rec.last_updated_by;
1928: END IF;
1929: IF (x_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE)
1923: x_oks_action_times_v_rec.creation_date := l_db_oks_action_times_v_rec.creation_date;
1924: END IF;
1925: IF (x_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM)
1926: THEN
1927: x_oks_action_times_v_rec.last_updated_by := l_db_oks_action_times_v_rec.last_updated_by;
1928: END IF;
1929: IF (x_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE)
1930: THEN
1931: x_oks_action_times_v_rec.last_update_date := l_db_oks_action_times_v_rec.last_update_date;
1925: IF (x_oks_action_times_v_rec.last_updated_by = OKC_API.G_MISS_NUM)
1926: THEN
1927: x_oks_action_times_v_rec.last_updated_by := l_db_oks_action_times_v_rec.last_updated_by;
1928: END IF;
1929: IF (x_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE)
1930: THEN
1931: x_oks_action_times_v_rec.last_update_date := l_db_oks_action_times_v_rec.last_update_date;
1932: END IF;
1933: IF (x_oks_action_times_v_rec.last_update_login = OKC_API.G_MISS_NUM)
1927: x_oks_action_times_v_rec.last_updated_by := l_db_oks_action_times_v_rec.last_updated_by;
1928: END IF;
1929: IF (x_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE)
1930: THEN
1931: x_oks_action_times_v_rec.last_update_date := l_db_oks_action_times_v_rec.last_update_date;
1932: END IF;
1933: IF (x_oks_action_times_v_rec.last_update_login = OKC_API.G_MISS_NUM)
1934: THEN
1935: x_oks_action_times_v_rec.last_update_login := l_db_oks_action_times_v_rec.last_update_login;
1929: IF (x_oks_action_times_v_rec.last_update_date = OKC_API.G_MISS_DATE)
1930: THEN
1931: x_oks_action_times_v_rec.last_update_date := l_db_oks_action_times_v_rec.last_update_date;
1932: END IF;
1933: IF (x_oks_action_times_v_rec.last_update_login = OKC_API.G_MISS_NUM)
1934: THEN
1935: x_oks_action_times_v_rec.last_update_login := l_db_oks_action_times_v_rec.last_update_login;
1936: END IF;
1937: END IF;
1931: x_oks_action_times_v_rec.last_update_date := l_db_oks_action_times_v_rec.last_update_date;
1932: END IF;
1933: IF (x_oks_action_times_v_rec.last_update_login = OKC_API.G_MISS_NUM)
1934: THEN
1935: x_oks_action_times_v_rec.last_update_login := l_db_oks_action_times_v_rec.last_update_login;
1936: END IF;
1937: END IF;
1938: RETURN(l_return_status);
1939: END populate_new_record;
1937: END IF;
1938: RETURN(l_return_status);
1939: END populate_new_record;
1940: -------------------------------------------
1941: -- Set_Attributes for:OKS_ACTION_TIMES_V --
1942: -------------------------------------------
1943: FUNCTION Set_Attributes (
1944: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
1945: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type
1940: -------------------------------------------
1941: -- Set_Attributes for:OKS_ACTION_TIMES_V --
1942: -------------------------------------------
1943: FUNCTION Set_Attributes (
1944: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
1945: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type
1946: ) RETURN VARCHAR2 IS
1947: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1948: BEGIN
1941: -- Set_Attributes for:OKS_ACTION_TIMES_V --
1942: -------------------------------------------
1943: FUNCTION Set_Attributes (
1944: p_oks_action_times_v_rec IN oks_action_times_v_rec_type,
1945: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type
1946: ) RETURN VARCHAR2 IS
1947: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1948: BEGIN
1949: x_oks_action_times_v_rec := p_oks_action_times_v_rec;
1945: x_oks_action_times_v_rec OUT NOCOPY oks_action_times_v_rec_type
1946: ) RETURN VARCHAR2 IS
1947: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1948: BEGIN
1949: x_oks_action_times_v_rec := p_oks_action_times_v_rec;
1950: RETURN(l_return_status);
1951: END Set_Attributes;
1952: BEGIN
1953: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1963: RAISE OKC_API.G_EXCEPTION_ERROR;
1964: END IF;
1965: --- Setting item attributes
1966: l_return_status := Set_Attributes(
1967: p_oks_action_times_v_rec, -- IN
1968: x_oks_action_times_v_rec); -- OUT
1969: --- If any errors happen abort API
1970: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1971: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1964: END IF;
1965: --- Setting item attributes
1966: l_return_status := Set_Attributes(
1967: p_oks_action_times_v_rec, -- IN
1968: x_oks_action_times_v_rec); -- OUT
1969: --- If any errors happen abort API
1970: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1971: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1972: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1971: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1972: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1973: RAISE OKC_API.G_EXCEPTION_ERROR;
1974: END IF;
1975: l_return_status := populate_new_record(l_oks_action_times_v_rec, l_def_oks_action_times_v_rec);
1976: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1977: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1978: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1979: RAISE OKC_API.G_EXCEPTION_ERROR;
1977: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1978: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1979: RAISE OKC_API.G_EXCEPTION_ERROR;
1980: END IF;
1981: l_def_oks_action_times_v_rec := fill_who_columns(l_def_oks_action_times_v_rec);
1982: --- Validate all non-missing attributes (Item Level Validation)
1983: l_return_status := Validate_Attributes(l_def_oks_action_times_v_rec);
1984: --- If any errors happen abort API
1985: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1979: RAISE OKC_API.G_EXCEPTION_ERROR;
1980: END IF;
1981: l_def_oks_action_times_v_rec := fill_who_columns(l_def_oks_action_times_v_rec);
1982: --- Validate all non-missing attributes (Item Level Validation)
1983: l_return_status := Validate_Attributes(l_def_oks_action_times_v_rec);
1984: --- If any errors happen abort API
1985: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1986: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1987: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1986: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1987: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1988: RAISE OKC_API.G_EXCEPTION_ERROR;
1989: END IF;
1990: l_return_status := Validate_Record(l_def_oks_action_times_v_rec, l_db_oks_action_times_v_rec);
1991: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1992: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1993: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1994: RAISE OKC_API.G_EXCEPTION_ERROR;
2000: p_init_msg_list => p_init_msg_list,
2001: x_return_status => l_return_status,
2002: x_msg_count => x_msg_count,
2003: x_msg_data => x_msg_data,
2004: p_oks_action_times_v_rec => p_oks_action_times_v_rec);
2005: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2006: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2007: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2008: RAISE OKC_API.G_EXCEPTION_ERROR;
2010:
2011: -----------------------------------------
2012: -- Move VIEW record to "Child" records --
2013: -----------------------------------------
2014: migrate(l_def_oks_action_times_v_rec, l_oks_action_times_rec);
2015: -----------------------------------------------
2016: -- Call the UPDATE_ROW for each child record --
2017: -----------------------------------------------
2018: update_row(
2019: p_init_msg_list,
2020: l_return_status,
2021: x_msg_count,
2022: x_msg_data,
2023: l_oks_action_times_rec,
2024: lx_oks_action_times_rec
2025: );
2026: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2027: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2020: l_return_status,
2021: x_msg_count,
2022: x_msg_data,
2023: l_oks_action_times_rec,
2024: lx_oks_action_times_rec
2025: );
2026: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2027: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2028: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2027: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2028: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2029: RAISE OKC_API.G_EXCEPTION_ERROR;
2030: END IF;
2031: migrate(lx_oks_action_times_rec, l_def_oks_action_times_v_rec);
2032: x_oks_action_times_v_rec := l_def_oks_action_times_v_rec;
2033: x_return_status := l_return_status;
2034: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2035: EXCEPTION
2028: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2029: RAISE OKC_API.G_EXCEPTION_ERROR;
2030: END IF;
2031: migrate(lx_oks_action_times_rec, l_def_oks_action_times_v_rec);
2032: x_oks_action_times_v_rec := l_def_oks_action_times_v_rec;
2033: x_return_status := l_return_status;
2034: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2035: EXCEPTION
2036: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2064: '_PVT'
2065: );
2066: END update_row;
2067: ------------------------------------------------------
2068: -- PL/SQL TBL update_row for:oks_action_times_v_tbl --
2069: ------------------------------------------------------
2070: PROCEDURE update_row(
2071: p_api_version IN NUMBER,
2072: p_init_msg_list IN VARCHAR2,
2072: p_init_msg_list IN VARCHAR2,
2073: x_return_status OUT NOCOPY VARCHAR2,
2074: x_msg_count OUT NOCOPY NUMBER,
2075: x_msg_data OUT NOCOPY VARCHAR2,
2076: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
2077: x_oks_action_times_v_tbl OUT NOCOPY oks_action_times_v_tbl_type,
2078: px_error_tbl IN OUT NOCOPY OKC_API.ERROR_TBL_TYPE) IS
2079:
2080: l_api_version CONSTANT NUMBER := 1;
2073: x_return_status OUT NOCOPY VARCHAR2,
2074: x_msg_count OUT NOCOPY NUMBER,
2075: x_msg_data OUT NOCOPY VARCHAR2,
2076: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
2077: x_oks_action_times_v_tbl OUT NOCOPY oks_action_times_v_tbl_type,
2078: px_error_tbl IN OUT NOCOPY OKC_API.ERROR_TBL_TYPE) IS
2079:
2080: l_api_version CONSTANT NUMBER := 1;
2081: l_api_name CONSTANT VARCHAR2(30) := 'V_error_tbl_update_row';
2082: i NUMBER := 0;
2083: BEGIN
2084: OKC_API.init_msg_list(p_init_msg_list);
2085: -- Make sure PL/SQL table has records in it before passing
2086: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
2087: i := p_oks_action_times_v_tbl.FIRST;
2088: LOOP
2089: DECLARE
2090: l_error_rec OKC_API.ERROR_REC_TYPE;
2083: BEGIN
2084: OKC_API.init_msg_list(p_init_msg_list);
2085: -- Make sure PL/SQL table has records in it before passing
2086: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
2087: i := p_oks_action_times_v_tbl.FIRST;
2088: LOOP
2089: DECLARE
2090: l_error_rec OKC_API.ERROR_REC_TYPE;
2091: BEGIN
2097: p_init_msg_list => OKC_API.G_FALSE,
2098: x_return_status => l_error_rec.error_type,
2099: x_msg_count => l_error_rec.msg_count,
2100: x_msg_data => l_error_rec.msg_data,
2101: p_oks_action_times_v_rec => p_oks_action_times_v_tbl(i),
2102: x_oks_action_times_v_rec => x_oks_action_times_v_tbl(i));
2103: IF (l_error_rec.error_type <> OKC_API.G_RET_STS_SUCCESS) THEN
2104: l_error_rec.sqlcode := SQLCODE;
2105: load_error_tbl(l_error_rec, px_error_tbl);
2098: x_return_status => l_error_rec.error_type,
2099: x_msg_count => l_error_rec.msg_count,
2100: x_msg_data => l_error_rec.msg_data,
2101: p_oks_action_times_v_rec => p_oks_action_times_v_tbl(i),
2102: x_oks_action_times_v_rec => x_oks_action_times_v_tbl(i));
2103: IF (l_error_rec.error_type <> OKC_API.G_RET_STS_SUCCESS) THEN
2104: l_error_rec.sqlcode := SQLCODE;
2105: load_error_tbl(l_error_rec, px_error_tbl);
2106: ELSE
2120: l_error_rec.error_type := 'OTHERS';
2121: l_error_rec.sqlcode := SQLCODE;
2122: load_error_tbl(l_error_rec, px_error_tbl);
2123: END;
2124: EXIT WHEN (i = p_oks_action_times_v_tbl.LAST);
2125: i := p_oks_action_times_v_tbl.NEXT(i);
2126: END LOOP;
2127: END IF;
2128: -- Loop through the error_tbl to find the error with the highest severity
2121: l_error_rec.sqlcode := SQLCODE;
2122: load_error_tbl(l_error_rec, px_error_tbl);
2123: END;
2124: EXIT WHEN (i = p_oks_action_times_v_tbl.LAST);
2125: i := p_oks_action_times_v_tbl.NEXT(i);
2126: END LOOP;
2127: END IF;
2128: -- Loop through the error_tbl to find the error with the highest severity
2129: -- and return it.
2162: );
2163: END update_row;
2164:
2165: ------------------------------------------------------
2166: -- PL/SQL TBL update_row for:OKS_ACTION_TIMES_V_TBL --
2167: ------------------------------------------------------
2168: -- This procedure is the same as the one above except it does not have a "px_error_tbl" argument.
2169: -- This procedure was create for backward compatibility and simply is a wrapper for the one above.
2170: PROCEDURE update_row(
2172: p_init_msg_list IN VARCHAR2,
2173: x_return_status OUT NOCOPY VARCHAR2,
2174: x_msg_count OUT NOCOPY NUMBER,
2175: x_msg_data OUT NOCOPY VARCHAR2,
2176: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
2177: x_oks_action_times_v_tbl OUT NOCOPY oks_action_times_v_tbl_type) IS
2178:
2179: l_api_version CONSTANT NUMBER := 1;
2180: l_api_name CONSTANT VARCHAR2(30) := 'V_tbl_update_row';
2173: x_return_status OUT NOCOPY VARCHAR2,
2174: x_msg_count OUT NOCOPY NUMBER,
2175: x_msg_data OUT NOCOPY VARCHAR2,
2176: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
2177: x_oks_action_times_v_tbl OUT NOCOPY oks_action_times_v_tbl_type) IS
2178:
2179: l_api_version CONSTANT NUMBER := 1;
2180: l_api_name CONSTANT VARCHAR2(30) := 'V_tbl_update_row';
2181: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2182: l_error_tbl OKC_API.ERROR_TBL_TYPE;
2183: BEGIN
2184: OKC_API.init_msg_list(p_init_msg_list);
2185: -- Make sure PL/SQL table has records in it before passing
2186: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
2187: update_row (
2188: p_api_version => p_api_version,
2189: p_init_msg_list => OKC_API.G_FALSE,
2190: x_return_status => x_return_status,
2189: p_init_msg_list => OKC_API.G_FALSE,
2190: x_return_status => x_return_status,
2191: x_msg_count => x_msg_count,
2192: x_msg_data => x_msg_data,
2193: p_oks_action_times_v_tbl => p_oks_action_times_v_tbl,
2194: x_oks_action_times_v_tbl => x_oks_action_times_v_tbl,
2195: px_error_tbl => l_error_tbl);
2196: END IF;
2197: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2190: x_return_status => x_return_status,
2191: x_msg_count => x_msg_count,
2192: x_msg_data => x_msg_data,
2193: p_oks_action_times_v_tbl => p_oks_action_times_v_tbl,
2194: x_oks_action_times_v_tbl => x_oks_action_times_v_tbl,
2195: px_error_tbl => l_error_tbl);
2196: END IF;
2197: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2198: EXCEPTION
2231: ---------------------------------------------------------------------------
2232: -- PROCEDURE delete_row
2233: ---------------------------------------------------------------------------
2234: -------------------------------------
2235: -- delete_row for:OKS_ACTION_TIMES --
2236: -------------------------------------
2237: PROCEDURE delete_row(
2238: p_init_msg_list IN VARCHAR2,
2239: x_return_status OUT NOCOPY VARCHAR2,
2238: p_init_msg_list IN VARCHAR2,
2239: x_return_status OUT NOCOPY VARCHAR2,
2240: x_msg_count OUT NOCOPY NUMBER,
2241: x_msg_data OUT NOCOPY VARCHAR2,
2242: p_oks_action_times_rec IN oks_action_times_rec_type) IS
2243:
2244: l_api_version CONSTANT NUMBER := 1;
2245: l_api_name CONSTANT VARCHAR2(30) := 'B_delete_row';
2246: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2243:
2244: l_api_version CONSTANT NUMBER := 1;
2245: l_api_name CONSTANT VARCHAR2(30) := 'B_delete_row';
2246: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2247: l_oks_action_times_rec oks_action_times_rec_type := p_oks_action_times_rec;
2248: l_row_notfound BOOLEAN := TRUE;
2249: BEGIN
2250: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2251: p_init_msg_list,
2256: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2257: RAISE OKC_API.G_EXCEPTION_ERROR;
2258: END IF;
2259:
2260: DELETE FROM OKS_ACTION_TIMES
2261: WHERE ID = p_oks_action_times_rec.id;
2262:
2263: x_return_status := l_return_status;
2264: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2257: RAISE OKC_API.G_EXCEPTION_ERROR;
2258: END IF;
2259:
2260: DELETE FROM OKS_ACTION_TIMES
2261: WHERE ID = p_oks_action_times_rec.id;
2262:
2263: x_return_status := l_return_status;
2264: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2265: EXCEPTION
2294: '_PVT'
2295: );
2296: END delete_row;
2297: ---------------------------------------
2298: -- delete_row for:OKS_ACTION_TIMES_V --
2299: ---------------------------------------
2300: PROCEDURE delete_row(
2301: p_api_version IN NUMBER,
2302: p_init_msg_list IN VARCHAR2,
2302: p_init_msg_list IN VARCHAR2,
2303: x_return_status OUT NOCOPY VARCHAR2,
2304: x_msg_count OUT NOCOPY NUMBER,
2305: x_msg_data OUT NOCOPY VARCHAR2,
2306: p_oks_action_times_v_rec IN oks_action_times_v_rec_type) IS
2307:
2308: l_api_version CONSTANT NUMBER := 1;
2309: l_api_name CONSTANT VARCHAR2(30) := 'V_delete_row';
2310: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2307:
2308: l_api_version CONSTANT NUMBER := 1;
2309: l_api_name CONSTANT VARCHAR2(30) := 'V_delete_row';
2310: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2311: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
2312: l_oks_action_times_rec oks_action_times_rec_type;
2313: BEGIN
2314: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2315: G_PKG_NAME,
2308: l_api_version CONSTANT NUMBER := 1;
2309: l_api_name CONSTANT VARCHAR2(30) := 'V_delete_row';
2310: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2311: l_oks_action_times_v_rec oks_action_times_v_rec_type := p_oks_action_times_v_rec;
2312: l_oks_action_times_rec oks_action_times_rec_type;
2313: BEGIN
2314: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2315: G_PKG_NAME,
2316: p_init_msg_list,
2325: END IF;
2326: -----------------------------------------
2327: -- Move VIEW record to "Child" records --
2328: -----------------------------------------
2329: migrate(l_oks_action_times_v_rec, l_oks_action_times_rec);
2330: -----------------------------------------------
2331: -- Call the DELETE_ROW for each child record --
2332: -----------------------------------------------
2333: delete_row(
2334: p_init_msg_list,
2335: l_return_status,
2336: x_msg_count,
2337: x_msg_data,
2338: l_oks_action_times_rec
2339: );
2340: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2341: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2342: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2376: '_PVT'
2377: );
2378: END delete_row;
2379: --------------------------------------------------
2380: -- PL/SQL TBL delete_row for:OKS_ACTION_TIMES_V --
2381: --------------------------------------------------
2382: PROCEDURE delete_row(
2383: p_api_version IN NUMBER,
2384: p_init_msg_list IN VARCHAR2,
2384: p_init_msg_list IN VARCHAR2,
2385: x_return_status OUT NOCOPY VARCHAR2,
2386: x_msg_count OUT NOCOPY NUMBER,
2387: x_msg_data OUT NOCOPY VARCHAR2,
2388: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type,
2389: px_error_tbl IN OUT NOCOPY OKC_API.ERROR_TBL_TYPE) IS
2390:
2391: l_api_version CONSTANT NUMBER := 1;
2392: l_api_name CONSTANT VARCHAR2(30) := 'V_error_tbl_delete_row';
2393: i NUMBER := 0;
2394: BEGIN
2395: OKC_API.init_msg_list(p_init_msg_list);
2396: -- Make sure PL/SQL table has records in it before passing
2397: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
2398: i := p_oks_action_times_v_tbl.FIRST;
2399: LOOP
2400: DECLARE
2401: l_error_rec OKC_API.ERROR_REC_TYPE;
2394: BEGIN
2395: OKC_API.init_msg_list(p_init_msg_list);
2396: -- Make sure PL/SQL table has records in it before passing
2397: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
2398: i := p_oks_action_times_v_tbl.FIRST;
2399: LOOP
2400: DECLARE
2401: l_error_rec OKC_API.ERROR_REC_TYPE;
2402: BEGIN
2408: p_init_msg_list => OKC_API.G_FALSE,
2409: x_return_status => l_error_rec.error_type,
2410: x_msg_count => l_error_rec.msg_count,
2411: x_msg_data => l_error_rec.msg_data,
2412: p_oks_action_times_v_rec => p_oks_action_times_v_tbl(i));
2413: IF (l_error_rec.error_type <> OKC_API.G_RET_STS_SUCCESS) THEN
2414: l_error_rec.sqlcode := SQLCODE;
2415: load_error_tbl(l_error_rec, px_error_tbl);
2416: ELSE
2430: l_error_rec.error_type := 'OTHERS';
2431: l_error_rec.sqlcode := SQLCODE;
2432: load_error_tbl(l_error_rec, px_error_tbl);
2433: END;
2434: EXIT WHEN (i = p_oks_action_times_v_tbl.LAST);
2435: i := p_oks_action_times_v_tbl.NEXT(i);
2436: END LOOP;
2437: END IF;
2438: -- Loop through the error_tbl to find the error with the highest severity
2431: l_error_rec.sqlcode := SQLCODE;
2432: load_error_tbl(l_error_rec, px_error_tbl);
2433: END;
2434: EXIT WHEN (i = p_oks_action_times_v_tbl.LAST);
2435: i := p_oks_action_times_v_tbl.NEXT(i);
2436: END LOOP;
2437: END IF;
2438: -- Loop through the error_tbl to find the error with the highest severity
2439: -- and return it.
2472: );
2473: END delete_row;
2474:
2475: --------------------------------------------------
2476: -- PL/SQL TBL delete_row for:OKS_ACTION_TIMES_V --
2477: --------------------------------------------------
2478: PROCEDURE delete_row(
2479: p_api_version IN NUMBER,
2480: p_init_msg_list IN VARCHAR2,
2480: p_init_msg_list IN VARCHAR2,
2481: x_return_status OUT NOCOPY VARCHAR2,
2482: x_msg_count OUT NOCOPY NUMBER,
2483: x_msg_data OUT NOCOPY VARCHAR2,
2484: p_oks_action_times_v_tbl IN oks_action_times_v_tbl_type) IS
2485:
2486: l_api_version CONSTANT NUMBER := 1;
2487: l_api_name CONSTANT VARCHAR2(30) := 'V_tbl_delete_row';
2488: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2489: l_error_tbl OKC_API.ERROR_TBL_TYPE;
2490: BEGIN
2491: OKC_API.init_msg_list(p_init_msg_list);
2492: -- Make sure PL/SQL table has records in it before passing
2493: IF (p_oks_action_times_v_tbl.COUNT > 0) THEN
2494: delete_row (
2495: p_api_version => p_api_version,
2496: p_init_msg_list => OKC_API.G_FALSE,
2497: x_return_status => x_return_status,
2496: p_init_msg_list => OKC_API.G_FALSE,
2497: x_return_status => x_return_status,
2498: x_msg_count => x_msg_count,
2499: x_msg_data => x_msg_data,
2500: p_oks_action_times_v_tbl => p_oks_action_times_v_tbl,
2501: px_error_tbl => l_error_tbl);
2502: END IF;
2503: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2504: EXCEPTION
2547: okc_debug.Set_Indentation('OKS_ACM_PVT');
2548: okc_debug.log('23700: Entered create_version', 2);
2549: END IF;
2550:
2551: INSERT INTO OKS_ACTION_TIMES_H(
2552: ID,
2553: COV_ACTION_TYPE_ID,
2554: CLE_ID,
2555: DNZ_CHR_ID,
2597: LAST_UPDATE_DATE,
2598: LAST_UPDATE_LOGIN,
2599: OBJECT_VERSION_NUMBER,
2600: p_major_version
2601: FROM OKS_ACTION_TIMES
2602: WHERE DNZ_CHR_ID = P_Id;
2603:
2604: RETURN l_return_status;
2605:
2637: okc_debug.Set_Indentation('OKS_ACM_PVT');
2638: okc_debug.log('24000: Exiting restore_version:OTHERS Exception', 2);
2639: END IF;
2640:
2641: DELETE OKS_ACTION_TIMES
2642: WHERE DNZ_CHR_ID = p_id;
2643:
2644: INSERT INTO OKS_ACTION_TIMES(
2645: ID,
2640:
2641: DELETE OKS_ACTION_TIMES
2642: WHERE DNZ_CHR_ID = p_id;
2643:
2644: INSERT INTO OKS_ACTION_TIMES(
2645: ID,
2646: COV_ACTION_TYPE_ID,
2647: CLE_ID,
2648: DNZ_CHR_ID,
2688: LAST_UPDATED_BY,
2689: LAST_UPDATE_DATE,
2690: LAST_UPDATE_LOGIN,
2691: OBJECT_VERSION_NUMBER
2692: FROM OKS_ACTION_TIMES_H
2693: WHERE DNZ_CHR_ID = P_Id
2694: AND major_version = p_major_version;
2695:
2696: RETURN l_return_status;