project QadFinancials > class BReportTree > method ValidateAnCodeForImportTree

Description

Validate AnCode data for Report Import Tree


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program3/breporttree.p)

assign oiReturnStatus = 0.

for each tAnCodeForUpdateTemp break by tAnCodeForUpdateTemp.tcQAnCode:
    
    if not first-of(tAnCodeForUpdateTemp.tcQAnCode) then 
       next.
    
    /* Check if AnCode is existing */                 
    <Q-37 run FRWAnCodePrim1 (all) (Read) (NoCache)
       (input ?, (FRWAnCode_ID)
        input tAnCodeForUpdateTemp.tcQAnCode, (FRWAnCodeCode)
        input tAnCodeForUpdateTemp.tcFRWCodeChartCode, (ChartCode)
        output dataset tqFRWAnCodePrim1) in BFRWAnalysisCode>

    find first tqFRWAnCodePrim1
        where tqFRWAnCodePrim1.tcFRWAnCodeCode = tAnCodeForUpdateTemp.tcQAnCode and
              tqFRWAnCodePrim1.tcFRWAnCodeFRWChartCode = tAnCodeForUpdateTemp.tcFRWCodeChartCode no-error.

    if available tqFRWAnCodePrim1 then
    do:
        /* Warning message for existing AnCode */
        <M-39 run SetMessage
           (input  substitute(#T-80'Analysis Code '&1' will be updated by Importing Excel data.':255(699519098)T-80#, tAnCodeForUpdateTemp.tcQAnCode) (icMessage), 
            input  '':U (icArguments), 
            input  '':U (icFieldName), 
            input  tAnCodeForUpdateTemp.tcQAnCode (icFieldValue), 
            input  'W':U (icType), 
            input  3 (iiSeverity), 
            input  '':U (icRowid), 
            input  'qadfin-101205':U (icFcMsgNumber), 
            input  '':U (icFcExplanation), 
            input  '':U (icFcIdentification), 
            input  '':U (icFcContext), 
            output viFcReturnSuper (oiReturnStatus)) in BReportTree>
        assign oiReturnStatus = 1.
    end.
end.