Home » Applications » Oracle Fusion Apps & E-Business Suite » Error in updating EGO Attributes at Item Revision Level (Oracle R12,Windows OS)
Error in updating EGO Attributes at Item Revision Level [message #335354] |
Mon, 21 July 2008 23:12 |
ramya9999
Messages: 1 Registered: July 2008
|
Junior Member |
|
|
Hi All,
Iam unable to update the EGO Attributes at Item Revision Level.The API used is ego_user_attrs_data_pub.process_user_attrs_data .When Iam doing the same procedure at Item level Iam able to update the attributes but at Revision Level Iam getting the following error
'There is a problem with the User-Defined Attributes metadata defined for the Object "EGO_ITEM_REVISION" in the database. Please contact an administrator for assistance.'
This is the Sample Code:
Declare
x_failed_row_id_list VARCHAR2(10);
x_return_status VARCHAR2(1);
x_errorcode NUMBER;
x_msg_count NUMBER;
x_msg_data VARCHAR2(1000);
l_attributes_row_table EGO_USER_ATTR_ROW_TABLE := EGO_USER_ATTR_ROW_TABLE();
l_attributes_data_table EGO_USER_ATTR_DATA_TABLE := EGO_USER_ATTR_DATA_TABLE();
l_pk_column_name_value_pairs EGO_COL_NAME_VALUE_PAIR_ARRAY := EGO_COL_NAME_VALUE_PAIR_ARRAY();
l_class_code_name_value_pairs EGO_COL_NAME_VALUE_PAIR_ARRAY := EGO_COL_NAME_VALUE_PAIR_ARRAY();
l_attributes_row_obj ego_user_attr_row_obj;
x_message_list Error_Handler.Error_Tbl_Type;
l_attributes_data_obj ego_user_attr_data_obj;
l_failed_row_id_list VARCHAR2 (1000);
l_return_status VARCHAR2 (100);
l_errorcode NUMBER;
l_msg_count NUMBER;
l_msg_data VARCHAR2 (500);
l_init_error_handler VARCHAR2 (100) :=
fnd_api.g_true;
l_inventory_item_id NUMBER := 0;
l_organization_id NUMBER := 0;
l_item_catalog_group_id NUMBER := 0;
l_revision_id NUMBER := 0;
BEGIN
fnd_global.apps_initialize(user_id => 1262,
resp_id => 50312,
resp_appl_id => 431,
security_group_id => 0);
--MO_GLOBAL.init: Manages Initialization code for Organization Security Policy.
mo_global.init('ONT');
SELECT DISTINCT inventory_item_id
INTO l_inventory_item_id
FROM mtl_system_items_b
WHERE segment1 = 'FPS10000000005';
SELECT ORGANIZATION_ID into l_organization_id FROM INV_ORGANIZATION_INFO_V WHERE ORGANIZATION_CODE = '000';
SELECT REVISION_ID INTO l_revision_id FROM MTL_ITEM_REVISIONS_B WHERE INVENTORY_ITEM_ID=90002 AND REVISION=1;
SELECT catalog_group_id
INTO l_item_catalog_group_id
FROM ego_catalog_groups_v
WHERE catalog_group = 'FPS_PROVIDING_SOLUTION';
l_pk_column_name_value_pairs :=
ego_col_name_value_pair_array
(ego_col_name_value_pair_obj ('INVENTORY_ITEM_ID',l_inventory_item_id),
ego_col_name_value_pair_obj ('ORGANIZATION_ID',l_organization_id)
,ego_col_name_value_pair_obj ('REVISION_ID',l_revision_id)
);
l_class_code_name_value_pairs := ego_col_name_value_pair_array(ego_col_name_value_pair_obj ('ITEM_CATALOG_GROUP_ID',l_item_catalog_group_id ));
l_pk_column_name_value_pairs := ego_col_name_value_pair_array ();
l_attributes_row_obj :=
ego_user_attr_row_obj (1,
601,
431,
'EGO_ITEMMGMT_GROUP',
'FPS_PROV_REV_N',
NULL,
NULL,
NULL,
'SYNC'
);
l_attributes_row_table := ego_user_attr_row_table ();
l_attributes_row_table.EXTEND;
l_attributes_row_table (1) :=
ego_user_attr_row_obj (1,
601,
431,
'EGO_ITEMMGMT_GROUP',
'FPS_PROV_REV_N',
NULL,
NULL,
NULL,
'SYNC'
);
l_attributes_data_table := ego_user_attr_data_table ();
l_attributes_data_table.EXTEND;
l_attributes_data_table (1) :=
ego_user_attr_data_obj (1,
'REV_TYPE',
'B',
NULL,
NULL,
NULL,
NULL,
1
);
l_attributes_data_table.EXTEND;
l_attributes_data_table (2) :=
ego_user_attr_data_obj (1,
'DROID_ITEM_REV',
'B',
NULL,
NULL,
NULL,
NULL,
1
);
l_attributes_data_table.EXTEND;
l_attributes_data_table (3) :=
ego_user_attr_data_obj (1,
'DROID_ITEM',
'B',
NULL,
NULL,
NULL,
NULL,
1
);
ego_user_attrs_data_pub.process_user_attrs_data
(p_api_version => 1.0,
p_object_name => 'EGO_ITEM_REVISION',
p_attributes_row_table =>l_attributes_row_table,
p_attributes_data_table => l_attributes_data_table,
p_pk_column_name_value_pairs =>l_pk_column_name_value_pairs,
p_class_code_name_value_pairs => l_class_code_name_value_pairs,
p_user_privileges_on_object => NULL,
p_entity_id => NULL,
p_entity_index => NULL,
p_entity_code => NULL,
p_debug_level => 1,
p_init_error_handler => fnd_api.g_true,
p_write_to_concurrent_log => fnd_api.g_false,
p_init_fnd_msg_list => fnd_api.g_true,
p_log_errors => fnd_api.g_true,
p_add_errors_to_fnd_stack => fnd_api.g_true,
p_commit => fnd_api.g_true,
x_failed_row_id_list => l_failed_row_id_list,
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('=========================================');
DBMS_OUTPUT.PUT_LINE('Return Status: '||l_return_status);
IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
DBMS_OUTPUT.PUT_LINE('Error Messages :');
DBMS_OUTPUT.PUT_LINE(l_msg_data);
Error_Handler.GET_MESSAGE_LIST(x_message_list=>x_message_list);
FOR i IN 1..x_message_list.COUNT LOOP
DBMS_OUTPUT.PUT_LINE(x_message_list(i).message_text);
END LOOP;
END IF;
DBMS_OUTPUT.PUT_LINE('=========================================');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Exception Occured :');
DBMS_OUTPUT.PUT_LINE(SQLCODE ||':'||SQLERRM);
DBMS_OUTPUT.PUT_LINE('========================================');
END;
--------------------------------
Please do reply asap.
|
|
|
|
|
|
|
Goto Forum:
Current Time: Mon Dec 23 01:53:17 CST 2024
|