Project: PRJ750815

	Platform	Oracle
	Database	SA801DVA	SA801DFL
	Version	82
	Description	UPD750815	

Records
STDNT_BDGT_ASGN	

PeopleCode (Record)
DERIVED_BDGT.INFORMATION_SOURCE.RowInit

Record Detail

Record: STDNT_BDGT_ASGN	
	Description	Student Budget Work Table
	Record Type	SQL Table
	Parent Record	STUDENT_AID
	Related Language	 
	DDL Space Name	FAAPP
	Owner ID	SFAB
	Comments	This table contains those students who either need to have a budget
		assigned, or have had a budget assigned and have yet to have that bu
		dget assignment moved to the.

FieldName          Type   Len  Key  Srch Req Edit Prompt          C Default                          
EMPLID             Char 11     KALS      Req Prmt STDNT_AID_SRCH
INSTITUTION        Char 5      KALS      Req Prmt INSTITUTION_TBL
AID_YEAR           Char 4      KDLS      Req Prmt AID_YEAR_TBL
STRM               Char 4      KDLS      Req Prmt TERM_VAL_TBL
PROCESSING_MODE    Char 1      KALS      Req Xlat
TERM_TYPE          Char 1                    Xlat
ACAD_PROG_PRIMARY  Char 5                    Prmt ACAD_PRGFA_CRVW
ACAD_CAREER        Char 4                    Xlat
ACAD_PLAN          Char 10                   Prmt ACAD_PLAN_TBL
ACAD_SUB_PLAN      Char 10                   Prmt ACAD_SUBPLAN_VW
ACADEMIC_LOAD      Char 1                    Xlat
ACAD_LOAD_APPR     Char 1                    Xlat
ACAD_LEVEL_PROJ    Char 3                    Prmt XL_ACAD_LVL_VW
ACAD_LEVEL_BOT     Char 3                    Prmt XL_ACAD_LVL_VW
FA_LOAD            Char 1                    Xlat
FORM_OF_STUDY      Char 4                    Xlat
RESIDENCY          Char 5                    Prmt RESIDENCY_TBL
FIN_AID_FED_RES    Char 5                    Prmt RESIDENCY_TBL
FIN_AID_ST_RES     Char 5                    Prmt RESIDENCY_TBL
FIN_AID_FED_EXCPT  Char 5                    Prmt RESID_EXCPT_TBL
FIN_AID_ST_EXCPT   Char 5                    Prmt RESID_EXCPT_TBL
STATE_RESIDENCE    Char 6                    Prmt STATE_NAMES_VW
APP_STATE_RESIDENC Char 2                    Prmt STATE_NAMES_VW
POSTAL             Char 12
HOUSING_TYPE       Char 1                    Xlat
MARITAL_STAT       Char 1                    Xlat
NUMBER_IN_FAMILY   Char 2
DEPNDNCY_STAT      Char 1                    Xlat
NSLDS_LOAN_YEAR    Char 1                    Xlat
BUDGET_GROUP_CODE  Char 6                    Prmt BUD_GRP_VW
PRORATE_BUDGET     Char 1
BUDGET_STATUS      Char 1                    Xlat
CAMPUS             Char 5                    Prmt CAMPUS_TBL
CAMPUS_FA          Char 5                    Prmt CAMPUS_TBL
UNT_TAKEN_FA       Num  5.3
UNT_TAKEN_FA_CL    Num  5.3
INTERESTED_IN_PLUS Char 1                    Xlat
INTERESTED_IN_SL   Char 1                    Xlat
ENROLL_CURNT_SUM   Char 1                    Xlat
ENROLL_FALL        Char 1                    Xlat
ENROLL_NEXT_SUM    Char 1                    Xlat
ENROLL_SPRING      Char 1                    Xlat
ENROLL_WINTER      Char 1                    Xlat
SRVC_IND_DTTM      DT   26
SRVC_IND_CD        Char 3                    Prmt SRVC_IND_CD_TBL
REFUND_PCT         Num  3.2
REFUND_SCHEME      Char 8                    Prmt ADJ_RFND_SCM_VW
REFUND_SETID       Char 5                    Prmt SETID_TBL
REFUND_CLASS       Char 1                    Xlat
ADVISOR_ROLE       Char 4                    Xlat
ADVISOR_ID         Char 11                   Prmt INSTR_ADVSR_VW
COMMITTEE_ID       Char 6                    Prmt COMMITTEE_TBL
WEEKS_OF_INSTRUCT  Num  2
START_DATE         Date 10
END_DATE           Date 10
STUDY_AGREEMENT    Char 10                   Prmt STUDY_AGRM_TBL
EXT_ORG_ID         Char 11                   Prmt EXT_ORG_TBL
COUNTRY            Char 3                    Prmt COUNTRY_TBL
ACAD_GROUP_ADVIS   Char 5                    Prmt ACAD_GROUP_TBL
ADMIT_TERM         Char 4                    Prmt TERM_VAL_TBL
STDNT_GROUP        Char 4                    Prmt STDNT_GROUP_TBL
SPORT1             Char 3                    Xlat
SPORT2             Char 3                    Xlat
SPORT3             Char 3                    Xlat
SPORT4             Char 3                    Xlat
ATHL_PARTIC_CD1    Char 5                    Prmt ATHL_PART_TBL
ATHL_PARTIC_CD2    Char 5                    Prmt ATHL_PART_TBL
ATHL_PARTIC_CD3    Char 5                    Prmt ATHL_PART_TBL
ATHL_PARTIC_CD4    Char 5                    Prmt ATHL_PART_TBL
CUR_PARTICIPANT1   Char 1                    Prmt XL_PSYESNO_VW
CUR_PARTICIPANT2   Char 1                    Prmt XL_PSYESNO_VW
CUR_PARTICIPANT3   Char 1                    Prmt XL_PSYESNO_VW
CUR_PARTICIPANT4   Char 1                    Prmt XL_PSYESNO_VW
FA_NUMBER_OF_WEEKS Num  3
COURSE_LD_PCT      Num  3.2
FA_UNIT_ANTIC      Num  5.3
FA_UNIT_COMPLETED  Num  5.3
FA_UNIT_IN_PROG    Num  5.3
FA_UNIT_CURRENT    Num  5.3
FA_LOAD_CURRENT    Char 1
ACAD_PLAN_TYPE     Char 3                    Xlat
FA_TERM_EFFDT      Date 10
FA_TERM_EFFSEQ     Num  3
ISIR_STU_ENRL_STAT Char 1                    Xlat
SFA_INTRSTD_IN_WSL Char 1                    Xlat

