Query to find Orders that have all LINES CLOSED status

All,
CAn someone send me SQL QUERY TO find all ORDERS that have all LINES in CLOSED status.
we have an issue in an environment, i am trying to build a data fix script.
regards
girish

Hi,
Try this :
Method-1 (backend):
*==============*
select a.order_number, b.line_number, b.flow_status_code
from oe_order_headers_all a, oe_order_lines_all b
where a.header_id = b.header_id
and a.org_id= &Org_id     -- Operating_unit_id
and a.org_id = b.org_id
and b.flow_status_code='CLOSED'
Method-2 (front end)
*==============*
Orders,Returns --> Order Organizor --> Find orders/Quotes form will open --> Close this serch page only.... --> Now you will able to see Order oganizor form --> Click on Lines Tab of this form (you will see this tab atleft bottom side of the page) --> Press F11.. --> In status Field give parameter as *"CLOSED"..*and press Ctrl + F11 ..... Take an export of the form output..
Risk : this query may take hell lot of time to complete..as it is going to pull all closed line of a particular Org..
Method-3
*========*
Check if you can find any oracle standard report for closed lines..
Hope this will help..
Regards :)
S.P DASH

Similar Messages

  • Report on Orders that have Order Lines modified during the period

    hi,
    I am a Beginner, PLEASE I NEED A HELP
    Report on Orders that have Order Lines modified during the period

    I don't know a standard report (SE95 does not seem to include selection by date), maybe you can tweak SE16 display of table SMODILOG for your purpose.
    Thomas

  • Query to find customers who have not purchased anything

    I have a query to find customers who have purchased what we call consumables (using item property) over a given period:
    SELECT T0.CardCode, T0.CardName, T0.DocDate, T0.DocTotal, T1.ItemCode, T1.Dscription,T1.quantity, T2.ItmsGrpNam
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry, OITG T2
    WHERE T0.DocDate BETWEEN '[%0]' AND '[%1]' AND T1.ItemCode like '2ssy%' AND  T2.ItmsGrpNam = 'consumable'
    I have another to show customers who have a particular type of equipment:
    SELECT T0.manufSN,T0.itemName,  T3.Name, T2.Address, T2.Street, T2.Block, T2.City, T2.County, T2.ZipCode
    FROM OINS T0 INNER JOIN OCRD T1 ON T0.customer = T1.CardCode INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode Inner Join OCPR T3 ON T0.ContactCod = T3.CntctCode
    WHERE T0.manufSN like 'P%' AND T2.AdresType= 'S'
    What I would like is to find those customers who have this equipment (query 2) but who have NOT purchased and consumables in say the last year.
    I have tried using Excel by finding duplicates and taking those in query 1 from those in query 2 but it's very messy.
    Has anyone done anything like this or got any good ideas?
    Thanks

    Hi Ralph,
    Well, I enjoy teaching, so let's start at the beginning.  SQL is a fairly full-featured language, and it supports recursion and nesting.  That's why the books online often describe elements of the SQL statements as "expression" - it may be more than a field or a simple function occurring there.  Nesting is the little puppy we used here.
    Now, in your first post, you said:  "What I would like is to find those customers who have this equipment (query 2) but who have NOT purchased and consumables (query 1) in say the last year."
    So, our common point between the two queries is the customer, the CardCode.  That's what this part does:  F0.CardCode = T0.Customer.  In my internal convention, I used F for Filter.  So we only want the results in the filter where the CardCode matches the CardCode/Customer from the main query tables.  It's the sole contact point between the two queries.
    You also said you wanted only the items where they had purchased no consumables, which basically translates into: a count of the records equals 0.  Now, since all we're interested in from the second query, the consumables query is how many records we returned, we get rid of all the columns except for one that we apply a COUNT to.  After that, it's a simple criteria:  the result of the second query has to equal 0.  This is how the criteria looks after you take out all the details and put only the important brackets in:  (SELECT COUNT...FROM...WHERE...) = 0.
    This might be confusing at first, because most of the time we return recordsets from queries, but a standard feature of SQL is to return a value of any data type if the query returns a single row and a single column.  This wouldn't work at all if we had more than one column in our nested query (or would require lots of tweaking), and although it returns a number of results in the complete process of the whole SQL statement, it only returns one result for each row.
    Regards,
    Mark Dielmann
    Edited by: Mark Dielmann on Nov 13, 2009 12:30 PM - Forum doesn't support advanced formatting on answered questions.
    Edited by: Mark Dielmann on Nov 13, 2009 12:32 PM - Salutations and more formatting.
    Edited by: Gordon Du on Nov 13, 2009 10:35 AM - There are maximum characters limitation for correct format

  • Sales orders that have been invoiced are still in the Billing due list

    Friends :
    We have  sales orders that have been invoiced are still in the Billing due list. When i look at sales orders it has 0.00 price.
    The error message is
    Billing not possible because repair is not yet completed
    The item is not relevant for billing
    The item has been fully invoiced already
    Full pints will be given.
    Van bills

    Hello,
    I believe these are repair orders, and invoices through order related billing. Check the incompletion log in the order, check whether the repair is complete. Go to the order VA02 --> Order ---> Environment --> Status. You may know the over all status of the document. Check for the billing status, if the billing status is not invoiced, then you need to generate invoice or Reject the line item.
    Prase

  • Query Help - PO's That Have Not Been Sent

    Is it possible to make a query for PO's that have not been sent? I tried a few things and couldn't get it to work.

    I think I understand what you mean let me try and answer that,
    Yes the order comes into SAP from our website then we have someone who then creates the PO based off the sales order. During that process the person who creates the PO then sends it via email in the messaging system to the vendor. My end game is to be able to run some type of query where we could see if that person has missed any.

  • Lightroom does not automatically find images that have been moved within same parent folder/drive

    Lightroom does not automatically find images that have been moved within same parent folder/drive...I moved my catalog and photos to shared drive so that all users can access and when I moved photos within parent folder lightroom did not automatically adjust like in video I watched.  I had to manually locate.  Is there a fix for this?

    Lightroom does not automatically find images that have been moved within same parent folder/drive...I moved my catalog and photos to shared drive so that all users can access and when I moved photos within parent folder lightroom did not automatically adjust like in video I watched.  I had to manually locate.  Is there a fix for this?
    I haven't watched that video, but if you move photos in your operating system ... Lightroom does NOT automatically find these photos. Finding photos that have been moved is NOT a feature of Lightroom. So, there is no fix for this.
    You would have to tell Lightroom where the photos are now located, as explained in the link from 99jon
    If you must move photos, move them inside of Lightroom, not in your operating system, or better yet — don't move them, and use Lightroom tools such as keywords and other metadata to achieve organization.

  • How to find geometry that have intersection with polyline?

    Hello,
    How to find geometry that have intersiction with polyline?
    I hava a lot of polygon, i want to find wich of polygon have intersection with polyline.
    What shall i do to find out this?
    Regatd,
    Thank's

    is that correct when i use such query?
    SELECT
    FROM aaa c
    WHERE SDO_RELATE(c.geometry,
    SDO_GEOMETRY(2002, 1, NULL,
    SDO_ELEM_INFO_ARRAY(1,2,1),
    SDO_ORDINATE_ARRAY(0,0,12,12,25,25)),
    'mask=anyinteract') = 'TRUE'
    Thanks

  • Where do I find emails that have been "archived"?

    How do I find emails that have been "archived"?

    That would depend somewhat on the email service you are using, but most have a folder called "Archive". Back up the mailbox list and then tap on teh account (not All Inboxes).

  • HT201272 I purchased several older James Bond movies 2 years ago that have all disappeared from my iTunes and are no longer available. Will I be refunded for these items?

    I purchased several older James Bond movies 2 years ago that have all disappeared from my iTunes and are no longer available. Will I be refunded for these items?

    No you won't be refunded, it's your responsibility to keep copies of your purchases. Have you not got copies of them on backups ?

  • Why can't the finder in Mountain Lion 10.8.2 find files that have successfully downloaded, or that other programs can find?

    Why can't the finder in Mountain Lion 10.8.2 find files that have successfully downloaded, or that other programs can find?
    This happens with maybe 1 out of 5 files. These are files that have either an ."aa" extention, or or are libraries that icloud can see, but finder can't.

    Files beginning with a period are invisible and library files are system files. Spotlight cannot find either unless configured to do so (btw, this is not a Finder issue but a Spotlight issue.)
    Get Spotlight to search system files (and more)
    Enter the search term in the Finder window's search field.
    Click the [+] button in the search bar to add a search option.
    In the first drop down menu choose Other.
    Choose “System Files” from the list that pops up (and check the box to place in drop down menu to avoid this step later,) click on the OK button.
    Now back in the Finder choose Include from the second drop down menu.

  • How to check the sales orders that have been created with an Rebate Agreeme

    Dear Experts,
    Do you know how to check the sales orders that have been created with an Rebate Agreements?
    Thanks!!

    Hi Hoo Laa,
    I have one way but little lengthy.
    Rebate condition always appears in the billing document.
    So 1st you extract the sales order list from Table VBAK.
    once you have the sales order list then you can put your order list in Table VBFA --> Extract the billing document list.
    Now put that list in the table VBRK.
    In VBRK you will get the "Doc. condition" --> put that doc condition in table KONV with your rebate condition type.
    It will show the result.
    Later, through VLOOKUP you can identify in which order you have given rebate to your customer.
    Already said, Little lengthy
    Regards,
    MT

  • I'm trying to move my photos from my iphone to my PC, every time I go to my Computer it comes up with PhotoStream and iPhone , unfortunately this does that have all my photos from iPhone in it. Can anyone help me?

    I'm trying to move my photos from my iphone to my PC, every time I go to my Computer it comes up with PhotoStream and iPhone , unfortunately this does that have all my photos from iPhone in it. Can anyone help me?
    I'm using the most up to date software.
    Thanks

    Thanks for that, on the sync via iTunes, when my iphone is connected to iTunes via USB my photos tab says my iphone but I can never see any pics there. If I press Sync it still doesn't show anything.
    Correction from my original post, it only comes up with PhotoStream on my computer when I'm connected via USB.

  • Query to find patches that were applied using admrgpch

    Hi,
    I Hav a query to find what are all patches merged and applied using admrgpch.Here,From the output I am concluding that, all the bugs that were fixed during a specific time were merged and applied using admrgpch.
    Could u please suggest my approach is wrong Or any better alternative is available ??
    =========================================
    col DRIVER_FILE_NAME format a15;
    col ORIG_PATCH_NAME format a7;
    col BUG_NUMBER format a10;
    select To_char(c.creation_date,'DD-MON-YYYY HH24:MI:SS') creation_date, driver_file_name, orig_patch_name,merged_driver_flag, bug_number
    from ad_comprising_patches c, ad_patch_drivers d, ad_bugs b
    where c.patch_driver_id = d.patch_driver_id
    and c.bug_id = b.bug_id
    and c.creation_date like TO_DATE('&a','DD-MON-YYYY')
    order by c.creation_date, bug_number;
    =========================================
    BestRegards/

    Hi All,
    we submitt a concurrent request last month it compleated in 335min. Now the same request is taking 7 hours. what can i do, our production is going on live in june its the error in wrong time, we tryed it for 3 times.. every time its taking 7 to 7.20min how can i resolve it?
    1) Is there any use to increase SGA?
    2) Our queary is very much tuned . . .
    Waiting for responce...
    Thanks
    Krish.
    [email protected]

  • Billing Due List shows third party sales orders that have no SGR

    Hello,
    I've run into an issue where the billing due list (VF04) shows sales documents that have not gone through statistical goods receipt.  In our normal flow we create a sales order, which automatically creates a purchase requisition (PR).  We create a purchase order (PO) from the PR and when we generate a shipping notification (ASN) we also do a statistical goods receipt, which kicks off billing. 
    Normally items show up in the billing due list based on the billing type of the sales order item category.  In this case that indicator is B - relevant for order-related billing on the basis of the order quantity.  My understanding is that it should not show up in the billing due list until goods receipt, which is not happening for us.  We're seeing sales orders based on non-SGR'd PO's in the billing due list. 
    Also, in sales to billing copy control (vtfa) the billing quantity indicator is E - Goods receipt less invoiced quantity.
    Any ideas?  Have I provided enough info?  Thanks in advance!

    Kapil,
    Thank you very much!  However, a setting of 'F' only seems to show line items in the Billing Due List after I create a vendor invoice.  We are not using vendor invoices for our process and I want items to show up in the Billing Due List after the GRN.  Are you saying that you think items should show up in the Billing Due List after the GRN?  I know SAP doco kind hints to that, but I did try a setting of 'F' and it does not work; the items only show up after I create a vendor invoice.
    Any other info or guidance is greatly appreciated.
    Thanks,
    Mark

  • Finding Photos that have been saved as Tiff

    I've been using Blurb to make photo books, and love the results. One of the best things, is that it will read my iphoto library without me having to upload the photos to another website. Problem, is it will only read JPEG or PNG images in iphoto.
    It does read my RAW photos as long as I have not edited them, but when I edit the RAW, iphoto saves as 16-bit Tiff. Which I like for keeping the quality of my photos. But then I can't get them in my books. So I've gone back and forth (being the indecisive girl I am) and some RAW are then saved as JPEG, and others as TIFF.
    Now I'm trying to find which ones are TIFF. But I can't find anywhere that shows me what the new file type is after the edit has been done. I made a smart album of RAW, Edited but it will show me both the Tiff, and the Jpeg.
    Anyone know how to find out the file type of an image. I've looked under "Info" and it still lists as RAW.
    I noticed that the TIFF's have a file size of 0, so if there's a way to search for that criteria, that might help too.

    Thanks! For some reason, that won't actually find them. The filename is still .crw, at least what I can see. The search doesn't actually seem to search the "modified" file.
    I wound up actually just looking in the package contents of iphoto, trying to find all files that have a .tif extension and then going back to iphoto to find the matching picture. Not simple, but at least I can figure out which ones are the tiff.

