Need help in getting all Open PO (Standard & BPA)

Hi All,
I have requirement to fetch all the Open PO (Standard & BPA) for given specific item and fall under given specified date. I was able to develop below query, need your help in correcting or modifying it.
Query
SELECT POH.segment1 into l_order_number
FROM PO_LINE_LOCATIONS_ALL POLL1,
PO_LINES_ALL POL,
PO_HEADERS_ALL POH
WHERE
POL.PO_LINE_ID = POLL1.PO_LINE_ID
AND NVL (POLL1.promised_date, POLL1.need_by_date) IN
(SELECT MIN (
NVL (pll.promised_date,
pll.need_by_date))
FROM po_lines_all pol,
po_releases_all pra,
po_line_locations_all pll
WHERE
pol.po_line_id = pll.po_line_id
AND NVL (pra.po_release_id, 1) =
NVL (pll.po_release_id, 1)
AND pol.item_id = p_component_item_id
AND pra.authorization_status = 'APPROVED'
AND (  pll.quantity
- (  pll.QUANTITY_RECEIVED
+ pll.QUANTITY_CANCELLED)) > 0
AND NVL (TRUNC (pll.promised_date),
TRUNC (pll.need_by_date)) <=
TRUNC (ld_date))
AND pol.item_id = p_component_item_id
AND POH.PO_HEADER_ID = POL.PO_HEADER_ID
AND POH.authorization_status = 'APPROVED'
AND (  POLL1.quantity
- (POLL1.QUANTITY_RECEIVED + POLL1.QUANTITY_CANCELLED)) >
0;
Thanks

Hi All,
I have requirement to fetch all the Open PO (Standard & BPA) for given specific item and fall under given specified date. I was able to develop below query, need your help in correcting or modifying it.
Query
SELECT POH.segment1 into l_order_number
FROM PO_LINE_LOCATIONS_ALL POLL1,
PO_LINES_ALL POL,
PO_HEADERS_ALL POH
WHERE
POL.PO_LINE_ID = POLL1.PO_LINE_ID
AND NVL (POLL1.promised_date, POLL1.need_by_date) IN
(SELECT MIN (
NVL (pll.promised_date,
pll.need_by_date))
FROM po_lines_all pol,
po_releases_all pra,
po_line_locations_all pll
WHERE
pol.po_line_id = pll.po_line_id
AND NVL (pra.po_release_id, 1) =
NVL (pll.po_release_id, 1)
AND pol.item_id = p_component_item_id
AND pra.authorization_status = 'APPROVED'
AND (  pll.quantity
- (  pll.QUANTITY_RECEIVED
+ pll.QUANTITY_CANCELLED)) > 0
AND NVL (TRUNC (pll.promised_date),
TRUNC (pll.need_by_date)) <=
TRUNC (ld_date))
AND pol.item_id = p_component_item_id
AND POH.PO_HEADER_ID = POL.PO_HEADER_ID
AND POH.authorization_status = 'APPROVED'
AND (  POLL1.quantity
- (POLL1.QUANTITY_RECEIVED + POLL1.QUANTITY_CANCELLED)) >
0;
Thanks

