RSFD_MGR_QRP_V1

(SQL View)
Index Back

Compare Forecast vs. quota

This record is used for Sales Dashboard to compare forecast vs. Quota for a sales rep. Has quota Has Forecast

SELECT Q.PERSON_ID_MANAGER , %TrimSubstr(Q.TIMEFRAME_ID , 1,15) %Concat '-' %Concat %TrimSubstr(Q.PERIOD_ROLLUP_ID , 1,15) , Q.TIMEFRAME_ID , Q.PERIOD_ROLLUP_ID , INST.PT_CDB_DEF_CUR_CD , %Round(SUM(%DecMult(CUR.INST_MULT , REVENUE_AMOUNT)),0) FROM PS_RSF_PLQR_R1_VW Q , PS_RSFD_TFP_VW TF , PSCDBINSTALL INST , PS_RBD_CURRT CUR , PS_RSF_SUSER S , PS_RSF_SUSER MGR WHERE TF.TIMEFRAME_ID = Q.TIMEFRAME_ID AND TF.PERIOD_ID = Q.PERIOD_ROLLUP_ID AND TF.ROLLUP_SEQNUM = 2 AND S.PERSON_ID = Q.PERSON_ID AND Q.FORECAST_CATEGORY = 'R' AND ((Q.CURRENCY_CD = CUR.CURRENCY_CD AND Q.CURRENCY_CD <> ' ' ) OR (Q.CURRENCY_CD = ' ' AND S.CURRENCY_CD = CUR.CURRENCY_CD)) AND Q.FORECAST_CATEGORY = 'R' AND Q.PERSON_ID_MANAGER = MGR.PERSON_ID AND ((MGR.REV_QUOTA_TYPE = 'M' AND Q.PERSON_ID_MANAGER = Q.PERSON_ID) OR MGR.REV_QUOTA_TYPE = 'R') GROUP BY Q.PERSON_ID_MANAGER , Q.TIMEFRAME_ID , Q.PERIOD_ROLLUP_ID , INST.PT_CDB_DEF_CUR_CD, CUR.INST_MULT

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 PERSON_ID_MANAGER Character(15) VARCHAR2(15) NOT NULL Contact Identifier for Treasury Contacts
2 TIMEFRAME_PERIOD Character(32) VARCHAR2(32) NOT NULL Time Frame
3 TIMEFRAME_ID Character(15) VARCHAR2(15) NOT NULL Time Frame
4 PERIOD_ID Character(15) VARCHAR2(15) NOT NULL Period
5 FROM_CUR Character(3) VARCHAR2(3) NOT NULL From Currency Code
6 QUOTA_AMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Quota Amount