API INV_ITEM_CATEGORY_PUB.Update_Category_Assignment Not Changing Purchasing Category In iProcurement [Video]

(Doc ID 1337071.1)

Last updated on APRIL 11, 2017

Applies to:

Oracle Product Hub - Version 12.1.3 and later
Oracle Item Master - Version 12.1.3 and later
Oracle Inventory Management - Version 12.1.3 and later
Information in this document applies to any platform.
***Checked for relevance on 14-AUG-2014***

INVPCATB.pls: INV_ITEM_CATEGORY_PUB: Public API For Item Categories


Symptoms

Category changes made with the API INV_ITEM_CATEGORY_PUB.update_category_assignment are not changing the Purchasing Category viewed thru iProcurement.

What is working
Correctly see the update in Oracle PIM and Oracle Inventory, but the iProcurement still shows the assignment previous category.

Steps
Video - Show issue (03:25)

1. Create an item.
2. Assign to a Purchasing Category.
3. Update the assignment category with API INV_ITEM_CATEGORY_PUB.update_category_assignment.
4. See the update in Oracle PIM and Oracle Inventory
5. Do NOT see the updated category in iProcurement (see the old assignment).

Workaround
Update the category via the screens.

Example API Call
Here is a sample API call. In this example, the variables for the organization, item, category set, category id and old category id are specific values that would need to be changed on each system. The same applies to the call to fnd_global.APPS_INITIALIZE that requires valid values for responsibility id, user id, and application id for each environment.

set serveroutput on format wraped;
DECLARE
l_return_status VARCHAR2 (10000);
l_errorcode NUMBER;
l_msg_count NUMBER;
l_msg_data VARCHAR2 (10000);
l_api_version NUMBER := 1.0;
l_organization_id NUMBER := 204;
l_inventory_item_id NUMBER := 592008;
l_category_set_id NUMBER := 2; -- PO
-- Changing Values
l_category_id NUMBER := 21;
l_old_category_id NUMBER := 1;
begin
dbms_output.put_line('Starting ...');
fnd_global.APPS_INITIALIZE(1318, 20634, 401);
dbms_output.put_line('INV Debug Profile: ' ||
fnd_profile.value('INV_DEBUG_TRACE'));
inv_item_category_pub.update_category_assignment
(p_api_version => l_api_version
-- ,p_init_msg_list
-- ,p_commit
,p_category_id => l_category_id
,p_old_category_id => l_old_category_id
,p_category_set_id => l_category_set_id
,p_inventory_item_id => l_inventory_item_id
,p_organization_id => l_organization_id
,x_return_status => l_return_status
,x_errorcode => l_errorcode
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data);

dbms_output.put_line('Return Status: '|| l_return_status);
dbms_output.put_line('Error: '|| l_errorcode);
dbms_output.put_line('Message Count: '|| l_msg_count);
dbms_output.put_line('Message Data: '|| l_msg_data);

dbms_output.put_line('.... Finishing');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Exception Occured :');
DBMS_OUTPUT.PUT_LINE(SQLCODE ||':'||SQLERRM);
DBMS_OUTPUT.PUT_LINE('=====================================');
RAISE;
end;
/

anonymous block completed
Starting ...
INV Debug Profile: 1
Return Status: S
Error:
Message Count: 5
Message Data:
.... Finishing

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