Wednesday, 17 December 2025

Use of inv_convert.inv_um_convert gives wrong result

Q: I am using EBS 12.2.12 with database 19c (19.12.1.0.0) I am using inv_convert.inv_um_convert function to get secondary quantity but it is giving wrong result which is -9999 (database user is different than APPS which has been granted to execute this function)

SELECT inv_convert.Inv_um_convert (item_id => 10576622, PRECISION => NULL,
              from_quantity => 170, from_unit => 'Ea', to_unit => 'NOS',
              from_name => NULL, to_name => NULL) x
FROM   dual; 


SELECT msi.segment1,
       msi.primary_uom_code,
       'Ea' AS second_uom,
       inv_convert.Inv_um_convert (msi.inventory_item_id, 'Ea',
       msi.primary_uom_code)
            AS conversion
FROM   mtl_system_items_b msi
WHERE  msi.inventory_item_id = 10576622
       AND organization_id = 111; 

However while using with APPS user it is giving correct result.

Ans: Below grants worked for me:

GRANT SELECT ON mtl_uom_conversions TO xx_custom_schema;



ALTER SESSION SET current_schema=xx_custom_schema;

CREATE SYNONYM mtl_uom_conversions FOR apps.mtl_uom_conversions; 

No comments:

Post a Comment