Similar Messages

  • Hi need help on getting customer open  items

    hi all,
    i need help regarding getting open items for customers in the previous
    ie. if i give current date,
    i want to get the open items for past 30 days from current date
    help me to get this ...
    thanks a lot
    regards,
    selvi

    or else ,
    use table BSID.
    Regards
    Peram

  • I need help. When I open my "page" all my documents were gone. I need those things.

    I need help. When I open my "page" all my documents were gone. I need those things.

    I meant flickering means...when i open combobox and click focus is going out of air window as though combobox is in some another window. once click press mouse down...focus is in combo box but window loses focus and once releases mouse ..window back to focus.  Kinda annoying effect when u try to click on combo box and select.
    Tested with html scout sample app and load any webpage with combobox , window loses focus.
    But any combobox made using EXT it do not flicker because ext handles focus event correctly.
    My windows has set of combo box and user always select different value from combo box if keep losing focus and coming back its annoying as hell.

  • Bapi to get all open purchase order

    hello experts,
    is there any bapi exists to get all open PO???
    thanks in advance.
    Regards
    Saurabh

    Hi
    No need of FM. You can directly select them using SELECT Query.
    SELECT EBELN EBELP FROM EKPO WHERE EREKZ NE 'X'.

  • Need help in getting 'RoleApprover' and 'Manager of RoleApprover'

    We are developing a Custom Role Approval Process using SOA composite.
    A manager or a delegated admin will be raising a Role Approval request for a beneficiary. We need to assign the Approval task to beneficiaries' manager or Role Approver.
    If the RoleApprover does not Approve the task in stipulated time, the task needs to get escalated to RoleApprover's manager.
    I'm new to OIM APIs, i was folllowing the tutorial "developing_oim_custom_approval_process_for_role_request.pdf". This needs an user defined field 'RoleApprover' created in the Role request form. We cannot create user defined field in the role request form.
    I need help in getting the 'RoleApprover' and the 'Manager of RoleApprover' programmatically.
    Payload from the OIM Approval request follows:
    <ns2:process>
    <RequestID>176</RequestID>
    <RequestModel>Assign Roles</RequestModel>
    <RequestTarget>Onhand Quantity</RequestTarget>
    <RequesterDetails>
    <FirstName>Steve</FirstName>
    <LastName>Waugh</LastName>
    <Login>STEVEWAUGH</Login>
    <DisplayName>Steve Waugh</DisplayName>
    <ManagerLogin>XELSYSADM</ManagerLogin>
    <OrganizationName>Test</OrganizationName>
    <Email>[email protected]</Email>
    <Status>Active</Status>
    <XellerateType>End-User</XellerateType>
    <UserType>Full-Time</UserType>
    <Role>ALL USERS</Role>
    <Role>Primavera P6 - Global</Role>
    <Role>iProcurement Catalog Administrator</Role>
    <Role>Onhand Quantity</Role>
    <Role>Test Purchasing Super User</Role>
    <Role>Test Delegated Administrator</Role>
    <Role>HELPDESK ADMINISTRATORS</Role>
    <Role>Test e-Commerce Gateway Super User</Role>
    <Role>eBusiness Finance</Role>
    <Role>Test Line Manager</Role>
    <Role>Test_ApplicationApprover</Role>
    </RequesterDetails>
    <BeneficiaryDetails>
    <FirstName>David</FirstName>
    <LastName>Boon</LastName>
    <Login>DAVIDBOON</Login>
    <DisplayName>David Boon</DisplayName>
    <ManagerLogin>STEVEWAUGH</ManagerLogin>
    <OrganizationName>TestCO</OrganizationName>
    <Email>[email protected]</Email>
    <Status>Active</Status>
    <XellerateType>End-User</XellerateType>
    <UserType>Full-Time</UserType>
    <Role>ALL USERS</Role>
    <Role>Hyperion</Role>
    <Role>Test Purchasing Administrator</Role>
    <Role>Test Internet Expenses Audit Manager</Role>
    <Role>Test Internet Expenses Auditor</Role>
    </BeneficiaryDetails>
    <ObjectDetails>
    <name>Test Onhand Quantity</name>
    <attributes/>
    </ObjectDetails>
    <url>
    http://host:port/workflowservice/CallbackService
    </url>
    <OtherDetails/>
    </ns2:process>
    Edited by: rajesh on Feb 13, 2011 9:00 AM

    Choose Xerces2.4 to serialize the DOM object is an option.
    javac XercesTest.java -classpath xmlParserAPIs.jar;xercesImpl.jar;.
    java -classpath xmlParserAPIs.jar;xercesImpl.jar;. XercesTest test.xml
    below is the source file: XercesTest.java
    //JAXP
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    //APACHE SERIALIZE FUNCTION
    import org.apache.xml.serialize.*;
    class XercesTest
    public static void main(String[] args) throws Exception
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document doc = builder.parse( new File( args[0] ) );
    File f = new File( "copy_of_"+ args[0] );
    OutputFormat format = new OutputFormat("xml","UTF-8",true ) ;
    FileOutputStream fout = new FileOutputStream( f );
    XMLSerializer ser = new XMLSerializer(fout, format );
    ser.serialize( doc );
    maybe it's helpful
    land

  • I have a Steinberg MI4 and a Roland Fantom X7, and am trying to use my Fantom in Logic to record audio. Need help setting it all up using MIDI cables. Please help !

    I have a Steinberg MI4 and a Roland Fantom X7, and am trying to use my Fantom in Logic to record audio. Need help setting it all up using MIDI cables. Please help !

    Encryption wouldn't matter except for Wifi.
    While 10.2 might help, there's not much you can do on the Internet these days with less than 10.4.11
    Tiger Requirements...
    To use Mac OS X 10.4 Tiger, your Macintosh needs:
        * A PowerPC G3, G4, or G5 processor
        * Built-in FireWire
        * At least 256 MB of RAM (I recommend 1GB minimum)
        * DVD drive (DVD-ROM), Combo (CD-RW/DVD-ROM) or SuperDrive (DVD-R) for installation
        * At least 3 GB of free disk space; 4 GB if you install the XCode 2 Developer Tools  (I recommend 20GB minimum)
    http://support.apple.com/kb/HT1514
    http://www.ebay.com/sch/i.html?_nkw=mac+os+x+tiger+retail+10.4
    See Tom's, (Texas Mac Man), great info on where/how to find/get Tiger...
    https://discussions.apple.com/message/15305521#15305521
    Or Ali Brown's great info on where/how to find/get Tiger...
    http://discussions.apple.com/thread.jspa?messageID=10381710#10381710
    As far as Memory, that's sort of easy, find your eMac here...
    http://eshop.macsales.com/MyOWC/Models.cfm?Family=emac&sType=Memory
    As far as Hard Drive, it's not easy to replace the Internal drive, I'd maybe suggest an external Firewire drive to boot from...
    http://eshop.macsales.com/item/Other%20World%20Computing/MAU4S7500G16/

  • I need help to find and open a job app that I exported, was able to fill out and sign and saved and now can't open it? What did I do wrong?

    I need help to find and open a job app that I exported, was able to fill out and sign and saved and now can't open it? What did I do wrong?

    What file format did you export it to?

  • I need help in getting my Iphone 3gs unfrozen

    Need help in getting my Iphone 3gs unfrozen. The apple logo is shown yet it will not restart. Suggestions?

    Hi,
    Try here >  iPhone and iPod touch: Frozen and unresponsive

  • I need help in getting my software options in CS5 Photoshop Student version. We have registered the product but don't have print preview or Adjust Auto Levels for example?

    I need help in getting my software options in CS5 Photoshop Student version. We have registered the product but don't have print preview or Adjust Auto Levels for example?

    <moved from Downloading, Installing, Setting Up to Photoshop General Discussion>

  • I need help in getting my reponses

    I need help in getting my responses back, or I am sending out the form wrong and people aren't getting it. Either way I need help, as I am getting very frustrated.  Thanks Dori

    <moved from Downloading, Installing, Setting Up to Photoshop General Discussion>

  • I need help in finding all the new fontsin iPad 2 using iOS  5

    I need help in finding all the new fonts in ipad 2 using ios 5

    You cannot change the email font. You can make it bold, italics and underline the type, but Helvetica is your only choice in the mail app.
    In the notes app you have 3 choice Noteworthy, Helvetica and Marker Felt. The font can be changed in Settings>Notes>Font.
    You can only use fonts that are built into the app that you are using at the time. You cannot pick and choose fonts from a list of all of the fonts that may be on the iPad but only from the list of fonts that the app allows.

  • Sign in told my firefox out of date did try to do upgrade but could not need help to get my sign in workin email

    sign in told my firefox is out of date. did try to do the upgrade but could not do
    need help to get my sign in working

    Kathleen Beal/funstarling please respond in https://support.mozilla.org/en-US/questions/982953

  • I changed my password i forgot what it is need help to get back in

    i need help i changed my passwordand i forgot it now i need help to get back in it keeps saying disabled?? help me plz

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                          
    If recovery mode does not work try DFU mode.                         
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings         
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • The basic sliders disappeared. Including the Exposure, Contrast, Highlights, Shadows, Whites, Blacks, Clarity and Vibrance Sliders are no longer available. I need help to get them back

    The basic sliders disappeared. Including the Exposure, Contrast, Highlights, Shadows, Whites, Blacks, Clarity and Vibrance Sliders are no longer available. I need help to get them back on the program. 
    I can't figure out where the sliders went and how to put them back on. Anyone have any suggestions?
    Thanks

    In Lightroom, go to the Window menu, select Panels, select Basic

  • TS1363 i need help to get out of recovery mode

    i need help to get out of recovery mode

    To get the phone out of recovery mode you will need to connect it to a computer with iTunes installed on it and restore it.

