Calculate Pending Qty in Inventory?

Hi Experts,
We are on R12 (12.1.3)
DB 11gR1
Am not a Techical guy - need a help from you guyz ..
Am trying to create a report using BI Publishera with below info:-
Shipment Number, Purchase Order Number, Recieved Date, GRN NO (Reciept) , Location (Subinventory), pending qty , recieved qty ,item code,po_line_num,
Am not a able to put a logic for a PO has same line_num
eg:
PO-------Line_No----GRN_No---Qty_Ordered------Qty_Rcvd-----Qty_Pndg
48--------8-------------36-----------------5--------------------1-----------------4-------
48--------8-------------37-----------------5--------------------2-----------------3-------
48--------8-------------38-----------------5--------------------2-----------------3-------
the above o/p is correct only if PO has only one Line_Num .. for PO having more than one line number o/p is wrong ...could any one please help me out...
here i have to get get Qty_Pndg as
4
2
0
My Query:
SELECT PV.VENDOR_NAME "VENDOR NAME",
PVS.ADDRESS_LINE1
|| ''
|| PVS.CITY ADDRESS,
PVS.ZIP "PO BOX",
PVS.COUNTY COUNTRY,
RSH.SHIPMENT_NUM "Shipment No",
TO_CHAR(RSH.CREATION_DATE) "DATE",
RSH.RECEIPT_NUM "GRN NO",
RSL.TO_SUBINVENTORY SUBINVENTORY,
msib.segment2
|| '.'
|| msib.segment3
|| '.'
|| msib.segment4 item_code,
msib.description description,
msib.segment2
|| '.'
|| msib.segment3
|| '.'
|| msib.segment4
|| '/'
|| msib.description product_details,
RSL.QUANTITY_RECEIVED,
PODA.QUANTITY_ORDERED "QTY ORDERED",
--PODA.QUANTITY_DELIVERED "QTY RECEIVED",
(PODA.QUANTITY_ORDERED - RSL.QUANTITY_RECEIVED) "QTY PENDING",
rsl.unit_of_measure UNIT,
pha.segment1 "PO NO",
POL.LINE_NUM "LINE NO"
FROM MTL_SYSTEM_ITEMS_B MSIB,
RCV_SHIPMENT_LINES RSL,
PO_HEADERS_ALL PHA,
PO_LINES_ALL POL,
PO_DISTRIBUTIONS_ALL PODA,
PO_VENDORS PV,
PO_VENDOR_SITES_ALL PVS,
RCV_SHIPMENT_HEADERS RSH
WHERE 1=1
AND pha.ORG_ID ='7956'--fnd_profile.value('7956')
AND rsl.po_header_id = pha.po_header_id
AND RSL.SHIPMENT_HEADER_ID =RSH.SHIPMENT_HEADER_ID
AND rsl.item_id = msib.inventory_item_id
AND rsl.to_organization_id = msib.organization_id
AND POL.PO_HEADER_ID =PHA.PO_HEADER_ID
AND PODA.PO_HEADER_ID =PHA.PO_HEADER_ID
AND PODA.PO_LINE_ID =rsl.po_line_id
AND RSL.PO_LINE_ID = POL.PO_LINE_ID
AND PODA.PO_HEADER_ID =PHA.PO_HEADER_ID(+)
AND PODA.PO_LINE_ID = POL.PO_LINE_ID
AND RSL.QUANTITY_RECEIVED <>0
AND PV.VENDOR_ID = PHA.VENDOR_ID
AND PVS.VENDOR_SITE_ID = PHA.VENDOR_SITE_ID
AND PHA.SEGMENT1 = :P_PURCHASE_ORDER_NUMBER
Thanks
Thanks

Gerry Tunggadjaya wrote:
Cost manager works per Inventory Organization, and it will not process any transasctions if even only one line is in an Error status.I jus activated it once and it processes transactions from all orgs, whats the catch here
Therefore, from all of the pending transactions, there should be at least one line in error for each IO.
please run the query below, and find the error code and transaction id:
select * from mtl_material_transactions where costed_flag = 'E'there are four transactions with E in costed_flag
two lines belong to an ORG and other two lines belong to another ORG
and only these two ORGS are having problems with their transactions not being costed..
what to do now

