AR_BILL_TO_CUSTOMERS_S_V

Details

  • Schema: FUSION

  • Object owner: AR

  • Object type: VIEW

Columns

Name

BILL_CUST_ACCOUNT_NUMBER

BILL_CUST_TYPE

BILL_CUST_ACCOUNT_ID

BILL_CUST_GLOBAL_ATTR1

BILL_CUST_GLOBAL_ATTR10

BILL_CUST_GLOBAL_ATTR12

BILL_CUST_GLOBAL_ATTR9

BILL_CUST_GLOBAL_ATTR_CAT

BILL_CUST_NPA_NUMBER

BILL_CUST_CAT_CODE

BILL_CUST_CITY

BILL_CUST_COUNTRY

BILL_CUST_COUNTY

BILL_CUST_GROUP_TYPE

BILL_CUST_GSA_FLAG

BILL_CUST_FISCAL_CODE

BILL_CUST_PARTY_ID

BILL_CUST_PARTY_NAME

BILL_CUST_PARTY_NUMBER

BILL_CUST_PARTY_TYPE

BILL_CUST_POSTAL_CODE

BILL_CUST_PROVINCE

BILL_CUST_STATE

BILL_CUST_TAX_REFERENCE

EVENT_ID

LINE_NUMBER

LEDGER_ID

BILL_CUSTOMER_CLASS_CODE

BILL_CUST_ATTR1

BILL_CUST_ATTR2

BILL_CUST_ATTR3

BILL_CUST_ATTR4

BILL_CUST_ATTR5

BILL_CUST_ATTR6

BILL_CUST_ATTR7

BILL_CUST_ATTR8

BILL_CUST_ATTR9

BILL_CUST_ATTR10

BILL_CUST_ATTR11

BILL_CUST_ATTR12

BILL_CUST_ATTR13

BILL_CUST_ATTR14

BILL_CUST_ATTR15

BILL_CUST_ATTR_CAT

BILL_TO_PARTYPROF_ATTR_CAT

BILL_TO_PARTYPROF_ATTR1

BILL_TO_PARTYPROF_ATTR2

BILL_TO_PARTYPROF_ATTR3

BILL_TO_PARTYPROF_ATTR4

BILL_TO_PARTYPROF_ATTR5

BILL_TO_PARTYPROF_ATTR6

BILL_TO_PARTYPROF_ATTR7

BILL_TO_PARTYPROF_ATTR8

BILL_TO_PARTYPROF_ATTR9

BILL_TO_PARTYPROF_ATTR10

BILL_TO_PARTYPROF_ATTR11

BILL_TO_PARTYPROF_ATTR12

BILL_TO_PARTYPROF_ATTR13

BILL_TO_PARTYPROF_ATTR14

BILL_TO_PARTYPROF_ATTR15

BILL_TO_PARTYPROF_ATTR16

BILL_TO_PARTYPROF_ATTR17

BILL_TO_PARTYPROF_ATTR18

BILL_TO_PARTYPROF_ATTR19

BILL_TO_PARTYPROF_ATTR20

BILL_TO_PARTYPROF_ATTR21

BILL_TO_PARTYPROF_ATTR22

BILL_TO_PARTYPROF_ATTR23

BILL_TO_PARTYPROF_ATTR24

BILL_TO_PARTYPROF_ATTR25

BILL_TO_PARTYPROF_ATTR26

BILL_TO_PARTYPROF_ATTR27

BILL_TO_PARTYPROF_ATTR28

BILL_TO_PARTYPROF_ATTR29

BILL_TO_PARTYPROF_ATTR30

BILL_TO_PARTYPROF_ATTRNUM1

BILL_TO_PARTYPROF_ATTRNUM2

BILL_TO_PARTYPROF_ATTRNUM3

BILL_TO_PARTYPROF_ATTRNUM4

BILL_TO_PARTYPROF_ATTRNUM5

BILL_TO_PARTYPROF_ATTRNUM6

BILL_TO_PARTYPROF_ATTRNUM7

BILL_TO_PARTYPROF_ATTRNUM8

BILL_TO_PARTYPROF_ATTRNUM9

BILL_TO_PARTYPROF_ATTRNUM10

BILL_TO_PARTYPROF_ATTRNUM11

BILL_TO_PARTYPROF_ATTRNUM12

BILL_TO_PARTYPROF_ATTRDATE1

BILL_TO_PARTYPROF_ATTRDATE2

BILL_TO_PARTYPROF_ATTRDATE3

BILL_TO_PARTYPROF_ATTRDATE4

BILL_TO_PARTYPROF_ATTRDATE5

BILL_TO_PARTYPROF_ATTRDATE6

BILL_TO_PARTYPROF_ATTRDATE7

BILL_TO_PARTYPROF_ATTRDATE8

BILL_TO_PARTYPROF_ATTRDATE9

BILL_TO_PARTYPROF_ATTRDATE10

BILL_TO_PARTYPROF_ATTRDATE11

BILL_TO_PARTYPROF_ATTRDATE12

Query

SQL_Statement

SELECT

/*+INDEX (l ar_xla_lines_extract_n1)*/

bill_cust_account_number,

bill_cust_type_code bill_cust_type,

bill_cust_account_id,

