Wednesday 28 March 2012

Function to get item type by passing inventory item id as parameter

CREATE OR REPLACE FUNCTION Getitemtype(p1 IN NUMBER) RETURN VARCHAR2 AS
v_item_type VARCHAR2(30);
BEGIN
SELECT DISTINCT item_type INTO v_item_type FROM mtl_system_items
WHERE inventory_item_id=p1;
RETURN v_item_type;
END;
/

No comments:

Post a Comment