AR_SALESP_VW

(SQL View)
Index Back

Sales Team Members

This record stores the individual member codes of the Support Team, and the member designated as the manager. This is an optional record.

SELECT CT.SETID , CT.CUST_ID , CT.SUPPORT_TEAM_CD , TCT.EFFDT , TCT.EFF_STATUS , TM.SUPPORT_TEAM_MBR , TM.MANAGER , TM.PRIORITY FROM PS_TEAM_MEMBERS TM , PS_TEAM_CODE_TBL TCT , PS_CUST_TEAM CT WHERE CT.DEFAULT_FLAG = 'Y' AND CT.SUPPORT_TEAM_CD = TCT.SUPPORT_TEAM_CD AND TCT.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC WHERE RECNAME = 'TEAM_CODE_TBL' AND SETCNTRLVALUE = CT.SETID) AND TM.SUPPORT_TEAM_CD = TCT.SUPPORT_TEAM_CD AND TM.SETID = TCT.SETID AND TCT.EFF_STATUS = 'A' AND %EffdtCheck(TEAM_CODE_TBL TCT2, TCT, %CurrentDateIn) AND TM.SETID = TCT.SETID AND TM.SUPPORT_TEAM_CD = TCT.SUPPORT_TEAM_CD AND TM.EFFDT = TCT.EFFDT AND TM.PRIORITY = ( SELECT MIN(Y.PRIORITY) FROM PS_TEAM_MEMBERS Y , PS_MEMBER_PERSON MP , PS_MEMBER_TYPE_TBL MT WHERE Y.SETID = TM.SETID AND Y.SUPPORT_TEAM_CD = TM.SUPPORT_TEAM_CD AND Y.EFFDT = TM.EFFDT AND Y.PRIORITY > 0 AND MP.SETID = Y.SETID AND MP.SUPPORT_TEAM_MBR = Y.SUPPORT_TEAM_MBR AND MT.SETID = MP.SETID AND MT.TEAM_MEMBER_TYPE = MP.TEAM_MEMBER_TYPE AND MT.EFF_STATUS = 'A' AND %EffdtCheck(MEMBER_TYPE_TBL MT2, MT, %CurrentDateIn) AND MT.SALES_PERSON = 'Y' )

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID

Default Value: OPR_DEF_TBL_FS.SETID

Prompt Table: SP_SETID_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.
3 SUPPORT_TEAM_CD Character(6) VARCHAR2(6) NOT NULL Support Team Code
4 EFFDT Date(10) DATE NOT NULL Effective Date

Default Value: %date

5 EFF_STATUS Character(1) VARCHAR2(1) NOT NULL Effective Status
A=Active
I=Inactive
6 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.
7 MANAGER Character(1) VARCHAR2(1) NOT NULL Manager

Y/N Table Edit

Default Value: N

8 PRIORITY Number(3,0) SMALLINT NOT NULL Priority

Default Value: 0