project QadFinancials > class BRevaluationSaf > method UpdateRevalSafs

Description

Updates RevalGLSafCombined through a reference temporary table. This method works as an envelope for UpdateRevalGLSafCombined. It's designed for mass processing.


Parameters


tRefRevalGLSafCombinedinput-outputtemp-table
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BRevaluation.AdditionalUpdates


program code (program6/brevaluationsaf.p)

/* ----------------------------------------------------------------- */
/* Process all records in the reference temp-table and fill-in IDs   */
/* ----------------------------------------------------------------- */
for each tRefRevalGLSafCombined:
    /* Fill-in lists of IDs */
    assign vcCostCentreSafs = string(tRefRevalGLSafCombined.CostCentre1Saf_ID) + ",":U +
                              string(tRefRevalGLSafCombined.CostCentre2Saf_ID) + ",":U +
                              string(tRefRevalGLSafCombined.CostCentre3Saf_ID) + ",":U +
                              string(tRefRevalGLSafCombined.CostCentre4Saf_ID) + ",":U +
                              string(tRefRevalGLSafCombined.CostCentre5Saf_ID).

    assign vcProjectSafs    = string(tRefRevalGLSafCombined.Project1Saf_ID)    + ",":U +
                              string(tRefRevalGLSafCombined.Project2Saf_ID)    + ",":U +
                              string(tRefRevalGLSafCombined.Project3Saf_ID)    + ",":U +
                              string(tRefRevalGLSafCombined.Project4Saf_ID)    + ",":U +
                              string(tRefRevalGLSafCombined.Project5Saf_ID).

    assign vcGLSafs         = string(tRefRevalGLSafCombined.GL1Saf_ID)         + ",":U +
                              string(tRefRevalGLSafCombined.GL2Saf_ID)         + ",":U +
                              string(tRefRevalGLSafCombined.GL3Saf_ID)         + ",":U +
                              string(tRefRevalGLSafCombined.GL4Saf_ID)         + ",":U +
                              string(tRefRevalGLSafCombined.GL5Saf_ID).

    <M-1 run UpdateRevalGLSafCombined (input  vcCostCentreSafs (icCostCentreSafIds), 
                                   input  vcGLSafs (icGLSafIds), 
                                   input  vcProjectSafs (icProjectSafIds), 
                                   input  tRefRevalGLSafCombined.CostCentreSafStructure_ID (iiCostCentreSafStructureID), 
                                   input  tRefRevalGLSafCombined.GLSafStructure_ID (iiGLSafStructureID), 
                                   input  tRefRevalGLSafCombined.ProjectSafStructure_ID (iiProjectSafStructureID), 
                                   output tRefRevalGLSafCombined.RevalGLSafCombined_ID (oiRevalGLSafCombinedId), 
                                   output viFcReturnSuper (oiReturnStatus)) in BRevaluationSaf>
    /* Update Failed */
    if viFcReturnSuper <> 0
    then do:
        assign oiReturnStatus = min(-1,viFcReturnSuper).
        return.
    end.
end.