project QadFinancials > class BFRWColumnGroup > method ValidateComponentPost

Description

Post validation


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BFRWColumnGroup.ValidateComponent


program code (program1/bfrwcolumngroup.p)

/* ======================================================================================= */
/* Check if any of the column groups are being deleted.                                    */
/* ======================================================================================= */
<M-87 run ValidateComponentPostDelete  (output viFcReturnSuper (oiReturnStatus)) in BFRWColumnGroup>
if viFcReturnSuper < 0 or viFcReturnSuper > 0 and oiReturnStatus = 0 then assign oiReturnStatus = viFcReturnSuper.
if oiReturnStatus < 0 then return.

    
/* ================================================================= */
/* Check that the report chart code exists                           */
/* ================================================================= */

for each t_sFRWCol where
         t_sFRWCol.tc_Status <> 'D':U:

    /* validate that the report chart exists */
                  
    <Q-43 run FRWChartPrim (all) (Read) (NoCache)
       (input ?, (FRWChart_ID)
        input t_sFRWCol.tcFRWChartCode, (FRWChartCode)
        output dataset tqFRWChartPrim) in BFRWChart>
             
    find first tqFRWChartPrim where
               tqFRWChartPrim.tcFRWChartCode = t_sFRWCol.tcFRWChartCode no-error.
            
    if not available tqFRWChartPrim
    then do:
        <M-97 run SetMessage
           (input  #T-37'Report Chart code does not exist. Please re-enter.':255(545671204)T-37# (icMessage), 
            input  '':U (icArguments), 
            input  'tFRWCol.tcFRWChartCode':U (icFieldName), 
            input  t_sFRWCol.tcFRWChartCode (icFieldValue), 
            input  'E':U (icType), 
            input  3 (iiSeverity), 
            input  t_sFRWCol.tc_Rowid (icRowid), 
            input  'qadfin-418873':U (icFcMsgNumber), 
            input  '':U (icFcExplanation), 
            input  '':U (icFcIdentification), 
            input  '':U (icFcContext), 
            output viFcReturnSuper (oiReturnStatus)) in BFRWColumnGroup>
        assign oiReturnStatus = -1.
    end.
    else do:
        assign t_sFRWCol.FRWChart_ID = tqFRWChartPrim.tiFRWChart_ID.
    end.
    
    /* Validate the column group details */
    <M-2 run ValidateComponentPostFRWColDet  (output viFcReturnSuper (oiReturnStatus)) in BFRWColumnGroup>
    if viFcReturnSuper < 0 or viFcReturnSuper > 0 and oiReturnStatus = 0 then assign oiReturnStatus = viFcReturnSuper.
    
end.    /* for each t_sFRWCol where */


/* ======================================================================================= */
/* Validate the analysis code, an analysis code is not mandatory                           */
/* therefore if it is removed from a column this needs to be handled.                      */
/* ======================================================================================= */
<M-60 run ValidateComponentPostMaximumColumns  (output viFcReturnSuper (oiReturnStatus)) in BFRWColumnGroup>
if viFcReturnSuper < 0 or viFcReturnSuper > 0 and oiReturnStatus = 0 then assign oiReturnStatus = viFcReturnSuper.