Query for order/delivery turnaround time

Hi, all-
I want to create a query that will show me the turnaround time from the time the sales order is posted to the time the delivery is posted. 
An additional twist:  we often have multiple deliveries on a sales order.  Would need to take all of these into account.
Is it as simple as querying the posting date and the Closed date?  But how would I do this?  Or do I need to somehow pull info from both the SO table and the delivery tables?
Thanks in advance,
Shelby

Shelby,
This is something like calculating Average Days to Pay where you need to find the avg turn around time in case of multiple deliveries for 1 Sales Order.
How do you plan to run this Report.  By entering a period range or by entering a Customer Code or by a Sales Order #
Use this query as an idea for the approach
SELECT DISTINCT T0.DocNum, SUM(DATEDIFF(DAY,T0.DocDate,T3.DocDate))/COUNT(T0.DocNum) AS [TurnAround Days],
COUNT(T0.DocNum) [Number of Deliveries]
FROM
[dbo].[ORDR] T0 INNER JOIN [dbo].[RDR1] T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN [dbo].[DLN1] T2 ON T2.BaseEntry = T0.DocEntry
INNER JOIN [dbo].[ODLN] T3 ON T3.DocEntry = T2.DocEntry
WHERE T0.DocStatus = 'C'
GROUP BY T0.DocNum
Note:  This query will list all the Sales Orders that are closed and will show turnaround days to close the Order completely and the number of deliveries to close the order completely.
Suda

