[E-Bussiness Suite] Query PO dengan Receipt Number by Date


Deskripsi
      Query untuk melisting PO yang memiliki Receipt Number dan difilter berdasarkan tanggal.

Howto



select  distinct PRHA.segment1 as PO_NUMBER
       ,RVHV.RECEIPT_NUM as RECEIPT_NUMBER

from PO_HEADERS_ALL PRHA

    ,RCV_SHIPMENT_LINES RSL
    ,RCV_VRC_HDS_V RVHV
    
where PRHA.CREATION_DATE >= TO_DATE('17/05/2013','DD/MM/YY')
AND PRHA.CREATION_DATE <= TO_DATE('22/05/2013','DD/MM/YY')
AND PRHA.po_header_id = RSL.po_header_id 
AND RSL.shipment_header_id = RVHV.shipment_header_id 


--Update--

Jika ingin ditambahkan Vendor dan Buyer maka akan menjadi seperti ini

select distinct PRHA.segment1 as PO_NUMBER
       ,RVHV.RECEIPT_NUM as RECEIPT_NUMBER
       ,PV.VENDOR_NAME AS VENDOR 
       ,HE.FULL_NAME AS BUYER

from PO_HEADERS_ALL PRHA

       ,RCV_SHIPMENT_LINES RSL
       ,RCV_VRC_HDS_V RVHV
       ,PO_VENDORS PV
       ,HR_EMPLOYEES HE
    
where PRHA.CREATION_DATE >= TO_DATE('17/05/2013','DD/MM/YY')
AND PRHA.CREATION_DATE <= TO_DATE('22/05/2013','DD/MM/YY')
AND PRHA.VENDOR_ID = PV.VENDOR_ID
AND PRHA.AGENT_ID = HE.EMPLOYEE_ID
AND PRHA.po_header_id = RSL.po_header_id 
AND RSL.shipment_header_id = RVHV.shipment_header_id 

Post a Comment

Harap gunakan bahasa yang baik dan sopan, terima kasih