project QadFinancials > class BCMask > method CreateCMaskJrnlGroups

Description

This method creates multiple records in table CMaskJrnlGroup


Parameters


icParentRowIdinputcharacterParent Row ID
iiNbrRecordsToCreateinputintegerNumber of new records to create
tCMaskJrnlGroupRefoutputtemp-tableCreated CMaskJrnlGroup records
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program3/bcmask.p)

/* ====================================================================================== *
 * Method       : CreateCMaskJrnlGroups                                                   *
 * Description  : This method creates new records for the CMaskJrnlGroup table            *
 * ====================================================================================== */
 
MAIN_BLOCK:
do on error undo, throw:
    /* Default output parameters */
    empty temp-table tCMaskJrnlGroupRef.
    

    /* Execution block */
    do viI = 1 to iiNbrRecordsToCreate:
        /* Create new record */
        <M-74 run AddDetailLine
           (input  'CMaskJrnlGroup':U (icTable), 
            input  icParentRowId (icParentRowid), 
            output viFcReturnSuper (oiReturnStatus)) in BCMask>
        if viFcReturnSuper < 0 or viFcReturnSuper > 0 and oiReturnStatus = 0 then assign oiReturnStatus = viFcReturnSuper.
        if viFcReturnSuper < 0 then leave MAIN_BLOCK.        
    
        create tCMaskJrnlGroupRef.  
        buffer-copy tCMaskJrnlGroup to tCMaskJrnlGroupRef.
    end.
end. /* MAIN_BLOCK */