The following lines contain the word 'select', 'insert', 'update' or 'delete':
procedure update_cost_concat_segs
(p_cost_allocation_keyflex_id in number
,p_cost_name in varchar2
) is
--
CURSOR csr_chk_cost is
SELECT null
FROM pay_cost_allocation_keyflex
where cost_allocation_keyflex_id = p_cost_allocation_keyflex_id
and (concatenated_segments <> p_cost_name
or concatenated_segments is null);
l_proc varchar2(72) := g_package||'update_cost_concat_segs';
procedure update_cost_concat_segs_auto
(p_cost_allocation_keyflex_id in number
,p_cost_name in varchar2
) is
PRAGMA AUTONOMOUS_TRANSACTION;
SELECT null
FROM pay_cost_allocation_keyflex
where cost_allocation_keyflex_id = p_cost_allocation_keyflex_id
for update nowait;
l_proc varchar2(72) := g_package||'update_cost_concat_segs_auto';
update pay_cost_allocation_keyflex
set concatenated_segments = p_cost_name
where cost_allocation_keyflex_id = p_cost_allocation_keyflex_id
and (concatenated_segments <> p_cost_name
or concatenated_segments is null);
end update_cost_concat_segs_auto;
update_cost_concat_segs_auto
(p_cost_allocation_keyflex_id => p_cost_allocation_keyflex_id
,p_cost_name => p_cost_name
);
end update_cost_concat_segs;
select view_all_organizations_flag
from per_security_profiles
where security_profile_id = p_security_profile_id;
select bus.cost_allocation_structure
from per_business_groups_perf bus
where bus.business_group_id = p_business_group_id;
update_cost_concat_segs (p_cost_allocation_keyflex_id => l_cost_alloc_key_id
,p_cost_name => l_cost_name);
PROCEDURE update_organization
( p_validate IN BOOLEAN DEFAULT false
,p_effective_date IN DATE
,p_language_code IN VARCHAR2 DEFAULT hr_api.userenv_lang
--
,p_organization_id IN NUMBER
,p_cost_allocation_keyflex_id IN NUMBER DEFAULT hr_api.g_number
,p_location_id IN NUMBER DEFAULT hr_api.g_number
--Bug 3040119
--,p_soft_coding_keyflex_id IN NUMBER DEFAULT hr_api.g_number
,p_date_from IN DATE DEFAULT hr_api.g_date
,p_date_to IN DATE DEFAULT hr_api.g_date
,p_internal_external_flag IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_internal_address_line IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_type IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_comments IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute_category IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute4 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute5 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute6 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute7 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute8 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute9 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute10 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute11 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute12 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
--Enhancement 4040086
--Begin of Add 10 additional segments
,p_attribute21 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute22 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute23 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute24 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute25 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute26 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute27 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute28 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute29 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute30 IN VARCHAR2 DEFAULT hr_api.g_varchar2
--End of Enhancement 4040086
-- Bug 3039046
,p_segment1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment4 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment5 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment6 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment7 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment8 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment9 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment10 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment11 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment12 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment21 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment22 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment23 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment24 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment25 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment26 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment27 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment28 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment29 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment30 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_concat_segments IN VARCHAR2 DEFAULT hr_api.g_varchar2
--
,p_object_version_number IN OUT NOCOPY NUMBER
)
IS
l_duplicate_org_warning boolean;
update_organization
( p_effective_date => p_effective_date
,p_language_code => p_language_code
,p_name => l_name
,p_organization_id => p_organization_id
,p_cost_allocation_keyflex_id => p_cost_allocation_keyflex_id
,p_location_id => p_location_id
-- Bug 3040119
--,p_soft_coding_keyflex_id => p_soft_coding_keyflex_id
,p_date_from => p_date_from
,p_date_to => p_date_to
,p_internal_external_flag => p_internal_external_flag
,p_internal_address_line => p_internal_address_line
,p_type => p_type
,p_comments => p_comments
,p_attribute_category => p_attribute_category
,p_attribute1 => p_attribute1
,p_attribute2 => p_attribute2
,p_attribute3 => p_attribute3
,p_attribute4 => p_attribute4
,p_attribute5 => p_attribute5
,p_attribute6 => p_attribute6
,p_attribute7 => p_attribute7
,p_attribute8 => p_attribute8
,p_attribute9 => p_attribute9
,p_attribute10 => p_attribute10
,p_attribute11 => p_attribute11
,p_attribute12 => p_attribute12
,p_attribute13 => p_attribute13
,p_attribute14 => p_attribute14
,p_attribute15 => p_attribute15
,p_attribute16 => p_attribute16
,p_attribute17 => p_attribute17
,p_attribute18 => p_attribute18
,p_attribute19 => p_attribute19
,p_attribute20 => p_attribute20
--Enhancement 4040086
,p_attribute21 => p_attribute21
,p_attribute22 => p_attribute22
,p_attribute23 => p_attribute23
,p_attribute24 => p_attribute24
,p_attribute25 => p_attribute25
,p_attribute26 => p_attribute26
,p_attribute27 => p_attribute27
,p_attribute28 => p_attribute28
,p_attribute29 => p_attribute29
,p_attribute30 => p_attribute30
--End Enhancement 4040086
-- Bug 3039046
,p_segment1 => p_segment1
,p_segment2 => p_segment2
,p_segment3 => p_segment3
,p_segment4 => p_segment4
,p_segment5 => p_segment5
,p_segment6 => p_segment6
,p_segment7 => p_segment7
,p_segment8 => p_segment8
,p_segment9 => p_segment9
,p_segment10 => p_segment10
,p_segment11 => p_segment11
,p_segment12 => p_segment12
,p_segment13 => p_segment13
,p_segment14 => p_segment14
,p_segment15 => p_segment15
,p_segment16 => p_segment16
,p_segment17 => p_segment17
,p_segment18 => p_segment18
,p_segment19 => p_segment19
,p_segment20 => p_segment20
,p_segment21 => p_segment21
,p_segment22 => p_segment22
,p_segment23 => p_segment23
,p_segment24 => p_segment24
,p_segment25 => p_segment25
,p_segment26 => p_segment26
,p_segment27 => p_segment27
,p_segment28 => p_segment28
,p_segment29 => p_segment29
,p_segment30 => p_segment30
,p_concat_segments => p_concat_segments
--
,p_object_version_number => p_object_version_number
,p_duplicate_org_warning => l_duplicate_org_warning);
PROCEDURE update_organization
( p_validate IN BOOLEAN DEFAULT false
,p_effective_date IN DATE
,p_language_code IN VARCHAR2 DEFAULT hr_api.userenv_lang
--
,p_name IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_organization_id IN NUMBER
,p_cost_allocation_keyflex_id IN NUMBER DEFAULT hr_api.g_number
,p_location_id IN NUMBER DEFAULT hr_api.g_number
-- Bug 3040119
--,p_soft_coding_keyflex_id IN NUMBER DEFAULT hr_api.g_number
,p_date_from IN DATE DEFAULT hr_api.g_date
,p_date_to IN DATE DEFAULT hr_api.g_date
,p_internal_external_flag IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_internal_address_line IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_type IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_comments IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute_category IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute4 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute5 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute6 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute7 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute8 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute9 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute10 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute11 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute12 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
--Enhancement 4040086
--Begin of Add 10 additional segments
,p_attribute21 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute22 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute23 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute24 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute25 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute26 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute27 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute28 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute29 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute30 IN VARCHAR2 DEFAULT hr_api.g_varchar2
--End of Add 10 additional segments
-- Bug 3039046
,p_segment1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment4 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment5 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment6 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment7 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment8 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment9 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment10 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment11 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment12 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment21 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment22 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment23 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment24 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment25 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment26 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment27 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment28 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment29 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_segment30 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_concat_segments IN VARCHAR2 DEFAULT hr_api.g_varchar2
--
,p_object_version_number IN OUT NOCOPY NUMBER
,p_duplicate_org_warning out nocopy boolean
) IS
--
-- Declare cursors and local variables
--
l_proc VARCHAR2(72) := g_package||'update_organization';
select concatenated_segments, -- Bug 3187772
segment1,
segment2,
segment3,
segment4,
segment5,
segment6,
segment7,
segment8,
segment9,
segment10,
segment11,
segment12,
segment13,
segment14,
segment15,
segment16,
segment17,
segment18,
segment19,
segment20,
segment21,
segment22,
segment23,
segment24,
segment25,
segment26,
segment27,
segment28,
segment29,
segment30
from pay_cost_allocation_keyflex
where cost_allocation_keyflex_id = l_cost_alloc_key_id;
select bus.cost_allocation_structure
from per_business_groups_perf bus
where bus.business_group_id = l_business_group_id;
savepoint update_organization;
hr_organization_bk4.update_organization_b
( p_effective_date => p_effective_date
,p_language_code => p_language_code
,p_name => p_name
,p_organization_id => p_organization_id
,p_cost_allocation_keyflex_id => p_cost_allocation_keyflex_id
,p_location_id => p_location_id
-- Bug 3040119
--,p_soft_coding_keyflex_id => p_soft_coding_keyflex_id
,p_date_from => l_date_from
,p_date_to => l_date_to
,p_internal_external_flag => p_internal_external_flag
,p_internal_address_line => p_internal_address_line
,p_type => p_type
,p_attribute_category => p_attribute_category
,p_attribute1 => p_attribute1
,p_attribute2 => p_attribute2
,p_attribute3 => p_attribute3
,p_attribute4 => p_attribute4
,p_attribute5 => p_attribute5
,p_attribute6 => p_attribute6
,p_attribute7 => p_attribute7
,p_attribute8 => p_attribute8
,p_attribute9 => p_attribute9
,p_attribute10 => p_attribute10
,p_attribute11 => p_attribute11
,p_attribute12 => p_attribute12
,p_attribute13 => p_attribute13
,p_attribute14 => p_attribute14
,p_attribute15 => p_attribute15
,p_attribute16 => p_attribute16
,p_attribute17 => p_attribute17
,p_attribute18 => p_attribute18
,p_attribute19 => p_attribute19
,p_attribute20 => p_attribute20
--Enhancement 4040086
,p_attribute21 => p_attribute21
,p_attribute22 => p_attribute22
,p_attribute23 => p_attribute23
,p_attribute24 => p_attribute24
,p_attribute25 => p_attribute25
,p_attribute26 => p_attribute26
,p_attribute27 => p_attribute27
,p_attribute28 => p_attribute28
,p_attribute29 => p_attribute29
,p_attribute30 => p_attribute30
--End Enhancement 4040086
-- Bug 3039046
,p_segment1 => l_cost_segment1
,p_segment2 => l_cost_segment2
,p_segment3 => l_cost_segment3
,p_segment4 => l_cost_segment4
,p_segment5 => l_cost_segment5
,p_segment6 => l_cost_segment6
,p_segment7 => l_cost_segment7
,p_segment8 => l_cost_segment8
,p_segment9 => l_cost_segment9
,p_segment10 => l_cost_segment10
,p_segment11 => l_cost_segment11
,p_segment12 => l_cost_segment12
,p_segment13 => l_cost_segment13
,p_segment14 => l_cost_segment14
,p_segment15 => l_cost_segment15
,p_segment16 => l_cost_segment16
,p_segment17 => l_cost_segment17
,p_segment18 => l_cost_segment18
,p_segment19 => l_cost_segment19
,p_segment20 => l_cost_segment20
,p_segment21 => l_cost_segment21
,p_segment22 => l_cost_segment22
,p_segment23 => l_cost_segment23
,p_segment24 => l_cost_segment24
,p_segment25 => l_cost_segment25
,p_segment26 => l_cost_segment26
,p_segment27 => l_cost_segment27
,p_segment28 => l_cost_segment28
,p_segment29 => l_cost_segment29
,p_segment30 => l_cost_segment30
,p_concat_segments => l_old_cost_name
--
,p_object_version_number => l_object_version_number
);
(p_module_name => 'update_organization'
,p_hook_type => 'BP'
);
update_cost_concat_segs (p_cost_allocation_keyflex_id => l_cost_alloc_key_id
,p_cost_name => l_cost_name);
hr_organization_bk4.update_organization_a
( p_effective_date => p_effective_date
,p_language_code => p_language_code
,p_name => p_name
,p_organization_id => p_organization_id
,p_cost_allocation_keyflex_id => p_cost_allocation_keyflex_id
,p_location_id => p_location_id
-- Bug 3040119
--,p_soft_coding_keyflex_id => p_soft_coding_keyflex_id
,p_date_from => l_date_from
,p_date_to => l_date_to
,p_internal_external_flag => p_internal_external_flag
,p_internal_address_line => p_internal_address_line
,p_type => p_type
,p_attribute_category => p_attribute_category
,p_attribute1 => p_attribute1
,p_attribute2 => p_attribute2
,p_attribute3 => p_attribute3
,p_attribute4 => p_attribute4
,p_attribute5 => p_attribute5
,p_attribute6 => p_attribute6
,p_attribute7 => p_attribute7
,p_attribute8 => p_attribute8
,p_attribute9 => p_attribute9
,p_attribute10 => p_attribute10
,p_attribute11 => p_attribute11
,p_attribute12 => p_attribute12
,p_attribute13 => p_attribute13
,p_attribute14 => p_attribute14
,p_attribute15 => p_attribute15
,p_attribute16 => p_attribute16
,p_attribute17 => p_attribute17
,p_attribute18 => p_attribute18
,p_attribute19 => p_attribute19
,p_attribute20 => p_attribute20
--Enhancement 4040086
,p_attribute21 => p_attribute21
,p_attribute22 => p_attribute22
,p_attribute23 => p_attribute23
,p_attribute24 => p_attribute24
,p_attribute25 => p_attribute25
,p_attribute26 => p_attribute26
,p_attribute27 => p_attribute27
,p_attribute28 => p_attribute28
,p_attribute29 => p_attribute29
,p_attribute30 => p_attribute30
--End Enhancement 4040086
-- Bug 3039046
,p_segment1 => l_cost_segment1
,p_segment2 => l_cost_segment2
,p_segment3 => l_cost_segment3
,p_segment4 => l_cost_segment4
,p_segment5 => l_cost_segment5
,p_segment6 => l_cost_segment6
,p_segment7 => l_cost_segment7
,p_segment8 => l_cost_segment8
,p_segment9 => l_cost_segment9
,p_segment10 => l_cost_segment10
,p_segment11 => l_cost_segment11
,p_segment12 => l_cost_segment12
,p_segment13 => l_cost_segment13
,p_segment14 => l_cost_segment14
,p_segment15 => l_cost_segment15
,p_segment16 => l_cost_segment16
,p_segment17 => l_cost_segment17
,p_segment18 => l_cost_segment18
,p_segment19 => l_cost_segment19
,p_segment20 => l_cost_segment20
,p_segment21 => l_cost_segment21
,p_segment22 => l_cost_segment22
,p_segment23 => l_cost_segment23
,p_segment24 => l_cost_segment24
,p_segment25 => l_cost_segment25
,p_segment26 => l_cost_segment26
,p_segment27 => l_cost_segment27
,p_segment28 => l_cost_segment28
,p_segment29 => l_cost_segment29
,p_segment30 => l_cost_segment30
,p_concat_segments => l_old_cost_name
,p_cost_name => l_cost_name
--
,p_object_version_number => l_object_version_number
,p_duplicate_org_warning => p_duplicate_org_warning
);
(p_module_name => 'update_organization'
,p_hook_type => 'AP'
);
ROLLBACK TO update_organization;
ROLLBACK TO update_organization;
END update_organization;
PROCEDURE delete_organization
( p_validate IN BOOLEAN
,p_organization_id IN hr_all_organization_units.organization_id%TYPE
,p_object_version_number IN hr_all_organization_units.object_version_number%TYPE )
IS
--
--
-- Declare cursors and local variables
--
l_proc VARCHAR2(72) := g_package||'delete_organization';
savepoint delete_organization;
hr_organization_bk5.delete_organization_b
(p_organization_id => p_organization_id
,p_object_version_number => p_object_version_number
);
(p_module_name => 'delete_organization'
,p_hook_type => 'BP'
);
delete from per_organization_list
where organization_id = p_organization_id;
hr_organization_bk5.delete_organization_a
(p_organization_id => p_organization_id
,p_object_version_number => p_object_version_number
);
(p_module_name => 'delete_organization'
,p_hook_type => 'AP'
);
ROLLBACK TO delete_organization;
ROLLBACK TO delete_organization;
END delete_organization;
select legislation_code
from per_business_groups pbg,
hr_all_organization_units hou
where hou.organization_id = p_organization_id
and pbg.business_group_id = hou.business_group_id;
SELECT 'Y'
INTO l_exists
FROM sys.dual
WHERE EXISTS
(SELECT null
FROM hr_org_info_types_by_class class,
hr_org_information_types type
WHERE class.org_classification = p_org_classif_code
AND class.org_information_type = type.org_information_type
AND ( type.legislation_code is null
OR type.legislation_code = l_legislation_code)
AND class.mandatory_flag = 'Y'
);
SELECT org_information_context
INTO l_context
FROM hr_organization_information
WHERE org_information_id = p_org_information_id;
select business_group_id
from hr_all_organization_units
where organization_id = p_organization_id;
PROCEDURE update_org_information
(p_validate IN BOOLEAN DEFAULT false
,p_effective_date IN DATE
,p_org_information_id IN NUMBER
,p_org_info_type_code IN VARCHAR2
,p_org_information1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information4 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information5 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information6 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information7 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information8 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information9 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information10 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information11 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information12 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute_category IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute4 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute5 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute6 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute7 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute8 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute9 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute10 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute11 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute12 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_object_version_number IN OUT NOCOPY NUMBER
) IS
--
-- Declare cursors and local variables
--
l_proc VARCHAR2(72) := g_package||'update_org_information';
select 1 from hr_organization_information hoi
where hoi.org_information_id = p_org_information_id
and hoi.org_information_context = p_org_info_type_code;
savepoint update_org_information;
hr_organization_bk2.update_org_information_b
(p_effective_date => trunc(p_effective_date)
,p_org_info_type_code => p_org_info_type_code
,p_org_information1 => p_org_information1
,p_org_information2 => p_org_information2
,p_org_information3 => p_org_information3
,p_org_information4 => p_org_information4
,p_org_information5 => p_org_information5
,p_org_information6 => p_org_information6
,p_org_information7 => p_org_information7
,p_org_information8 => p_org_information8
,p_org_information9 => p_org_information9
,p_org_information10 => p_org_information10
,p_org_information11 => p_org_information11
,p_org_information12 => p_org_information12
,p_org_information13 => p_org_information13
,p_org_information14 => p_org_information14
,p_org_information15 => p_org_information15
,p_org_information16 => p_org_information16
,p_org_information17 => p_org_information17
,p_org_information18 => p_org_information18
,p_org_information19 => p_org_information19
,p_org_information20 => p_org_information20
,p_org_information_id => p_org_information_id
,p_attribute_category => p_attribute_category
,p_attribute1 => p_attribute1
,p_attribute2 => p_attribute2
,p_attribute3 => p_attribute3
,p_attribute4 => p_attribute4
,p_attribute5 => p_attribute5
,p_attribute6 => p_attribute6
,p_attribute7 => p_attribute7
,p_attribute8 => p_attribute8
,p_attribute9 => p_attribute9
,p_attribute10 => p_attribute10
,p_attribute11 => p_attribute11
,p_attribute12 => p_attribute12
,p_attribute13 => p_attribute13
,p_attribute14 => p_attribute14
,p_attribute15 => p_attribute15
,p_attribute16 => p_attribute16
,p_attribute17 => p_attribute17
,p_attribute18 => p_attribute18
,p_attribute19 => p_attribute19
,p_attribute20 => p_attribute20
,p_object_version_number => l_object_version_number);
(p_module_name => 'update_org_information'
,p_hook_type => 'BP'
);
hr_organization_bk2.update_org_information_a
(p_effective_date => trunc(p_effective_date)
,p_org_info_type_code => p_org_info_type_code
,p_org_information1 => p_org_information1
,p_org_information2 => p_org_information2
,p_org_information3 => p_org_information3
,p_org_information4 => p_org_information4
,p_org_information5 => p_org_information5
,p_org_information6 => p_org_information6
,p_org_information7 => p_org_information7
,p_org_information8 => p_org_information8
,p_org_information9 => p_org_information9
,p_org_information10 => p_org_information10
,p_org_information11 => p_org_information11
,p_org_information12 => p_org_information12
,p_org_information13 => p_org_information13
,p_org_information14 => p_org_information14
,p_org_information15 => p_org_information15
,p_org_information16 => p_org_information16
,p_org_information17 => p_org_information17
,p_org_information18 => p_org_information18
,p_org_information19 => p_org_information19
,p_org_information20 => p_org_information20
,p_org_information_id => p_org_information_id
,p_attribute_category => p_attribute_category
,p_attribute1 => p_attribute1
,p_attribute2 => p_attribute2
,p_attribute3 => p_attribute3
,p_attribute4 => p_attribute4
,p_attribute5 => p_attribute5
,p_attribute6 => p_attribute6
,p_attribute7 => p_attribute7
,p_attribute8 => p_attribute8
,p_attribute9 => p_attribute9
,p_attribute10 => p_attribute10
,p_attribute11 => p_attribute11
,p_attribute12 => p_attribute12
,p_attribute13 => p_attribute13
,p_attribute14 => p_attribute14
,p_attribute15 => p_attribute15
,p_attribute16 => p_attribute16
,p_attribute17 => p_attribute17
,p_attribute18 => p_attribute18
,p_attribute19 => p_attribute19
,p_attribute20 => p_attribute20
,p_object_version_number => l_object_version_number);
(p_module_name => 'update_org_information'
,p_hook_type => 'AP'
);
ROLLBACK TO update_org_information;
ROLLBACK TO update_org_information;
END update_org_information;
PROCEDURE update_org_manager
(p_validate IN BOOLEAN DEFAULT false
,p_effective_date IN DATE
,p_organization_id IN NUMBER
,p_org_information_id IN NUMBER
,p_org_info_type_code IN VARCHAR2
,p_org_information1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information4 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information5 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information6 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information7 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information8 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information9 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information10 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information11 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information12 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_org_information20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute_category IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute4 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute5 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute6 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute7 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute8 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute9 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute10 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute11 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute12 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_attribute20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_object_version_number IN OUT NOCOPY NUMBER
,p_warning OUT NOCOPY BOOLEAN
) IS
--
-- Declare cursors and local variables
--
l_proc VARCHAR2(72) := g_package||'update_org_manager';
select business_group_id
from hr_all_organization_units
where organization_id = p_organization_id;
savepoint update_org_information;
hr_organization_bk2.update_org_information_b
(p_effective_date => trunc(p_effective_date)
,p_org_info_type_code => p_org_info_type_code
,p_org_information1 => p_org_information1
,p_org_information2 => p_org_information2
,p_org_information3 => p_org_information3
,p_org_information4 => p_org_information4
,p_org_information5 => p_org_information5
,p_org_information6 => p_org_information6
,p_org_information7 => p_org_information7
,p_org_information8 => p_org_information8
,p_org_information9 => p_org_information9
,p_org_information10 => p_org_information10
,p_org_information11 => p_org_information11
,p_org_information12 => p_org_information12
,p_org_information13 => p_org_information13
,p_org_information14 => p_org_information14
,p_org_information15 => p_org_information15
,p_org_information16 => p_org_information16
,p_org_information17 => p_org_information17
,p_org_information18 => p_org_information18
,p_org_information19 => p_org_information19
,p_org_information20 => p_org_information20
,p_org_information_id => p_org_information_id
,p_attribute_category => p_attribute_category
,p_attribute1 => p_attribute1
,p_attribute2 => p_attribute2
,p_attribute3 => p_attribute3
,p_attribute4 => p_attribute4
,p_attribute5 => p_attribute5
,p_attribute6 => p_attribute6
,p_attribute7 => p_attribute7
,p_attribute8 => p_attribute8
,p_attribute9 => p_attribute9
,p_attribute10 => p_attribute10
,p_attribute11 => p_attribute11
,p_attribute12 => p_attribute12
,p_attribute13 => p_attribute13
,p_attribute14 => p_attribute14
,p_attribute15 => p_attribute15
,p_attribute16 => p_attribute16
,p_attribute17 => p_attribute17
,p_attribute18 => p_attribute18
,p_attribute19 => p_attribute19
,p_attribute20 => p_attribute20
,p_object_version_number => l_object_version_number);
(p_module_name => 'update_org_information'
,p_hook_type => 'BP'
);
hr_organization_bk2.update_org_information_a
(p_effective_date => trunc(p_effective_date)
,p_org_info_type_code => p_org_info_type_code
,p_org_information1 => p_org_information1
,p_org_information2 => p_org_information2
,p_org_information3 => p_org_information3
,p_org_information4 => p_org_information4
,p_org_information5 => p_org_information5
,p_org_information6 => p_org_information6
,p_org_information7 => p_org_information7
,p_org_information8 => p_org_information8
,p_org_information9 => p_org_information9
,p_org_information10 => p_org_information10
,p_org_information11 => p_org_information11
,p_org_information12 => p_org_information12
,p_org_information13 => p_org_information13
,p_org_information14 => p_org_information14
,p_org_information15 => p_org_information15
,p_org_information16 => p_org_information16
,p_org_information17 => p_org_information17
,p_org_information18 => p_org_information18
,p_org_information19 => p_org_information19
,p_org_information20 => p_org_information20
,p_org_information_id => p_org_information_id
,p_attribute_category => p_attribute_category
,p_attribute1 => p_attribute1
,p_attribute2 => p_attribute2
,p_attribute3 => p_attribute3
,p_attribute4 => p_attribute4
,p_attribute5 => p_attribute5
,p_attribute6 => p_attribute6
,p_attribute7 => p_attribute7
,p_attribute8 => p_attribute8
,p_attribute9 => p_attribute9
,p_attribute10 => p_attribute10
,p_attribute11 => p_attribute11
,p_attribute12 => p_attribute12
,p_attribute13 => p_attribute13
,p_attribute14 => p_attribute14
,p_attribute15 => p_attribute15
,p_attribute16 => p_attribute16
,p_attribute17 => p_attribute17
,p_attribute18 => p_attribute18
,p_attribute19 => p_attribute19
,p_attribute20 => p_attribute20
,p_object_version_number => l_object_version_number);
(p_module_name => 'update_org_information'
,p_hook_type => 'AP');
ROLLBACK TO update_org_information;
ROLLBACK TO update_org_information;
END update_org_manager;
procedure delete_org_manager
(p_validate in boolean default false
,p_org_information_id in number
,p_object_version_number in out nocopy number) is
--
-- Declare cursors and local variables
--
l_proc varchar2(72) := g_package||'delete_org_manager';
savepoint delete_org_manager;
hr_organization_bk8.delete_org_manager_b
(p_org_information_id => p_org_information_id
,p_object_version_number => p_object_version_number);
(p_module_name => 'delete_org_manager'
,p_hook_type => 'BP');
hr_organization_bk8.delete_org_manager_a
(p_org_information_id => p_org_information_id
,p_object_version_number => l_object_version_number);
(p_module_name => 'delete_org_manager'
,p_hook_type => 'AP');
rollback to delete_org_manager;
rollback to delete_org_manager;
end delete_org_manager;
hr_organization_api.update_organization(
p_validate => p_validate
,p_effective_date => p_effective_date
,p_language_code => p_language_code
,p_organization_id => l_organization_id
,p_internal_external_flag => p_internal_external_flag
,p_type => p_type
,p_location_id => p_location_id
,p_object_version_number => l_object_version_number);
update hr_all_organization_units
set business_group_id = l_organization_id
where organization_id = l_organization_id;
select nvl(org_information1,fnd_profile.value('ORG_ID'))
from hr_organization_information HOI
, per_all_assignments_f PAAF
where HOI.organization_id = PAAF.organization_id
and PAAF.person_id = p_person_id
and p_effective_date between
PAAF.effective_start_date and PAAF.effective_end_date
and PAAF.primary_flag = 'Y'
and HOI.org_information_context='Exp Organization Defaults';
select nvl(org_information1,fnd_profile.value('ORG_ID'))
from hr_organization_information HOI
, per_all_assignments_f PAAF
where HOI.organization_id = PAAF.organization_id
and PAAF.assignment_id = p_assignment_id
and p_effective_date between
PAAF.effective_start_date and PAAF.effective_end_date
and HOI.org_information_context='Exp Organization Defaults';
select nvl(org_information1,fnd_profile.value('ORG_ID'))
from hr_organization_information HOI
where HOI.organization_id = p_organization_id
and HOI.org_information_context='Exp Organization Defaults';
/* hr_organization_api.update_organization(
p_validate => p_validate
,p_effective_date => p_effective_date
,p_language_code => p_language_code
,p_organization_id => l_organization_id
,p_internal_external_flag => p_internal_external_flag
,p_type => p_type
,p_location_id => p_location_id
,p_object_version_number => l_object_version_number);
PROCEDURE update_operating_unit
(
p_validate IN BOOLEAN DEFAULT false
,p_organization_id IN NUMBER
,p_effective_date IN DATE
,p_language_code IN VARCHAR2 DEFAULT hr_api.userenv_lang
,p_date_from IN DATE DEFAULT hr_api.g_date
,p_name IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_type IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_internal_external_flag IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_location_id IN NUMBER DEFAULT hr_api.g_number
,p_set_of_books_id IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_usable_flag IN VARCHAR2 DEFAULT hr_api.g_varchar2
-- Added p_short_code for bug 4526439
,p_short_code IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_legal_entity_id IN VARCHAR2 DEFAULT hr_api.g_varchar2
,p_object_version_number IN OUT NOCOPY NUMBER
,p_update_prim_ledger_warning OUT NOCOPY BOOLEAN
,p_duplicate_org_warning OUT NOCOPY BOOLEAN
) IS
--
-- Declare cursors and local variables
--
l_proc varchar2(72) := g_package||'update_operating_unit';
l_update_prim_ledger_warning boolean;
cursor csr_check_update (p_organization_id number)
is
select ORG_INFORMATION_ID,ORG_INFORMATION2,ORG_INFORMATION3,OBJECT_VERSION_NUMBER
from hr_organization_information
where ORG_INFORMATION_CONTEXT = 'Operating Unit Information'
and organization_id = p_organization_id;
savepoint update_operating_unit;
hr_organization_api.update_organization(
p_validate => p_validate
,p_effective_date => p_effective_date
,p_name=>p_name
,p_language_code => p_language_code
,p_organization_id => p_organization_id
,p_internal_external_flag => p_internal_external_flag
,p_type => p_type
,p_location_id => p_location_id
,p_object_version_number => p_object_version_number
,p_duplicate_org_warning =>l_duplicate_org_warning);
open csr_check_update(p_organization_id => p_organization_id);
if csr_check_update%notfound then
if(p_set_of_books_id is not null and p_legal_entity_id is not null) then
l_update_prim_ledger_warning := TRUE;
fetch csr_check_update into l_new_org_information_id,l_legal_entity_id,
l_set_of_books_id,l_new_ovn;
l_update_prim_ledger_warning := TRUE;
hr_organization_api.update_org_information(
p_validate => p_validate
,p_effective_date => p_effective_date
,p_org_information_id => l_new_org_information_id
,p_org_info_type_code => 'Operating Unit Information'
,p_org_information2 => p_legal_entity_id
,p_org_information3 => p_set_of_books_id
,p_org_information5 => p_short_code
,p_org_information6 => p_usable_flag
,p_object_version_number => l_new_ovn);
close csr_check_update;
p_update_prim_ledger_warning := l_update_prim_ledger_warning;
ROLLBACK TO update_operating_unit;
p_update_prim_ledger_warning :=false;
ROLLBACK TO update_operating_unit;
p_update_prim_ledger_warning :=false;
END update_operating_unit;
hr_organization_api.update_organization(
p_validate => p_validate
,p_effective_date => p_effective_date
,p_language_code => p_language_code
,p_organization_id => l_organization_id
,p_internal_external_flag => p_internal_external_flag
,p_type => p_type
,p_location_id => p_location_id
,p_object_version_number => l_object_version_number);
SELECT 'Y'
INTO l_exists
FROM sys.dual
WHERE EXISTS
(SELECT null
FROM PER_BUSINESS_GROUPS
WHERE business_group_id = p_bgr_id);
SELECT 'Y'
INTO l_exists
FROM sys.dual
WHERE EXISTS
(SELECT null
FROM hr_all_organization_units
WHERE organization_id = p_organization_id);