The following lines contain the word 'select', 'insert', 'update' or 'delete':
p_create_or_update IN VARCHAR2 := 'C',
px_cust_acct_rec IN OUT NOCOPY HZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE
);
p_create_or_update IN VARCHAR2 := 'C',
px_cust_acct_rec IN OUT NOCOPY HZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE
) IS
BEGIN
px_cust_acct_rec.cust_account_id := p_cust_acct_id;
px_cust_acct_rec.status_update_date := p_cust_acct_obj.status_update_date;
IF(p_create_or_update = 'C') THEN
px_cust_acct_rec.orig_system := p_cust_acct_os;
SELECT cust_account_profile_id
FROM HZ_CUSTOMER_PROFILES
WHERE cust_account_id = p_cust_acct_id;
p_create_or_update => 'C',
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
p_create_update_flag => 'C',
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_parent_id => x_cust_acct_id,
p_parent_os => x_cust_acct_os,
p_parent_osr => x_cust_acct_osr,
p_parent_obj_type => 'CUST_ACCT'
);
p_create_update_flag => 'C',
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_parent_acct_id => x_cust_acct_id,
p_parent_acct_os => x_cust_acct_os,
p_parent_acct_osr => x_cust_acct_osr
);
PROCEDURE update_cust_acct_bo(
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_cust_acct_obj IN HZ_CUST_ACCT_BO,
p_created_by_module IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
x_cust_acct_id OUT NOCOPY NUMBER,
x_cust_acct_os OUT NOCOPY VARCHAR2,
x_cust_acct_osr OUT NOCOPY VARCHAR2
)IS
l_ca_obj HZ_CUST_ACCT_BO;
do_update_cust_acct_bo(
p_init_msg_list => p_init_msg_list,
p_cust_acct_obj => l_ca_obj,
p_created_by_module => p_created_by_module,
p_obj_source => null,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
x_cust_acct_id => x_cust_acct_id,
x_cust_acct_os => x_cust_acct_os,
x_cust_acct_osr => x_cust_acct_osr,
p_parent_os => NULL
);
END update_cust_acct_bo;
PROCEDURE update_cust_acct_bo(
p_cust_acct_obj IN HZ_CUST_ACCT_BO,
p_created_by_module IN VARCHAR2,
p_obj_source IN VARCHAR2 := null,
p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
x_return_status OUT NOCOPY VARCHAR2,
x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
x_return_obj OUT NOCOPY HZ_CUST_ACCT_BO,
x_cust_acct_id OUT NOCOPY NUMBER,
x_cust_acct_os OUT NOCOPY VARCHAR2,
x_cust_acct_osr OUT NOCOPY VARCHAR2
)IS
l_msg_data VARCHAR2(2000);
do_update_cust_acct_bo(
p_init_msg_list => fnd_api.g_true,
p_cust_acct_obj => l_ca_obj,
p_created_by_module => p_created_by_module,
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_cust_acct_id => x_cust_acct_id,
x_cust_acct_os => x_cust_acct_os,
x_cust_acct_osr => x_cust_acct_osr,
p_parent_os => NULL
);
END update_cust_acct_bo;
PROCEDURE do_update_cust_acct_bo(
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
p_cust_acct_obj IN OUT NOCOPY HZ_CUST_ACCT_BO,
p_created_by_module IN VARCHAR2,
p_obj_source IN VARCHAR2 := null,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
x_cust_acct_id OUT NOCOPY NUMBER,
x_cust_acct_os OUT NOCOPY VARCHAR2,
x_cust_acct_osr OUT NOCOPY VARCHAR2,
p_parent_os IN VARCHAR2
)IS
l_debug_prefix VARCHAR2(30) := '';
l_create_update_flag VARCHAR2(1);
SELECT a.object_version_number, a.party_id
FROM HZ_CUST_ACCOUNTS a
WHERE a.cust_account_id = l_ca_id;
SAVEPOINT do_update_cust_acct_bo_pub;
hz_utility_v2pub.debug(p_message=>'do_update_cust_acct_bo_pub(+)',
p_prefix=>l_debug_prefix,
p_msg_level=>fnd_log.level_procedure);
p_create_or_update => 'U',
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
p_create_or_update => 'U',
px_cust_acct_rec => l_cust_acct_rec
);
HZ_CUST_ACCOUNT_V2PUB.update_cust_account(
p_cust_account_rec => l_cust_acct_rec,
p_object_version_number => l_ovn,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data
);
HZ_CUST_ACCT_BO_PVT.update_cust_profile(
p_cp_obj => p_cust_acct_obj.cust_profile_obj,
p_ca_id => x_cust_acct_id,
p_casu_id => NULL,
x_cp_id => l_cust_acct_profile_id,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data
);
p_create_update_flag => 'U',
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_parent_id => x_cust_acct_id,
p_parent_os => x_cust_acct_os,
p_parent_osr => x_cust_acct_osr,
p_parent_obj_type => 'CUST_ACCT'
);
p_create_update_flag => 'U',
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_parent_acct_id => x_cust_acct_id,
p_parent_acct_os => x_cust_acct_os,
p_parent_acct_osr => x_cust_acct_osr
);
hz_utility_v2pub.debug(p_message=>'do_update_cust_acct_bo(-)',
p_prefix=>l_debug_prefix,
p_msg_level=>fnd_log.level_procedure);
ROLLBACK TO do_update_cust_acct_bo_pub;
hz_utility_v2pub.debug(p_message=>'do_update_cust_acct_bo(-)',
p_prefix=>l_debug_prefix,
p_msg_level=>fnd_log.level_procedure);
ROLLBACK TO do_update_cust_acct_bo_pub;
hz_utility_v2pub.debug(p_message=>'do_update_cust_acct_bo(-)',
p_prefix=>l_debug_prefix,
p_msg_level=>fnd_log.level_procedure);
ROLLBACK TO do_update_cust_acct_bo_pub;
hz_utility_v2pub.debug(p_message=>'do_update_cust_acct_bo(-)',
p_prefix=>l_debug_prefix,
p_msg_level=>fnd_log.level_procedure);
END do_update_cust_acct_bo;
l_create_update_flag VARCHAR2(1);
l_create_update_flag := HZ_REGISTRY_VALIDATE_BO_PVT.check_bo_op(
p_entity_id => x_cust_acct_id,
p_entity_os => x_cust_acct_os,
p_entity_osr => x_cust_acct_osr,
p_entity_type => 'HZ_CUST_ACCOUNTS',
p_parent_id => px_parent_id,
p_parent_obj_type => px_parent_obj_type
);
IF(l_create_update_flag = 'E') THEN
FND_MESSAGE.SET_NAME('AR', 'HZ_API_PROPAGATE_OBJECT_ERROR');
IF(l_create_update_flag = 'C') THEN
do_create_cust_acct_bo(
p_validate_bo_flag => p_validate_bo_flag,
p_cust_acct_obj => p_cust_acct_obj,
p_created_by_module => p_created_by_module,
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
x_cust_acct_id => x_cust_acct_id,
x_cust_acct_os => x_cust_acct_os,
x_cust_acct_osr => x_cust_acct_osr,
px_parent_id => px_parent_id,
px_parent_os => px_parent_os,
px_parent_osr => px_parent_osr,
px_parent_obj_type => px_parent_obj_type
);
ELSIF(l_create_update_flag = 'U') THEN
do_update_cust_acct_bo(
p_cust_acct_obj => p_cust_acct_obj,
p_created_by_module => p_created_by_module,
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
x_cust_acct_id => x_cust_acct_id,
x_cust_acct_os => x_cust_acct_os,
x_cust_acct_osr => x_cust_acct_osr,
p_parent_os => px_parent_os
);
-- extraction validation logic is same as update
l_cust_acct_id := p_cust_acct_id;
p_create_or_update IN VARCHAR2 := 'C',
px_cust_acct_rec IN OUT NOCOPY HZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE
);
p_create_or_update IN VARCHAR2 := 'C',
px_cust_acct_rec IN OUT NOCOPY HZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE
) IS
BEGIN
px_cust_acct_rec.cust_account_id := p_cust_acct_id;
px_cust_acct_rec.status_update_date := p_cust_acct_v2_obj.status_update_date;
IF(p_create_or_update = 'C') THEN
px_cust_acct_rec.orig_system := p_cust_acct_os;
SELECT cust_account_profile_id
FROM HZ_CUSTOMER_PROFILES
WHERE cust_account_id = p_cust_acct_id;
p_create_or_update => 'C',
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
p_create_update_flag => 'C',
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_parent_id => x_cust_acct_id,
p_parent_os => x_cust_acct_os,
p_parent_osr => x_cust_acct_osr,
p_parent_obj_type => 'CUST_ACCT'
);
p_create_update_flag => 'C',
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_parent_acct_id => x_cust_acct_id,
p_parent_acct_os => x_cust_acct_os,
p_parent_acct_osr => x_cust_acct_osr
);
PROCEDURE update_cust_acct_v2_bo(
p_cust_acct_v2_obj IN HZ_CUST_ACCT_V2_BO,
p_created_by_module IN VARCHAR2,
p_obj_source IN VARCHAR2 := null,
p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
x_return_status OUT NOCOPY VARCHAR2,
x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
x_return_obj OUT NOCOPY HZ_CUST_ACCT_V2_BO,
x_cust_acct_id OUT NOCOPY NUMBER,
x_cust_acct_os OUT NOCOPY VARCHAR2,
x_cust_acct_osr OUT NOCOPY VARCHAR2
)IS
l_msg_data VARCHAR2(2000);
do_update_cust_acct_v2_bo(
p_init_msg_list => fnd_api.g_true,
p_cust_acct_v2_obj => l_ca_obj,
p_created_by_module => p_created_by_module,
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_cust_acct_id => x_cust_acct_id,
x_cust_acct_os => x_cust_acct_os,
x_cust_acct_osr => x_cust_acct_osr,
p_parent_os => NULL
);
END update_cust_acct_v2_bo;
PROCEDURE do_update_cust_acct_v2_bo(
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
p_cust_acct_v2_obj IN OUT NOCOPY HZ_CUST_ACCT_V2_BO,
p_created_by_module IN VARCHAR2,
p_obj_source IN VARCHAR2 := null,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
x_cust_acct_id OUT NOCOPY NUMBER,
x_cust_acct_os OUT NOCOPY VARCHAR2,
x_cust_acct_osr OUT NOCOPY VARCHAR2,
p_parent_os IN VARCHAR2
)IS
l_debug_prefix VARCHAR2(30) := '';
l_create_update_flag VARCHAR2(1);
SELECT a.object_version_number, a.party_id
FROM HZ_CUST_ACCOUNTS a
WHERE a.cust_account_id = l_ca_id;
SAVEPOINT do_update_cust_acct_v2_bo_pub;
hz_utility_v2pub.debug(p_message=>'do_update_cust_acct_v2_bo_pub(+)',
p_prefix=>l_debug_prefix,
p_msg_level=>fnd_log.level_procedure);
p_create_or_update => 'U',
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
p_create_or_update => 'U',
px_cust_acct_rec => l_cust_acct_rec
);
HZ_CUST_ACCOUNT_V2PUB.update_cust_account(
p_cust_account_rec => l_cust_acct_rec,
p_object_version_number => l_ovn,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data
);
HZ_CUST_ACCT_BO_PVT.update_cust_profile(
p_cp_obj => p_cust_acct_v2_obj.cust_profile_obj,
p_ca_id => x_cust_acct_id,
p_casu_id => NULL,
x_cp_id => l_cust_acct_profile_id,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data
);
p_create_update_flag => 'U',
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_parent_id => x_cust_acct_id,
p_parent_os => x_cust_acct_os,
p_parent_osr => x_cust_acct_osr,
p_parent_obj_type => 'CUST_ACCT'
);
p_create_update_flag => 'U',
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_parent_acct_id => x_cust_acct_id,
p_parent_acct_os => x_cust_acct_os,
p_parent_acct_osr => x_cust_acct_osr
);
hz_utility_v2pub.debug(p_message=>'do_update_cust_acct_v2_bo(-)',
p_prefix=>l_debug_prefix,
p_msg_level=>fnd_log.level_procedure);
ROLLBACK TO do_update_cust_acct_v2_bo_pub;
hz_utility_v2pub.debug(p_message=>'do_update_cust_acct_v2_bo(-)',
p_prefix=>l_debug_prefix,
p_msg_level=>fnd_log.level_procedure);
ROLLBACK TO do_update_cust_acct_v2_bo_pub;
hz_utility_v2pub.debug(p_message=>'do_update_cust_acct_v2_bo(-)',
p_prefix=>l_debug_prefix,
p_msg_level=>fnd_log.level_procedure);
ROLLBACK TO do_update_cust_acct_v2_bo_pub;
hz_utility_v2pub.debug(p_message=>'do_update_cust_acct_v2_bo(-)',
p_prefix=>l_debug_prefix,
p_msg_level=>fnd_log.level_procedure);
END do_update_cust_acct_v2_bo;
l_create_update_flag VARCHAR2(1);
l_create_update_flag := HZ_REGISTRY_VALIDATE_BO_PVT.check_bo_op(
p_entity_id => x_cust_acct_id,
p_entity_os => x_cust_acct_os,
p_entity_osr => x_cust_acct_osr,
p_entity_type => 'HZ_CUST_ACCOUNTS',
p_parent_id => px_parent_id,
p_parent_obj_type => px_parent_obj_type
);
IF(l_create_update_flag = 'E') THEN
FND_MESSAGE.SET_NAME('AR', 'HZ_API_PROPAGATE_OBJECT_ERROR');
IF(l_create_update_flag = 'C') THEN
do_create_cust_acct_v2_bo(
p_validate_bo_flag => p_validate_bo_flag,
p_cust_acct_v2_obj => p_cust_acct_v2_obj,
p_created_by_module => p_created_by_module,
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
x_cust_acct_id => x_cust_acct_id,
x_cust_acct_os => x_cust_acct_os,
x_cust_acct_osr => x_cust_acct_osr,
px_parent_id => px_parent_id,
px_parent_os => px_parent_os,
px_parent_osr => px_parent_osr,
px_parent_obj_type => px_parent_obj_type
);
ELSIF(l_create_update_flag = 'U') THEN
do_update_cust_acct_v2_bo(
p_cust_acct_v2_obj => p_cust_acct_v2_obj,
p_created_by_module => p_created_by_module,
p_obj_source => p_obj_source,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
x_cust_acct_id => x_cust_acct_id,
x_cust_acct_os => x_cust_acct_os,
x_cust_acct_osr => x_cust_acct_osr,
p_parent_os => px_parent_os
);
-- extraction validation logic is same as update
l_cust_acct_id := p_cust_acct_id;