VC_CHK_TPTRE_VW

(SQL View)
Index Back

Trees Security view

Variable Comp: this view returns Trees for a given VC Plan ID. The current plan is used (the last one processed by the eligibility process). GB_OPRID and PNLGRPNAME allow to check if the row is accessible for the current operator and panelgroup.

SELECT DISTINCT B.GB_OPRID , B.PNLGRPNAME , D.VC_PLAN_ID , D.VC_PAYOUT_PRD_ID , A.TREE_NAME ,A.DESCR FROM PS_VC_TOP_GROUP_VW A , PS_GB_SECPNLG_TBL B , PS_GB_GROUP_TBL C , PS_VC_PAYPRD_TBL D , PS_VC_PLAN_EFFDT E WHERE A.GB_GROUP_ID = B.GB_GROUP_ID AND B.GB_GROUP_ID = C.GB_GROUP_ID AND D.VC_PLAN_ID = E.VC_PLAN_ID AND E.TREE_NAME = A.TREE_NAME AND E.EFFDT >= ( SELECT MAX(EFFDT) FROM PS_VC_PLAN_EFFDT VC_PLAN_EFFDT WHERE VC_PLAN_EFFDT.VC_PLAN_ID = E.VC_PLAN_ID AND VC_PLAN_EFFDT.EFFDT <= D.PRD_BGN_DT) AND E.EFF_STATUS = 'A' AND A. TREE_EFFDT <= D.PRD_END_DT AND A.TREE_EFFDT <= %CurrentDateIn AND A.TREE_EFFDT >= ( SELECT MAX(EFFDT) FROM PS_VC_TREE_DT_VW VC_TREE_DT_VW WHERE VC_TREE_DT_VW.TREE_NAME = E.TREE_NAME AND EFFDT <= D.PRD_BGN_DT) AND C.EFFDT=( SELECT MAX(EFFDT) FROM PS_GB_GROUP_TBL GB_GROUP_TBL WHERE GB_GROUP_TBL.GB_GROUP_ID=C.GB_GROUP_ID AND GB_GROUP_TBL.EFFDT<=%CurrentDateIn AND GB_GROUP_TBL.EFFDT<=D.PRD_END_DT) AND C.EFF_STATUS = 'A' AND B.EFFDT=( SELECT MAX(EFFDT) FROM PS_GB_SECPNLG_TBL GB_SECPNLG_TBL WHERE GB_SECPNLG_TBL.GB_GROUP_ID=B.GB_GROUP_ID AND GB_SECPNLG_TBL.EFFDT<=%CurrentDateIn AND GB_SECPNLG_TBL.EFFDT<=D.PRD_END_DT)

  • Related Language Record: VC_CHK_TPTRELNG
  • # PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
    1 GB_OPRID Character(30) VARCHAR2(30) NOT NULL User ID
    2 PNLGRPNAME Character(18) VARCHAR2(18) NOT NULL Component Name
    3 VC_PLAN_ID Character(10) VARCHAR2(10) NOT NULL VC Plan ID
    4 VC_PAYOUT_PRD_ID Character(10) VARCHAR2(10) NOT NULL Payout Period ID
    5 TREE_NAME Character(18) VARCHAR2(18) NOT NULL Tree Name
    6 DESCR Character(30) VARCHAR2(30) NOT NULL Description