project QadFinancials > class BFRWAnalysisCode > method GetFRWAnCodeAllInfo

Description

Get all information for given Report Analysis Code. This method is using to export Report Analysis Code to Excel(Report Tree Export).


Parameters


icChartCodeinputcharacter
icAnalysisCodeListinputcharacter
tAnCodeforUpdateoutputtemp-table
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BReportTree.GetAnCodeAllInfo


program code (program1/bfrwanalysiscode.p)

<Q-36 run GetFRWAnCodeAllByCodeChart (all) (Read) (NoCache)
   (input icChartCode, (ChartCode)
    input icAnalysisCodeList, (FRWAnCodeList)
    output dataset tqGetFRWAnCodeAllByCodeChart) in BFRWAnalysisCode>

vpAnCodeElemDetIDList = "".
define buffer bGetFRWAnCodeAll for tqGetFRWAnCodeAllByCodeChart.

for each tqGetFRWAnCodeAllByCodeChart where tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeAnalyseType = 'A' 
    break by tiFRWAnCode_ID by tiFRWAnCodeElem_ID by tcFRWAnCodeElemDetCode:

    if first-of(tqGetFRWAnCodeAllByCodeChart.tiFRWAnCodeElem_ID) then
    do:
        vpAnCodeElemDetIDList = "".
        for each bGetFRWAnCodeAll where bGetFRWAnCodeAll.tiFRWAnCodeElem_ID = tqGetFRWAnCodeAllByCodeChart.tiFRWAnCodeElem_ID by bGetFRWAnCodeAll.tcFRWAnCodeElemDetCode:
           /*<blank> will not be translated, because in Cube Gen and Report Run it's also used the hard code string*/
           if (bGetFRWAnCodeAll.tcFRWAnCodeElemDetCode = "" and bGetFRWAnCodeAll.tiFRWAnCodeElemDetValue = 0) then  
               bGetFRWAnCodeAll.tcFRWAnCodeElemDetCode = "<blank>".
  
           if vpAnCodeElemDetIDList = "" then              
               vpAnCodeElemDetIDList = string(bGetFRWAnCodeAll.tcFRWAnCodeElemDetCode).
           else
               vpAnCodeElemDetIDList = vpAnCodeElemDetIDList + "," +  string(bGetFRWAnCodeAll.tcFRWAnCodeElemDetCode) .
        end.
        tqGetFRWAnCodeAllByCodeChart.tcCodeElemIDList = vpAnCodeElemDetIDList.
    end.
    else
    do: 
        if(tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeAnalyseType = "A") then
           delete tqGetFRWAnCodeAllByCodeChart.
    end.
end.

for each tqGetFRWAnCodeAllByCodeChart:
    create tAnCodeforUpdate.
    assign tAnCodeforUpdate.tcQAnCode = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeCode
           tAnCodeforUpdate.tcQAnAnalyseType = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeAnalyseType
           tAnCodeforUpdate.tcQAnCOAType = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeElemCOAType
           tAnCodeforUpdate.tcQAnDesc = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeDescription
           tAnCodeforUpdate.tcQAnAnalyseText = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeAnalyseText
           tAnCodeforUpdate.tcQAnXBRL = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeXBRElement
           tAnCodeforUpdate.tcQAntaxoName = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeTaxoName
           tAnCodeforUpdate.tcQAnELR = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeELR
           tAnCodeforUpdate.tcQAnBegins = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeElemMask
           tAnCodeforUpdate.tcQFrom = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeElemMaskRange1
           tAnCodeforUpdate.tcQTo = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeElemMaskRange2
           tAnCodeforUpdate.tcQList = tqGetFRWAnCodeAllByCodeChart.tcCodeElemIDList
           tAnCodeforUpdate.tcQAnCalcElement = tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeCalcElement.
    if tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeAnalyseType = {&FRWANALYSISTYPE-TEXT} then
    assign tAnCodeforUpdate.tcQAnAnalyseText = if num-entries(tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeInfo, ":":U) <> 0
                                               then trim(Entry(2, tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeInfo, ":":U))
                                               else trim(tqGetFRWAnCodeAllByCodeChart.tcFRWAnCodeInfo).
end.

vpAnCodeElemDetIDList = "".