Description
This method will initialize the instance of BBudget.
PreCondition
This method is executed when a new instance of the business class is started, or when a draft instance is opened (in that case a new instance is started which is a copy of the draft instance).
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program/bbudget.p)
<ANCESTOR-CODE>
/* ================================================================================================= */
/* Make sure the actuals and commitments of the WBS'es are not retrieved in all cases */
/* ================================================================================================= */
assign vlShowBudgetWBSActualCommitTC = false.
/* ================================================================================================= */
/* DataLoadActiveOnly; Load data from the database into the class temp-tables of the business class. */
/* Note: Method DataLoadActiveOnly will - after the standard DataLoad is executed - remove the */
/* non-active budgetversions and their underlaying figures from the instance-data. To keep track of */
/* this situation, data-item vlActiveVersionOnly is set in this method and in method InitInstance */
/* and it is used to check upon in a submethod of ValidateComponent. */
/* ================================================================================================= */
assign vlActiveVersionOnly = false.
/* ============================================================================ */
/* Get the system-properties regarding the budgets */
/* These instance-dep data-items can then be used during the whole component */
/* ============================================================================ */
<Q-1 run SystemPropertyByAll (all) (Read) (NoCache) (output dataset tqSystemPropertyByAll) in BSystemProperty >
find first tqSystemPropertyByAll no-error.
if available tqSystemPropertyByAll
then assign vlSysPropertyIsWithBudget = tqSystemPropertyByAll.tlSysPropertyIsWithBudget
vlSysPropertyIsBudOLCheckGL = tqSystemPropertyByAll.tlSysPropertyIsBudOLCheckGL
vlSysPropertyIsBudOLCheckPrj = tqSystemPropertyByAll.tlSysPropertyIsBudOLCheckPrj
vlSysPropertyIsBudOLCheckCC = tqSystemPropertyByAll.tlSysPropertyIsBudOLCheckCC
vlSysPropertyIsBudOverCh = tqSystemPropertyByAll.tlSysPropertyIsBudOverCh.
/* ================================================================================================ */
/* As the field for BudgetWBS.BudgetWBSSeq in Oracle is limited to hold only 38 digits and as every */
/* level uses 3 digits, we will limit the number of levels to 11 when working with an Oracle db. */
/* When working on a Prorgess-db, we allow 15 levels as a decimal in Progress can hold 50 digits. */
/* Class-data-item vdFSDLevelOneJump (instance-dependant) controls the values that will be used for */
/* BudgetWBSSeq and it initially holds the value for the first record on the highest-level. */
/* Its initial value is 4000000000000000000000000000000000000000000000 (a 4 followed by 45 zeros). */
/* In case of Oracle we restrict this to a 4 followed by 33 zeros so we can only have 11 levels - */
/* we do this by dividing the value of vdFSDLevelOneJump by 1 followed by 12 (45-33) zeros */
/* ================================================================================================ */
if dbtype('qaddb':U) = 'ORACLE':U
then assign vdFSDLevelOneJump = vdFSDLevelOneJump / 1000000000000.