bill_cust_global_attr1,

bill_cust_global_attr10,

bill_cust_global_attr12,

bill_cust_global_attr9,

bill_cust_global_attr_cat,

bill_cust_npa_number,

bill_cust_cat_code,

bill_cust_city,

bill_cust_country,

bill_cust_county,

bill_cust_group_type_code bill_cust_group_type,

bill_cust_gsa_flag,

bill_cust_fiscal_code,

bill_cust_party_id,

bill_cust_party_name,

bill_cust_party_number,

bill_cust_party_type,

bill_cust_postal_code,

bill_cust_province,

bill_cust_state,

bill_cust_tax_reference,

l.event_id event_id,

l.line_number line_number,

l.ledger_id ledger_id,

bill_customer_class_code,

bill_cust_attr1,

bill_cust_attr2,

bill_cust_attr3,

bill_cust_attr4,

bill_cust_attr5,

bill_cust_attr6,

bill_cust_attr7,

bill_cust_attr8,

bill_cust_attr9,

bill_cust_attr10,

bill_cust_attr11,

bill_cust_attr12,

bill_cust_attr13,

bill_cust_attr14,

bill_cust_attr15,

bill_cust_attr_cat,

ppgt.attribute_category bill_to_partyprof_attr_cat,

ppgt.attribute1 bill_to_partyprof_attr1,

ppgt.attribute2 bill_to_partyprof_attr2,

ppgt.attribute3 bill_to_partyprof_attr3,

ppgt.attribute4 bill_to_partyprof_attr4,

ppgt.attribute5 bill_to_partyprof_attr5,

ppgt.attribute6 bill_to_partyprof_attr6,

ppgt.attribute7 bill_to_partyprof_attr7,

ppgt.attribute8 bill_to_partyprof_attr8,

ppgt.attribute9 bill_to_partyprof_attr9,

ppgt.attribute10 bill_to_partyprof_attr10,

ppgt.attribute11 bill_to_partyprof_attr11,

ppgt.attribute12 bill_to_partyprof_attr12,

ppgt.attribute13 bill_to_partyprof_attr13,

ppgt.attribute14 bill_to_partyprof_attr14,

ppgt.attribute15 bill_to_partyprof_attr15,

ppgt.attribute16 bill_to_partyprof_attr16,

ppgt.attribute17 bill_to_partyprof_attr17,

ppgt.attribute18 bill_to_partyprof_attr18,

ppgt.attribute19 bill_to_partyprof_attr19,

ppgt.attribute20 bill_to_partyprof_attr20,

ppgt.attribute21 bill_to_partyprof_attr21,

ppgt.attribute22 bill_to_partyprof_attr22,

ppgt.attribute23 bill_to_partyprof_attr23,

ppgt.attribute24 bill_to_partyprof_attr24,

ppgt.attribute25 bill_to_partyprof_attr25,

ppgt.attribute26 bill_to_partyprof_attr26,

ppgt.attribute27 bill_to_partyprof_attr27,

ppgt.attribute28 bill_to_partyprof_attr28,

ppgt.attribute29 bill_to_partyprof_attr29,

ppgt.attribute30 bill_to_partyprof_attr30,

ppgt.attribute_number1 bill_to_partyprof_attrnum1,

ppgt.attribute_number2 bill_to_partyprof_attrnum2,

ppgt.attribute_number3 bill_to_partyprof_attrnum3,

ppgt.attribute_number4 bill_to_partyprof_attrnum4,

ppgt.attribute_number5 bill_to_partyprof_attrnum5,

ppgt.attribute_number6 bill_to_partyprof_attrnum6,

ppgt.attribute_number7 bill_to_partyprof_attrnum7,

ppgt.attribute_number8 bill_to_partyprof_attrnum8,

ppgt.attribute_number9 bill_to_partyprof_attrnum9,

ppgt.attribute_number10 bill_to_partyprof_attrnum10,

ppgt.attribute_number11 bill_to_partyprof_attrnum11,

ppgt.attribute_number12 bill_to_partyprof_attrnum12,

ppgt.attribute_date1 bill_to_partyprof_attrdate1,

ppgt.attribute_date2 bill_to_partyprof_attrdate2,

ppgt.attribute_date3 bill_to_partyprof_attrdate3,

ppgt.attribute_date4 bill_to_partyprof_attrdate4,

ppgt.attribute_date5 bill_to_partyprof_attrdate5,

ppgt.attribute_date6 bill_to_partyprof_attrdate6,

ppgt.attribute_date7 bill_to_partyprof_attrdate7,

ppgt.attribute_date8 bill_to_partyprof_attrdate8,

ppgt.attribute_date9 bill_to_partyprof_attrdate9,

ppgt.attribute_date10 bill_to_partyprof_attrdate10,

ppgt.attribute_date11 bill_to_partyprof_attrdate11,

ppgt.attribute_date12 bill_to_partyprof_attrdate12

FROM

ar_xla_lines_extract l,

ar_bill_to_cust_gt gt,

ar_cust_party_profile_gt ppgt

WHERE

gt.bill_cust_account_id = l.bill_customer_id

AND gt.bill_site_use_id = l.bill_site_use_id

AND ppgt.party_id = gt.bill_cust_party_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' ) )