DCM_SUPPLR_ADDR

(SQL View)
Index Back

View of Supplier Addresses

View of Supplier Addresses for 3rd party systems

SELECT c.business_unit %Concat '.' %Concat a.vendor_id %Concat '.' %Concat b.vndr_loc , c.business_unit , a.setid , a.vendor_id , b.vndr_loc , f.xlatlongname , g.address_seq_num , %subrec(ADDRESS_SBR, d) FROM ps_vendor a , ps_vendor_loc b , ps_ap_dm_bu c , PS_VENDOR_ADDR d , ps_set_cntrl_rec e , psxlatitem f , ps_vloc_addr_vw g WHERE c.business_unit = e.setcntrlvalue AND e.rec_group_id = 'FS_38' AND e.recname = 'VENDOR' AND e.setid = a.setid AND a.setid = b.setid AND a.vendor_id = b.vendor_id AND b.eff_status = 'A' AND b.effdt = ( SELECT MAX(bb.effdt) FROM ps_vendor_loc bb WHERE bb.setid = b.setid AND bb.vendor_id = b.vendor_id AND bb.vndr_loc = b.vndr_loc AND bb.effdt <= %CurrentDateIn) AND b.setid = d.setid AND b.vendor_id = d.vendor_id AND g.address_seq_num = d.address_seq_num AND d.eff_status = 'A' AND d.effdt = ( SELECT MAX(dd.effdt) FROM PS_VENDOR_ADDR dd WHERE dd.setid = d.setid AND dd.vendor_id = d.vendor_id AND dd.address_seq_num = d.address_seq_num AND dd.effdt <= %CurrentDateIn) AND f.fieldname = 'VNDR_ADDR_TYPE' AND f.fieldvalue = g.vndr_addr_type AND f.eff_status = 'A' AND f.effdt = ( SELECT MAX(ff.effdt) FROM psxlatitem ff WHERE ff.fieldname = f.fieldname AND ff.fieldvalue = f.fieldvalue AND ff.effdt <= %CurrentDateIn) AND g.setid = b.setid AND g.vendor_id = b.vendor_id AND g.vndr_loc = b.vndr_loc AND g.effdt = b.effdt UNION SELECT c.business_unit %Concat '.' %Concat a.vendor_id %Concat '.' %Concat b.vndr_loc , c.business_unit , a.setid , a.vendor_id , b.vndr_loc , f.xlatlongname , d.address_seq_num , %subrec(ADDRESS_SBR, d) FROM ps_vendor a , ps_vendor_loc b , ps_ap_dm_bu c , PS_VENDOR_ADDR d , ps_set_cntrl_rec e , psxlatitem f WHERE c.business_unit = e.setcntrlvalue AND e.rec_group_id = 'FS_38' AND e.recname = 'VENDOR' AND e.setid = a.setid AND a.setid = b.setid AND a.vendor_id = b.vendor_id AND b.eff_status = 'A' AND b.effdt = ( SELECT MAX(bb.effdt) FROM ps_vendor_loc bb WHERE bb.setid = b.setid AND bb.vendor_id = b.vendor_id AND bb.vndr_loc = b.vndr_loc AND bb.effdt <= %CurrentDateIn) AND b.setid = d.setid AND b.vendor_id = d.vendor_id AND b.prim_addr_seq_num = d.address_seq_num AND d.eff_status = 'A' AND d.effdt = ( SELECT MAX(dd.effdt) FROM PS_VENDOR_ADDR dd WHERE dd.setid = d.setid AND dd.vendor_id = d.vendor_id AND dd.address_seq_num = d.address_seq_num AND dd.effdt <= %CurrentDateIn) AND f.fieldname = 'VNDR_ADDR_TYPE' AND f.fieldvalue = 'PRIM' AND f.eff_status = 'A' AND f.effdt = ( SELECT MAX(ff.effdt) FROM psxlatitem ff WHERE ff.fieldname = f.fieldname AND ff.fieldvalue = f.fieldvalue AND ff.effdt <= %CurrentDateIn)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 DCM_SUPPLIER_KEY Character(27) VARCHAR2(27) NOT NULL Business Unit Concatenated with Supplier ID and Supplier Location to make a unique combination for third party systems.
2 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
3 VENDOR_SETID Character(5) VARCHAR2(5) NOT NULL Vendor SetID
4 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
5 VNDR_LOC Character(10) VARCHAR2(10) NOT NULL Vendor Location
6 DESCR Character(30) VARCHAR2(30) NOT NULL Description
7 ADDRESS_SEQ_NUM Number(5,0) INTEGER NOT NULL Address Sequence Number
8 COUNTRY Character(3) VARCHAR2(3) NOT NULL Country

Prompt Table: COUNTRY_TBL

9 ADDRESS1 Character(55) VARCHAR2(55) NOT NULL Address 1
10 ADDRESS2 Character(55) VARCHAR2(55) NOT NULL Address 2
11 ADDRESS3 Character(55) VARCHAR2(55) NOT NULL Address 3
12 ADDRESS4 Character(55) VARCHAR2(55) NOT NULL Address 4
13 CITY Character(30) VARCHAR2(30) NOT NULL City
14 NUM1 Character(6) VARCHAR2(6) NOT NULL Number 1
15 NUM2 Character(6) VARCHAR2(6) NOT NULL Number 2
16 HOUSE_TYPE Character(2) VARCHAR2(2) NOT NULL House Type
AB=House Boat
WW=Trailer
17 ADDR_FIELD1 Character(2) VARCHAR2(2) NOT NULL Address Field 1
18 ADDR_FIELD2 Character(4) VARCHAR2(4) NOT NULL Address Field 2
19 ADDR_FIELD3 Character(4) VARCHAR2(4) NOT NULL Address Field 3
20 COUNTY Character(30) VARCHAR2(30) NOT NULL County
21 STATE Character(6) VARCHAR2(6) NOT NULL State

Prompt Table: %EDIT_STATE

22 POSTAL Character(12) VARCHAR2(12) NOT NULL Postal
23 GEO_CODE Character(11) VARCHAR2(11) NOT NULL Geo Code
24 IN_CITY_LIMIT Character(1) VARCHAR2(1) NOT NULL In City Limit

Y/N Table Edit