Showing posts with label Inventory Tables. Show all posts
Showing posts with label Inventory Tables. Show all posts

March 12, 2012

Logic to find out items soldy qty

In inventory if u need to find the aging details of sales report u need to refer to cutomer tables

i.e:
 ra_customer_trx_lines_all and ra_customer_trx_all

conditions to filter will be inventory_item_id,organization_id

e.g query:

select
        sum(nvl(quantity_invoiced,0))  + sum(nvl(quantity_Credited,0))  Qty,to_number(ltrim(rtrim(cta.interface_header_attribute10)))
from
        ra_customer_trx_lines_all ctla ,ra_customer_trx_all cta
where
        cta.customer_trx_id =  ctla.customer_trx_id
        and inventory_item_id = 86343
       -- and to_number(ltrim(rtrim(cta.interface_header_attribute10))) = o_id
    --    and cta.trx_date >= sysdate - TDays
group by
        ltrim(rtrim(cta.interface_header_attribute10)),
        inventory_item_id;

December 2, 2010

Inventory Tables

Oracle Inventory Tables

mtl_system_items
mtl_item_revisions
mtl_item_categories
mtl_material_transactions
mtl_transaction_lots_numbers
mtl_serial_numbers
mtl_system_item_interface
mtl_item_revisions_interface
mtl_item_categories_interface
mtl_transaction_interface
mtl_transaction_lots_interface
mtl_serial_numbers_interface

COALESCE-SQL

Coalesce- return the null values from the expression. It works similar to a case statement where if expression 1 is false then goes to expr...