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/bfrwanalysiscode.p)
define buffer bFRWChart for FRWChart.
<ANCESTOR-CODE>
for each tFRWAnCode:
/* Retrieve additional details of the Report Chart */
if tFRWAnCode.FRWChart_ID <> ? and
tFRWAnCode.FRWChart_ID <> 0
then for first bFRWChart fields (FRWChart_ID GLSharedSet_ID DivisionSharedSet_ID CostCentreSharedSet_ID ProjectSharedSet_ID) no-lock where
bFRWChart.FRWChart_ID = tFRWAnCode.FRWChart_ID on error undo, throw:
assign tFRWAnCode.tiFRWChartGLSharedSet_ID = bFRWChart.GLSharedSet_ID
tFRWAnCode.tiFRWChartDivisionSharedSet_ID = bFRWChart.DivisionSharedSet_ID
tFRWAnCode.tiFRWChartCostCentreSharedSet_ID = bFRWChart.CostCentreSharedSet_ID
tFRWAnCode.tiFRWChartProjectSharedSet_ID = bFRWChart.ProjectSharedSet_ID.
end.
for each tFRWAnCodeElem where
tFRWAnCodeElem.tc_ParentRowid = tFRWAnCode.tc_Rowid,
each tFRWAnCodeElemDet where
tFRWAnCodeElemDet.tc_ParentRowid = tFRWAnCodeElem.tc_Rowid:
/* Construct value to be displayed on the UI */
if tFRWAnCodeElemDet.FRWAnCodeElemDetCode = "" or
tFRWAnCodeElemDet.FRWAnCodeElemDetCode = ?
then assign tFRWAnCodeElemDet.tcFRWAnCodeElemDetCodeDispVal = vcBlankValueTR.
else assign tFRWAnCodeElemDet.tcFRWAnCodeElemDetCodeDispVal = tFRWAnCodeElemDet.FRWAnCodeElemDetCode.
/* Retrieve description of the code */
if tFRWAnCodeElemDet.FRWAnCodeElemDetCode <> "" and
tFRWAnCodeElemDet.FRWAnCodeElemDetCode <> ? and
(tFRWAnCodeElemDet.tcFRWAnCodeElemDetDescription = '':U or
tFRWAnCodeElemDet.tcFRWAnCodeElemDetDescription = ?)
then do:
<M-2 run GetCOAElementDescription
(input tFRWAnCodeElem.FRWAnCodeElemCOAType (icCOAElementType),
input tFRWAnCodeElemDet.FRWAnCodeElemDetValue (iiCOAElement_ID),
input tFRWAnCodeElemDet.FRWAnCodeElemDetCode (icCOAElementCode),
output tFRWAnCodeElemDet.tcFRWAnCodeElemDetDescription (ocCOAElementDescription),
output viTempElement_ID (oiOutCOAElement_ID),
output viFcReturnSuper (oiReturnStatus)) in BFRWAnalysisCode>
if viFcReturnSuper < 0 or viFcReturnSuper > 0 and oiReturnStatus = 0 then assign oiReturnStatus = viFcReturnSuper.
if oiReturnStatus < 0 then next.
end. /* if tFRWAnCodeElemDet.tcFRWAnCodeElemDetDescription = '':U or */
end. /* for each tFRWAnCodeElem where */
end. /* foreach tFRWAnCode */