project QadFinancials > class BQCrossCyPosting > method CreateQCrossCyPosting1

Description

Methos will create QCrossCyPosting records based on the input table of this method.


Parameters


tNewQCrossCyPostinginputtemp-table
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BPosting.AdditionalUpdatesCrossCyPosting


program code (program6/bqcrosscyposting.p)

/* ================================================================ */
    /* Return if no data is passed                                      */
    /* ================================================================ */
    if not can-find (first tNewQCrossCyPosting) 
    then return.
    
    /* ================================================================ */
    /* Set Return-status = Default-error                                */
    /* ================================================================ */
    assign oiReturnStatus = -98.
    
    /* ================================================================ */
    /* Empty the instance                                               */
    /* ================================================================ */
    
    if viFcReturnSuper <> 0 
    then do :
        assign oiReturnStatus = viFcReturnSuper.
        if viFcReturnSuper < 0 
        then return.
    end.  /* if viFcReturnSuper <> 0 */
    
    /* ================================================================ */
    /* Go through the input and create a record for every input-record  */
    /* ================================================================ */
    for each tNewQCrossCyPosting : 
         <M-84 run AddDetailLine
            (input  'QCrossCyPosting':U (icTable), 
             input  '':U (icParentRowid), 
             output viFcReturnSuper (oiReturnStatus)) in BQCrossCyPosting>
        if viFcReturnSuper <> 0 
        then do :
            assign oiReturnStatus = viFcReturnSuper.
            if viFcReturnSuper < 0 
            then return.
        end.  /* if viFcReturnSuper <> 0 */
        buffer-copy tNewQCrossCyPosting
                    except  tc_rowid 
                            tc_parentrowid
                            tc_status
                            QCrossCyPosting_ID
                            QCrossCyPostingCreateDate
                            QCrossCyPostingCreateTime
                    to tQCrossCyPosting.
    end. /* for each tNewQCrossCyPosting */
    
    /* ================================================================ */
    /* Set Return-status = OK                                           */
    /* ================================================================ */
    if oiReturnStatus = -98
    then assign oiReturnStatus = 0.