PC_CA_MARGN_VW

(SQL View)
Index Back

Contract Profit Margin

View by Contract.

SELECT B.OPRID , A.CONTRACT_NUM , SUM(A.RESOURCE_AMOUNT) , SUM(A.BUDGET_AMOUNT) , SUM(A.PC_ANLTC_ACT_COST) , SUM(A.PC_ANLTC_ACT_REV) , SUM(A.PC_ANLTC_ACT_REV - A.PC_ANLTC_ACT_COST) , CASE WHEN SUM(A.PC_ANLTC_ACT_REV) <> 0 THEN %Round(%DecMult(%DecDiv(SUM(A.PC_ANLTC_ACT_REV - A.PC_ANLTC_ACT_COST), SUM(A.PC_ANLTC_ACT_REV)), 100), 2) ELSE 0 END , SUM(A.BUDGET_AMOUNT - A.PC_ANLTC_ACT_COST) , A.CURRENCY_CD , RPT.PC_GROUP_NAME , RPT.DISPLAY_ORDER FROM PS_PROJ_RES_SUM A , PS_PC_OPRID_PRJACT B , PS_PC_RPT_GROUPS RPT WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.PROJECT_ID = B.PROJECT_ID AND RPT.FEATURE_CD = 'PC_CA_MARG' AND A.CONTRACT_NUM <> ' ' AND A.RESOURCE_AMOUNT <> 0 GROUP BY B.OPRID, A.CONTRACT_NUM, A.CURRENCY_CD, RPT.PC_GROUP_NAME, RPT.FROM_RANGE, RPT.TO_RANGE, RPT.DISPLAY_ORDER HAVING (SUM(A.PC_ANLTC_ACT_REV) <> 0 AND %Round(%DecMult(%DecDiv(SUM(A.PC_ANLTC_ACT_REV - A.PC_ANLTC_ACT_COST), SUM(A.PC_ANLTC_ACT_REV)), 100), 2) BETWEEN RPT.FROM_RANGE AND RPT.TO_RANGE)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).
2 CONTRACT_NUM Character(25) VARCHAR2(25) NOT NULL Contract
3 RESOURCE_AMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Transaction Amount
4 BUDGET_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL BUDGET_AMT
5 PC_ANLTC_ACT_COST Signed Number(28,3) DECIMAL(26,3) NOT NULL Profitability Actual Cost
6 PC_ANLTC_ACT_REV Signed Number(28,3) DECIMAL(26,3) NOT NULL Profitability Actual Revenue
7 MARGIN Signed Number(28,3) DECIMAL(26,3) NOT NULL Margin
8 PROFIT_MARGIN Signed Number(27,2) DECIMAL(25,2) NOT NULL Profit Margin Percent
9 VAR_AMOUNT_01 Signed Number(28,3) DECIMAL(26,3) NOT NULL Specifies the monetary amount of a debit or credit in the business unit base currency. Debit entries are positive and credit entries are negative. This amount is only zero if associated with a statistical account.
10 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
11 PC_GROUP_NAME Character(30) VARCHAR2(30) NOT NULL Analytics Grouping Name
12 DISPLAY_ORDER Number(3,0) SMALLINT NOT NULL Display order for ordering items in a list - web style