35: where TAV.ACTIVITY_VERSION_ID = P_ACTIVITY_VERSION_ID;
36: --
37: begin
38: --
39: HR_UTILITY.SET_LOCATION ('Entering: ' || W_PROC, '1');
40: --
41: open C1;
42: fetch C1
43: into W_OK;
46: end if;
47: close C1;
48: --
49: if (W_OK <> 'YES') then
50: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
52: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
53: HR_UTILITY.RAISE_ERROR;
54: end if;
47: close C1;
48: --
49: if (W_OK <> 'YES') then
50: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
52: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
53: HR_UTILITY.RAISE_ERROR;
54: end if;
55: --
48: --
49: if (W_OK <> 'YES') then
50: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
52: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
53: HR_UTILITY.RAISE_ERROR;
54: end if;
55: --
56: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
49: if (W_OK <> 'YES') then
50: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
52: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
53: HR_UTILITY.RAISE_ERROR;
54: end if;
55: --
56: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
57: --
52: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
53: HR_UTILITY.RAISE_ERROR;
54: end if;
55: --
56: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
57: --
58: end;
59: --
60: -- ----------------------------------------------------------------------------
79: where VEN.VENDOR_ID = P_VENDOR_ID;
80: --
81: begin
82: --
83: HR_UTILITY.SET_LOCATION ('Entering: ' || W_PROC, '1');
84: --
85: open C1;
86: fetch C1
87: into W_OK;
90: end if;
91: close C1;
92: --
93: if (W_OK <> 'YES') then
94: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
95: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
96: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
97: HR_UTILITY.RAISE_ERROR;
98: end if;
91: close C1;
92: --
93: if (W_OK <> 'YES') then
94: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
95: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
96: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
97: HR_UTILITY.RAISE_ERROR;
98: end if;
99: --
92: --
93: if (W_OK <> 'YES') then
94: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
95: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
96: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
97: HR_UTILITY.RAISE_ERROR;
98: end if;
99: --
100: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
93: if (W_OK <> 'YES') then
94: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
95: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
96: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
97: HR_UTILITY.RAISE_ERROR;
98: end if;
99: --
100: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
101: --
96: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
97: HR_UTILITY.RAISE_ERROR;
98: end if;
99: --
100: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
101: --
102: end;
103: --
104: -- ----------------------------------------------------------------------------
125: and VSP.VENDOR_ID = P_VENDOR_ID;
126: --
127: begin
128: --
129: HR_UTILITY.SET_LOCATION ('Entering: ' || W_PROC, '1');
130: --
131: open C1;
132: fetch C1
133: into W_OK;
136: end if;
137: close C1;
138: --
139: if (W_OK <> 'YES') then
140: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
141: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
142: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
143: HR_UTILITY.RAISE_ERROR;
144: end if;
137: close C1;
138: --
139: if (W_OK <> 'YES') then
140: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
141: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
142: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
143: HR_UTILITY.RAISE_ERROR;
144: end if;
145: --
138: --
139: if (W_OK <> 'YES') then
140: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
141: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
142: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
143: HR_UTILITY.RAISE_ERROR;
144: end if;
145: --
146: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
139: if (W_OK <> 'YES') then
140: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
141: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
142: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
143: HR_UTILITY.RAISE_ERROR;
144: end if;
145: --
146: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
147: --
142: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
143: HR_UTILITY.RAISE_ERROR;
144: end if;
145: --
146: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
147: --
148: end;
149: --
150: -- ----------------------------------------------------------------------------
173: and VSP.VENDOR_ID <> P_VENDOR_ID;
174: --
175: begin
176: --
177: HR_UTILITY.SET_LOCATION ('Entering: ' || W_PROC, '1');
178: --
179: if (P_PRIMARY_SUPPLIER_FLAG = 'Y') then
180: --
181: open C1;
186: end if;
187: close C1;
188: --
189: if (W_OK <> 'YES') then
190: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
191: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
192: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
193: HR_UTILITY.RAISE_ERROR;
194: end if;
187: close C1;
188: --
189: if (W_OK <> 'YES') then
190: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
191: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
192: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
193: HR_UTILITY.RAISE_ERROR;
194: end if;
195: --
188: --
189: if (W_OK <> 'YES') then
190: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
191: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
192: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
193: HR_UTILITY.RAISE_ERROR;
194: end if;
195: --
196: end if;
189: if (W_OK <> 'YES') then
190: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
191: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
192: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
193: HR_UTILITY.RAISE_ERROR;
194: end if;
195: --
196: end if;
197: --
194: end if;
195: --
196: end if;
197: --
198: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
199: --
200: end;
201: --
202: -- ----------------------------------------------------------------------------
216: := G_PACKAGE || 'CHECK_NON_TRANSFER';
217: --
218: begin
219: --
220: HR_UTILITY.SET_LOCATION ('Entering: ' || W_PROC, '1');
221: --
222: if ( (nvl (P_ACTIVITY_VERSION_ID, G_OLD_REC.ACTIVITY_VERSION_ID)
223: <> G_OLD_REC.ACTIVITY_VERSION_ID)
224: or (nvl (P_VENDOR_ID, G_OLD_REC.VENDOR_ID )
222: if ( (nvl (P_ACTIVITY_VERSION_ID, G_OLD_REC.ACTIVITY_VERSION_ID)
223: <> G_OLD_REC.ACTIVITY_VERSION_ID)
224: or (nvl (P_VENDOR_ID, G_OLD_REC.VENDOR_ID )
225: <> G_OLD_REC.VENDOR_ID )) then
226: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
227: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
228: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
229: HR_UTILITY.RAISE_ERROR;
230: end if;
223: <> G_OLD_REC.ACTIVITY_VERSION_ID)
224: or (nvl (P_VENDOR_ID, G_OLD_REC.VENDOR_ID )
225: <> G_OLD_REC.VENDOR_ID )) then
226: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
227: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
228: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
229: HR_UTILITY.RAISE_ERROR;
230: end if;
231: --
224: or (nvl (P_VENDOR_ID, G_OLD_REC.VENDOR_ID )
225: <> G_OLD_REC.VENDOR_ID )) then
226: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
227: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
228: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
229: HR_UTILITY.RAISE_ERROR;
230: end if;
231: --
232: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
225: <> G_OLD_REC.VENDOR_ID )) then
226: HR_UTILITY.SET_MESSAGE (801, 'HR_6153_ALL_PROCEDURE_FAIL');
227: HR_UTILITY.SET_MESSAGE_TOKEN ('PROCEDURE', W_PROC);
228: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
229: HR_UTILITY.RAISE_ERROR;
230: end if;
231: --
232: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
233: --
228: HR_UTILITY.SET_MESSAGE_TOKEN ('STEP','1');
229: HR_UTILITY.RAISE_ERROR;
230: end if;
231: --
232: HR_UTILITY.SET_LOCATION (' Leaving: ' || W_PROC, 1);
233: --
234: end;
235: --
236: -- ----------------------------------------------------------------------------
259: where vsp.activity_version_id = p_activity_version_from;
260: --
261: Begin
262: --
263: hr_utility.set_location('Entering:'|| v_proc, 5);
264: --
265: Open sel_vendor_supply;
266: fetch sel_vendor_supply into l_rec.vendor_id
267: , l_rec.primary_supplier_flag
285: End Loop;
286: --
287: close sel_vendor_supply;
288: --
289: hr_utility.set_location(' Leaving:'|| v_proc, 10);
290: --
291: End copy_vendor_supply;
292: --
293: -- ----------------------------------------------------------------------------
327: --
328: l_proc varchar2(72) := g_package||'return_api_dml_status';
329: --
330: Begin
331: hr_utility.set_location('Entering:'||l_proc, 5);
332: --
333: Return (nvl(g_api_dml, false));
334: --
335: hr_utility.set_location(' Leaving:'||l_proc, 10);
331: hr_utility.set_location('Entering:'||l_proc, 5);
332: --
333: Return (nvl(g_api_dml, false));
334: --
335: hr_utility.set_location(' Leaving:'||l_proc, 10);
336: End return_api_dml_status;
337: --
338: -- ----------------------------------------------------------------------------
339: -- |---------------------------< constraint_error >---------------------------|
381: --
382: l_proc varchar2(72) := g_package||'constraint_error';
383: --
384: Begin
385: hr_utility.set_location('Entering:'||l_proc, 5);
386: --
387: If (p_constraint_name = 'OTA_VENDOR_SUPPLIES_FK1') Then
388: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
389: hr_utility.set_message_token('PROCEDURE', l_proc);
384: Begin
385: hr_utility.set_location('Entering:'||l_proc, 5);
386: --
387: If (p_constraint_name = 'OTA_VENDOR_SUPPLIES_FK1') Then
388: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
389: hr_utility.set_message_token('PROCEDURE', l_proc);
390: hr_utility.set_message_token('STEP','5');
391: hr_utility.raise_error;
392: ElsIf (p_constraint_name = 'OTA_VSP_PRIMARY_SUPPLIER_F_CHK') Then
385: hr_utility.set_location('Entering:'||l_proc, 5);
386: --
387: If (p_constraint_name = 'OTA_VENDOR_SUPPLIES_FK1') Then
388: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
389: hr_utility.set_message_token('PROCEDURE', l_proc);
390: hr_utility.set_message_token('STEP','5');
391: hr_utility.raise_error;
392: ElsIf (p_constraint_name = 'OTA_VSP_PRIMARY_SUPPLIER_F_CHK') Then
393: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
386: --
387: If (p_constraint_name = 'OTA_VENDOR_SUPPLIES_FK1') Then
388: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
389: hr_utility.set_message_token('PROCEDURE', l_proc);
390: hr_utility.set_message_token('STEP','5');
391: hr_utility.raise_error;
392: ElsIf (p_constraint_name = 'OTA_VSP_PRIMARY_SUPPLIER_F_CHK') Then
393: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
394: hr_utility.set_message_token('PROCEDURE', l_proc);
387: If (p_constraint_name = 'OTA_VENDOR_SUPPLIES_FK1') Then
388: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
389: hr_utility.set_message_token('PROCEDURE', l_proc);
390: hr_utility.set_message_token('STEP','5');
391: hr_utility.raise_error;
392: ElsIf (p_constraint_name = 'OTA_VSP_PRIMARY_SUPPLIER_F_CHK') Then
393: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
394: hr_utility.set_message_token('PROCEDURE', l_proc);
395: hr_utility.set_message_token('STEP','10');
389: hr_utility.set_message_token('PROCEDURE', l_proc);
390: hr_utility.set_message_token('STEP','5');
391: hr_utility.raise_error;
392: ElsIf (p_constraint_name = 'OTA_VSP_PRIMARY_SUPPLIER_F_CHK') Then
393: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
394: hr_utility.set_message_token('PROCEDURE', l_proc);
395: hr_utility.set_message_token('STEP','10');
396: hr_utility.raise_error;
397: Else
390: hr_utility.set_message_token('STEP','5');
391: hr_utility.raise_error;
392: ElsIf (p_constraint_name = 'OTA_VSP_PRIMARY_SUPPLIER_F_CHK') Then
393: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
394: hr_utility.set_message_token('PROCEDURE', l_proc);
395: hr_utility.set_message_token('STEP','10');
396: hr_utility.raise_error;
397: Else
398: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
391: hr_utility.raise_error;
392: ElsIf (p_constraint_name = 'OTA_VSP_PRIMARY_SUPPLIER_F_CHK') Then
393: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
394: hr_utility.set_message_token('PROCEDURE', l_proc);
395: hr_utility.set_message_token('STEP','10');
396: hr_utility.raise_error;
397: Else
398: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
399: hr_utility.set_message_token('PROCEDURE', l_proc);
392: ElsIf (p_constraint_name = 'OTA_VSP_PRIMARY_SUPPLIER_F_CHK') Then
393: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
394: hr_utility.set_message_token('PROCEDURE', l_proc);
395: hr_utility.set_message_token('STEP','10');
396: hr_utility.raise_error;
397: Else
398: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
399: hr_utility.set_message_token('PROCEDURE', l_proc);
400: hr_utility.set_message_token('STEP','15');
394: hr_utility.set_message_token('PROCEDURE', l_proc);
395: hr_utility.set_message_token('STEP','10');
396: hr_utility.raise_error;
397: Else
398: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
399: hr_utility.set_message_token('PROCEDURE', l_proc);
400: hr_utility.set_message_token('STEP','15');
401: hr_utility.raise_error;
402: End If;
395: hr_utility.set_message_token('STEP','10');
396: hr_utility.raise_error;
397: Else
398: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
399: hr_utility.set_message_token('PROCEDURE', l_proc);
400: hr_utility.set_message_token('STEP','15');
401: hr_utility.raise_error;
402: End If;
403: --
396: hr_utility.raise_error;
397: Else
398: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
399: hr_utility.set_message_token('PROCEDURE', l_proc);
400: hr_utility.set_message_token('STEP','15');
401: hr_utility.raise_error;
402: End If;
403: --
404: hr_utility.set_location(' Leaving:'||l_proc, 10);
397: Else
398: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
399: hr_utility.set_message_token('PROCEDURE', l_proc);
400: hr_utility.set_message_token('STEP','15');
401: hr_utility.raise_error;
402: End If;
403: --
404: hr_utility.set_location(' Leaving:'||l_proc, 10);
405: End constraint_error;
400: hr_utility.set_message_token('STEP','15');
401: hr_utility.raise_error;
402: End If;
403: --
404: hr_utility.set_location(' Leaving:'||l_proc, 10);
405: End constraint_error;
406: --
407: -- ----------------------------------------------------------------------------
408: -- |------------------------------< insert_dml >------------------------------|
448: --
449: l_proc varchar2(72) := g_package||'insert_dml';
450: --
451: Begin
452: hr_utility.set_location('Entering:'||l_proc, 5);
453: --
454: --
455: g_api_dml := true; -- Set the api dml status
456: --
472: );
473: --
474: g_api_dml := false; -- Unset the api dml status
475: --
476: hr_utility.set_location(' Leaving:'||l_proc, 10);
477: Exception
478: When hr_api.check_integrity_violated Then
479: -- A check constraint has been violated
480: g_api_dml := false; -- Unset the api dml status
535: --
536: l_proc varchar2(72) := g_package||'update_dml';
537: --
538: Begin
539: hr_utility.set_location('Entering:'||l_proc, 5);
540: --
541: --
542: g_api_dml := true; -- Set the api dml status
543: --
553: where vendor_supply_id = p_rec.vendor_supply_id;
554: --
555: g_api_dml := false; -- Unset the api dml status
556: --
557: hr_utility.set_location(' Leaving:'||l_proc, 10);
558: --
559: Exception
560: When hr_api.check_integrity_violated Then
561: -- A check constraint has been violated
615: --
616: l_proc varchar2(72) := g_package||'delete_dml';
617: --
618: Begin
619: hr_utility.set_location('Entering:'||l_proc, 5);
620: --
621: g_api_dml := true; -- Set the api dml status
622: --
623: -- Delete the ota_vendor_supplies row.
631: --
632: -- The row to be deleted was NOT found therefore a serious
633: -- error has occurred which MUST be reported.
634: --
635: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
636: hr_utility.set_message_token('PROCEDURE', l_proc);
637: hr_utility.set_message_token('STEP','5');
638: hr_utility.raise_error;
639: End If;
632: -- The row to be deleted was NOT found therefore a serious
633: -- error has occurred which MUST be reported.
634: --
635: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
636: hr_utility.set_message_token('PROCEDURE', l_proc);
637: hr_utility.set_message_token('STEP','5');
638: hr_utility.raise_error;
639: End If;
640: --
633: -- error has occurred which MUST be reported.
634: --
635: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
636: hr_utility.set_message_token('PROCEDURE', l_proc);
637: hr_utility.set_message_token('STEP','5');
638: hr_utility.raise_error;
639: End If;
640: --
641: hr_utility.set_location(' Leaving:'||l_proc, 10);
634: --
635: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
636: hr_utility.set_message_token('PROCEDURE', l_proc);
637: hr_utility.set_message_token('STEP','5');
638: hr_utility.raise_error;
639: End If;
640: --
641: hr_utility.set_location(' Leaving:'||l_proc, 10);
642: --
637: hr_utility.set_message_token('STEP','5');
638: hr_utility.raise_error;
639: End If;
640: --
641: hr_utility.set_location(' Leaving:'||l_proc, 10);
642: --
643: Exception
644: When hr_api.child_integrity_violated then
645: -- Child integrity has been violated
691: --
692: Cursor C_Sel1 is select ota_vendor_supplies_s.nextval from sys.dual;
693: --
694: Begin
695: hr_utility.set_location('Entering:'||l_proc, 5);
696: --
697: --
698: -- Select the next sequence number
699: --
700: Open C_Sel1;
701: Fetch C_Sel1 Into p_rec.vendor_supply_id;
702: Close C_Sel1;
703: --
704: hr_utility.set_location(' Leaving:'||l_proc, 10);
705: End pre_insert;
706: --
707: -- ----------------------------------------------------------------------------
708: -- |------------------------------< pre_update >------------------------------|
737: --
738: l_proc varchar2(72) := g_package||'pre_update';
739: --
740: Begin
741: hr_utility.set_location('Entering:'||l_proc, 5);
742: --
743: hr_utility.set_location(' Leaving:'||l_proc, 10);
744: End pre_update;
745: --
739: --
740: Begin
741: hr_utility.set_location('Entering:'||l_proc, 5);
742: --
743: hr_utility.set_location(' Leaving:'||l_proc, 10);
744: End pre_update;
745: --
746: -- ----------------------------------------------------------------------------
747: -- |------------------------------< pre_delete >------------------------------|
776: --
777: l_proc varchar2(72) := g_package||'pre_delete';
778: --
779: Begin
780: hr_utility.set_location('Entering:'||l_proc, 5);
781: --
782: hr_utility.set_location(' Leaving:'||l_proc, 10);
783: End pre_delete;
784: --
778: --
779: Begin
780: hr_utility.set_location('Entering:'||l_proc, 5);
781: --
782: hr_utility.set_location(' Leaving:'||l_proc, 10);
783: End pre_delete;
784: --
785: -- ----------------------------------------------------------------------------
786: -- |-----------------------------< post_insert >------------------------------|
815: --
816: l_proc varchar2(72) := g_package||'post_insert';
817: --
818: Begin
819: hr_utility.set_location('Entering:'||l_proc, 5);
820: --
821: hr_utility.set_location(' Leaving:'||l_proc, 10);
822: End post_insert;
823: --
817: --
818: Begin
819: hr_utility.set_location('Entering:'||l_proc, 5);
820: --
821: hr_utility.set_location(' Leaving:'||l_proc, 10);
822: End post_insert;
823: --
824: -- ----------------------------------------------------------------------------
825: -- |-----------------------------< post_update >------------------------------|
854: --
855: l_proc varchar2(72) := g_package||'post_update';
856: --
857: Begin
858: hr_utility.set_location('Entering:'||l_proc, 5);
859: --
860: hr_utility.set_location(' Leaving:'||l_proc, 10);
861: End post_update;
862: --
856: --
857: Begin
858: hr_utility.set_location('Entering:'||l_proc, 5);
859: --
860: hr_utility.set_location(' Leaving:'||l_proc, 10);
861: End post_update;
862: --
863: -- ----------------------------------------------------------------------------
864: -- |-----------------------------< post_delete >------------------------------|
893: --
894: l_proc varchar2(72) := g_package||'post_delete';
895: --
896: Begin
897: hr_utility.set_location('Entering:'||l_proc, 5);
898: --
899: hr_utility.set_location(' Leaving:'||l_proc, 10);
900: End post_delete;
901: --
895: --
896: Begin
897: hr_utility.set_location('Entering:'||l_proc, 5);
898: --
899: hr_utility.set_location(' Leaving:'||l_proc, 10);
900: End post_delete;
901: --
902: -- ----------------------------------------------------------------------------
903: -- |---------------------------------< lck >----------------------------------|
963: --
964: l_proc varchar2(72) := g_package||'lck';
965: --
966: Begin
967: hr_utility.set_location('Entering:'||l_proc, 5);
968: --
969: -- Add any mandatory argument checking here:
970: -- Example:
971: -- hr_api.check_mandatory_arg_error
981: -- a) The row does NOT exist.
982: -- b) The row is NOT current (i.e. failure on the object version).
983: --
984: Close C_Sel1;
985: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
986: hr_utility.set_message_token('TABLE_NAME', 'ota_vendor_supplies');
987: hr_utility.raise_error;
988: End If;
989: Close C_Sel1;
982: -- b) The row is NOT current (i.e. failure on the object version).
983: --
984: Close C_Sel1;
985: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
986: hr_utility.set_message_token('TABLE_NAME', 'ota_vendor_supplies');
987: hr_utility.raise_error;
988: End If;
989: Close C_Sel1;
990: --
983: --
984: Close C_Sel1;
985: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
986: hr_utility.set_message_token('TABLE_NAME', 'ota_vendor_supplies');
987: hr_utility.raise_error;
988: End If;
989: Close C_Sel1;
990: --
991: hr_utility.set_location(' Leaving:'||l_proc, 10);
987: hr_utility.raise_error;
988: End If;
989: Close C_Sel1;
990: --
991: hr_utility.set_location(' Leaving:'||l_proc, 10);
992: --
993: -- We need to trap the ORA LOCK exception
994: --
995: Exception
997: --
998: -- The object is locked therefore we need to supply a meaningful
999: -- error message.
1000: --
1001: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
1002: hr_utility.set_message_token('TABLE_NAME', 'ota_vendor_supplies');
1003: hr_utility.raise_error;
1004: End lck;
1005: --
998: -- The object is locked therefore we need to supply a meaningful
999: -- error message.
1000: --
1001: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
1002: hr_utility.set_message_token('TABLE_NAME', 'ota_vendor_supplies');
1003: hr_utility.raise_error;
1004: End lck;
1005: --
1006: -- ----------------------------------------------------------------------------
999: -- error message.
1000: --
1001: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
1002: hr_utility.set_message_token('TABLE_NAME', 'ota_vendor_supplies');
1003: hr_utility.raise_error;
1004: End lck;
1005: --
1006: -- ----------------------------------------------------------------------------
1007: -- |-----------------------------< convert_args >-----------------------------|
1044: l_proc varchar2(72) := g_package||'convert_args';
1045: --
1046: Begin
1047: --
1048: hr_utility.set_location('Entering:'||l_proc, 5);
1049: --
1050: -- Convert arguments into local l_rec structure.
1051: --
1052: l_rec.vendor_supply_id := p_vendor_supply_id;
1056: l_rec.comments := p_comments;
1057: --
1058: -- Return the plsql record structure.
1059: --
1060: hr_utility.set_location(' Leaving:'||l_proc, 10);
1061: Return(l_rec);
1062: --
1063: End convert_args;
1064: --
1107: l_proc varchar2(72) := g_package||'convert_defs';
1108: --
1109: Begin
1110: --
1111: hr_utility.set_location('Entering:'||l_proc, 5);
1112: --
1113: -- We must now examine each argument value in the
1114: -- p_rec plsql record structure
1115: -- to see if a system default is being used. If a system default
1129: End If;
1130: --
1131: -- Return the plsql record structure.
1132: --
1133: hr_utility.set_location(' Leaving:'||l_proc, 10);
1134: Return(p_rec);
1135: --
1136: End convert_defs;
1137: --
1168: --
1169: l_proc varchar2(72) := g_package||'insert_validate';
1170: --
1171: Begin
1172: hr_utility.set_location('Entering:'||l_proc, 5);
1173: --
1174: -- Call all supporting business operations
1175: --
1176: CHECK_TAV
1195: P_VENDOR_ID => P_REC.VENDOR_ID,
1196: P_PRIMARY_SUPPLIER_FLAG => P_REC.PRIMARY_SUPPLIER_FLAG
1197: );
1198: --
1199: hr_utility.set_location(' Leaving:'||l_proc, 10);
1200: End insert_validate;
1201: --
1202: -- ----------------------------------------------------------------------------
1203: -- |---------------------------< update_validate >----------------------------|
1232: --
1233: l_proc varchar2(72) := g_package||'update_validate';
1234: --
1235: Begin
1236: hr_utility.set_location('Entering:'||l_proc, 5);
1237: --
1238: -- Call all supporting business operations
1239: --
1240: CHECK_NON_TRANSFER
1249: P_VENDOR_ID => P_REC.VENDOR_ID,
1250: P_PRIMARY_SUPPLIER_FLAG => P_REC.PRIMARY_SUPPLIER_FLAG
1251: );
1252: --
1253: hr_utility.set_location(' Leaving:'||l_proc, 10);
1254: End update_validate;
1255: --
1256: -- ----------------------------------------------------------------------------
1257: -- |---------------------------< delete_validate >----------------------------|
1286: --
1287: l_proc varchar2(72) := g_package||'delete_validate';
1288: --
1289: Begin
1290: hr_utility.set_location('Entering:'||l_proc, 5);
1291: --
1292: -- Call all supporting business operations
1293: --
1294: hr_utility.set_location(' Leaving:'||l_proc, 10);
1290: hr_utility.set_location('Entering:'||l_proc, 5);
1291: --
1292: -- Call all supporting business operations
1293: --
1294: hr_utility.set_location(' Leaving:'||l_proc, 10);
1295: End delete_validate;
1296: --
1297: -- ----------------------------------------------------------------------------
1298: -- |---------------------------------< ins >----------------------------------|
1359: --
1360: l_proc varchar2(72) := g_package||'ins';
1361: --
1362: Begin
1363: hr_utility.set_location('Entering:'||l_proc, 5);
1364: --
1365: -- Determine if the business process is to be validated.
1366: --
1367: If p_validate then
1392: If p_validate then
1393: Raise HR_Api.Validate_Enabled;
1394: End If;
1395: --
1396: hr_utility.set_location(' Leaving:'||l_proc, 10);
1397: Exception
1398: When HR_Api.Validate_Enabled Then
1399: --
1400: -- As the Validate_Enabled exception has been raised
1455: l_rec g_rec_type;
1456: l_proc varchar2(72) := g_package||'ins';
1457: --
1458: Begin
1459: hr_utility.set_location('Entering:'||l_proc, 5);
1460: --
1461: -- Call conversion function to turn arguments into the
1462: -- p_rec structure.
1463: --
1481: --
1482: p_vendor_supply_id := l_rec.vendor_supply_id;
1483: --
1484: --
1485: hr_utility.set_location(' Leaving:'||l_proc, 10);
1486: End ins;
1487: --
1488: -- ----------------------------------------------------------------------------
1489: -- |---------------------------------< upd >----------------------------------|
1557: --
1558: l_proc varchar2(72) := g_package||'upd';
1559: --
1560: Begin
1561: hr_utility.set_location('Entering:'||l_proc, 5);
1562: --
1563: -- Determine if the business process is to be validated.
1564: --
1565: If p_validate then
1601: If p_validate then
1602: Raise HR_Api.Validate_Enabled;
1603: End If;
1604: --
1605: hr_utility.set_location(' Leaving:'||l_proc, 10);
1606: Exception
1607: When HR_Api.Validate_Enabled Then
1608: --
1609: -- As the Validate_Enabled exception has been raised
1664: l_rec g_rec_type;
1665: l_proc varchar2(72) := g_package||'upd';
1666: --
1667: Begin
1668: hr_utility.set_location('Entering:'||l_proc, 5);
1669: --
1670: -- Call conversion function to turn arguments into the
1671: -- l_rec structure.
1672: --
1686: --
1687: upd(l_rec, p_validate);
1688: --
1689: --
1690: hr_utility.set_location(' Leaving:'||l_proc, 10);
1691: End upd;
1692: --
1693: -- ----------------------------------------------------------------------------
1694: -- |---------------------------------< del >----------------------------------|
1753: --
1754: l_proc varchar2(72) := g_package||'del';
1755: --
1756: Begin
1757: hr_utility.set_location('Entering:'||l_proc, 5);
1758: --
1759: -- Determine if the business process is to be validated.
1760: --
1761: If p_validate then
1793: If p_validate then
1794: Raise HR_Api.Validate_Enabled;
1795: End If;
1796: --
1797: hr_utility.set_location(' Leaving:'||l_proc, 10);
1798: Exception
1799: When HR_Api.Validate_Enabled Then
1800: --
1801: -- As the Validate_Enabled exception has been raised
1852: l_rec g_rec_type;
1853: l_proc varchar2(72) := g_package||'del';
1854: --
1855: Begin
1856: hr_utility.set_location('Entering:'||l_proc, 5);
1857: --
1858: -- As the delete procedure accepts a plsql record structure we do need to
1859: -- convert the arguments into the record structure.
1860: -- We don't need to call the supplied conversion argument routine as we
1868: -- business process
1869: --
1870: del(l_rec, p_validate);
1871: --
1872: hr_utility.set_location(' Leaving:'||l_proc, 10);
1873: End del;
1874: --
1875: end OTA_VSP_API;