Maybe you are looking for

  • Will Time machine use Icloud Storage for Back up   How?

    I purchases 50 MG of storage from Icloud but how do I transfer this to Time Machine ans activate backup?

  • How to get the duplicate rows in dynamically generate data table [list items collection] and send emails in sharepoint2010

    Hi, i have share point list like  below ID   name AdminEmail Useremail   URl   DueDate   UploadSatus 1    ppp     [email protected]  [email protected]    url  some date    uploaded 2    yyy       [email protected]   [email protected]   url somedate  

  • Some maybe simple questions

    Well, I recently got a 1TB WD external (apparently thats the new fashion), set up with Time Machine on my mom's iMac, and networked it. Works slow, but gets the job done (and hey, its 802.11g). I'm having a small inconveniece. Is there a way I can sh

  • How do I improve the quality of photos on the web?

    I have noticed that a lot of websites I visit the image quality is shocking, its driving me mad and cant figure out how to improve it for good instead of pressing SHIFT + A or whatever it is... please help   

  • Cannot execute xterm

    Hi all, I am trying to connect to solaris 8 zone via xterm. I am getting the following error xterm (Solaris 8 zone via SECURE SHELL) Connecting <Solaris 8 zone> via SECURE SHELL Thu Apr 15 13:42:47 2010 Warning: No xauth data; using fake authenticati