Home » Applications » Oracle Fusion Apps & E-Business Suite » Suppliers - Query to see when the vendor site was changed from 'CHECK' payment method to 'EDI' (R12.1.3)
Suppliers - Query to see when the vendor site was changed from 'CHECK' payment method to 'EDI' [message #635573] Wed, 01 April 2015 08:54
magik570
Messages: 2
Registered: April 2015
Location: United States
Junior Member
I have this, that shows EDI sites.. but need to know when the site was flipped to EDI
with c_edi_pyo as 
(select etd.tp_header_id,emap.map_code 
  from ece_tp_details etd,ece_mappings emap 
 where etd.map_id=emap.map_id 
   and nvl(etd.edi_flag,'N')='Y' 
   and emap.map_code='EC_PYO_FF'), 
c_edi_asni as 
(select etd.tp_header_id,emap.map_code 
  from ece_tp_details etd,ece_mappings emap 
 where etd.map_id=emap.map_id 
   and nvl(etd.edi_flag,'N')='Y' 
   and emap.map_code='EC_ASNI_FF'), 
c_edi_ini as 
(select etd.tp_header_id,emap.map_code 
  from ece_tp_details etd,ece_mappings emap 
 where etd.map_id=emap.map_id 
   and nvl(etd.edi_flag,'N')='Y' 
   and emap.map_code='EC_INI_FF'), 
c_edi_poo as 
(select etd.tp_header_id,emap.map_code 
  from ece_tp_details etd,ece_mappings emap 
 where etd.map_id=emap.map_id 
   and nvl(etd.edi_flag,'N')='Y' 
   and emap.map_code='EC_POO_FF') 
select asup.vendor_name Supplier_name, 
      asup.segment1 supplier_number, 
      assa.vendor_site_code supplier_site_code, 
      assa.EDI_ID_NUMBER EDI_ID, 
      decode(pyo.tp_header_id, NULL, 'No', 'Yes') EDI_820_PAYMENT_OUT, 
      decode(poo.tp_header_id, NULL, 'No', 'Yes') EDI_850_PO_OUT, 
      decode(asni.tp_header_id, NULL, 'No', 'Yes') EDI_856_ASNI_IN, 
      decode(ini.tp_header_id, NULL, 'No', 'Yes') EDI_810_INV_IN 
 from ece_tp_headers        eth, 
      ap_supplier_sites_all assa, 
      ap_suppliers          asup, 
      c_edi_pyo             pyo, 
      c_edi_poo             poo, 
      c_edi_asni            asni, 
      c_edi_ini             ini 
where eth.tp_header_id = assa.tp_header_id 
  and assa.vendor_id = asup.vendor_id 
  and eth.tp_header_id = pyo.tp_header_id(+) 
  and eth.tp_header_id = poo.tp_header_id(+) 
  and eth.tp_header_id = asni.tp_header_id(+) 
  and eth.tp_header_id = ini.tp_header_id(+); 

*Blackswan added {code} tags. Please do so yourself in the future.

Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and read http://www.orafaq.com/forum/t/174502/

[Updated on: Wed, 01 April 2015 08:59] by Moderator

Report message to a moderator

Previous Topic: Calculate Balance in Ledger Please help
Next Topic: FRM-40733 pl/sql built-in SET_GROUP_CHAR_CELL failed
Goto Forum:
  


Current Time: Sun Nov 24 07:12:55 CST 2024