l_api_version NUMBER := 1.0;
l_init_msg_list VARCHAR2(2) := FND_API.G_TRUE;
l_commit VARCHAR2(2) := FND_API.G_FALSE;
SELECT inventory_item_id,
segment1,
primary_uom_code
FROM mtl_system_items_b
WHERE segment1 = v_segment1; -- INVENTORY ITEM CODE
EGO_ITEM_PUB.ASSIGN_ITEM_TO_ORG(
P_API_VERSION => l_api_version
, P_INIT_MSG_LIST => l_INIT_MSG_LIST
, P_COMMIT => l_COMMIT
, P_INVENTORY_ITEM_ID => itm.inventory_item_id --(item id from the above Query)
, P_ITEM_NUMBER => itm.segment1 --(Item Code from the above Query)
, P_ORGANIZATION_ID => v_organization_id --(Organization Id for assingment)
, P_ORGANIZATION_CODE => NULL--v_organization_code
, P_PRIMARY_UOM_CODE => itm.primary_uom_code --(UOM from the above Query)
, X_RETURN_STATUS => X_RETURN_STATUS
, X_MSG_COUNT => X_MSG_COUNT
);
Leave a Reply
Want to join the discussion?Feel free to contribute!