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

Similar Messages

  • Pending Order Report for Milestone Value - Order Related Billing

    Hi Experts,
                    Is there any Report for Pending Order Value  for billing for Order Related Billing
    Thanks,
    Tom

    HI,
    Please raise message to SAP through service marketplace.
    Thanks,
    Vrajesh

  • Report for showing pending (ageing) quantity according to store location w

    dear ABAP Gurus,
    I have made a roport for showing pending (ageiing) quantity acc to location wise.
    and i m sending here the code i made for same.Tell me if sme amendments required.
    Report for showing pending (ageing) quantity according to store location wise:   
    1.     Fields on selection screen (input screen) : Plant code From to , Material code From to , Current date, Numbers of days(for display the ageing(pending) balance for a given period,Storage locations from to.
    2.     Field in the output List : Material code , Material descriptions, Balance quantiy,Balance value ,Consumptions date. 
    the code is:
    REPORT  ZAGEIN_SUDHA.
    TABLES: mara,mseg,makt.
    TYPES: BEGIN OF t_mara,
    matnr LIKE mara-matnr,           "material number
    maktx LIKE makt-maktx,           "material description
    ersda LIKE mara-ersda,           "material creation date
    lgort like mseg-lgort,           "storage location
    bwart like mseg-bwart,           "goods received or issued
    menge like mseg-menge,           "value at movement type
    werks like mseg-werks,           "plant
    END OF t_mara.
    DATA: i_mara TYPE STANDARD TABLE OF t_mara with header line,
          itab type standard table of mara with header line,
    *wa_mara TYPE t_mara,
    v_date TYPE i,                      "age in days
    GI type mseg-menge,                 "goods issued
    GR type mseg-menge,                 "goods received
    bal type mseg-menge,                "balance
    total type i,
    grace type i,
    g_quan type mseg-menge.
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECT-OPTIONS: p_matnr FOR mara-matnr.
    select-options: p_werks for mseg-werks.
    select-options: p_lgort for mseg-lgort.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
    REFRESH i_mara.
    SELECT mr~matnr                        "mara-matnr
    mk~maktx                               "makt-maktx
    mr~ersda                               "mara-ersda
    mg~lgort                               "mseg-lgort
    mg~bwart                               "mseg-bwart
    mg~menge                               "mseg-menge
    INTO corresponding fields of table i_mara
    FROM mara AS mr INNER JOIN
    makt AS mk
    ON mrmatnr = mkmatnr INNER JOIN mseg AS mg on mkmatnr = mgmatnr
    WHERE mrmatnr IN p_matnr and mgwerks IN p_werks and mg~lgort IN
    p_lgort.
    total = 0.
    IF sy-subrc = 0.
    *CLEAR wa_mara.
    LOOP AT i_mara.
    if i_mara-bwart = '101' .
    GR = total + i_mara-menge.
    total = GR.
    elseif
    i_mara-bwart = '102' or i_mara-bwart = '122'.
    GR = GR - i_mara-menge.
    endif.
    if i_mara-bwart = '261'.
    GI = total + i_mara-menge.
    elseif i_mara-bwart = '262'.
    GR = GR + i_mara-menge.
    endif.
    bal = GR - GI.
    if bal GE  GR.
    grace = 30.
    else.
    grace = 10.
    endif.
    g_quan = bal - GR.
    v_date = sy-datum - i_mara-ersda.
    endloop.
    WRITE: / i_mara-matnr ,i_mara-maktx,' is ',v_date,' ,days old  and
    stored at' ,i_mara-lgort ,   ' with balance =', bal ,'the grace time is
    ', grace, 'and' ,'grace quantity is ' ,g_quan.
    *ENDLOOP.

    Hi,
    That sounds like a nice report.  What about it?!
    Gareth.

  • Report for showing pending (ageing) quantity according to store location wi

    Report for showing pending (ageing) quantity according to store location wise:   
    Fields on selection screen (input screen) : Plant code From to , Material code From to , Current date, Numbers of days(for display the ageing(pending) balance for a given period,Storage locations from to.
    Field in the output List : Material code , Material descriptions, Balance quantiy,Balance value ,Consumptions date.

    Hi,
    That sounds like a nice report.  What about it?!
    Gareth.

  • Pending Quantity in PO for stock transfer

    Dear All,
    I want to know the pending order quantity for stock transfer orders (plant to plant),I have tried
    ME80FN,ME2L Etc. but all report are showing the pending quantity only after MIGO done by
    the receiving plant.
    Our requirement is like this that one plant created one stock transfer order to one
    plant and he want to know the actual pending order quantity as on date considering
    by deducting stock in transit (5B5T) (i.e. PO quantity 100 pcs - quantity delivered 50 pcs then actual
    pending quantity should be 50 pcs but in mentioned report it is showing 100 pcs pending).
    Please note in our case in every PO more than 800 line items are there.
    Can any one inform me about standard report or any table where net pending quantity are getting
    stored.I have checked table EKBE,MARD,MARC.
    Regards,
    SP Shukla.

    Hi,
    In mb5b u give movement type & check
    Generally i do not think there is a  std report, this we also faced, we developed a report with the help of ABAPer
    Pandari

  • A report on pending quantity according to store locationwise

    hello!!
    i m seeking for a guideline to make a report on pending quantity according to store locationwise.
    regards,

    Hi,
    That sounds like a nice report.  What about it?!
    Gareth.

  • Pending Quantity for Receipts

    Hi all,
    I am trying to create a report in Receivables which tracks the Receipts having Pending Quantity i.e, Quantity_Received - Quantity_Accepted = Quantity_not_Inspected.
    Can anyone tell me weather any standard oracle report is there for reference.
    Thanks in advance.

    Hi Ketter,
    Can u please send me the Query.
    I have used this Query....
    SELECT A.RECEIPT_NUM, A.ITEM_DESCRIPTION, A.CREATION_DATE, A.TRANSACTION_TYPE, NVL(A.QUANTITY,0) QTY_RECD,
    NVL(B.TRANSACTION_TYPE,'IN RECEIVING') TRANSACTION_TYPE,
         NVL(B.QUANTITY,0) QTY_ACPTED, ABS(NVL(A.QUANTITY,0)-NVL(B.QUANTITY,0)) QTY_NOT_INSP, A.UNIT_OF_MEASURE, NVL(A.PO_UNIT_PRICE,0) PO_UNIT_PRICE,
         A.CURRENCY_CODE, NVL(A.RATE,0) RATE, NVL(A.VALUE,0) VALUE
    FROM
         (SELECT RSH.RECEIPT_NUM RECEIPT_NUM, RSL.ITEM_DESCRIPTION ITEM_DESCRIPTION, RT.SHIPMENT_LINE_ID SHIPMENT_LINE_ID,
    RSH.CREATION_DATE CREATION_DATE,
         NVL(RSL.QUANTITY_RECEIVED, 0) QUANTITY, RT.UNIT_OF_MEASURE UNIT_OF_MEASURE, NVL(RT.PO_UNIT_PRICE, 0) PO_UNIT_PRICE,
    RT.CURRENCY_CODE CURRENCY_CODE,
         NVL(RT.CURRENCY_CONVERSION_RATE,0) RATE, NVL(RSL.QUANTITY_RECEIVED * RT.PO_UNIT_PRICE * RT.CURRENCY_CONVERSION_RATE ,0) VALUE,
         RT.TRANSACTION_TYPE TRANSACTION_TYPE
         FROM RCV_TRANSACTIONS RT, RCV_SHIPMENT_HEADERS RSH , RCV_SHIPMENT_LINES RSL, RCV_SUPPLY RS
         WHERE RSH.SHIPMENT_HEADER_ID = RT.SHIPMENT_HEADER_ID
              AND RSH.RECEIPT_NUM IS NOT NULL
              AND RSL.SHIPMENT_LINE_ID = RT.SHIPMENT_LINE_ID
    AND RS.RCV_TRANSACTION_ID = RT.TRANSACTION_ID
    --          AND RSH.RECEIPT_NUM BETWEEN :P_FROM_RECEIPT_NUM AND :P_TO_RECEIPT_NUM
    --          AND RSH.CREATION_DATE BETWEEN :P_FROM_DATE AND :P_TO_DATE
    &LP_DATE
    &LP_RECEIPT_NUM
    -- &LP_ORG_ID
              AND RT.ORGANIZATION_ID LIKE DECODE( :P_ORG_ID, NULL, '%', :P_ORG_ID)
              AND RT.TRANSACTION_TYPE NOT IN ('ACCEPT', 'DELIVER','REJECT' )     
         ORDER BY 1) A,
         (SELECT RSH.RECEIPT_NUM RECEIPT_NUM, RSL.ITEM_DESCRIPTION ITEM_DESCRIPTION, RT.SHIPMENT_LINE_ID SHIPMENT_LINE_ID,
    RSH.CREATION_DATE CREATION_DATE, NVL(RSL.QUANTITY_RECEIVED, 0) QUANTITY,
                   RT.UNIT_OF_MEASURE UNIT_OF_MEASURE, NVL(RT.PO_UNIT_PRICE, 0) PO_UNIT_PRICE, RT.CURRENCY_CODE CURRENCY_CODE,
                   NVL(RT.CURRENCY_CONVERSION_RATE,0) RATE, NVL(RSL.QUANTITY_RECEIVED * RT.PO_UNIT_PRICE * RT.CURRENCY_CONVERSION_RATE ,0) VALUE,
                   RT.TRANSACTION_TYPE TRANSACTION_TYPE
         FROM RCV_TRANSACTIONS RT, RCV_SHIPMENT_HEADERS RSH , RCV_SHIPMENT_LINES RSL, RCV_SUPPLY RS
         WHERE RSH.SHIPMENT_HEADER_ID = RT.SHIPMENT_HEADER_ID
              AND RSH.RECEIPT_NUM IS NOT NULL
              AND RSL.SHIPMENT_LINE_ID = RT.SHIPMENT_LINE_ID
    AND RS.RCV_TRANSACTION_ID = RT.TRANSACTION_ID
    --          AND RSH.RECEIPT_NUM BETWEEN :P_FROM_RECEIPT_NUM AND :P_TO_RECEIPT_NUM
    --          AND RSH.CREATION_DATE BETWEEN :P_FROM_DATE AND :P_TO_DATE
    &LP_DATE
    &LP_RECEIPT_NUM
    -- &LP_ORG_ID
              AND RT.ORGANIZATION_ID LIKE DECODE( :P_ORG_ID, NULL, '%', :P_ORG_ID)
              AND RT.TRANSACTION_TYPE NOT IN ('ACCEPT', 'RECEIVE','REJECT','TRANSFER')
         ORDER BY 1) B
    WHERE A.SHIPMENT_LINE_ID = B.SHIPMENT_LINE_ID(+)
    AND ABS(NVL(A.QUANTITY,0)-NVL(B.QUANTITY,0))>0
    ORDER BY 1
    Regards,
    NRK

  • Report for open purchase order quantity

    Dear experts,
    Is there any report for showing open purchase order quantity for which goods are not yet received?
    Regards
    babu

    Hi
    ref the blw link which will have the complete sap std reports
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/erplo/sapStandardReports

  • Report to view pending Purchase Order for Release

    Hi,
    Is there any sap standard report through which we can view pending Purchase Order for Release.
    Regards,

    Hi,
    you can use transaction ME28, this can give information of pending purchase order for release on release level.
    but this transaction is used for releasing the collective release for purchase order. this is not an report.
    if you want transaction for reporting purpose only, you need to create a report or query on EKKO table. based on release indicator.
    vikas,

  • Report for PO wise balance order quantity with delivery due date

    Dear Sir,
    How can we get a Report for all POs ,showing Vendor wise / PO wise  / Item wise balance item quantity along with the Delivery Due Date
    With Thanks and Regards
    B Mittal

    Dear Mr Charlie
    ME2L with Parameter WE101 and Scope EINT , do not give balance PO item quantity .We look for areport which can give PO wise balance item quantity and delivery schedule date .
    Rgds
    B Mittal

  • Report for POs pending Release (approval) and POs overdue (past deliv date)

    Hi All,
    In ME2N - std report for POs. How do I set the selection critieria in order to get the following information
    1. POs pending Approval (subject to Release Strategy)
    2. POs pending delivery from Vendor where the delivery date requested in the POs is past. (How does Selection parameter WE101 help in this report.? How to show how many days past requested delivery date in the PO?)
    Thanks in advance

    Dear,
    1. POs pending Approval (subject to Release Strategy) : -
    Enter ME2N, select Dynamic Selection.
    Here click on Purchasing Document Header,
    Double click on Release Indicator field and assign "X" ,
    Then souble click on Subject to release and also give "Yes" indicator then click on execute you get list of purchase order which is unrelease.
    2) POs pending delivery from Vendor: -
    Enter ME2N, Select selection parameter WE101,
    Here you can find list of pending purchase order, You can see document date or delivery date from change layout to find out how it is past.
    Regards,
    Mahesh Wagh

  • Interactive Report for Pending Order

    Hi Gurus,
    Iam new to ABAP.
        I have Requirement to display the Interactive Report for Pending Order Status Report which displays pending of purchase orders for material wise and Vendor wise .Using ALV. Can Any one help ...me which table data i need to read and what are the field required.
      Thanks in advance.

    Hi G K,
    For pending order : VA05 (select open sales orders).
    cheers,
    Hema.

  • Report for Pending MIRO

    Hi,
    I am creating a Infoset Query for Pending MIRO report means PO + Vender whose GR has done but not MIRO.
    i use EKKO and EKBE.....
    Can any other table should me used.......Please suggest !
    REgards,
    Pardeep Malik

    Hi,
    1.Goto MB5S.Execute the report.
    2.Then select current display variant, a screen will be dispalyed in this select position.It will show the column cotent
    3.Select the input u require and transfer them to the left side byclicking the < .U fields will be transferred.
    4.Then click on copy
    5.Then go to settings at the top,then sElect layout then save.
    6.Give the layuot name & save, & come out of the screen.
    7.Now again goto MB5S ,in the bottom select ur lay out and execute u will get the report based on the layout created by use.
    Date range not possible.
    murugan

  • Report for pending approval absences

    Dear all Gents ,
    I want to create report for all types of employees absences which are pending approval and approved and every thing , any one has a select statement for this please ?
    thank you

    You have to query : per_absence_attendances table for applied leave
    and HR_API_TRANSACTION Table for pending approval leave.
    Thanks

  • Report for pending delivery

    Hi Experts,
    We have requirement,  SAP report for pending delivery - to help customer reconcile on what is pending for deliveries.
    I have used standard Tcode VL06 and VL06O but seeing all deliveries.
    Kindly let me know how to configure a report or t code so that  I should be able to see only pending delivery based on sales order.
    Regards,

    Hi DSP
    If I understood your requirement correctly, you are sending the sales orders to the dispatcher, based on those sales orders dispatcher has to create the deliveries only for those items which are going to be shipped today (i.e. GI to be posted today) so that he can optimized the transporation etc.
    For this requirement I think you can use VL04 transaction code and give input as shown in below screen shot. The inportant thing to note here is that, system selects only those line items from a sales order which has a GI date less than or equal to the date given in below screen.
    i.e. if your sales order has a 2 line items
    Line item 1 has GI date = 19.08.2014
    Line item 2 has GI date = 22.08.2014
    then as per below input  i.e. GI date = 22.08.014 system will create a delivery for both the line items
    If you give GI date = 19.08.2014 in below selection screen then system will create a delivery only for line item 1.  Please try and let me know

Maybe you are looking for

  • How to set custom shortcuts for Styles in Pages 5.1?

    I just updated Pages to version 5.1. It said, that it will bring back the feature where you can use different shortcuts for specific styles. How can you do that? Anyone figured it out yet? Thanks, Mark

  • Bpel parsing issue with special characters...

    Hi All, We are integrating Oracle Sales Order information with OTM as Order Releases. For this we are sending the Sales Order in the form of clob from the procedure to the Bpel process. 1. A PL/SQL procedure would send the Sales order XML as a CLOB.

  • Dynamic list population in forms 4.5

    Hi all, I'm trying to populate the list at run time, but always the error , FRM-41337. In 6i the same code works. Please help me with an example. the situation, the list poulates all units defined in the master table Thanks in advance

  • Mapping PRE to COS

    Hi. Could someone confirm if Mapping from EXP to PRE to COS is automatic in any router? in my case I am ussing an 7600 with SIP-400. In other case I am ussing the same 7600 with a WS card. I am worried about the mapping between PRE to COS. Tranks.

  • Saving as Disc Image hangs/freezes and must force quit to exit

    Hi, I've always been able to Save as Disc Image in order to make multiple copies. Now, it runs fine all the way until it gets to "Burn - Current Operation: Writing" where it freezes indefinitely. The beachball turns so I eventually have to force-quit