Saturday, 12 December 2015

Oracle SCM : RFQ (Request For Quotation) Query

Here we have the query to get the RFQ (Request For Quotation) details, like RFQ No, Supplier details, RFQ date, BID Number, Quote Submission status, Awarded Status..


/* Formatted on 13/12/2015 10:40:26 (QP5 v5.126.903.23003) */
SELECT   assa.VENDOR_ID SUPPLIER_ID,
         PBP.TRADING_PARTNER_NAME SUPPLIER_NAME,
         PAH.DOCUMENT_NUMBER RFQ_NO,
         PADSL.DISPLAY_NAME RFQ_OUTCOME,
         PAH.OPEN_BIDDING_DATE RFQ_DATE,
         PBH.bid_number,
         CASE WHEN PBH.bid_number IS NOT NULL THEN 'Yes' ELSE 'No' END
            Quote_sbumitted,
         DECODE (PBH.AWARD_STATUS, 'AWARDED', 'Yes', 'No') AWARD_STATUS
  FROM   PON_AUCTION_HEADERS_ALL PAH,
         PON_AUC_DOCTYPES PAD,
         PO_ALL_DOC_STYLE_LINES PADSL,
         pon_bidding_parties pbp,
         PON_BID_HEADERS PBH,
         AP_SUPPLIER_SITES_ALL assa
 WHERE       1 = 1
         AND PAD.DOCTYPE_ID = PAH.DOCTYPE_ID
         AND PAD.INTERNAL_NAME = 'REQUEST_FOR_QUOTE'
         AND PAH.AUCTION_STATUS IS NOT NULL
         AND PAH.AUCTION_STATUS <> 'DRAFT'
         AND PAH.STYLE_ID = PADSL.STYLE_ID(+)
         AND PAH.CONTRACT_TYPE = PADSL.DOCUMENT_SUBTYPE(+)
         AND PAH.AUCTION_HEADER_ID = PBP.AUCTION_HEADER_ID
         AND PBP.AUCTION_HEADER_ID = PBH.AUCTION_HEADER_ID(+)
         AND PBP.TRADING_PARTNER_ID = PBH.TRADING_PARTNER_ID(+)
         AND PBP.vendor_site_id = assa.vendor_site_id
     -- AND PAH.DOCUMENT_NUMBER='31001'




Enjoy and Stay Well !! :)

No comments:

Post a Comment

Power BI: Show Last Data Refresh on Dashboard

 To show last data refresh on Power BI report follow the below steps. 1. Open Report Query Editor Mode. 2. Clink on Get Data -> Blank...