AP 1099 Electronic Media - draft

Description
Categories: BI Publisher, Financials, Procurement
Columns: C Rownum, Vendor Name, Tax Reporting Name, Payee Name Control, Vendor Line, Vendor City, Vendor State, Vendor Zip, Error Text, Misc1 ...
Application: Payables
Source: 1099 Electronic Media (XML) - Not Supported: Reserved For Future Use
Short Name: APTCMT_XML
DB package: AP_APXT7CMT_XMLP_PKG
SELECT  rownum C_rownum, P.vendor_name vendor_name,
                P.tax_reporting_name tax_reporting_name,
                rpad(P.name_control, 4) payee_name_control,
                pvs.address_line1||' '||pvs.address_line2||' '||pvs.address_line3 vendor_line,
                decode(substr(p.organization_type_lookup_code,1,7), 'FOREIGN',
                  substr(pvs.city,1,21)||' '||substr(pvs.state,1,9)||' '||substr(ft.territory_short_name,1,10),
                  rpad(substr(pvs.city,1,40),40)) vendor_city,
                rpad(substr(pvs.state,1,2),2) vendor_state,
                rpad(substr(replace(replace(pvs.zip,'-',''),' ',''),1,9),9) vendor_zip,
                decode(pvs.address_line1,'','No Address Line 1. ')||
                     decode(substr(p.organization_type_lookup_code,1