Sales back Order Query

Hi All
I am having an issue with a query im doing for a customer for sales back orders.
The customer does not want to use the current back order report in Business one.
What they essentially want is to see only the items on back order where that  sales order already has a delivery to it.
They do not want to see sales order that havent been delivered at all.
This is what i have so far.
it does pick up items where there is a balance to be delivered...however, it does not pick up the lines that have not been delivered at all
select T0.Docnum as "Sales Order Num", CAST(T0.DocDate as DATE) as "Sales Order Date", T1.ItemCode, T1.Dscription, T1.Quantity, T1.OpenQty from ORDR T0 inner join RDR1 T1 on T0.DocEntry = T1.DocEntry
where T1.TargetType <> '-1' and T1.LineStatus <> 'C'
Not to sure what I am missing.
Your help will be appreciated.
Thank you
Jerusha

Hi
I need the query to pick up the sales orders with items that have a partial delivery as well as the items on the sales order that havent been delivered at all. However it should not pick up sales orders where no delivery notes has been added at all..i.e no target document for any of the lines
eg
Sales order 1
ItemCode     Qty     Delivered
Item 1           10         2
Item 2           10       10
Item 3           10        0
Sales order 2
ItemCode     Qty     Delivered
Item 1           10        0
Item 2           10        0
Item 3           10        0
so the query should only pick up sales order 1 with lines item 1 and item 3.
Hope this makes more sense..
Thank you for your help so far.
Jerusha

