KK_ASCRV_AMT_VW

(SQL View)
Index Back

Associated Revenue Amounts Vw


SELECT C.BUSINESS_UNIT , B.ASSOC_EXP_BD , C.ACCOUNT , C.DEPTID , %subrec(CF9A_AK_SBR, C) , %subrec(CFCC2_AK_SBR, C) , C.BUDGET_PERIOD , D.LEDGER_GROUP , D.SEQ_NBR , D.CAP , D.PERCENTAGE , - SUM(A.POSTED_TOTAL_AMT) , A.LEDGER , E.LEDGER_TYPE_KK FROM PS_LEDGER_KK A , PS_KK_BUDGET_TYPE B , PS_KK_EX_XREF C , PS_KK_REV_XREF D , PS_LED_GRP_LED_TBL E , PS_SET_CNTRL_REC F , PS_SET_CNTRL_REC G , PS_BUS_UNIT_TBL_GL H WHERE A.BUSINESS_UNIT = C.BUSINESS_UNIT AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.BUSINESS_UNIT = H.BUSINESS_UNIT AND A.CURRENCY_CD = H.BASE_CURRENCY AND A.LEDGER = E.LEDGER AND E.SETID = F.SETID AND F.SETCNTRLVALUE = A.BUSINESS_UNIT AND F.RECNAME = 'LED_GRP_LED_TBL' AND E.LEDGER_GROUP = D.LEDGER_GROUP AND E.LEDGER_GROUP = B.LEDGER_GROUP AND E.LEDGER_TYPE_KK = D.REV_METHOD AND B.SETID1 = G.SETID AND A.BUDGET_PERIOD = D.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 C.SEQ_NBR = D.SEQ_NBR AND B.ASSOC_EXP_BD = C.LEDGER_GROUP AND B.LEDGER_GROUP = D.LEDGER_GROUP AND (A.ACCOUNT = D.ACCOUNT OR A.ACCOUNT = ( SELECT I.ACCOUNT FROM PS_KK_BD_DFLT_ACCT I , PS_SET_CNTRL_REC J WHERE I.SETID1 = B.SETID1 AND I.LEDGER_GROUP = B.LEDGER_GROUP AND I.EFFDT = B.EFFDT AND I.SETID = J.SETID AND J.SETCNTRLVALUE = A.BUSINESS_UNIT AND J.RECNAME = 'KK_BD_TYPE_VW')) AND A.DEPTID = D.DEPTID AND %Join(COMMON_FIELDS, CF9A_AK_SBR A, CF9A_AK_SBR D) AND %Join(COMMON_FIELDS, CFCC2_AK_SBR A, CFCC2_AK_SBR D) GROUP BY C.BUSINESS_UNIT, B.ASSOC_EXP_BD, C.ACCOUNT, C.DEPTID, %subrec(CF9A_AK_SBR, C),%subrec(CFCC2_AK_SBR, C), C.BUDGET_PERIOD, D.LEDGER_GROUP, A.LEDGER, E.LEDGER_TYPE_KK, D.SEQ_NBR, D.CAP, D.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 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