Similar Messages

  • Goods Received Valuation for Order Delivery

    Dear Experts,
    In our business process planned order is created through project system. planned order is converted in to production order. while receiving finished goods throgh production order .
    for exmple:  production order 1:
             In finished good A with moving avg price is Rs150
                               for this we use raw material B  Rs 120
                                 labour & machine                       Rs  20
              toatl production cost is                               Rs  140
    while goods receiving the production order credited with Rs 140.
    For same material again we created one more Production order with another planned order.
                                production order 2:
                      In finished good A with moving avg price is Rs150
                                        for this we use raw material B  Rs 140
                                          labour & machine                       Rs  20
                       toatl production cost is                               Rs  160
    while goods receiving the production order2 credited with Rs 140. which is previous production order1 cost.
    our client wants to credit production2 with Rs 160.
    this credit posting Rs 140 is taken for all production order which is created to mateial finished good A.
    Define Goods Received Valuation for Order Delivery here i assigned the valuation varient to the plant.
    Is there any configuration for this apart from  the valuation type  V in the Material Master.
    Please help on this.  I will be grateful for all of you.
    Thanks and Regards
    Raju

    Hi
    The situation you are describing is a standard behaviour... SAP documentation states that in MTO scenario, your price from 1st goods receipt is used to valuate the subsequent Goods receipts
    I think, both of your production orders pertain to the same project.... Correct me if i am wrong plz...
    If you create another project, 140 will not be used... System will use the price from the 1st goods receipt of that project
    This behaviour is controlled by requirement class settings. Check what requirement class you are using and see what all valuation settings have you made there.. especially in fields "Valuation" and "Without valuation strategy"
    Refer the following path in SAP library or help.sap.com
    - Controlling > Product Cost Controlling > Cost Obj Contr > Product Cost by sales order > Valuated sales order stock >  Std price with valuated sales order stock
    This appllies to both sales order stock and project stock
    This explanation is very detailed and comprehensive... Believe me, these settings are extremely influential  and must be done with utmost care.... Understand this documentation well b4 doing the settings
    Regards
    Ajay M

  • Query for Order recomendation from MRP.

    Good evening,
    Recommendations are saved for the Production and Purchase Order after MRP is done.  New Production and/or Purchase Orders are created in Planned stages.  We need a query for the Alert Management to the users for the new Orders created.
    Please can anyone guide and help me.
    thank you.

    Hi,
    Welcome you post on the forum.
    Try this for production order:
    SELECT T0.DocNum, T0.ItemCode FROM OWOR T0
    WHERE T0.OriginType = 'R' AND DateDiff(dd,T0.DocDate,GetDate())=0
    Thanks,
    Gordon
    Good Morning Sir,
    Thanks for your message, guidance and support for the query.
    The query for the alert for Production is working fine, we just changed the DocDate to PostDate as the Production Order, Posting date is as PostDate.
    We tried to change the OWOR to OPOR and the Origin type to T0.Comments='Origin :MRP' and tried for Purchase Order, but the alert is not visible.  Would it be ok, that we create an UDF and try the same?.
    thanks and warm regards.

  • Batches not getting  for order components at time of order creation

    Hi Folks,
    My requirement is that when I create a production order and save automatic batch determination should take place for all components. For this I have done all the settings for eg
    1) Assigment of batch search proceduree to order type
    2) Define batch search strategy,procedure , condition , access sequence
    3) Create batch strategy record for order type/ plant/component by COB1
    4) Create sort rule and assign to batch strategy record
    5) Batch classification is there and value of the sort chracteristic is populated in all batches
    6) There is enough available stock in the batch at that storage location
    But batch field is not getting populated .. Even if I press the batch determintion button manually
    on the component overview screen batch selection screen is appearing but no batches are getting determined for selection .I have checked the selection criteria and it is correct and I was expecting batch 'ZSWETA' to b determined as it is satisfying the selection criteria. I am really wondering why this is happening as I have done all the required config settings but batch determination is not happening..
    Can you please help me out of this...
    Regards
    Suchandra

    Hi,
    kindly check the following things-:
    Material master -: Purchasing View tick in check box of Batch Management
                               MRP 2 -:Batch Entry(Select 3-Auto Batch entry on Release)
                              Work Scheduling -: Batch Entry & Batch Management.
    hope it will help you to get the auto Batch Number.
    Regards,
    Mukesh

  • Approval Query  for Sale Delivery Problem

    Hello,
    I have to set approval procedure of Sale Delivery in following condition
    If i add sale order for Specific item for 10 Qty for example C01 customer & after that i add sale order for same item qty 10 for another customer ie C02 & i have stock for that item 50 but user give delivery first to C02 in staid of C01 but C01 give me first order
    on this condition i have to set approval user can't deliver second sale order first he have to take approval from manager to do this & he deliver first order first then then don't have to need approval.
    Can any one help me?

    Hi,
    Row level approval is not possible in SBO.
    You may check this for your reference: http://www.beonesolutions.com/ip/Solutions/ap.html
    Thanks,
    Joseph

  • How to build MDX query for two periods of time?

    I have the following MDX:
    SELECT NON EMPTY
    [Measures].[Returns],
    [Measures].[Returns]
    ON COLUMNS,
    NON EMPTY
    ([Employees].[Company].[Company].ALLMEMBERS )
    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM
    SELECT
    STRTOSET("[Exec Date].[Hierarchy].[Month Num].&[2014]&[1]", CONSTRAINED)
    ) ON COLUMNS FROM [cbSales]
    WHERE
    IIF(
    STRTOSET("[Exec Date].[Hierarchy].[Month Num].&[2014]&[1]", CONSTRAINED).Count = 1,
    STRTOSET("[Exec Date].[Hierarchy].[Month Num].&[2014]&[1]", CONSTRAINED),
    [Exec Date].[Hierarchy].currentmember
    Both columns shows returned data for month 2014/01
    I want to have data for the next month (2014/02) in the second column.
    How can I change the query to achieve my goal.

    Hi,
    To achieve this you need to create another measure with the help of ParallelPeriod function. Check the following example;
    WITH MEMBER [Measures].[Sales Amount Current] AS [Measures].[Sales Amount]
    MEMBER [Measures].[Sales Amount Next] AS ([Measures].[Sales Amount], PARALLELPERIOD([Date].[Calendar].[Month],-1, [Date].[Calendar].CURRENTMEMBER)), format_string = "Currency"
    MEMBER [Measures].[Current Month] AS [Date].[Calendar].CURRENTMEMBER.Member_Caption
    MEMBER [Measures].[Next Month] AS PARALLELPERIOD([Date].[Calendar].[Month],-1, [Date].[Calendar].CURRENTMEMBER).Member_Caption
    SELECT {[Measures].[Current Month], [Measures].[Sales Amount Current], [Measures].[Next Month], [Measures].[Sales Amount Next]} ON COLUMNS,
    {[Product].[Category].[Category].MEMBERS} ON ROWS
    FROM [Adventure Works]
    WHERE [Date].[Calendar].[Month].&[2007]&[10]
    For ParallelPeriod specify -1 for "Numeric Expression" to navigate forward of the date hierarchy.
    Best regards,
    Chandima
    Thanks, nice answer

  • Query for orders booked in last 30 minutes

    Hi all
    Can you please help me with query. I need info about all orders booked in last 30 minutes.
    Thanks

    Can you give me the query
    i know if it orders booked in last one day booked_date>sysdate-1. But how about minutes.

  • VTFL transaction - multiple billing documents for same delivery

    Hi all,
            Iam using the transaction VTFL for Order, Delivery and Billing. When the routines 03 and 04 are used, we need to ignore POD ( Proof Of Delivery ). So, for this,  I have used routines 09 and 10. POD issue is resolved. But another issue is raising. When I generate the billing document for the delivery, multiple billing documents are generating. I mean, for some delivery, if already a billing document is created, when we again try to generate the billing document ( VF01 ) for the same delivery or order, it is generating the different billing document.  I need to control this.
    Please guide me in this regard,
    Thanking you,
    Regards,
    Murali Krishna T

    Pl. check delivery for incompleteness, if delivery is incomplete then shippment is not allowing delivery, Check route, vehicle number, vehicle details.
    Hope this will help u.
    Jyotsna

  • Ordered delivery logic

    I have an orchestration that receive a message from the message box with the ordered delivery option set to true. After processing, the message has to be sent to an external system ( Request Response ).
    My question is: should i activate the ordered delivery option within the send port too ?
    N.B : this orchestration is not using convoy or correlation techniques.

    Hi Aheriz,
    Ordered delivery in your case isn't really helpful. As whenever a new message comes in, it will initiate a new instance of your orchestration which are independent. So there is really no reference for Ordered delivery.
    If you want to First IN First Out then I guess you will have to implement singleton orchestration. Have a look at
    Example.
    Maheshkumar S. Tiwari| http://tech-findings.blogspot.in/

  • Issue at the time of creation of transfer order for inbound delivery

    Hello,
    I am facing one issue at the time of creation of transfer order for inbound delivery.
    If I create inbound delivery for purchase order with account assignment as 'M' (Ind. cust. w/o KD-CO), inbound delivery is not updated. Also document flow for inbounde delivery s not updated. I can create N number of transfer orders for on inbound delivery. Need help to resolve issue.
    If I create inbound delivery for purchase order with account assignment other than 'M' (Ind. cust. w/o KD-CO), inbound delivery and document flow is updated.
    Thanks and Regards,
    Nikhil

    Hi
    In OMS2 t-code
    for your material type and  plant ,you have to mark value based and qunaity based updation mark
    Regards
    kailas Ugale

  • Query for Sales Order Analysis

    Dear Experts
    I have written a Query for Sales Order Analysis and would like to have help on this.
    The query is used for generating daily report for Sales Order on number of documents (Sales Order), total amount of sales orders and total GP of Sales Order. The query is written as below:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum] ORDER BY T0.[DocNum]
    where U_Total_GP is a UDF for storing the GP of each order.
    After executing the query, a selection criteria of date appears and after a date is selected, the report shown information required. However, the query does not calculate column total for total amount and total GP. Although I know the total for each column can be displayed by pressing "Ctrl" + Click on the column title, it would have to be done from time to time.
    Therefore, I would like to modify my query in order to calculate the column totals when executed. Are there any suggestions for this?
    Thank you
    Regards
    Elton

    Hi Elton,
    Try this:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
    Union ALL
    SELECT '', SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0]
    ORDER BY T0.[DocNum]
    Thanks,
    Gordon

  • Inbound idoc for updating delivery date of purchase order

    Hi All,
    Our vendor sends a delivery file consisting of delivery date and quantity(could be partial) for line items of a purchase order.
    I need to update the Purchase order line item with the delivery date and quantity sent from the Vendor. It should add a new confirmation line with custom confirmation category in the confirmation tab of the line item in the Purchase order.
    Each time we get a delivery file we need to add a new confirmation line in the confirmation tab of the purchase order line item.
    How can I get this working using inbound idoc processing? Which Idoc type should I use to solve my issue. Will ORDERSP work for my scenario?
    Thank you,
    Sonali.

    >
    sonali ashi wrote:
    > We have all EDI set up done for ORDERSP idoc in our system. Problem when I use this idoc type by default system is always adding confirmation catgeory 'AB' but we want our custom  category to be added instead of 'AB'.
    > Edited by: sonali ashi on Dec 23, 2010 9:47 PM
    Confirmation category used for order acknowledgement is define in configuation. You can change that from AB to your custom condition and EDI should pickup that.
    SPRO->Material Management->Purchasing->Confirmation->Define Internal Confirmation Category
    >
    sonali ashi wrote:
    > I have also noticed that 'AB' confirmation accepts only full quantity order acknowledgement through Idoc processing.
    > Manually I can add a "AB" confirmation for partial quantity but in the idoc processing it fails.
    > Edited by: sonali ashi on Dec 23, 2010 9:47 PM
    Check tolerance limit defined for confirmation category in 'Conformation Control' Node in SPRO at same level as above.
    Regards,
    Pawan.

  • Report or Query for analysing Changes made in a Purchase Order

    Hi All,
    Item changes to a PO can be seen easily by using Environment-->Item Changes.
    Is there a way to use this as a query or report so it is possible to search many PO's at the same time to find the date of a specific change. For example, delivery date completed flag set to complete, see the date this was made.
    Thanks.

    Hi,
    SAP has provided two reports that you can use for capturing all changes you have made to your POs -
    1)   RSSCD100; and
    2)   CHANGEDOCU_READ
    Both reports shall be run with Object Class EINKBELEG.
    Cheers,
    HT

  • Table name for purchase order delivery fields

    Hi Gurus,
    Can you please tell me the name of the tables and the joining condition for purchase order delivery details like Name, street , city, postal code, address detail and the joining condition?
    Regards
    MD. SAMY

    Hi MD. SAMY,
    1. Table EKPO has details lat line item level.
    2. You must make a simple ABAP program in the infosets (or functional area) that contain a line "addrnumber = ekpo-adrnr" while addrnumber is ADRC table field.
    3. Choose fields that you want in ADRC and put it into new fields (e.g. : DELI_NAME2 = adrc-name2., etc)
    4. The new field attribute must be maintained in the infosets (in EXSTRA).
    5. Now in the query you have those fields.
    Regards,
    Sameer

  • HT1438 Estimated cost and turnaround time for new iPad screen replacement?

    Looking to see what others have experienced in roundabout cost and turnaround time for screen/glass replacement on new iPad... Everything else seems to be in working order...

    Apple's Limited Warranty http://www.apple.com/legal/warranty/ for iPad excludes coverage for damage resulting from accident, disassembly, unauthorized service and unauthorized modifications.
    Apple will provide a replacement iPad for:
    iPad model
    Out-of-Warranty Service Fee
    New iPad
    $299
    iPad 2, iPad
    $249
    You can get the glass replaced at 3rd party repair sources for less $, however, the Apple warranty will be voided.
    iPad Repair & Screen Replacement Services
    http://www.ifixyouri.com/16-ipad-repairs
    RepairZoom iPad Repair
    http://www.repairzoom.com/ipad-repair.html
    Mission Repair
    http://www.missionrepair.com/Apple_iPad_Repair_Services_s/431.htm
     Cheers, Tom

