KK_ASCR2_STA_VW

(SQL View)
Index Back

Associated Rev Stat Amounts Vw

cloned from KK_ASCR2_AMT_VW with additional column "STATISTICS_CODE" for stat amount calculation purpose new in 89

SELECT E.BUSINESS_UNIT , B.ASSOC_EXP_BD , E.ACCOUNT , E.DEPTID , %subrec(CF9A_AK_SBR, E) , %subrec(CFCC2_AK_SBR, E) , E.BUDGET_PERIOD , R.LEDGER_GROUP , R.SEQ_NBR , R.CAP , R.PERCENTAGE , - SUM(A.POSTED_TOTAL_AMT) , A.LEDGER , A.STATISTICS_CODE , L.LEDGER_TYPE_KK FROM PS_LEDGER_KK A , PS_KK_BUDGET_TYPE B , PS_KK_EX_XREF E , PS_KK_REV_XREF R , PS_LED_GRP_LED_TBL L , PS_SET_CNTRL_REC F , PS_SET_CNTRL_REC G , PS_BUS_UNIT_TBL_GL H WHERE A.BUSINESS_UNIT = E.BUSINESS_UNIT AND A.BUSINESS_UNIT = R.BUSINESS_UNIT AND A.BUSINESS_UNIT = H.BUSINESS_UNIT AND A.LEDGER = L.LEDGER AND L.SETID = F.SETID AND F.SETCNTRLVALUE = A.BUSINESS_UNIT AND F.RECNAME = 'LED_GRP_LED_TBL' AND L.LEDGER_GROUP = R.LEDGER_GROUP AND L.LEDGER_GROUP = B.LEDGER_GROUP AND B.ASSOC_EXP_BD = E.LEDGER_GROUP AND B.SETID1 = G.SETID AND A.BUDGET_PERIOD = R.BUDGET_PERIOD AND G.SETCNTRLVALUE = A.BUSINESS_UNIT AND G.RECNAME = 'KK_BD_TYPE_VW' AND B.EFFDT = ( SELECT MAX(H.EFFDT) FROM PS_KK_BUDGET_TYPE H WHERE H.SETID1 = B.SETID1 AND H.LEDGER_GROUP = B.LEDGER_GROUP AND H.EFFDT <= %CurrentDateIn AND H.EFF_STATUS = 'A') AND E.SEQ_NBR = R.SEQ_NBR AND A.ACCOUNT = R.ACCOUNT AND A.DEPTID = R.DEPTID AND %Join(COMMON_FIELDS, CF9A_AK_SBR A, CF9A_AK_SBR R) AND %Join(COMMON_FIELDS, CFCC2_AK_SBR A, CFCC2_AK_SBR R) AND A.STATISTICS_CODE <> ' ' GROUP BY E.BUSINESS_UNIT, B.ASSOC_EXP_BD, E.ACCOUNT, E.DEPTID, %subrec(CF9A_AK_SBR, E), %subrec(CFCC2_AK_SBR, E), E.BUDGET_PERIOD, R.LEDGER_GROUP, A.LEDGER,A.STATISTICS_CODE , L.LEDGER_TYPE_KK, R.SEQ_NBR, R.CAP, R.PERCENTAGE

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 LEDGER_GROUP Character(10) VARCHAR2(10) NOT NULL Ledger Group
3 ACCOUNT Character(10) VARCHAR2(10) NOT NULL Account
4 DEPTID Character(10) VARCHAR2(10) NOT NULL Department

Prompt Table: DEPT_TBL

5 OPERATING_UNIT Character(8) VARCHAR2(8) NOT NULL Operating Unit ChartField

Prompt Table: OPER_UNIT_TBL

6 PRODUCT Character(6) VARCHAR2(6) NOT NULL Product ChartField

Prompt Table: PRODUCT_TBL

7 FUND_CODE Character(5) VARCHAR2(5) NOT NULL Fund Code

Prompt Table: FUND_TBL

8 CLASS_FLD Character(5) VARCHAR2(5) NOT NULL Class Field

Prompt Table: CLASS_CF_TBL

9 PROGRAM_CODE Character(5) VARCHAR2(5) NOT NULL Program Code ChartField

Prompt Table: PROGRAM_TBL

10 BUDGET_REF Character(8) VARCHAR2(8) NOT NULL Budget Reference

Prompt Table: BUD_REF_TBL

11 AFFILIATE Character(5) VARCHAR2(5) NOT NULL Affiliate

Prompt Table: AFFILIATE_VW

12 AFFILIATE_INTRA1 Character(10) VARCHAR2(10) NOT NULL IntraUnit Affiliate1

Prompt Table: %EDIT_INTRA01

13 AFFILIATE_INTRA2 Character(10) VARCHAR2(10) NOT NULL Operating Unit Affiliate

Prompt Table: %EDIT_INTRA02

14 CHARTFIELD1 Character(10) VARCHAR2(10) NOT NULL Expansion chartfield 1

Prompt Table: CHARTFIELD1_TBL

15 CHARTFIELD2 Character(10) VARCHAR2(10) NOT NULL Expansion Chartfield 2

Prompt Table: CHARTFIELD2_TBL

16 CHARTFIELD3 Character(10) VARCHAR2(10) NOT NULL Expansion Chartfield 3

Prompt Table: CHARTFIELD3_TBL

17 BUSINESS_UNIT_PC Character(5) VARCHAR2(5) NOT NULL PC Business Unit

Prompt Table: SP_PCBUGL_NONVW

18 PROJECT_ID Character(15) VARCHAR2(15) NOT NULL Project Id ChartField

Prompt Table: SP_PROJFS_NONVW

19 ACTIVITY_ID Character(15) VARCHAR2(15) NOT NULL Activity ID

Prompt Table: PROJ_ACT_FVW

20 RESOURCE_TYPE Character(5) VARCHAR2(5) NOT NULL Source Type

Prompt Table: PROJ_RESTYPE_FS

21 BUDGET_PERIOD Character(8) VARCHAR2(8) NOT NULL Budget Period
22 ASSOC_REV_BD Character(10) VARCHAR2(10) NOT NULL Assc. Rev. Ledger Group
23 SEQ_NBR Number(15,0) DECIMAL(15) NOT NULL Sequence Number
24 CAP Signed Number(28,3) DECIMAL(26,3) NOT NULL Spending Cap
25 PERCENTAGE Signed Number(7,2) DECIMAL(5,2) NOT NULL Percentage
26 POSTED_TOTAL_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Specifies the net balance of debit and credit amounts that have been posted to a particular ChartField combination.
27 LEDGER Character(10) VARCHAR2(10) NOT NULL Ledger
28 STATISTICS_CODE Character(3) VARCHAR2(3) NOT NULL Statistics Code
29 LEDGER_TYPE_KK Character(1) VARCHAR2(1) NOT NULL Commitment Control Ledger Type
0=Budget
1=Expense or Recognized Revenue
2=Encumbrance
3=Pre-Encumbrance
4=Collected Revenue
5=Planned