PeopleCode Detail

PeopleCode (Record): DERIVED_BDGT.INFORMATION_SOURCE.RowInit
&I_R_AK [/0] [/0]
method [/0] [/0] [/0] [/0] [/0] [/0] [/0] [/0] [/0];
&NOSC SrlSlc 1, Record.FA_APP_SRC_RANK, Record.FA_APP_SRC_RANK, "weeIsiuin=: n i_er=2)&" 1 To AtvRwon FA_APP_SRC_RANK.INFORMATION_SOURCE)
&MIN_SRC_RANK = 99;
&INFO_SRC = "";
ScrollSelect(1, Record.FA_APP_SRC_RANK, Record.FA_APP_SRC_RANK, "where Institution = :1 and Aid_Year =:2", STDNT_AID_SRCH.INSTITUTION, STDNT_AID_SRCH.AID_YEAR);
For &I = 1 To ActiveRowCount(FA_APP_SRC_RANK.INFORMATION_SOURCE);
   &RANK = FetchValue(FA_APP_SRC_RANK.SOURCE_RANK, &I);
   If &RANK < &MIN_SRC_RANK Then
      &MIN_SRC_RANK = &RANK;
      &INFO_SRC = FetchValue(FA_APP_SRC_RANK.INFORMATION_SOURCE, &I);
   End-If;
End-For;

&EMPLID = STDNT_AID_SRCH.EMPLID;
&INSTITUTION = STDNT_AID_SRCH.INSTITUTION;
&AID_YEAR = STDNT_AID_SRCH.AID_YEAR;

