Description
Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.
Parameters
oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bbanknumber.p)
/* ==================================================================== */
/* JBA: run this block only when the data are loaded and displayed ... */
/* not if the method is called after DataLoad in Update... methods */
/* where we work with created or modified or deleted records */
/* ==================================================================== */
if vlRunCalculate = false
then do:
assign vlRunCalculate = true.
return.
end.
<ANCESTOR-CODE>
for each tBankNumber:
if vlDataLoadKeepPrevious and
can-find (tAlreadyCalculatedRecords where
tAlreadyCalculatedRecords.tcTableName = "BankNumber" and
tAlreadyCalculatedRecords.tc_Rowid = tBankNumber.tc_Rowid)
then next.
/*Convert ParentObject_ID to Code*/
if tBankNumber.tc_Status <> "N":U
then do:
<M-1 run CalculateBankNumber (output viFcReturnSuper (oiReturnStatus)) in BBankNumber>
assign oiReturnStatus = if (oiReturnStatus > 0 and
viFcReturnSuper = 0) or
oiReturnStatus < 0
then oiReturnStatus
else viFcReturnSuper.
end.
/*Convert CompanySharedSet_ID to CompanyCode*/
if tBankNumber.tc_Status <> "N":U
then do:
<M-3 run CalculateCompanySharedSet (output viFcReturnSuper (oiReturnStatus)) in BBankNumber>
assign oiReturnStatus = if (oiReturnStatus > 0 and
viFcReturnSuper = 0) or
oiReturnStatus < 0
then oiReturnStatus
else viFcReturnSuper.
end.
end. /* for each tBankNumber: */
<M-94 run CalculatePayFormatCodeDesc (output viFcReturnSuper (oiReturnStatus)) in BBankNumber>
assign oiReturnStatus = if (oiReturnStatus > 0 and
viFcReturnSuper = 0) or
oiReturnStatus < 0
then oiReturnStatus
else viFcReturnSuper.