CWB_SALESPER_VW(SQL View) |
Index Back |
---|---|
Cust Name Prompt by Bus Unit |
SELECT DISTINCT D.business_unit , D.cust_id , MA.name1 , TM.SUPPORT_TEAM_MBR FROM ps_customer C , PS_CUST_DATA D , PS_TEAM_MEMBERS TM , PS_CUST_TEAM CT , PS_MEMBER_ACTIV_VW MA WHERE c.cust_status = 'A' AND c.bill_to_flg = 'Y' AND c.cust_level <> 'P' AND c.setid = ( SELECT SETID FROM PS_SET_CNTRL_REC WHERE SETCNTRLVALUE = D.business_unit AND RECNAME = 'CUSTOMER') AND C.cust_id = D.cust_id AND CT.SETID = C.SETID AND CT.CUST_ID = C.CUST_ID AND CT.DEFAULT_FLAG = 'Y' AND TM.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC WHERE RECNAME = 'TEAM_MEMBERS' AND SETCNTRLVALUE = D.BUSINESS_UNIT) AND TM.SUPPORT_TEAM_CD = CT.SUPPORT_TEAM_CD AND TM.EFFDT = ( SELECT MAX(X.EFFDT) FROM PS_TEAM_MEMBERS X , PS_TEAM_CODE_TBL TC WHERE X.SETID = TM.SETID AND TC.SETID = X.SETID AND X.SUPPORT_TEAM_CD = TM.SUPPORT_TEAM_CD AND TC.SUPPORT_TEAM_CD = X.SUPPORT_TEAM_CD AND TC.EFF_STATUS = 'A' AND TC.EFFDT <= %CurrentDateIn AND X.EFFDT = TC.EFFDT AND X.SUPPORT_TEAM_MBR = TM.SUPPORT_TEAM_MBR) AND TM.PRIORITY = ( SELECT MIN(PRIORITY) FROM PS_TEAM_MEMBERS Y WHERE Y.SETID = TM.SETID AND Y.SUPPORT_TEAM_CD = TM.SUPPORT_TEAM_CD AND Y.EFFDT = TM.EFFDT AND Y.PRIORITY > 0) AND TM.SETID = MA.SETID AND TM.SUPPORT_TEAM_MBR = MA.SUPPORT_TEAM_MBR |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL |
Business Unit
Default Value: OPR_DEF_TBL_FS.BUSINESS_UNIT Prompt Table: SP_BUARED_NONVW |
2 | CUST_ID | Character(15) | VARCHAR2(15) NOT NULL |
Uniquely identifies an organizational entity that purchases goods or services from the enterprise. Represents the sold-to customer which is the customer organization that places orders. The CUST_ID may or may not be the same as the identifiers for the bill-to and ship-to locations.
Prompt Table: CUST_BU_VW_AR |
3 | NAME1 | Character(40) | VARCHAR2(40) NOT NULL | Name 1 |
4 | SALES_PERSON | Character(8) | VARCHAR2(8) NOT NULL |
Specifies the personnel code for the person who works with a customer as a sales representative. This field is required for a customer that functions as a bill-to customer.
Prompt Table: SALES_PERSN_VW |