/* SELECT VALUES FROM ISIR_STUDENT */
SQLExec("SELECT A.DEPNDNCY_STAT,A.HOUSING_CODE_1,A.SCHOOL_CHOICE_1,A.HOUSING_CODE_2,A.SCHOOL_CHOICE_2,A.HOUSING_CODE_3,A.SCHOOL_CHOICE_3,A.HOUSING_CODE_4,A.SCHOOL_CHOICE_4,A.HOUSING_CODE_5,A.SCHOOL_CHOICE_5,A.HOUSING_CODE_6,A.SCHOOL_CHOICE_6,A.SFA_HOUSING_CODE7,SFA_SCHL_CHOICE_7,A.SFA_HOUSING_CODE8,SFA_SCHL_CHOICE_8,A.SFA_HOUSING_CODE9,SFA_SCHL_CHOICE_9,A.SFA_HOUSING_CODE10,SFA_SCHL_CHOICE_10,A.NUM_FAMILY_MEMBERS FROM PS_ISIR_STUDENT A WHERE A.EMPLID=:1 AND A.INSTITUTION=:2 AND A.AID_YEAR=:3 AND A.EFFDT=(SELECT MAX(X.EFFDT) FROM PS_ISIR_STUDENT X WHERE X.EMPLID=A.EMPLID AND X.INSTITUTION=A.INSTITUTION AND X.AID_YEAR=A.AID_YEAR) AND A.EFFSEQ=(SELECT MAX(Z.EFFSEQ) FROM PS_ISIR_STUDENT Z	WHERE Z.EMPLID=A.EMPLID	AND Z.INSTITUTION=A.INSTITUTION	AND Z.AID_YEAR=A.AID_YEAR AND Z.EFFDT=A.EFFDT)", &EMPLID, &INSTITUTION, &AID_YEAR, &DEPNDNCY_STAT, &HOUSING_CODE_1, &SCHOOL_CHOICE_1, &HOUSING_CODE_2, &SCHOOL_CHOICE_2, &HOUSING_CODE_3, &SCHOOL_CHOICE_3, &HOUSING_CODE_4, &SCHOOL_CHOICE_4, &HOUSING_CODE_5, &SCHOOL_CHOICE_5, &HOUSING_CODE_6, &SCHOOL_CHOICE_6, &SFA_HOUSING_CODE7, &SFA_SCHL_CHOICE_7, &SFA_HOUSING_CODE8, &SFA_SCHL_CHOICE_8, &SFA_HOUSING_CODE9, &SFA_SCHL_CHOICE_9, &SFA_HOUSING_CODE10, &SFA_SCHL_CHOICE_10, &NUM_FAMILY_MEMBERS);
/* SELECT VALUES FROM ISIR_PARENT */
SQLExec("SELECT A.NUMBER_IN_FAMILY FROM PS_ISIR_PARENT A WHERE A.EMPLID=:1 AND A.INSTITUTION=:2 AND A.AID_YEAR=:3 AND A.EFFDT=(SELECT MAX(X.EFFDT) FROM PS_ISIR_STUDENT X WHERE X.EMPLID=A.EMPLID AND X.INSTITUTION=A.INSTITUTION AND X.AID_YEAR=A.AID_YEAR) AND A.EFFSEQ=(SELECT MAX(Z.EFFSEQ) FROM PS_ISIR_STUDENT Z	WHERE Z.EMPLID=A.EMPLID	AND Z.INSTITUTION=A.INSTITUTION	AND Z.AID_YEAR=A.AID_YEAR AND Z.EFFDT=A.EFFDT)", &EMPLID, &INSTITUTION, &AID_YEAR, &NUMBER_IN_FAMILY);
/* SELECT OWNING_SCHOOL_CD FROM ISIR_CONTROL */
SQLExec("SELECT A.OWNING_SCHOOL_CD FROM PS_ISIR_CONTROL A WHERE A.EMPLID=:1 AND A.INSTITUTION=:2 AND A.AID_YEAR=:3 AND A.EFFDT=(SELECT MAX(X.EFFDT) FROM PS_ISIR_CONTROL X WHERE X.EMPLID=A.EMPLID AND X.INSTITUTION=A.INSTITUTION AND X.AID_YEAR=A.AID_YEAR) AND A.EFFSEQ=(SELECT MAX(Z.EFFSEQ) FROM PS_ISIR_CONTROL Z WHERE Z.EMPLID=A.EMPLID AND Z.INSTITUTION=A.INSTITUTION AND Z.AID_YEAR=A.AID_YEAR AND Z.EFFDT=A.EFFDT)", &EMPLID, &INSTITUTION, &AID_YEAR, &OWNING_SCHOOL_CD);

