AR_CM_SALESREP_H_V

Details

  • Schema: FUSION

  • Object owner: AR

  • Object type: VIEW

Columns

Name

CM_REP_H_FREIGHT_CCID

CM_REP_H_REC_CCID

CM_REP_H_REV_CCID

CM_REP_H_NAME

CM_REP_H_SALESREP_ID

CM_REP_H_SALESREP_NUMBER

CM_REP_H_SALES_TAX_GEOCODE

CM_REP_H_SALES_TAX_INS_CITY_LM

LEDGER_ID

EVENT_ID

Query

SQL_Statement

select ref.freight_ccid cm_rep_h_freight_ccid ,

ref.rec_ccid cm_rep_h_rec_ccid ,

ref.rev_ccid cm_rep_h_rev_ccid ,

decode(shdrt.RESOURCE_ID, -1, 'No Sales Credit', HZP.PARTY_NAME) cm_rep_h_name,

shdrt.resource_salesrep_id cm_rep_h_salesrep_id ,

shdrt.salesrep_number cm_rep_h_salesrep_number ,

shdrt.sales_tax_geocode cm_rep_h_sales_tax_geocode ,

shdrt.sales_tax_inside_city_limits cm_rep_h_sales_tax_ins_city_lm ,

he.ledger_id ledger_id ,

he.event_id event_id

FROM jtf_rs_salesreps shdrt ,

HZ_PARTIES hzp,

ar_xla_lines_extract he,

ar_ref_accounts_All ref

WHERE he.level_flag = 'H'

AND shdrt.resource_salesrep_id = he.resource_salesrep_id

AND ref.source_ref_table(+) = 'RA_SALESREPS'

AND ref.source_ref_account_id(+) = he.resource_salesrep_id

AND ref.bu_id(+) = he.org_id

AND shdrt.RESOURCE_ID = HZP.PARTY_ID (+)