Business Objects API hz_cust_acct_bo_pub.get_cust_acct_bo is providing wrong profile amount values (Doc ID 2130742.1)

Last updated on JULY 31, 2017

Applies to:

Oracle Trading Community - Version 12.1.3 to 12.2.5 [Release 12.1 to 12.2]
Information in this document applies to any platform.

Symptoms

On : 12.1.3 version, APIs

ACTUAL BEHAVIOR
---------------

Business Objects API hz_cust_acct_bo_pub.get_cust_acct_bo is providing wrong profile amount values.

Here is a simple test case:

DECLARE
 l_account hz_cust_acct_bo;
 l_return_status VARCHAR2 (1000);
 l_msg_count NUMBER;
 l_msg_data VARCHAR2 (1000);
 l_messages HZ_MESSAGE_OBJ_TBL;
BEGIN
 hz_cust_acct_bo_pub.get_cust_acct_bo (
  p_cust_acct_id => 7204185,
  p_cust_acct_os => NULL,
  p_cust_acct_osr => NULL,
  x_cust_acct_obj => l_account,
  x_return_status => l_return_status,
  x_messages => l_messages);
 IF l_return_status = fnd_api.g_ret_sts_success
 THEN
  dbms_output.put_line(xmltype.createXml(l_account.cust_profile_obj.cust_profile_amt_objs(1)).extract('/').getStringVal());
 END IF;
END;

The API returns the following information, which is wrong as it is linked to the site:

<HZ_CUST_PROFILE_AMT_OBJ>
 <CUST_ACCT_PROFILE_AMT_ID>6357058
 <CUST_ACCT_PROFILE_ID>8407203
 <CURRENCY_CODE>CAD
 <TRX_CREDIT_LIMIT>9000
 <OVERALL_CREDIT_LIMIT>9000
 <CUST_ACCT_ID>7204185
 <SITE_USE_ID>14935216
 <CREATED_BY_MODULE>HZ_CPUI
 <CREATED_BY_NAME>QIAN_LI
 <CREATION_DATE>11/12/2015 22:08:41
 <LAST_UPDATE_DATE>11/12/2015 22:08:41
 <LAST_UPDATED_BY_NAME>QIAN_LI


The issue is in procedure PROCEDURE get_cust_profile_bo in package HZ_EXTRACT_CUST_ACCT_BO_PVT, cursor C1, which is missing a SITE_USE_ID IS NULL check when querying table HZ_CUST_PROFILE_AMTS.

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