Onhand - Quantity Suggested

Hi Gurus,
I was looking at onhand availability screen for one item and it shows data like below:
On-Hand Quantity: 1
Available to reserve: 0
Available to Transact: 0
Then I tried to pull this information using "inv_quantity_tree_pub.query_quantities" api.
The result set says "Suggested Quantity" as 1.
Can anyone help me in understanding what is suggested quantity?
Thanks in advance.
Edited by: 987644 on Feb 12, 2013 10:31 AM

Suggested quantity is the on-hand quantity itself.
The reason it is showing 0 for both " Available to reserve" and "Available to Transact" is, there must be some record stuck in the temp table for the related item.
SELECT *
FROM
MTL_MATERIAL_TRANSACTIONS_TEMP
WHERE inventory_item_id = <your item id>
If it returns any row, you need to delete the same to get the on-hand data corrected.
Thanks,
PS.

Similar Messages

  • ONHAND QUANTITY SETUP을 확인하는 방법

    제품: Applications
    작성날짜 : 2006-05-30
    ONHAND QUANTITY SETUP을 확인하는 방법
    ==============================
    PURPOSE
    Onhand quantity setup을 확인하는 방법
    Explanation
    script을 통해, 여러 setup사항들 및 onhand수량을 check할 수 있다.
    1. Check Organization controls
    2. Check Subinventory controls
    3. Check item attributes and controls for lot, locator, serial and
    revision.
    4. Check onhand quantity stock records a) non lot control
    b) lot controlled
    5. Check that stock records agree with attribute settings including
    the following:
    - Check that stock has a lot number if under lot control.
    - Check expiration date, lots which have expired still show in
    transaction screen
    - LPN containerized items
    6. Show reservations for the item
    7. Show overall quantities (from an internal routine called qtytree)
    8. Check that cost groups are correct.
    9. Check that quantities agree.
    아래의 script을 onhand.sql로 생성하여 수행하시기 바랍니다.
    $Header: onhand.sql 115.9 2005/05/25 $
    FILE
    onhand.sql
    DESCRIPTION
    Gives information regarding quantity values for an item within an organization,
    subinventory, revision and lot to determine why the system does not find
    available stock.
    Quantity on hand
    Reservable quantity on hand
    Quantity reserved
    Quantity suggested
    Quantity available to transact
    Quantity available to reserve
    The retrieved information will be written to an O/S file called: onhand.lst
    This script should be used for Release 11.5 only.
    BASE
    Bug 3089073, 4349223
    ARGUMENTS
    Organization_id
    Inventory_item_id
    lot_number => return over this if item is not lot controlled
    revision => return over this if item is not revision controlled
    subinventory_code
    /*WHENEVER SQLERROR EXIT FAILURE;*/
    spool onhand.lst
    set linesize 125;
    set pagesize 200;
    set verify off;
    set serveroutput on
    PROMPT 1/ To check Organization controls
    SELECT organization_id ORG_ID,
    primary_cost_method CST_TYP,
    cost_organization_id CST_ORG,
    master_organization_id MAST_ORG,
    default_cost_group_id DEF_CST_GRP,
    project_reference_enabled PROJ_FLG,
    wms_enabled_flag WMS
    FROM mtl_parameters
    WHERE organization_id = &&org_id;
    PROMPT 2/ To check Subinventory controls
    SELECT secondary_inventory_name, organization_id org_id, default_cost_group_id DEF_CST_GRP,
    locator_type LOC, asset_inventory ASSET_INV
    FROM mtl_secondary_inventories
    where organization_id = &&org_id;
    PROMPT 3/ To check item attributes
    select LOT_CONTROL_CODE LOT, REVISION_QTY_CONTROL_CODE REV, LOCATION_CONTROL_CODE LOC,
    SERIAL_NUMBER_CONTROL_CODE SER
    from mtl_system_items_b
    where organization_id= &&org_id
    and inventory_item_id = &&item_id;
    prompt control = 2 for on
    prompt serial_number_control 1-No serial number, 2-Predefined serial number, 5-Dynamic entry at inventory receipt
    prompt 6-Dynamic entry at sales order issue
    PROMPT 4/ To check onhand quantity stock records a) non lot control b) lot controlled
    select moqd.inventory_item_id ITEM_ID, moqd.organization_id ORG_ID,
    moqd.primary_transaction_quantity PRIM_QTY, moqd.subinventory_code, moqd.revision REV,
    moqd.locator_id, moqd.lot_number,
    moqd.cost_group_id CST_GRP_ID, moqd.project_id, moqd.task_id, moqd.lpn_id,
    moqd.CONTAINERIZED_FLAG CONT_FLG
    from mtl_onhand_quantities_detail moqd
    where moqd.organization_id = &&org_id
    and moqd.inventory_item_id = &&item_id;
    select moqd.inventory_item_id ITEM_ID, moqd.organization_id ORG_ID,
    moqd.primary_transaction_quantity PRIM_QTY, moqd.subinventory_code,moqd.revision REV,
    moqd.locator_id, moqd.lot_number, mln.expiration_date EXPIRE_DATE,
    moqd.cost_group_id CST_GRP_ID, moqd.project_id, moqd.task_id, moqd.lpn_id,
    moqd.CONTAINERIZED_FLAG CONT_FLG
    from mtl_onhand_quantities_detail moqd, mtl_lot_numbers mln
    where moqd.organization_id = &&org_id
    and moqd.inventory_item_id = &&item_id
    and moqd.inventory_item_id = mln.inventory_item_id
    and moqd.organization_id = mln.organization_id
    and moqd.lot_number = mln.lot_number;
    PROMPT Check that stock records agree with attribute settings ie. stock has a lot
    PROMPT number if under lot control. Also check expiration date, lots which have expired
    PROMPT still show in transaction screen but cannot be reserved (bug 3818166) and for
    PROMPT negative balances, if found apply patch 3747966.
    PROMPT Also check for LPN containerised items will not show as available on forms need
    PROMPT unpack the material and then try to issue out from desktop or Perform the Misc
    PROMPT issue of the LPN from the Mobile (bug 4349223).
    PROMPT
    PROMPT 5/ Show reservations for item
    select organization_id, inventory_item_id, demand_source_name, demand_source_header_id,
    demand_source_line_id, primary_reservation_quantity, revision, subinventory_code,
    locator_id, lot_number
    from mtl_reservations
    where organization_id = &&org_id
    and inventory_item_id = &&item_id;
    PROMPT 6/ Show overall quantities from qtytree
    SELECT
    x.organization_id organization_id
    , x.inventory_item_id inventory_item_id
    , x.revision revision
    , x.lot_number lot_number
    , To_date(NULL) lot_expiration_date
    , x.subinventory_code subinventory_code
    , sub.reservable_type reservable_type
    , x.locator_id locator_id
    , x.primary_quantity primary_quantity
    , x.date_received date_received
    , x.quantity_type quantity_type
    , x.cost_group_id cost_group_id
    , x.containerized containerized
    FROM (
    SELECT
    x.organization_id organization_id
    , x.inventory_item_id inventory_item_id
    , NULL revision
    , NULL lot_number
    , x.subinventory_code subinventory_code
    , x.locator_id locator_id
    , SUM(x.primary_quantity) primary_quantity
    , MIN(x.date_received) date_received
    , x.quantity_type quantity_type
    , x.cost_group_id cost_group_id
    , x.containerized containerized
    FROM (
    -- reservations
    SELECT
    mr.organization_id organization_id
    , mr.inventory_item_id inventory_item_id
    , mr.revision revision
    , mr.lot_number lot_number
    , mr.subinventory_code subinventory_code
    , mr.locator_id locator_id
    , mr.primary_reservation_quantity
    - Nvl(mr.detailed_quantity,0) primary_quantity
    , To_date(NULL) date_received
    , 3 quantity_type
    , to_number(NULL) cost_group_id
    , 0 containerized
    FROM mtl_reservations mr
    WHERE
    Nvl(mr.supply_source_type_id, 13) = 13
    AND mr.primary_reservation_quantity > Nvl(mr.detailed_quantity,0)
    UNION ALL
    -- onhand quantities
    SELECT
    moq.organization_id organization_id
    , moq.inventory_item_id inventory_item_id
    , moq.revision revision
    , moq.lot_number lot_number
    , moq.subinventory_code subinventory_code
    , moq.locator_id locator_id
    , decode(NULL, NULL, moq.transaction_quantity, nvl(pjm_ueff_onhand.onhand_quantity
    (NULL,moq.inventory_item_id,moq.organization_id
    ,moq.revision,moq.subinventory_code,moq.locator_id,moq.lot_number)
    ,moq.transaction_quantity))
    , nvl(moq.orig_date_received,
    moq.date_received) date_received
    , 1 quantity_type
    , moq.cost_group_id cost_group_id
    , decode(moq.containerized_flag,
    1, 1, 0) containerized
    FROM
    mtl_onhand_quantities_detail moq
    UNION ALL
    -- pending transactions in mmtt
    --changed by jcearley on 12/8/99
    --added 1 to decode statement so that we make sure the
    --issue qtys in mmtt are seen as negative.
    --This problem arose because create_suggestions stores
    --the suggested transactions in mmtt as a positive number.
    -- added 5/23/00
    -- if quantity is in an lpn, then it is containerized
    SELECT
    mmtt.organization_id organization_id
    , mmtt.inventory_item_id inventory_item_id
    , mmtt.revision revision
    , NULL lot_number
    , mmtt.subinventory_code subinventory_code
    , mmtt.locator_id locator_id
    , Decode(mmtt.transaction_status, 2, 1
    , Decode(mmtt.transaction_action_id
    , 1, -1, 2, -1, 28, -1, 3, -1, Sign(mmtt.primary_quantity))
    * Abs( decode(NULL, NULL, mmtt.primary_quantity, Nvl(apps.pjm_ueff_onhand.txn_quantity(NULL,mmtt.transaction_temp_id,mmtt.lot_number,
    'N',mmtt.inventory_item_id, mmtt.organization_id, mmtt.transaction_source_type_id,
    mmtt.transaction_source_id, mmtt.rcv_transaction_id,
    sign(mmtt.primary_quantity)
    ),mmtt.primary_quantity)) )
    , Decode(mmtt.transaction_action_id
    , 1, To_date(NULL)
    , 2, To_date(NULL)
    , 28, To_date(NULL)
    , 3, To_date(NULL)
    , Decode(Sign(mmtt.primary_quantity)
    , -1, To_date(NULL)
    , mmtt.transaction_date)) date_received
    , Decode(mmtt.transaction_status, 2, 5, 1) quantity_type
    , mmtt.cost_group_id cost_group_id
    , decode(mmtt.lpn_id, NULL, 0, 1) containerized
    FROM
    mtl_material_transactions_temp mmtt
    WHERE
    mmtt.posting_flag = 'Y'
    AND mmtt.subinventory_code IS NOT NULL
    AND (Nvl(mmtt.transaction_status,0) <> 2 OR -- pending txns
    -- only picking side of the suggested transactions are used
    Nvl(mmtt.transaction_status,0) = 2 AND
    mmtt.transaction_action_id IN (1,2,28,3,21,29,32,34)
    -- dont look at scrap and costing txns
    AND mmtt.transaction_action_id NOT IN (24,30)
    UNION ALL
    -- receiving side of transfers
    -- added 5/23/00
    -- if quantity is in an lpn, then it is containerized
    SELECT
    Decode(mmtt.transaction_action_id
    , 3, mmtt.transfer_organization
    , mmtt.organization_id) organization_id
    , mmtt.inventory_item_id inventory_item_id
    , mmtt.revision revision
    , NULL lot_number
    , mmtt.transfer_subinventory subinventory_code
    , mmtt.transfer_to_location locator_id
    , Abs( decode(NULL, NULL, mmtt.primary_quantity, Nvl(apps.pjm_ueff_onhand.txn_quantity(NULL,mmtt.transaction_temp_id,mmtt.lot_number,
    'N',mmtt.inventory_item_id, mmtt.organization_id, mmtt.transaction_source_type_id,
    mmtt.transaction_source_id, mmtt.rcv_transaction_id,
    sign(mmtt.primary_quantity)
    ),mmtt.primary_quantity)) )
    , mmtt.transaction_date date_received
    , 1 quantity_type
    , mmtt.transfer_cost_group_id cost_group_id
    , decode(mmtt.transfer_lpn_id, NULL, 0, 1) containerized
    FROM
    mtl_material_transactions_temp mmtt
    WHERE
    mmtt.posting_flag = 'Y'
    AND Nvl(mmtt.transaction_status,0) <> 2 -- pending txns only
    AND mmtt.transaction_action_id IN (2,28,3)
    ) x
    WHERE x.organization_id = &&org_id
    AND x.inventory_item_id = &&item_id
    GROUP BY
    x.organization_id, x.inventory_item_id, x.revision
    , x.subinventory_code, x.locator_id
    , x.quantity_type, x.cost_group_id, x.containerized
    ) x
    , mtl_secondary_inventories sub
    WHERE
    x.organization_id = sub.organization_id (+)
    --AND Nvl(sub.availability_type, 1) = 1
    AND x.subinventory_code = sub.secondary_inventory_name (+) ;
    PROMPT Check that cost groups are correct see Bug 4222079
    PROMPT 7/ To find stock values from system nb.<cr> over lot and revision if item
    PROMPT is not under lot or revision control, <cr> over subinventory for all subinvs
    DECLARE
    L_api_return_status VARCHAR2(1);
    l_qty_oh NUMBER;
    l_qty_res_oh NUMBER;
    l_qty_res NUMBER;
    l_qty_sug NUMBER;
    l_qty_att NUMBER;
    l_qty_atr NUMBER;
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(1000);
    l_rev varchar2(100):=NULL;
    l_lot VARCHAR2(100):=NULL;
    l_loc VARCHAR2(100):=NULL;
    l_lot_control BOOLEAN :=false;
    l_revision_control BOOLEAN :=false;
    l_lot_control_code NUMBER;
    l_revision_qty_control_code NUMBER;
    l_location_control_code NUMBER;
    l_org_id NUMBER;
    l_item_id NUMBER;
    l_subinv VARCHAR2(10);
    BEGIN
    select LOT_CONTROL_CODE ,REVISION_QTY_CONTROL_CODE, LOCATION_CONTROL_CODE
    into l_lot_control_code, l_revision_qty_control_code, l_location_control_code
    from mtl_system_items_b
    where organization_id= &&org_id
    and inventory_item_id = &&item_id;
    if l_lot_control_code = 2 then
    l_lot_control :=true;
    l_lot:='&lotnumber';
    end if;
    if l_revision_qty_control_code =2 then
    l_revision_control:=true;
    l_rev:='&revision';
    end if;
    inv_quantity_tree_grp.clear_quantity_cache;
    dbms_output.put_line('Transaction Mode');
    apps.INV_Quantity_Tree_PUB.Query_Quantities (
    p_api_version_number => 1.0
    , p_init_msg_lst => apps.fnd_api.g_false
    , x_return_status => L_api_return_status
    , x_msg_count => l_msg_count
    , x_msg_data => l_msg_data
    , p_organization_id => &&org_id
    , p_inventory_item_id => &&item_id
    , p_tree_mode => apps.INV_Quantity_Tree_PUB.g_transaction_mode
    , p_onhand_source => NULL
    , p_is_revision_control=> l_revision_control
    , p_is_lot_control => l_lot_control
    , p_is_serial_control => NULL
    , p_revision => l_rev
    , p_lot_number => l_lot
    , p_subinventory_code => '&&subinv_code'
    , p_locator_id => NULL
    , x_qoh => l_qty_oh
    , x_rqoh => l_qty_res_oh
    , x_qr => l_qty_res
    , x_qs => l_qty_sug
    , x_att => l_qty_att
    , x_atr => l_qty_atr );
    dbms_output.put_line('Quantity on hand --> '||to_char(l_qty_oh));
    dbms_output.put_line('Reservable quantity on hand --> '||to_char(l_qty_res_oh));
    dbms_output.put_line('Quantity reserved --> '||to_char(l_qty_res));
    dbms_output.put_line('Quantity suggested --> '||to_char(l_qty_sug));
    dbms_output.put_line('Quantity available to transact --> '||to_char(l_qty_att));
    dbms_output.put_line('Quantity available to reserve --> '||to_char(l_qty_atr));
    end;
    PROMPT Check that quantities agree with script 4 and 5.
    Spool off;
    PROMPT *** Print file onhand.lst created ***
    exit
    Reference Documents
    Bug 4529874

  • API to update onhand quantity

    Hi All,
    Is there any API that I can use to update the onhand quantity of Inventory Item.
    Thanks,
    Priya.

    Priya,
    We do (or I should say "Shoud") not update the onhand quantity after you book the order. You can create reservations though (standard functionality available). This way others will not be able to take the quantity that is reserved against this order. Onhand quantity is table is exclusively used by transaction manager to move the qty in and out.
    If you tell us the functional requirements as why you are trying to do this, we can offer better advice.
    Thanks
    Nagamohan

  • How to know onhand quantity at a selected date

    Hi,
    is there a concurrent ( or a PLSQL package ) which could give the onhand quantity of an item in storage at a given date .
    thanks.

    There are few reports on Oracle that allows you to analyze the past situation of stock, comparing it with the actual situation and the transactions done during the period between the rollback date and the current date. One of these is "Transaction historical summary". You can launch this report from a Cost Management or Inventory responsibility.
    Also build inventory position is a good solution.
    Regards
    Riccardo
    Message was edited by:
    Riccardo

  • How to calucalte onhand quantity in inventory

    Hi,
    I am facing problem to calculate the onhand quantity ,reserved quantity and available quantity,
    Please help this.
    Thanks

    Hi
    Please use inv_quantity_tree_pub.query_quantities. It has all the out variables that you are looking for.
    Thanks
    Nagamohan

  • How to get the onhand quantity along with zero quantities in Inventory?

    How to get the onhand quantity along with zero quantities in Inventory...Plz reply me as son as possible?

    Hi Akshata,
    In processRequest you can use pageContext.getParameter
    String PartyName = pageContext.getParameter("PartyName");Regards,
    Sujoy

  • How to find onhand quantity from backend

    Hi,
    Somebody please tell me how to find onhand quantity for a particular item for particular subinventory.
    Please provide the query.
    Thanks in advance.

    mtl_onhand_quantities view contains the details of onhand.
    You can sum up transaction_quantities and group by item_id, org_id and subinventory code.
    Hope this helps,
    Sandeep Gandhi

  • REPORT - Sold quantity and OnHand quantity

    Hello Everyone,
    How can I create a query to show what I have sold within a date range and how much inventory I have of those items.  Thank you.
    itemcode      sold        onhand     whscod
    x                    10                5            AH
    x                      5                0            CH
    x                    12                3            GB
    Y                      0               5            AH
    Y                      0             10            CH
    Y                    2                20            GB

    That is the 2nd step for the query. I would like him to try this first.
    Here is the final:
    SELECT S.ItemCode, SUM(S.quantity) 'Sold', S.Onhand, S.WhsCode
    FROM (SELECT T0.ItemCode, T0.quantity, T2.Onhand, T0.WhsCode
    FROM dbo.INV1 T0
    INNER JOIN dbo.OINV T1 ON T1.DocEntry=T0.DocEntry
    INNER JOIN dbo.OITW T2 ON T2.WhsCode=T0.WhsCode AND T2.ItemCode=T0.ItemCode
    WHERE T1.DocDate Between [%0\] AND [%1\]
    UNION ALL
    SELECT T0.ItemCode, -T0.quantity, T2.Onhand, T0.WhsCode
    FROM dbo.RIN1 T0
    INNER JOIN dbo.ORIN T1 ON T1.DocEntry=T0.DocEntry
    INNER JOIN dbo.OITW T2 ON T2.WhsCode=T0.WhsCode AND T2.ItemCode=T0.ItemCode
    WHERE T1.DocDate Between [%0\] AND [%1\]) S
    GROUP BY S.ItemCode, S.Onhand, S.WhsCode
    ORDRE BY S.ItemCode

  • ASCP is showing onhand quantity as negative in workbench

    Hi All,
    ASCP is showing oh hand quantity for an item as negative in ASCP workbench, when we checked for the same item in source instance, it shows as 71 available.
    ASCP shows two rows for onhand, one as positive 52 and one as negative -16
    Could anybody help us to get the probable cause for the same.
    Regards.

    Check how is the result of availability check to be represented in schedule line.
    In SPRO-SD-BF-ACand TORACAC with ATP LogicDefine default settings
    Here configure the availability check rule in such a way that if the goods cant be delivered on the Requested Delivery date, then it shoudl propose the date on w hich teh goods can be delivered. Then your problem will be solved.
    The options you can select are C or E.
    Rwd if it helps.

  • R12 12.0.4 Onhand Quantity SQL required

    Hi guys
    We are a huge retailing company and currently in the process of implementing a custom made application for POS. One of our requirements is to reserve a given quantity against a particular item and once the PO received from the customer, raise a Credit invoice against customer account. Throughout last couple of years after the R12 implementation we kept on adding in-house built modules, mostly for tracking the on-hand quantities. We never used the material reservation until the custom application integration.
    As we are planning to go live with the custom built application, we are in a requirement to alter our on-hand quantity scripts throughout the custom modules and reports. Right now we are using the following query to fetch the on-hand quantities:
    Select onhand_quantity from
    Select sum(onhand_qty) onhand_quantity, inventory_item_id, organization_id, subinventory_code from
    Select sum(transaction_quantity) onhand_qty,inventory_item_id, organization_id, subinventory_code from mtl_onhand_quantities
    group by organization_id, subinventory_code, inventory_item_id
    union all
    Select sum(reservation_quantity)*-1 onhand_qty,inventory_item_id, organization_id, subinventory_code from mtl_reservations
    group by organization_id, subinventory_code, inventory_item_id
    group by inventory_item_id, organization_id, subinventory_code
    where inventory_item_id = :item_id and
    organization_id = :org_id and
    subinventory_code = :subinv_code
    Should we consider anything else? We tried to use "apps.INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES" API, unfortunately while compiling we got compilation errors. Please forward your suggestions
    regards,

    Thanks Sandeep
    Unfortunately, we do use move orders quite frequent (OM team just confirmed) and there are just few entries in MTL_MATERIAL_TRANSACTION_TEMP table. A total of 6 records dating back to 2010.
    Anyway we are going ahead with the current setup and will include this table if differences are found at later stages. Thank you very much for your replies.
    Regards,

  • The onhand quantity at sub inventory level it is not showing correctly

    For an item the org level quantityt is showing correctly but at sub inventory level it is not showing correctly.
    1)For an item org level the avilablty as below :
                   On Hand / Avail to Reserve / Avail to Transact are
         oRG level          7     7          7
    STAGING           7     7          7
         STORES          0     0          0     
    2) Created an Sales order with quantity 5 ,then STAGING decreased by 5 which is correct.
              the avilablty as below :
                   On Hand / Avail to Reserve / Avail to Transact are
         oRG level          7     7          7
    STAGING           2     2          2
         STORES          0     0          0     
    3) Shipping Transaction not completed,Received 4 into Stores – Staging avail increased by 6 and even STORES also increased by 4 . Here we do not understand why STAGING increased to 6.
         the avilablty as below :
                   On Hand / Avail to Reserve / Avail to Transact are
         oRG level          7     7          7
    STAGING           6     6          6
         STORES          4     4          4     
    4)Ship Transaction Completed sucessfully now the values are showing correctly.
         The avilablty as below :
                   On Hand / Avail to Reserve / Avail to Transact are
         oRG level          7     7          7
    STAGING           2     2          2
         STORES          4     4          4

    Hi Patel,
    You can create a confirmations using CO11N for sub-operations, but you can only confirm hours, not yield quantity. The yield quantity requried to be confirmed in the operation. You can partially or fully confirm sub-operations.
    Enter the order number, sub -operation number all the related data will be displayed execpt greyed quantity fields.
    Can you see the "sub-operation" entry field below "oper./activity" in CO11N ?
    Thanks & Regards,
    Ramagiri

  • Query regarding Onhand Quantity

    Hello,
    I am new to manufacturing modules and I need some help.
    I have a requirement in inventory where I need to get the list of items,
    - if the qty on hand falls below a certain qty level in a sub-inventory.
    - I also need to identify the date on which it happened.
    Ex: if item# 12345 in sub-inventory “STOCKROOM” falls below 500, then I need to identify the date on which it happened.
    Any help in resolve this issue is highly appreciated.
    TIA
    KP

    Intresting ...
    An attempt, not sure if you like it
    The mtl_onhand_quantities_detail keeps track of the qty by means of logging into this
    table all new transactions that bring in qty and any decrement to qty is updated to the records
    by updating the earlier record and moving down as needed(lifo method)
    There is a create_transaction_id and update_transaction_id(decrementing trxn), but realy the
    update_transaction_id is the most recent decrement transaction prior transaction id's are not stored.
    I think you would start as
    select inventory_item_id, sum(transaction_qty) from mtl_onhand_quantities_detail
    you can restrict this further by org/subinv etc.
    Lets say you do not want to do any special logic for items that are over 500 qty, nothing
    is needed but for anything that is below 500 you would want to invoke something that may have logic
    like below.
    Lets say I got a record 400 qty for an item, this is what I would do
    400 As of sysdate(report run date)
    You list all transactions in descending order of occurence for the item/org
    that is the most recent transaction comes in the list first(mtl_material_transactions)
    Take the current qty in a variable say v_qty
    {Trxqty} { change_vqty_by} { QOH_Before_This_Trxn(revised v_qty)}
    {-10} {+10} { 410}
    {+5} {  -5} { 405}
    {+20} { -20} { 385}
    {-200} {+200} {585}
    (You stop on this record as this is more than 500, that
    means the prior record is where your qoh got negative and provide that trx date)
    Assuming this report is run bi-weekly/monthly you may just restrict looking back past transactions only
    to that extent.
    Try it out and if there is a better way/ the way you handled it please update for reference.

  • Regarding negative no s in committed quantity

    Dear all,
                            While checking the stock status of a finished goods...............the value in the committed qty is coming as negative....and the value in the available qty is added up with the in stock value.
    Example:-
                                         Instock             committed                 Available
    1)Item A                       1020                  -180                         1200
    Kindly suggest me a solution for that.
    Regards,
    shyam

    Hi shyam,
    Refer this link may it will help you
    Negative Onhand Quantity
    I think Log SAP Support for that.
    Thanks,
    Srujal Patel

  • WIP Assy Completion -The onhand qty is zero for the selection criteria ente

    Hi,
    I am trying to do a Work Order-Less completions with Transaction Type as 'WIP Assy Completion', the assembly items are not serial and lot controlled.
    When i am trying to save it, it throws an error as 'The onhand qty is zero for the selection criteria entered'.
    Please suggest.
    Thanks

    Do you have onhand quantity for the components under that assembly?
    Thanks
    Nagamohan

  • Inventory Management: Blocked stock coming up in OnHand

    Hello Experts -
    We've implemented 2LIS_03_BF for our inventory management reports.
    However, the OnHand quantity is also picking up Blocked quantity. I used the same code as given by SAP.
    For a material, the OnHand quantity is 13 in our reports when there's nothing under Unrestricted in MMBE. But there are 13 under Blocked.
    I looked at the code and the way the code is, it would pick up the Blocked quantity also.
    How do I resolve this issue?
    Thanks,
    Syed

    Hi,
    Which key figure are you using to get Stock on Hand?
    To get stock on hand we have to use 0TOTALSTCK - Quantity Total Stock and 0BLOCKEDSTK is for blocked stock
    These 2 are non-cumulative key figure.In update rules logic will be differentiated based on Stock type and stock category. For Blocked stock , stock type should be 'D' and stock category NA 'KR'.
    Please check update rules of BF.
    hope it helps...
    regards,
    Raju

Maybe you are looking for

  • Premier elements 11

    I have recently bought premier elements 11. I open the icon, click on new project, it looks to try and open but it then close. I then get a message... We have detected an incompatible display driver. To get a better and faster performance, please upd

  • Insert via DB-LINK

    Hi, i'm trying to insert via dblink data selected from local table. Here is the code: create or replace type T_DATA_IDS as table of number(19); export_process_ids t_data_ids;And here is the query:     insert into process@archive       (select * from

  • SEARCH item in MULTI-SELECT LOV (Hierachical Tree)

    I have created a multi-select LOV using a hierarchical tree; providing the query for the tree in the Functional/Data Query property. The Multi-Select LOV works fine. As you would suspect some LOV's have long lists that one must scroll through. I woul

  • I have cs5 on pc can i convert it to mac?

    I have cs5 on pc can i convert it to mac?

  • A suspicious dialogue box is appearing on my Mac, with a checkbox for using searchmoose. How can I get rid of this?

    This morning when I booted up my MacBook Pro, I got a suspicious-looking dialogue box that says "Update Alert!" and something about downloading a utility in preparation for "the new version of OSX." A checkbox below offered searchmoose as my search e