Total of particular items of various open sales orders for particular cust

HI.. following are my Items code  :
2009,  8010, 8016, 9831, 27363, 27361, 27360, 27181, 16095.
i want the report that consists of all items to be delivered to the customer. I  have created the following query :
SELECT T0.CardName AS 'Dept_Name',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '2009') '2009',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8010') '8010',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8016') '8016',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '9831') '9831',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27363') '27363',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27361') '27361',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27360') '27360',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27181') '27181',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '16095') '16095'
FROM ORDR T0
but i want the total of particular items of various open sales orders for particular customer.
pls improve the above query.
thanks
reema

Hi,
Try this
SELECT T0.CardName AS 'Dept_Name',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '2009') '2009',
(Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '2009') 'All 2009',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8010') '8010',
(Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8010') 'All 8010',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8016') '8016',
(Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8016') 'All 8016',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '9831') '9831',
(Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '9831') 'All 9831',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27363') '27363',
(Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27363') 'All 27363',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27361') '27361',
(Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27361') 'All 27361',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27360') '27360',
(Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27360') 'All 27360',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27181') '27181',
(Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27181') 'All 27181',
(Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '16095') '16095'
(Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '16095') 'All 16095'
FROM ORDR T0
Regards,
Bala

Similar Messages

  • BAPI:Create sales order from an existing open sales order for open items

    Dear All,
    Could any one suggest me any BAPI that can create sales order from an existing OPEN sales order for OPEN items. since we are closing all open orders and creating new orders with reference to existing open orders.   please suggest, its would be great help.
    Regards,
    Reddy

    hi suresh,
    we are changing tax procedure from formula to condition based, so this is the reason we have close all the open orders and recreate in TAXINN procedure, it is going to be large number of records( open orders), so....
    Regards,
    Reddy

  • How can i get the open sale orders for given material no and plant

    Hi,
    I have to retrieve the open sale orders depending on the material number and plant.
    For only open sale orders at header level and item level.
    I want to use VBUK-GBSTK to find open sale order at header level and
                          VBUP-GBSTA at item level.
    Can any one suggest me the best logic as performance is concerned?           
    Thanks,
    Kumar.

    hi Prasanth,
    select werks matnr from ZVSCHDRUN into table it_plant.
    sort it_plant by matnr werks.
    select
            vbeln
            posnr
            matnr
            werks
            erdat
            kbmeng
            vrkme
            from vbap
            into table it_vbap
            for all entries in it_plant
            where matnr = it_plant-matnr and
                  werks = it_plant-werks.
    and again i have to write one more select query for vbup.
    am i right?

  • Open sales orders for FD32

    Hi all,
    As everyone must be knowing in FD32 we can see Sales value ( Open sales orders + Open deliveries).
    For one of my customers i can see an amount in open sales orders field, but i could not find the SO in VA05 report.
    Can anyone help me to find list of Open sales orders which are reflected in FD32 sales value field.
    Thanks all.
    Rajesh

    Dear Rajesh sandbhor ,
    First please check whether there is any value in FD32>Extras>Sales Value.
    If YES, then Instead of going for VA05, in fd32, go to environment>sales and distribution documents>open orders.
    Please check and revert back if there is any issues.
    Thanks & Regards,
    Hegal K Charles

  • Can't open sales order for a deleted customer number

    Dear all ,
    i have deleted a customer cos it was repeated ,now there were some sales orders where that customer is a sold-to-party
    when ever i try to open thous sales orders the systems gives an error message [ no customer record exist for sold to party ******* ]
    the sales orders that does not open because of this error are no more wanted
    would you advise about how to delete them ?
    thanks and best regards

    well,
    thanks for the fast reply but
    the customer no. is generated automatically and I can't assign the same number again .

  • Need Standared report for Open Sales order for all customers

    VA05 is not useful as it gives this list for individual customers.
    We need to see a list of all open orders for asll customers in one report only.
    Thanx in advance.

    Hello,
      did you try with transaction SDO1 - Orders Within Time Period? If it doesn't fit your requirements I suggest you to create a query.
    Best regards,
    Andrea

  • Select query for sales order for particular customer oder text and storage

    Hi All,
    I am trying to retriev customer order text and customer storage bin from the following select query, but it's giving huge number of records, I want to restrict the number of records.
    Select customer order text, customer storage bin
                       Select STXH–TDOBJECT, STXH–TDID
                       Where  TDOBJECT = VBBP
                              TDID = Y001
                              TDID = Y007
    Please let me know how to restirct the number of records.
    Thanks,
    Ranjan

    Try using the FM 'READ_TEXT'.
    NAME will be the order number concatenated with the item number.
    And you have the ID and OBJECT.  You may also need to use the LANGUAGE.
    Message was edited by:
            Matt Nagel

  • Function to find quantity of a material in Open sales Order in 4.5

    hi ,
    is there any function to find the total quantity of a material in open sales order for an input date in 4.5
    Regards

    I think you may find function <b>RV_BILLING_PRINT_VIEW</b> helpful. This is the function used by the standard SAP report <b>RVADIN01</b> to assemble all the information needed to print a Sales Order. The structure and table output by this function contain all the information in the header and line items of the Sales Order.
    To watch this function in action, set a break point on this function (line 1075 of RVADIN01 in my system) and print a Sales Order (SO).
    I use VF31 to print an arbitrary SO during testing.
    Your company may have altered the standard print configuration for sales orders in SAP. If so, you will need to note the output type of your test Sales Order in VF31 and use Transaction <b>V/83</b> to determine which program is being used to print that type of SO.

  • Open Sales order, Delivery docuement, Billing document, Item

    Hi Gurus,
    Kindly help to view the following items for a particular customer.
    1) Open sales order value
    2) Open Delivery docuement value
    3) Open Billing document value
    4) Open item.
    I presume for viewing open sales order VA05N and to view Open item FBL5N would suffice. Please correct me if i am wrong and let me know about points 2 and 3.
    This is required because, my client is facing some figure mismatch while executing F.35 tcode. I am trying to analyze the differnce of figures while doing a Static and dynamic credit check.
    Thanking you in advance
    ficoguy.

    Dear ficoguy,
    1) Open sales order value
    Tcode: VA05 (select OPEN SALES ORDERS)
    optional method: SE11/ TABLE VBAK/ INPUT customer code as KUNNR, fetch the list.
    Input the VBELN in VBUK and filter with RFSTK='A'
    2) Open Delivery document value
    Tcode: VF04 (OUTPUT DATA FOR BATCH PROCESSING-->CHECK LIST DISPLAY)
    DOCUMENT TO BE SELECTED = DELIVERY RELATED
    optional method:(same as above except the FIRST TABLE)
    SE11/ TABLE LIKP/ INPUT customer code as KUNNR, fetch the list.
    Input the VBELN in VBUK and filter with RFSTK='A'
    3) Open Billing document value
    TCode: VF05
    Selection criteria : OPEN BILLING DOCUMENTS
    4) Open item.
    Tcode : FBL5N
    Check and revert back.
    Thanks & Regards,
    Hegal K Charles

  • Mass Update of Product hierarchy in all CRM Open Sales Orders

    Hi Folks,
    I have a requirement in my project wherein I have to update product hierarchy details with new values in all Items of CRM Open sales orders.
    If suppose I have a text file which has the details of Open Orders & new product hierarchy which i have to update, then would it be recommended if I use BDC for this task. Can I Call Transaction CRMD_ORDER?
    If someone has already gone through such requirement, Can you please suggest me how to proceed with this requirement. Using BDC or any other way which I can proceed with?
    Thanks in advance !!!
    Regards,
    Nitish.

    You are correct in indicating that Exchange rate type field  is not seen in Header data of sales order. I checked screen layouts for various screens for sales order data and this field is not suppressed. The only reason could be that this field is not used in sales order screens
    If you are interested, you could also check in the following way
    1.  Go to SE11, enter database table as VBAK
    2. Once inside data dictionary table, click where used list button, select programs and screens and execute
    3. click continue (don't select background)
    4. now you would have list of programs and screens, this table is used
    5.  now start another session and go to transaction SE51
    6. indicate program name as SAPMV45A and screen numbers as listed in step 4. you can check all screen numbers to see whether Exchange rate type field is listed in sales order layout.
    7. Of particular interest would be screen number 4311 as this contains  Financial accounting data & 4303 Billing data
    8. you can check screen layout for screen 4311 & 4303. you would see Exchange rate type field is not indicated.
    9. in case you could find this field in any screen, you could ask your ABAP consultant to add this field in the layout screen.
    Hope this answers your question

  • Open sale orders

    In a report i am in need of obtaining open sale order for a material. open sale order means sale orders for which the PGI is not yet done.
    Please tell me the data fetching from various tables.
    can anybody tell me how to achieve this..

    HI
    Give logic  to ur ABAPER in FS If in  VA02  Item is given as if Balance Qty is Greater than 0 then it is OPEN and if not it is Closed.
    Regards
    Santosh.A.R

  • Open Sales order data

    Hi,
       Can any one please help on identifying the table used for retrieving Open sales order data for a particular period, My requirement is to take the Volume of open sales order for Data migration volume assessment
      Please help on this
    Thanks
    Rajesh.R

    hello, friend.
    a standard transaction is VA05 or VA05n to check on open orders. 
    if you need to check the database tables, you can check sales order status/header thru table VBUK.  for item level, use VBUP.  you will find fields such as reference status, delivery status, etc.
    regards.
    jy

  • How to  find the Open sale orders till date for  given plant and material ?

    Hi experts,
                     I have a requirement to calculate the open sale orders for a given plant and material. I have tried in VA05 wherein i can get only for the material and sales area combination. From the document nos obtained from VA05 i can then find the plant. But my question is how do i get the output of VA05 into my progra. (can i use submit for a module pool report ).
    Also if ther is some other standard table or Function module to find the open sale orders till a given date ,it will be even more helpful....in which case i can drop the VA05 route.
    Kindly help
    Thanks in advance
    Ashwin

    Hi Ashwin,
        You can use SAP Tables VBAK and VBUP to get to know if the document is complete or not.
       VBUK-GBSTK is the field that will give you the status of the Sales Order .
      VBUK is used at header level , whereas VBUP is used for Item level.
      So in your case what I would do is :
      Get the Sales Orders that satisy the plant and material criteria from VBAP table , take this Sales Document numbers and go to VBUK or VBUP table to get the Sales Order Status. 
       If I need to find the open quantity as well I will link to VBFA table based on the document number.
      Reward if helpful.
    Thanks,
    Imran

  • Permanent closure of Open Sales Orders

    Morning Gurus !!
    May be this is an issue with a lot of consultants. Our company wants to close all the open Sales Orders, for which I have suggested giving a Reason for Rejection or a Credit Block to close them. But end users are asking for a method where the closed Sales Orders should not be editable or changable in VA02, they should permanently be closed. 
    For this requirement I searched the forum and found no solution except one thread, which I did not understand, how to implement. I am giving that info here:
    Thread by - Ravi D Mansharamani, Posted on Feb 27, 2008. Topic: Closing of a Sales Order
    "You can use status profile (Transaction BS02) at sales order header and here you can define status 10 as created and status 20 as completed. Now for status 20, you can define objects types wherein you wont allow any changes by clicking on forbidden for a particular status, in this case status 20."
    Now my questions are:
    1. How to implement above suggested method and will it permanently close an open sales order?
    2. If this does not, then is there any way in which we can close an open sales order which cannot be changed in VA02??
    3. If I want to attach a document or a screen shot to a thread, how to do it?
    4. How to know a thread no., if I want to give reference of it in my thread?
    Your valuable suggestions are urgently needed
    With best regards.
    Venkat - Hyd

    Hi Venkat ,
    We can very well do this by using status profile concept.Pls configure as per below.
    1.SPRO -
    S&D u2013 Sales --- Sales Documents u2013Define and Assign Status Profile T Code:BS02
    Define status profile
    2.Assign two statuses to the status profile : Double Click on the newly created status profile to create the statuses
    3.Click on Object types to select the relevant object .Select the object type and save the profile.
    4.Assign status profile to relevant Sales Order Types : VOV8
    5.Finally we can control the closing the closing functionality in Exit.MV45AFZZ .
    Hope it helps,
    Sash.

  • Commited quantity but there are no open sales orders.

    Item show as x quantity committed in inventory data tab in Item Master data. There is no open sales orders for specific item though. Client is on SAP 2007 A SP 00 PL42. Anyone had this before..? Solution?

    Hi Jerusha,
    Sometimes the stock quantities can go out of sync.  Not entirely sure why, upgrading to the latest patch may help preventing it in the future.
    In order to fix this you can run the 'Restore Item Balances' for that item.
    Go to the Help Menu / Support Desk / Restore / Restore Item Balances.
    Enter the Item Number in the From and To box to ensure you only run it for the effected item.  Run the routine to recalculate the quantities.
    Regards,
    Adrian

Maybe you are looking for

  • Load Balancing on RDS 2012 R2 does not work

    Hello, I'm working on a test deployment with 3 Session Hosts,  GW/WA/CB on one server and licensing on another.   GW and CB are also on a Failover cluster so i don't want High Availability now (I want to start with simpler and work out the errors fir

  • HR Auth check

    Hi Our HR department are restricted to running reports and HR transactions based on basic pay on all org keys other then their own. Therefore HR employees are not allowed to view each others salaries. A new person has recently joined the HR departmen

  • How to import a jpeg image into premier elements 12?

    how do  i import a jpeg image into premier elements 12?

  • Method getCustomDatum() and Oracle thin client

    Hello All, I am using WL6.1 and an Oracle thin driver. I am using the Oracle Intermedia classes for Java in order to retrieve images for jsps and servlets. Trying to use the Oracle classes caused class cast exceptions. When using the weblogic.jdbc.ve

  • Lost signal today, hasnt come back (not antenna related)

    Hi I noticed on my drive home today that I had no signal, I usually make phone calls on my way home and have signal normally the whole way. When arriving home I rebooted the phone to no avail (total 3 times) my wife also has an iphone and it has a fu