Maybe you are looking for

  • Apex in iframe broken in 4.1?

    Hi, I am experiencing a strange problem after I upgraded Application Express to 4.1. Every new application I create, will not work in an iframe. The frame shows up as empty (with chrome's element inspector showing the content as simply <html><head></

  • Restricting List of credit card displayed while creating Order

    Dear All,        We have an issue where there are various different payment card types setup in SAP CRM for transaction TA. Among these all payment cards setup, I want to restrict and show only a few for US Sales Org and rest of them for UK sales org

  • Confusion over permissions authentication in Get Info...

    Hi, It just occurred to me I've never satisfied myself as to why, when attempting to alter the permissions on a file or folder that the current user owns and has read/write privileges to, it is necessary to authenticate using an Admin username and pa

  • OSPF problem: Neighbor Down 1-2 times per day

    Hi We have 4 devices are running OSPF (3 cisco routers and 1 Juniper firewall as show in attachment file). In last few months, we got Neighbot Down message almost 1-2 times per day. Network between them interrupt for a short time and even monitoring

  • GW 8/Word 2007 E-Mail Merge

    Running Windows 7, GW 8.01 and Word 2007 SP1. Trying to run a mail merge that will send the merge via e-mail. GW is configured as the default MAPI application. While it appears to process something, messages are never sent. Nothing in Sent Items, not