Monday, March 8, 2010

How to do UOM Conversions through api? ( inv_convert.inv_um_convert_new )

We have an api named inv_convert.inv_um_convert_new that can be used for UOM conversions
The parameter precision can be varied from NULL to value supported by your receiving variable.
Note : This code has been tested in R12.1.1 instance.

set serveroutput on;
v_Rate Number(30,23);
v_suom    varchar2(20)  default 'BK';
v_puom    varchar2(20)  default 'KG';
v_itemid  number default  '12345';
v_rate := inv_convert.inv_um_convert_new
                           item_id                    => v_itemid
                          ,precision                 => NULL  
                          ,from_quantity      => 1             
                          ,from_unit               => v_suom
                          ,to_unit                     => v_puom
                          ,from_name            => NULL
                          ,to_name                  => NULL
                          ,capacity_type        => 'U'
dbms_output.put_line('Rate :' ||v_rate);

2 Responses to “How to do UOM Conversions through api? ( inv_convert.inv_um_convert_new )”

Anonymous said...
June 20, 2013 at 1:39 PM

Excellent article. Really helped me out. Thanks Sandeep!

sajith said...
December 9, 2013 at 7:13 AM

After executing this API, where do I see the change in the front-end screen? Kindly let me know.

Post a Comment


The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.