Similar Messages

  • Table for Sales Order Pending Qty.

    Hi All,
    I need a Table from which I can extract the pending qty (Qty
    Still to be delivered)with material code of all open sales
    order. I need this for Reporting purpose. This report is for
    pending qty so by refering this report I can forward my
    requirement to production.
    Thanks in Advance.
    Regards
    Mahendra

    Hi:
    I think you are looking for a back order report - we developed a custom report.  I think on the production side, there should be a list of parts to be make.  On the sales side, you could try VA05 and select open orders
    Or even try Logistics > Production > MRP > Environment....there are options there
    Try Tcode CO24
    Let me know how this turned out

  • Pending Transactions in Inventory Accounting Periods for some ORG`s

    We are using 12.0.6
    We have 7 inventory ORGs
    We are feeding data since nov-08 and none of the Periods are closed yet
    Some ORGs have a very high number of uncosted transactions while some have none
    I dont understand why
    And secondly If i want to remove these transactions from pending status, how would i do that and make them costed so the pending number goes to zero
    Please advice
    Thanks

    What is the costing method being used? If it is average costing(or fifo/lifo) then, if one the transactions gets errored then costing of all subsequent transactions for that items in that org will be stopped. Also, there could be many other reasons like cost cut off date. inter org txns etc.
    best way to find out is run the following query
    select *
    from mtl_material_transactions
    where costed_flag = 'E';
    This gives all errored transactions. Try to resolve the issues with these transactions(check error_code, error_explanation columns).
    Hope this helps..
    Edited by: user625046 on Dec 3, 2009 5:13 AM

  • Difference in closing Balance qty in Inventory Cube and R3 T-code MB5B

    Dear All
    In evaluations of the 0OIC_C03 Infocube and corresponding reports in R/3 with transaction MB5B/MB51 suggest incorrect data extraction. The difference is in the initial stoock uploeaded . I found transaction in the PSA of 2LIS_03_BX which are not there in the MB5B/MB51.When I run the Query I found a certain qty in the Closing Balance but the same can not be traced in MB5B. The closing balances is the differnce in the qty of Mvt. Type 541 and 542. The closing balance is apearing against the calday but not against the posting date. Moreever the closing balance is apearing against Calday 30/07/2008 whereas we have gone live on 01/08/2008 and uploaded the initial stock on 31/08/2008.
    Dinesh Sharma

    Dear All
    In evaluations of the 0OIC_C03 Infocube and corresponding reports in R/3 with transaction MB5B/MB51 suggest incorrect data extraction. The difference is in the initial stoock uploeaded . I found transaction in the PSA of 2LIS_03_BX which are not there in the MB5B/MB51.When I run the Query I found a certain qty in the Closing Balance but the same can not be traced in MB5B. The closing balances is the differnce in the qty of Mvt. Type 541 and 542. The closing balance is apearing against the calday but not against the posting date. Moreever the closing balance is apearing against Calday 30/07/2008 whereas we have gone live on 01/08/2008 and uploaded the initial stock on  31/08/2008.
    Dinesh Sharma

  • Total Quantity received as well as pending Qty against an Inbound No.

    I have to make report for showing Total quantity received and pending quantity of inbound angainst inbound delivery number.
    which table, field name i use to make report.

    Inbound delivery against PO
    LIPS-VGBEL = Reference Document ( In this case it would be PO number)
    EKES Vendor Confirmations table also use for it
    Go to EKBE table for GR document and get the field ETENS (Sequential number of vendor confirmation).
    Go to EKES table and select the record based on EBELN, EBELP and ETENS to get the corresponding delivery number

  • Formatted Search - Calculate GP Base Price for Non Inventory Items

    Hi Experts,
    On one of our customer's 8.8 PL 15 installation, requirement was to calculate GP for Non Inventory Items (on SO screen). Since SAP does not automatically calculates it we proposed and implemented following solution.
    1. Have all Non Inventory Items to be costed at Standard cost so that you can manually enter the cost in the Item Master.
    2. Write following formatted search on GP Base Price field so as to calculate the GP Base Price for the Non Inventory Items only. The formatted search must not make any changes to Inventory Items as we want system to calculate the GP automatically (just in case cost changes from SO to Delivery or Invoice).
    DECLARE @II AS nVarchar(1)
    DECLARE @COST AS Numeric(19,2)
    SET @II = (SELECT OITM.InvntItem FROM OITM WHERE OITM.ItemCode = $[RDR1.ItemCode])
    SET @COST = (SELECT     (OITW.AVGPrice * $[RDR1.NumPerMsr]) FROM     OITW WHERE     OITW.ItemCode = $[RDR1.ItemCode] AND
         OITW.WhsCode = $[RDR1.WhsCode])
    IF (@II = 'N')
    BEGIN
    SELECT @COST
    END
    3. Formatted search achieves what was originally required however if a user overwrites the Item Code (Inventory Item) in the SO then above formatted search clears the GP Base Price field and sets the GP basis for the item as "Manual". By obverwrite means user first selected item A0001 on line 1 and then entered A0002 on same line i.e. Line 1.
    My question here is what is wrong in the formatted search that is resulting in this behaviour.
    Any questions please let me know.
    Thanks in advance.
    Regards
    Devinder

    Hi Gordon,
    Thanks for taking out time to help me however Key requirement here is
    Write formatted search on GP Base Price field so as to calculate the GP Base Price for the Non Inventory Items only.
    Your query sets the base price for GP Base Price for Inventory Item to ZERO and Base Price By to Manual.
    Note that my Formatted search has a problem only when an Inventory Item line is overwritten. I am not sure if this is a problem with SAP itself rather than my query.
    Any other ideas please?
    Regards
    Devinder

  • Report on INventory Issue

    Hi Experts,
    I have my inventory cube in production.......BF, BX , UM are intialised and compressed. Evryday delta scheduling is takin place.
    When i run report on inventory i m gettin
    MOvement Type = Not Assigned
    for some materials with some quantities.
    If i run with filter on movement type = [not assigned] exclude then my quantities matches with MB5B report on R3 side.
    But i want to know from where this quantities come in reporting?
    I have checked in cube with movement type = not assigned then it shows no records.....
    PLz let me know how to handle the occurences of these not assigned quantities.....
    points will be assigned.
    Regards,
    Vaishnavi.

    Hi Vaishnavi,
    Movement type = Not assigned means there is no movement type for this particular material in R/3, I am afraid which is not correct as each material will have a movement type for sure. You can check in MSEG table in R/3 whether this material has any movement type for this plant.
    Now my thoughts are, you wont find the characterestic Movement Type in the IM Standard Cube. I think you have changed the cube to meet your requirement. But my suggestion would be to use the cube as it is and for the movement type result, first create an ODS on 2LIS_03_BF create a report on it and put an RRI to the query you have created on the cube.
    Coming to how we get the values for quantities, it is because of the routines we use in the update rules for BX, BF anf UM. If you have a look at the routines you will understand the aswer. you are asking your system to look for the movement type and calculate the Qty accordingly.
    Hope it helps...

  • Is there any way out in business explorer to calculate key figures

    Hi friends,
    I need your help to calculate key figure in run time, actually I have a infoset of billing item and stock transfer order (STO) with purchase requsition (PR) . one STO line no. is having multiple PR for example one STO line of 100 nos qty is having two different PR for 50, 50 nos. but in billing item there is no linking of PR only STO and STO line is there. I am having problem to calculate balance qty in case partial delivery for example if delevered qty is 10 then pending quantity should be 40 in first PR and 50 in second PR but it is showing 40, 40 in both. please help me out to resolve this.
    With Regards,
    Raman

    Hi Radha,
    If I am not wrong, you need to have the delivered quantity at the PR level in order to get the pending quantity per PR. Since delivered quanity is for the STO line item only, you can get the pending quantity for each STO line item and not the PR. You can get the correct values for the STO line items are using the query designer options.
    Regards
    Renu

  • Qty Blocking scenario related to GR Based Invoice Verification

    Friends,
    I'm facing issues related to automatic deletion of Qty blocking reason during LIV.
    Scenario is like below:
    GR1 Qty = 5
    IR1 Qty = 7
    This invoice is posted by system but blocked for payment due to Qty variance.
    Expectation is that store person should GR for balance 2 qty.
    However even when this additional GR is posted, it is appearing as separate line item in PO History also and is not linked to IR1  and qty block against that invoice remains as it is there and it can not be released in MRBR automatic release functionality.
    However, it's working fine in case if there is No GR Based IN activated for PO Line item.
    is it a standard thing that we can't implement Qty blocking scenario ( & obviously it's auto release after reqd GR ) for GR Based IV scene.

    Thanks PRIYA for prompt reply as usual.
    You are right , system will expect additional GR for diff qty.
    However issue is that even I post this additional GR for 2 qty , system is not relasing this blocked invoice automatically in MRBR automatic release function.
    However, if i test same scenario for PO item NOT having GR based-IV tick...system automatically release such qty blocked invoice in MRBR once it find additional GR posted against same PO line item.
    But i case of GR based IV, system is not linking this additional GR to pending qty blocked invoice.
    just FYI, However invoice blcoking due to price variance is working fine ( iwth reqd PO Line item price change, system is able to release this price blocked invoice automatically in MRBR automatic release function.
    I believe you might have qty blocking scenario for GR Based IV cases in your any of previous projects. if yes, pls advise me.
    Thanks in advance.

  • Pending quantity report for a manufacuting firm

    Hi Guys,
    I need a report to know the daily pending quantity report for a manufacturing company..
    I have tried a query and to some extent its working fine.. i need some more changes in the query.
    The report should be look lie below,
    ITEMCODE,ITEMNAME,ORDERED QUANTITY,ORDERED VALUE,SALES QTY(DELIVERED QTY),SALES VALUE,PENDING QTY,PENDING VALUE ,SHORTFALL(IF THE INSTOCK QTY IS LESS THAN PENDING QTY).
    Here there are using 5 different price lists.
    and the above report has to be classifed seperately for each price list seperately and also in the given period if there is a item which has not been ordered then it also be needs to list in the report with eventhoug it dont have any values .
    Could anybody pls modify the below query.
    SELECT T1.ItemCode, Max(T1.[Dscription]) As 'Item Description' ,t3.price as 'Unit Price/PC',Sum(T1.[OrderedQty]) as 'Ordered Qty' ,(Sum(T1.[OrderedQty]) * t3.price ) as 'Ordered Value' , Sum(T1.[Quantity]) as 'Del Qty',(Sum(T1.[Quantity]) * t3.price) as 'Sales Value',(Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) as 'Pending Qty',((Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) * t3.price) as 'Pending Value',T2.OnHand, (T2.OnHand - (Sum(T1.[Quantity]) - Sum(T1.[OrderedQty]))) as 'SHORT'
    FROM ODLN T0 
    INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ITEMCODE = T2.ITEMCODE
    inner join itm1 t3 on t1.itemcode = t3.itemcode
    inner join opln t4 on t3.pricelist = t4.listnum
    WHERE T0.[DocDate] >=[%0] AND  T0.[DocDate] <=[%1] and t4.listname = '[%2]'
    Group By T1.ItemCode,T2.OnHand,t4.listname,t3.price

    Try this query
    SELECT T1.ItemCode, Max(T1.[Dscription]) As 'Item Description' ,t3.price as 'Unit Price/PC',Sum(T1.[OrderedQty]) as 'Ordered Qty' ,(Sum(T1.[OrderedQty]) * t3.price ) as 'Ordered Value' , Sum(T1.[Quantity]) as 'Del Qty',(Sum(T1.[Quantity]) * t3.price) as 'Sales Value',(Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) as 'Pending Qty',((Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) * t3.price) as 'Pending Value',T2.OnHand, (T2.OnHand - (Sum(T1.[Quantity]) - Sum(T1.[OrderedQty]))) as 'SHORT'
    FROM ODLN T0 
    INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ITEMCODE = T2.ITEMCODE
    left join itm1 t3 on t1.itemcode = t3.itemcode
    left join opln t4 on t3.pricelist = t4.listnum
    WHERE T0.[DocDate] >='[%0]' AND  T0.[DocDate] <='[%1]' and t4.listname = '[%2]'
    Group By T1.ItemCode,T2.OnHand,t4.listname,t3.price
    union all
    select B.ItemCode, B.ItemName,D.Price,SUM(C.OnOrder), 0,0,0,0,0,SUM(C.OnHand),SUM(C.OnHand)-SUM(C.OnOrder)
    from OITM B
    INNER JOIN OITW C ON B.ItemCode = C.ItemCode
    INNER JOIN ITM1 D ON C.ItemCode=D.ItemCode
    WHERE B.ItemCode NOT IN (SELECT T1.ItemCode FROM ODLN T0 
    INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ITEMCODE = T2.ITEMCODE
    left join itm1 t3 on t1.itemcode = t3.itemcode
    left join opln t4 on t3.pricelist = t4.listnum
    WHERE T0.[DocDate] >='[%0]' AND  T0.[DocDate] <='[%1]' and t4.listname = '[%2]' )
    GROUP BY B.ItemCode, B.ItemName, D.Price
    Regards,
    Bala
    Edited by: Balakumar Viswanathan on Nov 15, 2010 4:23 PM

  • REPORT-Sales Order Qty minus Delivery Qty

    How to find Sales Order Qty minus Delivery Qty  in a STd report  other than t.code v.02
    THanks in advance
    Paul

    Dear Paul
    The report which you are asking is a Pending Order Report.
    You  better go for a Zreport & call your required fields in the report.
    The selection field will be plant
    Eg: You can incorporate in the report Sales Doc, Order type, Doc date, SP, SH, Region, sales area, material code, material description, Order qty, Pend qty, Pending value, pant, PO ref no., date, Customer currency etc.
    Once all items delivered the doc number wont be in the report.
    Regards
    Deepu Pillai

  • Report to check "Book Qty & Counted Qty" in Warehouse Management

    Hi All,
    In MI24, I can see "Book Qty & Counted Qty" in Inventory Management.
    But, Is there any report to check "Book Qty & Counted Qty" in Warehouse Management.
    If any report is there, let me know the T-Code.
    Regards
    Siva

    if you know the inventory record and the warehouse number, you can fetch the information from table LINV. Input warehouse and inventory record. The fields GESMA and MENGE/MENGA give the book quantity and counted quantity respectively.
    Regards,
    Rajiv..

  • Inventory Aging Report

    Hi Experts,
    I have a requirement to implement Inventory Aging report . The report should show total qty of inventory on hand in buckets of
    (0-30 days), (31-60 days) and so on upto a year for given plant and material .
    I also need to show value of inventory on hand in similiar buckets .
    Is it possible to fullfill this requirement using 2LIS_03_BX extractor ?
    I am assuming the distribution in buckets would need to be done at run time .  If so how to design the buckets in the query ?
    Thanks in advance
    Arun

    You can create this report using IC_C03 not just BX extractor. You need to do the ageing with reference to the materials and then sum to get the value at plant level. 
    For this report to work, its assumed that inventory is managed in FIFO method. The formula is derived with based ONLY on the receipt value. First you need to get the receipt values with reference to the time buckets (0 - 30, 31 - 60, 61 - 90 etc). So restrict the relevent movement types for the std KF - 0RECVS_VAL. Then do the offset in the Calendar day.
    Once you have all the receipt bucket values, then you can create the ageing formula using the if else condition in the query which goes like
    Ageing 0 - 30 ->    ((Receipt value 0 - 30 <= Closing Stock value ) * Receipt Value 0 - 30)+ ((Receipt value 0 - 30 > Closing Stock value ) * Closing Stock value))
    Ageing 31 - 60 ->    ((Receipt value 31 - 60 <= Closing Stock value + Ageing 0 - 30) * Receipt Value 31 -60 )+ ((Receipt value 31 - 60 + Ageing 0 - 30 > Closing Stock value ) * Closing Stock value- Ageing 0 - 30))
    The same formula can be extended up any time bucket you require (Eg Ageing 1Yr - 3 Yr, Ageing 3Yr - 5Yr, Ageing > 5 Yr  etc). provided you make the receipt buckets properly.
    The ageing formula is calculated during the run time, so the query performance can be slightly bad. However there is no standard R/ 3 report equvalent to this. Unless you make a abap report.
    Cheers
    Deepesh

  • Schedule line- Delivery Qty Field Name

    Hi All,
             I need to know the Delivery Qty Field Name in Schedule Line in Order .from the system I took rv45a stru name. But I want to know exact table name and Field Name .
            If it is not stored Directly, then I need to Know how to calculate Delivery Qty.
    With Regards,
    Neptune.M

    Hi,
    LIPS-LFIMG - Actual quantity delivered (in sales units)
    It is in LIPS table pass VBELN AND POSNN to obtain
    SELECT SINGLE * FROM LIPS
                               WHERE VBELN = DTAB-VBELN
                                    AND POSNR = DTAB-POSNN.
        IF SY-SUBRC EQ 0.
          MOVE : LIPS-LFIMG   TO    DTAB-LFIMG.
          MODIFY DTAB.
        ENDIF.
    Reward points if useful
    Lakshmiraj

  • Inventory Closing Balance Report

    Hi gurus,
    I clients want to see Inventory value report as below:
    Item Opening stock Import Qty (Received) Consumed Closing Stock
    Qty. Value Qty. Value Qty. Value Qty. Value
    Received indicates all incoming Qty into Inventory
    Consumed: All outgoing Qty from Sub Inventory/ Org.
    Is there any standard report to extract above data? there are some reports "inventory value report" but not meeting above criteria
    Please advise best report from Oracle apps? and Table?
    Regards
    Chinnu

    Hi gurus,
    I clients want to see Inventory value report as below:
    Item Opening stock Import Qty (Received) Consumed Closing Stock
    Qty. Value Qty. Value Qty. Value Qty. Value
    Received indicates all incoming Qty into Inventory
    Consumed: All outgoing Qty from Sub Inventory/ Org.
    Is there any standard report to extract above data? there are some reports "inventory value report" but not meeting above criteria
    Please advise best report from Oracle apps? and Table?
    Regards
    Chinnu

Maybe you are looking for

  • Mountain Lion install, now having hard drive issues.

    Download of OS X Mountain Lion from the Mac App Store went well, but then went t install it and suddenly I have a big problem with my hard drive. Disk repair can't even solve it. All worked perfectly before this. Ugh. My MacBook Pro is now telling me

  • Templates with sound?  Resolution with 1440x1080?

    SOS. Two problems: 1. I'm trying to save a Motion template with sound. The Motion Untitled document plays OK with sound, but when I save it as a template.... no sound. What am I doing wrong? (The sound is part of an imported QT movie) 2. My client sa

  • Can't see the external disk attached to the TC!!!

    Just bought a TC 1TB today. I put a WD 500G external disk to the usb port of the TC. And i found it ways lost the connection to the WD when i see the two airpot disk in my finder. TC's internal disk is fine and never lost, but i sometimes i can not f

  • Invisible text in received mail

    For a couple of weeks now, many emails that I receive show only part of the body of the messages received. In many, I need to drag the cursor over the body and the text reappears in those spots, almost as if I'm painting them in. Anybody have an idea

  • How to apply XP and GTK look and feel??

    hi.. please tell me how can I apply XP and GTK look and Feel in my Swing applications??