Similar Messages

  • Back Order Report/Query

    Hi Experts,
    I have a client who do not want the Open Sales Orders that is past it's due date to show up on the Sales Back Order report.
    I run into some difficulties with the querie:
    When I use the Open Quantity and Deloivered Quantity fields in the query it will also bring back the Open SO with no Deliveries linked.
    SELECT T1.[DocNum], T1.[CardCode], T1.[CardName], T1.[DocDate], T1.[DocDueDate], T0.[ItemCode], T0.[Dscription] FROM [dbo].[RDR1]  T0 INNER JOIN ORDR T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[LineStatus] = 'O' AND T0.[Quantity] <> '0'
    When I use the RDR1 and DLN1 base entry link, it will also show the lines that are already delivered in full.
    SELECT T1.[DocNum], T1.[CardCode], T1.[CardName], T1.[DocDate], T1.[DocDueDate], T0.[ItemCode] FROM RDR1 T0  INNER JOIN ORDR T1 ON T0.DocEntry = T1.DocEntry INNER JOIN DLN1 T2 ON T2.BaseEntry = T0.DocEntry and T2.BaseLine = T0.Visorder
    How do I get a query that displays only the Sales Orders that have Backorders, without also showing the Sales Orders that have nothing delivered but is past due date?
    Your help will be greatly appreciated.
    Thanks,
    Marli

    Please check this thread:
    Customized Back Order Report
    Thanks,
    Gordon

  • Monthly Sales Order query Doc Status problem

    Hi Experts,
    I am having an problem while making a total monthly sales order query in which I am not getting the document status which are Open - Printed. Also note that these document which are open printed are not having any target document.
    SELECT T0.[DocStatus],T1.[TargetType],T0.[CANCELED],T0.[CardCode], T0.[CardName], T0.[NumAtCard], T5.[SeriesName], T0.[DocNum], T0.[DocDate], T0.[DocDueDate], T0.[DocTotal],T0.[Max1099]'Total Before Discount',T0.[TotalExpns],T4.[descript]'Territory',T2.[SlpName]'Employee Name'
    ,T0.[discsum]  FROM ORDR T0  ,RDR1 T1,OSLP T2,OCRD T3,OTER T4,NNM1 T5  where  T0.DocEntry = T1.DocEntry AND T0.SlpCode = T2.SlpCode AND T0.CardCode = T3.CardCode
    AND T3.Territory = T4.territryID AND T0.Series = T5.Series and T0.[CANCELED]='N' and T1.[TargetType] is not null
    My mission for the above query is to have Total Monthly Sales Orders with value exluding the cancelled and closed sales sales ( close here means - which are manually done by right click on sales order screen and selecting Close )
    Please guied how to solve this issue because in the back end for Sales Order which have turned to deleivery are showing doc status as closed and the sales order which are manually closed are also showing doc status as closed. How to diffrentiate between them.
    Waiting for a positve feedback.
    Regards,
    Rahul

    Try this one:
    SELECT DISTINCT T0.[DocStatus],T0.[CardCode], T0.[CardName], T0.[NumAtCard], T5.[SeriesName],
    T0.[DocNum], T0.[DocDate], T0.[DocDueDate], T0.[DocTotal],T0.[Max1099]'Total Before Discount',
    T0.[TotalExpns],T4.[descript]'Territory',T2.[SlpName]'Employee Name',T0.[discsum]
    FROM DBO.ORDR T0
    INNER JOIN DBO.RDR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN DBO.OSLP T2 ON T0.SlpCode = T2.SlpCode
    INNER JOIN DBO.OCRD T3 ON T0.CardCode = T3.CardCode
    INNER JOIN DBO.OTER T4 ON T3.Territory = T4.territryID
    INNER JOIN DBO.NNM1 T5 ON T0.Series = T5.Series
    where  T0.[CANCELED]='N' and T1.[TargetType] != -1
    Thanks,
    Gordon

  • Query to match incoming shipment with back ordered products

    Hi all,
    I would like to create a query that matches up an A/P Invoice for goods received in on shipment to any goods on backorder.  I would like to do this by matching up the item codes from the A/P Invoice to the item codes from the open Sales Orders.  I would like this to show the customer who has an open order, the posting date of that order, the item code/description/quantity of the open goods (that are matched by the incoming shipment) and sorted by date.
    any help would be greatly appreciated
    thanks,
    Hayden

    Hi Gordon,
    When we order goods, we create a Purchase Order, and when we receive the goods we create an A/P Invoice so B1 updates the inventory and to make a payment for the goods.  What I would like to do is then have a query ready so that when we receive the shipment we can see, based on Sales Orders that are still open, which customers have goods on back order that we can now fill because of the new shipment.  I am doing this by trying to join the RDR1 table with the POR1 table using the ItemCode field, but neither Query Generator or Query Wizard allow this relationship.
    I hope this helps clarify, and if you have any ideas that would be great.
    Thanks,
    Hayden
    Edited by: Todd Linscott on Jul 12, 2011 7:38 PM

  • Query to get Back to back order details

    Hello Experts,
    Can any one help with query to show back to back orders linking. E.g sales order creates B2B puchase order and then further sales purchase transaction and client want sales order and Po details with sales invoices.
    Can anyone provide information how sales order will be linked to B2B Po?
    Regards,
    Preeti

    Hi Preeti,
    Check http://wiki.sdn.sap.com/wiki/display/B1/SAPB1SQLD-SLCalculateSalesprofitabilitybasedonB2B+Orders for back to back order linking.
    Thanks,
    Neetu

  • Open sales order and back orders

    hi ,
    what is the difference between open sales order and back orders?
    thanks
    ganesh

    Hi Ram,
    A open sales order  is the one which is not yet delivered that means u have only created a sales order and saved it( create a sales order, save it and see the document flow, the order shows as open)
    Back order is also an order which is not completely fulfilled. may be because of the target quantity or because of not meeting the requested delivery date.
    in this case you will pull back the required quantity from other sales order(open sales orders) this is done using T.Code CO06.
    cheers,
    anil.

  • How to get the back order quantity for sales Order

    Hi Friends,
    I want to get the back order quantity for sales order . in MD04 t-code,
    there is a field(MDEZ-MNG01) for Received Qty/ Required qty.  But MDEZ is a structure.
    I tried from MDTB table, but the table is not updated with the values in MD04.
    Please guide me from which table I can get the back order Qty for sales Order
    (ref: t-code  MD04, MRP element = CusOrd).
    Thanks,
    Sagar

    >
    VIdya Sagar wrote:
    > Hi,
    >
    > Isn't  there any difference b/n Open Sales Order and Back order??
    Yes Quite Difference.
    Read:
    http://www.sap-img.com/sap-sd/explain-the-meaning-of-an-open-sales-order.htm
    http://help.sap.com/saphelp_sbo2005asp1/helpdata/en/b6/bdb9b2f02842348c9edbe78af863c4/content.htm

  • Third party Sales Orders in V.15 Back Order Report

    Hi,
    Is there any standard setting to incorporate undeliverd third party sales orders in the standard V.15 backorder report.
    I need to get the list of third party SOs which are backordered???  similar to drop ship and stock orders (TAB & TAN).

    As per my knowledge, in standard Third party Sales Orders process,
    -On availability check.
    -there is no GI.
    -no movement type.
    -TAS - I Cat - is not relevant for delivery.
    The Standard process is
    Create Third Party Sales Order (VA01/VA03 - retrieve PR num)* - Create Purchase Order (Display list of PR with ME57 and convert to PO with ME58) - Approval/Release of PO (if required - ME28) - Invoice Verification (MIRO)**
    - Billing (VF01/vf04)
    The PR number is automatically created in this step.
    The incoming invoice from the vendor updates the billing quantity, so that the customer-billing document can only be created after entering the invoice from the vendor.
    So, in standard TP sales process, Back order processing is not possisble. If you any other business process scenario, do share with us.
    Thanks & Regards
    JP

  • Combined Purchase Order and Sales Order Query. (Including Stand Alone Docs)

    Hi,
    I need some help please!
    I am looking for a query that will show all the Purchase Orders with all their base document Sales Orders. However I also need to show those stand alone Purchase orders and Sales Orders.
    What I have is two queries, one for the PO fields en one for The SO fields. I would like a way to combine these two so I have one query with the relevant PO and SO info next to each other.
    The final query will have a top heading structure like this:
    Status,Purchase No.,Supplier No.,Supplier Name,Week,Month,Del Method,Country,Method,Rep.|Status,Rep.,Sales No.,Customer No.,Customer Name,Customer Order no.,Cust. Del date,Doc total,Del Method
    +(The first part is for the purchase order section, the second part starting at the second 'Status' is the sales order section)
    +Purchase Order Query:
    SELECT
      T0.DocStatus 'Status',
      T0.DocNum'Purchase Order No.',
      T0.CardCode 'Supplier No.',
      T0.CardName'Supplier Name',
      DATEPART(ww,T0.DocDuedate)'Week',
      DATEPART(mm,T0.DocDuedate) 'Month',
      T1.TrnspName 'Delivery Method',
      T2.Country 'Country',
      T0.JrnlMemo 'Method',
      T3.SlpName 'Rep.'
    FROM OPOR T0 
    INNER JOIN OSHP T1 ON T0.TrnspCode = T1.TrnspCode
    INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode
    INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode
    Sales Order Query:
    SELECT
      T0.DocStatus 'Status',
      T2.SlpName 'Rep.',
      T0.DocNum 'Sales Order No.',
      T0.CardCode 'Customer No.',
      T0.CardName 'Customer Name',
      T0.NumAtCard 'Customer Order no.',
      T0.DocDueDate 'Cust. Delivery date',
      T0.DocTotal ' Doc total',
      T1.TrnspName ' Delivery Method'
    FROM ORDR T0 
    INNER JOIN OSHP T1 ON T0.TrnspCode = T1.TrnspCode
    INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode
    The problem I am having is that if I combine these queries it excludes all those records with blank/empty data fields.
    I do not mind having to go to crystal reports to get what I want.
    Any suggestions?
    Thanks!

    Hi thanks GordonDu,
    I have tried a union before, and yours works great. However my problem is to display the  PO en SO columns next to each other and not underneath each other.
    Something like this:
    Po No          Supplier          SO No           Customer
    1234           Sup 1             9876              Cust 1
    1235           Sup 2             no SO             Cust 2
    1236           Sup 3             9877              Cust 3
    1237           Sup 4             9878              Cust 4
    1238           Sup 5             no SO             Cust 4
    I have this query, but with this it drops all those Purchase Orders made Stand Alone and without a SO number.
    SELECT
      T2.DocNum AS 'Purchase Order No.',
      T0.DocNum AS 'Sales Order No.',
      T2.CardCode AS 'Supplier No.',
      T2.CardName AS 'Supplier Name'
    FROM ORDR T0 
       INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
       INNER JOIN OPOR T2 ON T2.DocEntry = T1.PoTrgEntry
    Though using your Union gives me all the information I want and the ability to expand on that, my problem is the "Display" part. I am sure I am doing something stupid somwhere 
    Edited by: Desmond Moll on Mar 7, 2012 8:03 AM

  • How would I Get Requisition referance in a Sale Order in Back to Back Order

    We are doing Back to back order flow but i am unable to track SALE Order - Requisition - Purchase Order - Invoice in a sequence since i am unable to find any requisition referance in Sale Order.
    REgards
    Ravikumar GN.

    925713 wrote:
    We are doing Back to back order flow but i am unable to track SALE Order - Requisition - Purchase Order - Invoice in a sequence since i am unable to find any requisition referance in Sale Order.
    REgards
    Ravikumar GN.Go to Tools-->Scheduling-->Reseveration details-->Supply Tab
    There you see the type and header details
    Once the req moves to PO..the same can be also tracked in the same supply tab
    HTH
    Mahendra

  • Confirmation/Back order processing in Sales Order

    Hello All,
    Need some inputs on the Schedule line confirmation and the back order processing for Sales Order
    Scenario 1
    Sales order created but there is no stock in Storage location. Based on our settings Sales Order confirmed for a future date(say 10 days) based on the delivery/lead time.
    Also sales order goes on credit block. Next we receive stock in storage location.
    Now when we release the credit hold it is not doing the confirmation autmatically. I know it can be done but dont know the settings or config where as soon as the Sales order is released from Credit hold then it should do the availibility check and confirm the Order (for todays or toms date.)
    Scenario 2:
    Sales order created but there is no stock in Storage location. Based on our settings Sales Order confirmed for a future date(say 10 days) based on the delivery/lead time.
    Next we receive stock. We would like to confirm the sales order automatically by a program instead of going in individually in each sales order.
    What Tcode/program can do this availibility check and confirm the sales order for todays date. Is this a back order processing or rescheduling. Need information on this process..
    Thanks
    SAP Fans...

    HI Rahul
    When you create the sales order and if stock is not confirmed then ,system will give the next delivery date and you can do the backorder processing for that sales order . So backorder processing is done only for Open orders
    Regards
    Srinath

  • Retrive the Back Orders for OM through SQL Query

    Hi,
    When I am creating an order in the Order Management module and manually changing them to back-orders after pick release has been done , line status changes to awaiting shipment but when i click on the actions buttton --> Additional Line Information --> Delivery status tab , the pick status is shown to be backordered . I want to write a query to retrieve the information about the orders where pick status is backordered.
    Can you suggest the tables i should check in order to retrieve the information for these orders where picked status is 'Backordered'.
    If anyone has any doubt in the query posted please reply back i will try to clarify them
    Thanks
    Ashwini

    Back order situation happens at
    1. Pick release time
    2. at ship confirm
    Only the delivery detail status changes to Back ordered, no change to order line.
    you need to join the delivery details for an order line to get the backorder lines.
    wsh_delivery_details.
    you may have multiple DD for a single SO line.
    Ganesan.

  • Retrivet the Back Orders for OM through SQL Query

    Hi,
    When I am creating an order in the Order Management module and manually changing them to back-orders after pick release has been done , line status changes to awaiting shipment but when i click on the actions buttton --> Additional Line Information --> Delivery status tab , the pick status is shown to be backordered . I want to write a query to retrieve the information about the orders where pick status is backordered.
    Can you suggest the tables i should check in order to retrieve the information for these orders where picked status is 'Backordered'.
    If anyone has any doubt in the query posted please reply back i will try to clarify them
    Thanks
    Ashwini

    Try this Ashwini. You'll probably want to add some filters for shipfrom org or OU.
    Regards,
    Jon
    SELECT
    ooh.order_number
    , ool.line_number||'.'||ool.shipment_number as line_number
    , ool.ordered_item
    , ool.ordered_quantity
    FROM
    wsh_delivery_details wdd
    , oe_order_lines_all ool
    , oe_order_headers_all ooh
    WHERE 1=1
    AND wdd.source_line_id = ool.line_id
    AND ool.header_id = ooh.header_id
    AND ool.flow_status_code = 'AWAITING_SHIPPING'
    AND wdd.released_status = 'B'
    ORDER BY
    ooh.order_number, ool.line_number, ool.shipment_number

  • Sales order is being blocked for Credit due to Back order batch Jobs.

    Hi experts,
    While running Back order Batch jobs sytem is putting sales orders into credit block even though we releasing orders by VKM4. Our user is releasing orders but system is again putting back those orders in Credit block. Can anybody explain me what exactly Back orders does ? if Schedule line changes due to Back orders does system puts the order into Credit block ? please help me to solve this issue..
    Thanks
    Kesari sai
    Edited by: kesarisai ks on Sep 13, 2008 5:10 PM

    Hi,
    You don't need to use user exits for this purpose. What you need to do is to extend the validity of your credit checks in IMG.
    To do this, go to spro Sales and Distribution -> Basic Functions -> Credit Management and in config for automatic credit control, select the right risk category.
    In the config screen you will have a field called "no of days", here you define the validity of the credit release. For example if you it setup for 10 days, the system will pick up the release date and add 10 days for validity.
    If backorder batch runs within these 10 days, it will not re-block the documents. If however runs after the 10 days it will block them.
    Regards
    Silvia

  • Sale order back order

    iwe need do back order for a picked SO#,
    when we do “back order all” in ship confirm form, that means system will be auto-transferred.
    But in this case, I do in Aug-5, but I didn’t find any transfer back from Staging to FG yet.
    For all telents, did the standard function of OM support this?
    or how can we achive this Prospective?

    Oracle standard function is not support auto transfer from staging to FG in this case. You need to do it manually, via subinventory transfer / move order transfer function

Maybe you are looking for

  • Error :DATASET_NOT_OPEN Except.: CX_SY_FILE_OPEN_MODE

    Hello experts Kindly help me on this... All my scheduled background job were CANCELLED due to this error... Error analysis: ST22 An exception occurred that is explained in detail below. The exception, which is assigned to class 'CX_SY_FILE_OPEN_MODE'

  • Problem with FGI4 with key figure

    hi, I am trying to create a report using FGI4. But when i am selecting predefined element & trying to choose key figure which are coming dynamically from structure GLFLEXS(Flexible General Ledger Reporting), there i am not getting BILWERT(Balance she

  • Access Snapshot tool in VB

    I have few questions. 1st. Is there a program that can copy a pdf and paste it to document, that is automated, I know the snapshot tool exists and I can use that but I have roughly 3000 pdfs with 40 to 100 pages each I need to copy to add to my repor

  • Transporting a Package from one client to anothr

    Hi, I Would like to transport all the objects in one client that i have to another client.

  • Fading around edge of images [cs3]

    I've spent a fair bit of time a few times, using the eraser tool and soft brush to `fade' around the edges of photos so they don't appear hard but blend with the background in some smooth way near the edges. I'm pretty sure this could be done using s