0% found this document useful (0 votes)
393 views

Initializin An API

This document describes procedures for testing and debugging the EGO_ITEM_PUB API in Oracle Applications. It initializes global variables, defines an item, calls the Process_Items API to create the item, and checks the return status and messages. Other APIs like INV_ITEM_CATEGORY_PUB and INV_ITEM_CATALOG_ELEM_PUB are also mentioned for creating category and catalog assignments.

Uploaded by

nahor02
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
393 views

Initializin An API

This document describes procedures for testing and debugging the EGO_ITEM_PUB API in Oracle Applications. It initializes global variables, defines an item, calls the Process_Items API to create the item, and checks the return status and messages. Other APIs like INV_ITEM_CATEGORY_PUB and INV_ITEM_CATALOG_ELEM_PUB are also mentioned for creating category and catalog assignments.

Uploaded by

nahor02
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

FND_GLOBAL.APPS_INITIALIZE(USER_ID=>&userid,RESP_ID=>NULL,RESP _APPL_ID=>NULL); This API will update mtl_system_items_interface and mtl_interface_errors if problems occur.

The following procedure may be used to facilitate initial testing and debugging of EGO_ITEM_PUB: SET SERVEROUTPUT ON DECLARE l_item_table EGO_Item_PUB.Item_Tbl_Type; x_item_table EGO_Item_PUB.Item_Tbl_Type; x_Inventory_Item_Id mtl_system_items_b.inventory_item_id%TYPE; x_Organization_Id mtl_system_items_b.organization_id%TYPE; x_return_status VARCHAR2(1); x_msg_count NUMBER(10); x_msg_data VARCHAR2(1000); x_message_list Error_Handler.Error_Tbl_Type; BEGIN --Setting FND global variables. --Replace MFG user name with appropriate user name. FND_GLOBAL.APPS_INITIALIZE(USER_ID=>&userid,RESP_ID=>NULL,RESP _APPL_ID=>NULL); --FIRST Item definition l_item_table(1).Transaction_Type := 'CREATE'; -- Replace this with 'UPDATE' for update transaction. l_item_table(1).Segment1 := 'TEST1'; l_item_table(1).Description := 'TEST ITEM'; l_item_table(1).Organization_Code := '&masterorg'; l_item_table(1).Template_Name := '&template'; l_item_table(1).Inventory_Item_Status_Code := 'Active'; l_item_table(1).Long_Description := 'Create test item';

DBMS_OUTPUT.PUT_LINE('====================================='); DBMS_OUTPUT.PUT_LINE('Calling EGO_ITEM_PUB.Process_Items API'); EGO_ITEM_PUB.Process_Items( p_api_version => 1.0

,p_init_msg_list ,p_commit ,p_Item_Tbl ,x_Item_Tbl ,x_return_status ,x_msg_count

=> FND_API.g_TRUE => FND_API.g_TRUE => l_item_table => x_item_table => x_return_status => x_msg_count);

DBMS_OUTPUT.PUT_LINE('=================================='); DBMS_OUTPUT.PUT_LINE('Return Status ==>'||x_return_status); IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN FOR i IN 1..x_item_table.COUNT LOOP DBMS_OUTPUT.PUT_LINE('Inventory Item Id :'|| to_char(x_item_table(i).Inventory_Item_Id)); DBMS_OUTPUT.PUT_LINE('Organization Id :'|| to_char(x_item_table(i).Organization_Id)); END LOOP; ELSE DBMS_OUTPUT.PUT_LINE('Error Messages :'); 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; 2. INV_ITEM_CATEGORY_PUB can be used to Create / Update category assignments. 11.5.9 customers can apply patch 4088037 to introduce Update functionality for this API. 3. INV_ITEM_CATALOG_ELEM_PUB can be used for importing item catalog descriptive element value assignments.

You might also like