AR_SHIP_TO_CUSTOMERS_S_V

Details

  • Schema: FUSION

  • Object owner: AR

  • Object type: VIEW

Columns

Name

SHIP_CUST_ACCOUNT_NUMBER

SHIP_CUST_TYPE

SHIP_CUST_ACCOUNT_ID

HIP_CUST_GLOBAL_ATTR1

SHIP_CUST_GLOBAL_ATTR10

SHIP_CUST_GLOBAL_ATTR12

SHIP_CUST_GLOBAL_ATTR9

SHIP_CUST_GLOBAL_ATTR_CAT

SHIP_CUST_NPA_NUMBER

SHIP_CUST_AREA_CODE

SHIP_CUST_CAT_CODE

SHIP_CUST_CITY

SHIP_CUST_COUNTRY

SHIP_CUST_COUNTY

SHIP_CUST_GROUP_TYPE

SHIP_CUST_GSA_FLAG

SHIP_CUST_FISCAL_CODE

SHIP_CUST_PARTY_ID

SHIP_CUST_PARTY_NAME

SHIP_CUST_PARTY_NUMBER

SHIP_CUST_PARTY_TYPE

SHIP_CUST_POSTAL_CODE

SHIP_CUST_PROVINCE

SHIP_CUST_STATE

SHIP_CUST_TAX_REFERENCE

LINE_NUMBER

EVENT_ID

LEDGER_ID

SHIP_CUSTOMER_CLASS_CODE

Query

SQL_Statement

SELECT

/*+INDEX(l ar_xla_lines_extract_n1)*/

null ship_cust_account_number ,

null ship_cust_type ,

null ship_cust_account_id ,

null hip_cust_global_attr1 ,

null ship_cust_global_attr10 ,

null ship_cust_global_attr12 ,

null ship_cust_global_attr9 ,

null ship_cust_global_attr_cat ,

null ship_cust_npa_number ,

p5.primary_phone_area_code SHIP_CUST_AREA_CODE,

p5.category_code ship_cust_cat_code

,loc.city ship_cust_city

,loc.country ship_cust_country

,loc.county ship_cust_county

,p5.group_type ship_cust_group_type ,

p5.gsa_indicator_flag ship_cust_gsa_flag ,

p5.jgzz_fiscal_code ship_cust_fiscal_code ,

p5.party_id ship_cust_party_id ,

p5.party_name ship_cust_party_name ,

p5.party_number ship_cust_party_number ,

p5.party_type ship_cust_party_type

,loc.postal_code ship_cust_postal_code

,loc.province ship_cust_province

,loc.state ship_cust_state

,null ship_cust_tax_reference ,

l.line_number line_number ,

l.event_id event_id ,

l.ledger_id ledger_id ,

null ship_customer_class_code

FROM hz_parties p5

,ar_xla_lines_extract l

,hz_party_site_uses p_su

,hz_party_sites p_site

,hz_locations loc

WHERE p5.party_id = l.ship_customer_id

AND p_su.party_site_use_id = l.ship_site_use_id

AND p_site.party_site_id = p_su.party_site_id

AND loc.location_id = p_site.location_id

AND ((l.event_class_code IN ('INVOICE','DEBIT_MEMO','DEPOSIT', 'GUARANTEE','CHARGEBACK','ADJUSTMENT')

AND l.level_flag = 'H')

OR (l.event_class_code IN ('CREDIT_MEMO','RECEIPT')

AND l.level_flag = 'L'

AND l.from_to_flag = 'T'))