project QadFinancials > class BBudget > method BudgetWBSCreateMultipleSub

Description

This method is the sub-method of method BudgetWBSCreateMultiple because it could not contain all the code


Parameters


icBudgetTcRowidinputcharacterBudgetTcRowid
icBudgetWBSTcRowidinputcharacterBudgetWBSTcRowid; tc_rowid of the parent-code for the new records
icMultipleCreationListinputcharacterMultipleCreationList; Codes of the new WBS-node
tNewMBudgetWBSoutputtemp-tableOutput table
tNewMBudgetVersionFigureoutputtemp-tableOutput table
tNewMBudgetVersionGLFigoutputtemp-tableNewMBudgetVersionGLFig
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BBudget.BudgetWBSCreateMultiple


program code (program6/bbudget.p)

/* ====================================== */
    /* Clear the content of the output tables */
    /* ====================================== */
    empty temp-table tNewMBudgetWBS.
    empty temp-table tNewMBudgetVersionFigure.
    empty temp-table tNewMBudgetVersionGLFig.
    
    /* ====================================== */
    /* Go through the list with the new-nodes */
    /* ====================================== */
    do viCounter = num-entries(icMultipleCreationList) to 1 by -1 :
        /* ========================================================================= */
        /* Call the create-method (including parameters for the FDSCode and FDSList) */
        /* ========================================================================= */
        empty temp-table tNewBudgetWBS.
        empty temp-table tNewBudgetVersionFigure.
        empty temp-table tNewBudgetVersionGLFig.

        <M-81 run BudgetWBSCreate
           (input  icBudgetTcRowid (icBudgetTcRowid), 
            input  icBudgetWBSTcRowid (icBudgetWBSTcRowid), 
            input  entry(viCounter,icmultipleCreationList) (icNewBudgetWBSCode), 
            input  0 (iiNewBudgetWBSLineNumber), 
            input  true (ilCreateChild), 
            input  (if index(entry(viCounter,icmultipleCreationList),'*':U) = 0 then '':U else entry(viCounter,icmultipleCreationList)) (icBudgetWBSFDSCode), 
            input  (if index(entry(viCounter,icmultipleCreationList),'*':U) = 0 then entry(viCounter,icmultipleCreationList) else '':U) (icBudgetWBSFDSList), 
            output tNewBudgetWBS (tNewBudgetWBS), 
            output tNewBudgetVersionFigure (tNewBudgetVersionFigure), 
            output tNewBudgetVersionGLFig (tNewBudgetVersionGLFig), 
            input  ? (icNewBudgetWBSTopicDescription), 
            input  false (ilNewBudgetWBSIsPrintDesc), 
            input  ? (icNewBudgetGroupCode), 
            input  ? (icNewAltCOAGroupCode), 
            input  ? (icNewBudgetWBSFDSLink), 
            input  ? (icNewBudgetWBSCategory), 
            output viFcReturnSuper (oiReturnStatus)) in BBudget>

        if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
        if oiReturnStatus < 0 then return.
        
        /* ============================================================================= */
        /* Copy the output of the call to the output of this method                      */
        /* Clear the output of the call so they are empty for the next doVicounter-loop  */
        /* ============================================================================= */
        for each tNewBudgetWBS :
            create tNewMBudgetWBS.
            buffer-copy tNewBudgetWBS to tNewMBudgetWBS.
        end. /* for each */
        for each tNewBudgetVersionFigure :
            create tNewMBudgetVersionFigure.
            buffer-copy tNewBudgetVersionFigure to tNewMBudgetVersionFigure.
        end. /* for each */
        for each tNewBudgetVersionGLFig :
            create tNewMBudgetVersionGLFig.
            buffer-copy tNewBudgetVersionGLFig to tNewMBudgetVersionGLFig.
        end. /* for each */
    end. /* do viCounter */