EAM_ASSETNUMBER_PUB.Insert_asset_number Does Not Update P_LOCATION Parameter (Doc ID 1246814.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle Enterprise Asset Management - Version 12.1.1 and later
Information in this document applies to any platform.

Symptoms

On : 12.1.1 version – Enterprise Asset Manager
EAM_AssetNumber_Pub.Insert_Asset_Number does not update the P_LOCATION parameter correctly. A P_LOCATION parameter is provided but gets overwritten by a default value.
STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Use a script to insert data into the EAM_AssetNumber_Pub.Insert_Asset_Number API.
  the script is as follows :
DECLARE
l_return_status VARCHAR2 (1 BYTE);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (2000 BYTE);
l_object_id NUMBER;
BEGIN
eam_assetnumber_pub.insert_asset_number (
p_api_version => 1.0,
p_init_msg_list => fnd_api.g_true,
p_commit => fnd_api.g_true,
p_validation_level => fnd_api.g_valid_level_full,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_object_id => l_object_id,
p_inventory_item_id => 65002,
p_serial_number => 'DNM_998877',
p_instance_number => 'DNM_998877',
p_current_status => 3,
p_descriptive_text => 'DNM_998877',
p_current_organization_id => 747,
p_maintainable_flag => 'Y',
p_OWNING_DEPARTMENT_ID => NULL,
p_EQUIPMENT_GEN_OBJECT_ID => NULL,
p_instantiate_flag => FALSE,
p_active_start_date => SYSDATE(),
p_location => 9611,
p_operational_log_flag => 'Y',
p_checkin_status => NULL
);
END;

  As can be seen, the p_location is provided with a field from hz_locations table.

2. Now the updated data is queried using the following sql :

SELECT
SERIAL_NUMBER ,
LOCATION_TYPE_CODE ,
LOCATION_ID
FROM
CSI_ITEM_INSTANCES
WHERE
SERIAL_NUMBER = 'DNM_998877';

  The incorrect location is showing.

The query returns the following:
SERIAL_NUMBER,"LOCATION_TYPE_CODE","LOCATION_ID"
DNM_998877,"INTERNAL_SITE",209

The expected query result is:
SERIAL_NUMBER,"LOCATION_TYPE_CODE","LOCATION_ID"
DNM_998877,"HZ_LOCATIONS",9611

3. When the asset is viewed in EAM>Asset Numbers form - the incorrect location is showing




Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms