83: p_rec.object_version_number := 1; -- Initialise the object version
84: --
85: psp_rtd_shd.g_api_dml := true; -- Set the api dml status
86: --
87: -- Insert the row into: psp_report_template_details
88: --
89: insert into psp_report_template_details
90: (template_detail_id
91: ,template_id
85: psp_rtd_shd.g_api_dml := true; -- Set the api dml status
86: --
87: -- Insert the row into: psp_report_template_details
88: --
89: insert into psp_report_template_details
90: (template_detail_id
91: ,template_id
92: ,object_version_number
93: ,criteria_lookup_type
173: Procedure pre_insert
174: (p_rec in out nocopy psp_rtd_shd.g_rec_type
175: ) is
176: --
177: Cursor C_Sel1 is select psp_report_template_details_s.nextval from sys.dual;
178: --
179: Cursor C_Sel2 is
180: Select null
181: from psp_report_template_details
177: Cursor C_Sel1 is select psp_report_template_details_s.nextval from sys.dual;
178: --
179: Cursor C_Sel2 is
180: Select null
181: from psp_report_template_details
182: where template_detail_id =
183: psp_rtd_ins.g_template_detail_id_i;
184: --
185: l_proc varchar2(72) := g_package||'pre_insert';
199: --
200: -- The primary key values are already in use.
201: --
202: fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
203: fnd_message.set_token('TABLE_NAME','psp_report_template_details');
204: fnd_message.raise_error;
205: End If;
206: Close C_Sel2;
207: --
292: --
293: when hr_api.cannot_find_prog_unit then
294: --
295: hr_api.cannot_find_prog_unit_error
296: (p_module_name => 'PSP_REPORT_TEMPLATE_DETAILS'
297: ,p_hook_type => 'AI');
298: --
299: end;
300: --