DERIVED_BDGT.INFORMATION_SOURCE = &INFO_SRC;
Evaluate DERIVED_BDGT.INFORMATION_SOURCE
When = "I"
   DERIVED_BDGT.DEPNDNCY_STAT = FetchValue(STDNT_BGT_INTVW.DEPNDNCY_STAT, 1);
   If None(DERIVED_BDGT.DEPNDNCY_STAT) Then
      DERIVED_BDGT.DEPNDNCY_STAT = &DEPNDNCY_STAT;
   End-If;
   DERIVED_BDGT.HOUSING_TYPE = FetchValue(STDNT_BGT_HSEVW.HOUSING_CODE, 1);
   If None(DERIVED_BDGT.HOUSING_TYPE) Then
      If &SCHOOL_CHOICE_1 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_1;
      End-If;
      If &SCHOOL_CHOICE_2 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_2;
      End-If;
      If &SCHOOL_CHOICE_3 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_3;
      End-If;
      If &SCHOOL_CHOICE_4 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_4;
      End-If;
      If &SCHOOL_CHOICE_5 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_5;
      End-If;
      If &SCHOOL_CHOICE_6 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_6;
      End-If;
      If &SFA_SCHL_CHOICE_7 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &SFA_HOUSING_CODE7;
      End-If;
      If &SFA_SCHL_CHOICE_8 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &SFA_HOUSING_CODE8;
      End-If;
      If &SFA_SCHL_CHOICE_9 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &SFA_HOUSING_CODE9;
      End-If;
      If &SFA_SCHL_CHOICE_10 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &SFA_HOUSING_CODE10;
      End-If;
   End-If;
   DERIVED_BDGT.NUMBER_IN_FAMILY = FetchValue(STDNT_BGT_APPVW.NUM_FAMILY_MEMBERS, 1);
   If None(DERIVED_BDGT.NUMBER_IN_FAMILY) Then
      If DERIVED_BDGT.DEPNDNCY_STAT = "I" Then
         DERIVED_BDGT.NUMBER_IN_FAMILY = &NUM_FAMILY_MEMBERS;
      Else
         DERIVED_BDGT.NUMBER_IN_FAMILY = &NUMBER_IN_FAMILY;
      End-If;
   End-If;
   Break;
When-Other
   DERIVED_BDGT.DEPNDNCY_STAT = &DEPNDNCY_STAT;
   If None(DERIVED_BDGT.DEPNDNCY_STAT) Then
      DERIVED_BDGT.DEPNDNCY_STAT = FetchValue(STDNT_BGT_INTVW.DEPNDNCY_STAT, 1);
   End-If;
   If None(DERIVED_BDGT.HOUSING_TYPE) Then
      If &SCHOOL_CHOICE_1 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_1;
      End-If;
      If &SCHOOL_CHOICE_2 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_2;
      End-If;
      If &SCHOOL_CHOICE_3 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_3;
      End-If;
      If &SCHOOL_CHOICE_4 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_4;
      End-If;
      If &SCHOOL_CHOICE_5 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_5;
      End-If;
      If &SCHOOL_CHOICE_6 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &HOUSING_CODE_6;
      End-If;
      If &SFA_SCHL_CHOICE_7 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &SFA_HOUSING_CODE7;
      End-If;
      If &SFA_SCHL_CHOICE_8 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &SFA_HOUSING_CODE8;
      End-If;
      If &SFA_SCHL_CHOICE_9 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &SFA_HOUSING_CODE9;
      End-If;
      If &SFA_SCHL_CHOICE_10 = &OWNING_SCHOOL_CD Then
         DERIVED_BDGT.HOUSING_TYPE = &SFA_HOUSING_CODE10;
      End-If;
   End-If;
   If None(DERIVED_BDGT.HOUSING_TYPE) Then
      DERIVED_BDGT.HOUSING_TYPE = FetchValue(STDNT_BGT_HSEVW.HOUSING_CODE, 1);
   End-If;
   If DERIVED_BDGT.DEPNDNCY_STAT = "I" Then
      DERIVED_BDGT.NUMBER_IN_FAMILY = &NUM_FAMILY_MEMBERS;
   Else
      DERIVED_BDGT.NUMBER_IN_FAMILY = &NUMBER_IN_FAMILY;
   End-If;
   If None(DERIVED_BDGT.NUMBER_IN_FAMILY) Then
      DERIVED_BDGT.NUMBER_IN_FAMILY = FetchValue(STDNT_BGT_APPVW.NUM_FAMILY_MEMBERS, 1);
   End-If;
End-Evaluate;