Maybe you are looking for

  • Strange Message After Applying 10.5.5 Update

    O, ye gurus, can ye help me ascertain this cryptic message after running Disk First Aid? Warning: SUID file "System/Library/CoreServices/Finder.app/Contents/Resources/OwnerGroupTool" has been modified and will not be repaired Warning: SUID file "usr/

  • Display problem from different domain

    Hi I am not able to make my display(DISPLAY variable). When I m exporting the display variable from the same domain as the linux box is present. It is working fine but when I trying to export the DISPLAY variable from different domain and use the GUI

  • Animation easing

    Hi all, Does anyone know if there is a way to apply easing to specific ranges in a motion tween? I have to say the new tween tools are very dissapointing - it takes me twice as long to do stuff and I often get un-predictable effects. Also, can anyone

  • Simulation VIs and functions

    With Regards; The LabView that I am using works on a computer that has Windows Vista Ultimate (32 bit) installed. I was doing a control design and I notice that some of the functions in simulation don't work. Does this mean that because of the operat

  • UNDO retention causing excessive I/O ?

    New DBA here. Quick Summary: We have an oracle 10gR2 DB on AIX 5.3. OS runs from the box, Database runs from a san. Aside from the DB, there is a web based application running on the box, which uses the DB. System is dedicated to this application. We