PGM_CST_SUM_VW1

(SQL View)
Index Back

View of Project Actual Cost

This view calculates the actual cost by Project.

SELECT B.BUSINESS_UNIT , B.PROJECT_ID , B.DESCR , B.SUMMARY_PRJ , B.PROJECT_TYPE , B.EFF_STATUS , B.PERCENT_COMPLETE , SUM(A.RESOURCE_AMOUNT) , MAX(A.CURRENCY_CD) , E.PROJECT_STATUS , %Substring(F.DESCR ,1,10) , K.PC_HEALTH , %DatePart(K.PC_HEALTH_DTTM) FROM PS_PC_ACTIVITY_SUM A , PS_PROJECT B , PS_PROJ_AN_GRP_MAP C , PS_SET_CNTRL_REC D , PS_PROJECT_STATUS E , PS_PROJ_STATUS_TBL F , PS_PGM_CST_EPT_VW2 H , PS_PROJECT J , PS_PC_PROJHEALTH K WHERE A.BUSINESS_UNIT = H.BUSINESS_UNIT AND A.PROJECT_ID = %Substring(H.TREE_NODE, 1, 15) AND B.BUSINESS_UNIT = H.BUSINESS_UNIT AND B.PROJECT_ID = H.PROJECT_ID AND J.BUSINESS_UNIT = A.BUSINESS_UNIT AND J.PROJECT_ID = A.PROJECT_ID AND E.BUSINESS_UNIT = A.BUSINESS_UNIT AND E.PROJECT_ID = A.PROJECT_ID AND C.ANALYSIS_GROUP = J.AN_GRP_TOT_COSTS AND D.RECNAME = 'PROJ_AN_GRP_MAP' AND D.SETCNTRLVALUE = J.BUSINESS_UNIT AND C.SETID = D.SETID AND A.ANALYSIS_TYPE = C.ANALYSIS_TYPE AND E.EFFDT = ( SELECT MAX(V1.EFFDT) FROM PS_PROJECT_STATUS V1 WHERE V1.BUSINESS_UNIT = E.BUSINESS_UNIT AND V1.PROJECT_ID = E.PROJECT_ID AND V1.EFFDT <= %CurrentDateIn) AND E.EFFSEQ = ( SELECT MAX(V2.EFFSEQ) FROM PS_PROJECT_STATUS V2 WHERE V2.BUSINESS_UNIT = E.BUSINESS_UNIT AND V2.PROJECT_ID = E.PROJECT_ID AND V2.EFFDT = E.EFFDT) AND F.SETID = C.SETID AND F.PROJECT_STATUS = E.PROJECT_STATUS AND F.EFF_STATUS = 'A' AND F.EFFDT = ( SELECT MAX(X1.EFFDT) FROM PS_PROJ_STATUS_TBL X1 WHERE F.SETID = X1.SETID AND F.PROJECT_STATUS = X1.PROJECT_STATUS AND F.EFFDT <= %CurrentDateIn) GROUP BY B.BUSINESS_UNIT, B.PROJECT_ID, B.DESCR, B.SUMMARY_PRJ, B.PROJECT_TYPE, B.EFF_STATUS, B.PERCENT_COMPLETE, E.PROJECT_STATUS , F.DESCR, K.PC_HEALTH , %DatePart(K.PC_HEALTH_DTTM)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 PROJECT_ID Character(15) VARCHAR2(15) NOT NULL Project Id ChartField
3 DESCR Character(30) VARCHAR2(30) NOT NULL Description
4 SUMMARY_PRJ Character(1) VARCHAR2(1) NOT NULL An indicator to determine whether project is summary or detail.
N=Detail Project
Y=Program
5 PROJECT_TYPE Character(5) VARCHAR2(5) NOT NULL Project Type
A=Activity
G=Grant
H=Phase
P=Project
S=Segment
6 PC_PROCESS_STATUS Character(1) VARCHAR2(1) NOT NULL The processing state of a project.
A=Active
I=Inactive
P=Pending
T=Template
7 PERCENT_COMPLETE Number(6,2) DECIMAL(5,2) NOT NULL % Complete
8 PC_COST_AMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Total cost for a project.
9 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
10 PROJECT_STATUS Character(1) VARCHAR2(1) NOT NULL Project Status
B=Budgeted
C=Closed
H=Hold
O=Open
P=Proposed
11 DESCRSHORT Character(10) VARCHAR2(10) NOT NULL Short Description
12 PC_HEALTH Character(1) VARCHAR2(1) NOT NULL Calculated based on user-defined criteria, this field shows the overall health of a project.
F=Fair
G=Good
P=Poor
13 ASOF_DT Date(10) DATE As of Date