Creating Query to show items from open sales orders with a/p invoice

Hi experts,
I am trying to create a query that will show what items/quantities are still in open sales orders that can now be filled by an incoming shipment of goods, processed through the a/p invoice.
This needs to be done using subqueries, which I have no experience with.  I am trying to do this using the ORDR and RDR1 tables to show the open items from the sales orders and the OPOR and POR1 tables to show items just received in to inventory.  I would like the query to show exactly the open item's, their quantities, the posting date from the sales order and the customer name that can now be filled from the new shipment through the a/p invoice.
I appreciate the assistance,
Hayden (on behalf of Todd)

Hello,
try this
SELECT T0.[DocDate], T1.[ItemCode], T1.[Dscription],( T1.[Quantity] - T1.[DelivrdQty]) As "Open Qty" FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[DocDueDate]  <= [%0]And ( T1.[Quantity] - T1.[DelivrdQty]) != 0
Try this query in query manager.
Thanks
Manvendra Singh Niranjan
Edited by: Manvendra Singh Niranjan on Jul 13, 2011 6:27 AM

Similar Messages

  • Delivery of sub-items from a sales order

    Hi experts,
    We have a business requirement to be able to modify the customer's transmitted order line in a sales order. However, we would like to retain the customer's original order details.
    In order to do this, we wanted to capture the original request as a line item in the sales order with a item category not relevant for delivery and billing. We then create a sub-item for the original line with UEPOS populated for the sub-item. This sub-item is relevant for delivery and billing.
    However, we find that with the copy routine 101, SAP does not allow only the sub-item to be delivered. With the routine 110, SAP does bring in the sub-item, but blanks out the material number ( since it expects product substitution ).
    Would appreciate inputs from the forum
    Regards
    Rohit Zalani

    Hi Rohit,
    It is ideally required to have both higher item and subitem in delivery. However the moment there is a sub item, the delivery quantity for higher level item becomes 0 and hence this will not affect the quantity to be delivered. Hence the presence of higher level item will not impact the delivery or PGI in anyway. You can check this.
    Similarly for billing, you can check the Billing quantity field in copy control between delivery and invoice. The value has to be either G or H based on the scenario you want.
    Having said all these things, I think just adding the customer entered material either in the customer material field in sales order (I think VBAP-MATWA) or in some other Z field will relieve you of this big complexity. So unless or otherwise your customer i adamant on this, you can think of a simpler solution than the multiple levels of items.

  • How to delete a line item from the sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi
    U can do this in two ways one u can short close the order by entering Reason for rejection in VA02 at header level and if yr order is multiple line item order u can enter the reason for rejection in any of the line item which u don't want to deliver.
    This is called short close ( as the qty is not delivered fully).
    Thx.

  • How to delete the line item from a sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

  • SAP won't let me delete an item from a sale order!

    I am trying to delete an item from a sale order but i get this message
    "A production order already exists for item 000030
    Message no. V1603"

    What was the item category of material??also what was the movement type assigned??
    If already some production order exists with this line item then ask your PP guy to come out of this...(first you need to take necessary action on Production order--then you can delete line item at sales order level)
    Phanikumar

  • Change open sales order with new condition schema

    Hi SD Experts,
    I have to change condition type on condition schema. For example, now we have ZPVI (Discount %). I have to change with ZPFI (Discount %). But we have some open sales orders with old schema. Can I correct old sales orders with new condition schema? Is it possible?
    Thank you.
    Gulay Celik

    >
    Shai Sinai wrote:
    > 3) The item categories of document items are assigned to billing plan types. This customization does create separate billing plan for each item, but the billing plans of item are refrenced to the header billing plan (according database field FPLA-RFPLN and screen field RV60F-KFREL), what  means that item's values are not taken into consideration.
    >
    In this case it is obvious that it's not possible to have an item on the same document, which would have a billing plan different from the header. Unless, of course, you are ready to change the existing configuration or create a new item category, which would be independent from the header billing plan.
    If, despite configuration, such entry is possible in VA41/VA42, then you'll have to use BDC instead of BAPI. Unfortunately, BAPIs do not have all the same functionality that might be available in the transaction.

  • Return sales order( with ref. to Invoice) need to have less quantity

    Hi Friends,
    Here one issue is coming while creating a return sales order with ref. to  invoice.
    Example is:
    In original invoice an article X is of price 10 having 10 quantity and hence total price 100.
    but now customer wish to return only 5 articles and creating this Retun sales order with refernce to this invice
    now in return sales order quantity is coming correct i.e 5 but the amount is still the same i.e 100.
    But this should be 50( 5*10).
    Please can someone help to find the reason why the price is not changing while quantity is changing.
    I have already check the copy control but there also setting seems to be correct.
    Also when i try to update the pricing via condition tab the price got changed. but that is manually.
    Thanks
    Punit.

    Thanks Jignesh,
    But can you please tell which pricing input should be the best.
    As "price redetermine" option can't be selected as price keep changing.
    also i did that for "same price and redetermine tax" but doesn't seems to be working.
    Please if you can suggest any option where the price of the article will be same (the old one when article was sold) as proportionate to quantity without redetermining the price.
    like article x has qty 10 and price 10 hence amount 100
    but later price of article change to 11
    then if i chose redetermine price then for five article this will be 55 which is again wrong( it should be 50 as at the time of sale the price was 10)
    Hope I made the issue clear enough. Which setting in pricing one can recommend.
    Regards
    Punit
    Thanks

  • Query for all open sales order with a date range

    Hi Experts!
    I wrote this query that will look up all open sales order of a particular customer and how much was served:
    SELECT T0.[DocNum] 'OS #', T0.[DocDate] 'Posting Date', T0.[CardName] 'Customer',  T1.[Dscription] 'Item Description',T4.[SalUnitMsr] 'Sales UOM', T4.[InvntryUom] 'Invty UOM', T1.[UseBaseUn] 'Use of Invty UOM' , T1.[Quantity], T1.[Quantity]-T1.[OpenQty] 'Served Qty', T1.[OpenQty] 'Unserved Qty' FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCTG T2 ON T0.GroupNum = T2.GroupNum INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode INNER JOIN OITM T4 ON T1.ItemCode = T4.ItemCode WHERE T0.[DocStatus] = 'O' and T0.[CardName] =[%0]
    However, I don't know how to input a parameter for the date range in a query.  Can anyone help with this issue?
    Your input will be highly appreciated.
    Warm regards,
    Jen

    Hiiiiiii
             Try This.....
    SELECT T0.DocNum 'OS #', T0.DocDate 'Posting Date', T0.CardName 'Customer', T1.Dscription 'Item Description',T4.SalUnitMsr 'Sales UOM', T4.InvntryUom 'Invty UOM', T1.UseBaseUn 'Use of Invty UOM' , T1.Quantity, T1.Quantity, T1.OpenQty 'Served Qty', T1.OpenQty 'Unserved Qty' FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCTG T2 ON T0.GroupNum = T2.GroupNum INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode INNER JOIN OITM T4 ON T1.ItemCode = T4.ItemCode WHERE T0.DocStatus = 'O' and T0.CardName ='[%0]' and (T0.DocDate>='[%1]' and T0.DocDate<='[%2]')
    Regards,

  • SD report for the open sales orders with items

    Hi,
    Is there any standard SAP report which display open sales order togeather with the open items. I want to have columns target quantity, delivered quantity and open quantity.
    Any tip?
    BR
    Saso

    Dear Saso,
    I think, instead using Report: VA05/ VA05N; its better to use Report: VL10C
    In this report, you will get all the Sales Orders along with Materials - relevant for open delivery, along with Open Qty. and various other options can be selected from "Change Layout - (Ctrlt+F8)".
    Best Regards,
    Amit
    Note: Don't maintain any Field-Entry (while executing the Report: VL10N; in order to list all Sales Orders. But, if you want to list Sales Orders based upon some criterias, maintain the Field-entries, as reqd.

  • Close open sales order with no subsequest documents

    Hi,
    I have a scenario where line items in a sales order have been rejected citing a reason. But for two of these line item materials in a  report are showing up as open with zero quantity (comes up as error in report). The quantity of all line items in the sales order is zero. These line item description column is complete.
    how can this be corrected. how the sales orders  can be made completed, without deleting line items.
    Thanks
    Sharan

    Just a quick check,
    do all items you rejected have been assigned the same reason for rejection.

  • G/L Account is missing in item data in sales order with reference to quotation

    Dear SAP Guru,
    I have a problem in accordance with G/L Account missing sales order. Initially, please find the below lines.
    1. If I do the sales order without reference to quotation there is no error in G/L Account missing.
    2. If I do the sales order with reference to quotation there is an error that G/L account is missing in item data.
    I have checked the VKOA, the settings are fine.
    Kindly anyone of you resolve this issue.
    Warm Regards
    Vidya Sagar

    G/L account is missing in item data.
    Many times, it has been discussed on this issue in SCN and please search with the same text so that you will find many threads asking various areas to check.  Take the inputs from there and post here still if you have issue.
    G. Lakshmipathi

  • Create sales order with refrence to invoice number

    Hi,
    I am creating salesorder using FM SD_SALESDOCUMENT_CREATE in my custom report.
    My requirement is to create a sales order with refrence to a invoice number. Kindly let me know which parameters are need to be passed to this FM to create sales order with refrence to a invoice.
    Regards,
    Rajneesh

    Hi,
    Please I have something similar requirement ot create the sales order from the billing document via Idoc.
    Please let me know if any ideas thanks
    Cheers
    Jasmeet

  • CREATE SALES ORDER WITH REFERENCE TO INVOICE USING RECORDING

    Hi,
    I wanted to know if it was possible to create a sales order with reference to an invoice using recording(SHDB transaction).If there is some other method please explain the method in detail(Its very urgent)

    Hi,
    You should be able to use BAPI_SALESORDER_CREATEFROMDAT2 instead of doing a BDC and you can populate the reference document in the relevant header field.
    Gareth.

  • SALES ORDER WITH REFERENCE TO INVOICE

    I need to create a sales order with reference to an invoice which is called a credit memo request.Which method is better?Can we do recording using SHDB for VA01 transaction by clicking on the create with reference tab in VA01 and performing the recording or do we need to use BAPI.Please explain both the  methods if possible

    Use the BAPI: BAPI_CUSTOMERRETURN_CREATE.
    Regards
    Kannaiah

  • Create different billing document types from same sales order type

    Hello,
    Please take a common document flow, just  like this one:
    - Sales Order (type ZE01 )
    - Outbound Delivery
    - Billing Document ( ZA or ZB )
    The billing document is based on the outbound delivery. Here is the requirement that we need to implement:
    - We need to determine different billing document types ( ZA or ZB ) according to a custom determination, based on a Z table. In some cases the billing document will be type ZA, in other cases it will be type ZB. I've been told that I can achieve this  via copy control , but some extra help would be welcome.
    Any clues?
    Regards,
    Joã

    Hi João G Neves ,
    Were you able to achieve this requirement using a  user exit? if so could you let me know the name of the user exit? Basically in our current project a sales order can be billied using 6 different billing document types. The copy controls between the sales  document and billing document is been set up for all the 6different billing doc types and currently the users are manually selecting the billing document type in VF01 .The buisness insists on making this automated.They want the billing document type to be determined based on some custom condtions.
    Any inputs regarding this is highly appreciated.
    Thanks & Regards,
    Srini

