50: l_proc varchar2(72) := g_package||'set_security_group_id';
51: --
52: begin
53: --
54: hr_utility.set_location('Entering:'|| l_proc, 10);
55: --
56: -- Ensure that all the mandatory parameter are not null
57: --
58: hr_api.mandatory_arg_error
81: hr_api.set_security_group_id
82: (p_security_group_id => l_security_group_id
83: );
84: --
85: hr_utility.set_location(' Leaving:'|| l_proc, 20);
86: --
87: end set_security_group_id;
88: --
89: -- ---------------------------------------------------------------------------
110: l_proc varchar2(72) := g_package||'return_legislation_code';
111: --
112: Begin
113: --
114: hr_utility.set_location('Entering:'|| l_proc, 10);
115: --
116: -- Ensure that all the mandatory parameter are not null
117: --
118: hr_api.mandatory_arg_error
128: -- call to this function. Just return the value in the global
129: -- variable.
130: --
131: l_legislation_code := hr_ord_bus.g_legislation_code;
132: hr_utility.set_location(l_proc, 20);
133: else
134: --
135: -- The ID is different to the last call to this function
136: -- or this is the first call to this function.
145: close csr_leg_code;
146: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
147: fnd_message.raise_error;
148: end if;
149: hr_utility.set_location(l_proc,30);
150: --
151: -- Set the global variables so the values are
152: -- available for the next call to this function.
153: --
154: close csr_leg_code;
155: hr_ord_bus.g_organization_link_id := p_organization_link_id;
156: hr_ord_bus.g_legislation_code := l_legislation_code;
157: end if;
158: hr_utility.set_location(' Leaving:'|| l_proc, 40);
159: return l_legislation_code;
160: end return_legislation_code;
161: --
162: -- ---------------------------------------------------------------------------
210: --
211: l_proc varchar2(72) := g_package || 'chk_parent_organization_id';
212: l_org_id number;
213: begin
214: hr_utility.set_location('Entering:'|| l_proc, 10);
215: --
216: --
217: -- Check mandatory parameters have been set
218: --
220: (p_api_name => l_proc
221: ,p_argument => 'parent_organization_id'
222: ,p_argument_value => p_parent_organization_id);
223: --
224: hr_utility.set_location(l_proc, 20);
225: --
226: --
227: -- Check that the organization is valid on the effective date and it is valid
228: -- for the business group.
239: else
240: close c_valid_org_for_bg_and_date;
241: end if;
242: --
243: hr_utility.set_location(l_proc, 30);
244: --
245: --
246: -- Check that the organization is classified as a HR Organization and it is
247: -- currently enabled.
256: else
257: close c_valid_hr_org;
258: end if;
259: --
260: hr_utility.set_location(' Leaving:'|| l_proc, 40);
261: end chk_parent_organization_id;
262: --
263: -- ---------------------------------------------------------------------------
264: -- |--------------------< chk_child_organization_id >------------------------|
317: --
318: l_proc varchar2(72) := g_package || 'chk_child_organization_id';
319: l_org_id number;
320: begin
321: hr_utility.set_location('Entering:'|| l_proc, 10);
322: --
323: --
324: -- Check mandatory parameters have been set
325: --
327: (p_api_name => l_proc
328: ,p_argument => 'child_organization_id'
329: ,p_argument_value => p_child_organization_id);
330: --
331: hr_utility.set_location(l_proc, 20);
332: --
333: --
334: -- Check that the organization is valid on the effective date and it is valid
335: -- for the business group.
346: else
347: close c_valid_org_for_bg_and_date;
348: end if;
349: --
350: hr_utility.set_location(l_proc, 30);
351: --
352: --
353: -- Check that the organization is classified correctly as per the rules held in the
354: -- table HR_DE_ORG_LINK_TYPES_MAPPING and it is currently enabled.
364: else
365: close c_valid_org_class;
366: end if;
367: --
368: hr_utility.set_location(' Leaving:'|| l_proc, 40);
369: end chk_child_organization_id;
370: --
371: -- ---------------------------------------------------------------------------
372: -- |-----------------------< chk_org_link_type >-----------------------------|
402: -- Local variables.
403: --
404: l_proc varchar2(72) := g_package || 'chk_org_link_type';
405: begin
406: hr_utility.set_location('Entering:'|| l_proc, 10);
407: --
408: --
409: -- Check mandatory parameters have been set
410: --
412: (p_api_name => l_proc
413: ,p_argument => 'org_link_type'
414: ,p_argument_value => p_org_link_type);
415: --
416: hr_utility.set_location(l_proc, 20);
417: --
418: --
419: -- Check that the org link type exists in hr_lookups for the
420: -- lookup type 'DE_LINK_TYPE'.
422: if hr_api.not_exists_in_hr_lookups
423: (p_effective_date => p_effective_date
424: ,p_lookup_type => 'DE_LINK_TYPE'
425: ,p_lookup_code => p_org_link_type) then
426: hr_utility.set_message(800, 'HR_DE_LINK_TYPE_CHK');
427: hr_utility.raise_error;
428: end if;
429: --
430: hr_utility.set_location(' Leaving:'|| l_proc, 30);
423: (p_effective_date => p_effective_date
424: ,p_lookup_type => 'DE_LINK_TYPE'
425: ,p_lookup_code => p_org_link_type) then
426: hr_utility.set_message(800, 'HR_DE_LINK_TYPE_CHK');
427: hr_utility.raise_error;
428: end if;
429: --
430: hr_utility.set_location(' Leaving:'|| l_proc, 30);
431: end chk_org_link_type;
426: hr_utility.set_message(800, 'HR_DE_LINK_TYPE_CHK');
427: hr_utility.raise_error;
428: end if;
429: --
430: hr_utility.set_location(' Leaving:'|| l_proc, 30);
431: end chk_org_link_type;
432: --
433: -- ---------------------------------------------------------------------------
434: -- |--------------------< chk_parent_child_org_ids >-------------------------|
463: -- Local variables.
464: --
465: l_proc varchar2(72) := g_package || 'chk_parent_child_org_ids';
466: begin
467: hr_utility.set_location('Entering:'|| l_proc, 10);
468: --
469: --
470: -- Check that the organizations are not the same.
471: --
469: --
470: -- Check that the organizations are not the same.
471: --
472: if p_parent_organization_id = p_child_organization_id THEN
473: hr_utility.set_message(800, 'HR_DE_ORG_SAME_CHK');
474: hr_utility.raise_error;
475: end if;
476: --
477: hr_utility.set_location(' Leaving:'|| l_proc, 30);
470: -- Check that the organizations are not the same.
471: --
472: if p_parent_organization_id = p_child_organization_id THEN
473: hr_utility.set_message(800, 'HR_DE_ORG_SAME_CHK');
474: hr_utility.raise_error;
475: end if;
476: --
477: hr_utility.set_location(' Leaving:'|| l_proc, 30);
478: end chk_parent_child_org_ids;
473: hr_utility.set_message(800, 'HR_DE_ORG_SAME_CHK');
474: hr_utility.raise_error;
475: end if;
476: --
477: hr_utility.set_location(' Leaving:'|| l_proc, 30);
478: end chk_parent_child_org_ids;
479: --
480: -- ---------------------------------------------------------------------------
481: -- |--------------------< chk_localisation_installed >-----------------------|
520: --
521: l_proc varchar2(72) := g_package || 'chk_localisation_installed';
522: l_dummy varchar2(2000);
523: begin
524: hr_utility.set_location('Entering:'|| l_proc, 10);
525: --
526: --
527: -- Check that the German HR localisation has been installed.
528: --
525: --
526: --
527: -- Check that the German HR localisation has been installed.
528: --
529: if not hr_utility.chk_product_install('Oracle Human Resources', 'DE') then
530: hr_utility.set_message(800, 'HR_DE_LOC_INSTALL_CHK');
531: hr_utility.raise_error;
532: end if;
533: --
526: --
527: -- Check that the German HR localisation has been installed.
528: --
529: if not hr_utility.chk_product_install('Oracle Human Resources', 'DE') then
530: hr_utility.set_message(800, 'HR_DE_LOC_INSTALL_CHK');
531: hr_utility.raise_error;
532: end if;
533: --
534: hr_utility.set_location(l_proc, 20);
527: -- Check that the German HR localisation has been installed.
528: --
529: if not hr_utility.chk_product_install('Oracle Human Resources', 'DE') then
530: hr_utility.set_message(800, 'HR_DE_LOC_INSTALL_CHK');
531: hr_utility.raise_error;
532: end if;
533: --
534: hr_utility.set_location(l_proc, 20);
535: --
530: hr_utility.set_message(800, 'HR_DE_LOC_INSTALL_CHK');
531: hr_utility.raise_error;
532: end if;
533: --
534: hr_utility.set_location(l_proc, 20);
535: --
536: --
537: -- Check that the business group has a legislation code of 'DE' ie. Germany.
538: --
546: else
547: close c_valid_legislation;
548: end if;
549: --
550: hr_utility.set_location(' Leaving:'|| l_proc, 30);
551: end chk_localisation_installed;
552: --
553: -- ---------------------------------------------------------------------------
554: -- |--------------------< chk_org_link_info_category >-----------------------|
585: -- Local variables.
586: --
587: l_proc varchar2(72) := g_package || 'chk_org_link_info_category';
588: begin
589: hr_utility.set_location('Entering:'|| l_proc, 10);
590: --
591: --
592: -- If the information category is not null then check that the information category
593: -- matches the link type.
598: fnd_message.raise_error;
599: end if;
600: end if;
601: --
602: hr_utility.set_location(l_proc, 20);
603: --
604: --
605: -- Check that the information category matches the link type if the link type is either
606: -- 'DE_SOCIAL_INSURANCE' or 'DE_LIABILITY_INSURANCE'.
611: fnd_message.raise_error;
612: end if;
613: end if;
614: --
615: hr_utility.set_location(' Leaving:'|| l_proc, 50);
616: end chk_org_link_info_category;
617: --
618: -- ---------------------------------------------------------------------------
619: -- |-------------------< chk_organization_link_delete >----------------------|
646: -- Local variables.
647: --
648: l_proc varchar2(72) := g_package || 'chk_organization_link_delete';
649: begin
650: hr_utility.set_location('Entering:'|| l_proc, 10);
651: --
652: --
653: -- Cannot delete the record when it is for a liability insurance provider.
654: --
656: fnd_message.set_name('PER', 'HR_DE_CANT_DEL_LIABILITY_INS');
657: fnd_message.raise_error;
658: end if;
659: --
660: hr_utility.set_location(' Leaving:'|| l_proc, 20);
661: end chk_organization_link_delete;
662: --
663: -- ----------------------------------------------------------------------------
664: -- |-----------------------------< chk_ddf >----------------------------------|
694: --
695: l_proc varchar2(72) := g_package || 'chk_ddf';
696: --
697: begin
698: hr_utility.set_location('Entering:'||l_proc,10);
699: --
700: if ((p_rec.organization_link_id is not null) and (
701: nvl(hr_ord_shd.g_old_rec.org_link_information_category, hr_api.g_varchar2) <>
702: nvl(p_rec.org_link_information_category, hr_api.g_varchar2) or
833: ,p_attribute30_value => p_rec.org_link_information30
834: );
835: end if;
836: --
837: hr_utility.set_location(' Leaving:'||l_proc,20);
838: end chk_ddf;
839: --
840: -- ----------------------------------------------------------------------------
841: -- |------------------------------< chk_df >----------------------------------|
871: --
872: l_proc varchar2(72) := g_package || 'chk_df';
873: --
874: begin
875: hr_utility.set_location('Entering:'||l_proc,10);
876: --
877: if ((p_rec.organization_link_id is not null) and (
878: nvl(hr_ord_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
879: nvl(p_rec.attribute_category, hr_api.g_varchar2) or
1010: ,p_attribute30_value => p_rec.attribute30
1011: );
1012: end if;
1013: --
1014: hr_utility.set_location(' Leaving:'||l_proc,20);
1015: end chk_df;
1016: --
1017: -- ----------------------------------------------------------------------------
1018: -- |-----------------------< chk_non_updateable_args >------------------------|
1115: -- Local Variables.
1116: --
1117: l_proc varchar2(72) := g_package || 'insert_validate';
1118: Begin
1119: hr_utility.set_location('Entering:'||l_proc, 10);
1120: --
1121: hr_api.validate_bus_grp_id
1122: (p_rec.business_group_id);
1123: --
1157: --
1158: hr_ord_bus.chk_df
1159: (p_rec);
1160: --
1161: hr_utility.set_location(' Leaving:'||l_proc, 10);
1162: End insert_validate;
1163: --
1164: -- ----------------------------------------------------------------------------
1165: -- |---------------------------< update_validate >----------------------------|
1172: -- Local Variables.
1173: --
1174: l_proc varchar2(72) := g_package || 'update_validate';
1175: Begin
1176: hr_utility.set_location('Entering:'||l_proc, 10);
1177: --
1178: --
1179: -- Check mandatory parameters have been set.
1180: --
1195: --
1196: hr_ord_bus.chk_df
1197: (p_rec);
1198: --
1199: hr_utility.set_location(' Leaving:'||l_proc, 10);
1200: End update_validate;
1201: --
1202: -- ----------------------------------------------------------------------------
1203: -- |---------------------------< delete_validate >----------------------------|
1208: --
1209: l_proc varchar2(72) := g_package||'delete_validate';
1210: --
1211: Begin
1212: hr_utility.set_location('Entering:'||l_proc, 5);
1213: --
1214: chk_organization_link_delete
1215: (p_org_link_type => p_rec.org_link_type);
1216: --
1213: --
1214: chk_organization_link_delete
1215: (p_org_link_type => p_rec.org_link_type);
1216: --
1217: hr_utility.set_location(' Leaving:'||l_proc, 10);
1218: End delete_validate;
1219: --
1220: end hr_ord_bus;