Maybe you are looking for

  • Problem in Display WSDL

    Hi All, I have transported my development from one environment to another. When i go to Sender agreement and display WSDL i am getting the follwing error " Problem updating the object id <obejctid> : ICF" The adapter used in sender agreement is WS ad

  • Podcasts won't auto delete

    Have all my subscribed podcasts set to "keep all unplayed episodes" Once I have finished listening to an episode, it doesn't automatically delete, even when the next episode is downloaded I am getting a backlog of episodes all stored on my iPhone, wi

  • Cant access camera roll

    after picking a picture in camera roll and txting it...I can not access camera roll again because the topof the phone where it says "albums" comes up lower - thereby covering the camera roll.  I can see it, since the "album" is see through, but I can

  • Which MacBook air should I buy??

    I have 2 options for buying MacBook air? 1) 11 inch i7 4 GB Ram and 128 GB flash memory 2) 13 inch i5 4 GB Ram and 128 GB flash memory Which laptop will best suit me for word excel PowerPoint and day to day office use. Would be replacing my desktop w

  • JavaScript that comes with Publishing

    Hi, I've just created a quick video player using the FLVPlayBack Component.  When I publish, the HTML file always has a bunch of JavaScript in the <header> tab.  What is this JavaScript for? I've tried to move the JavaScript into a seperate file and