project QadFinancials > class BMfgDomain > method MaintainData


Parameters


tCopyDomainsinputtemp-table
tCopyDomainPropertyinputtemp-table
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BDomain.AdditionalUpdates


program code (program1/bmfgdomain.p)

/* ====================================================== */
    /* Set the return status to unexpected system error (-98) */
    /* ====================================================== */
    assign oiReturnStatus = -98.
    
    /* ============================================================== */
    /* Set the status of domain to 'C' when the domainproperty is 'C' */
    /* ============================================================== */
    for each tCopyDomains where
             tCopyDomains.tc_Status = "":U:
        if can-find(tCopyDomainProperty where
                    tCopyDomainProperty.tc_ParentRowid = tCopyDomains.tc_Rowid and
                    tCopyDomainProperty.tc_Status      = "C":U)
        then assign tCopyDomains.tc_Status = 'C':U.
    end.

    /* =============================================================================================== */
    /* Execute the ProcessMaintainData method to execute the generic processing of the update in the   */
    /* Financials across to the MFG/PRO database. (this method can be called from within a Loop)       */
    /* First: clear the instance                                                                       */
    /* Last: call ProcessMaintainDataSave to save the data                                             */
    /* =============================================================================================== */
    <M-2 run ClearData (output viFcReturnSuper (oiReturnStatus)) in BMfgDomain>
    if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0 then Return.
    <M-3 run ProcessMaintainData (output viFcReturnSuper (oiReturnStatus)) in BMfgDomain>
    if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0 then Return.
    <M-5 run ProcessMaintainDataSave (output viFcReturnSuper (oiReturnStatus)) in BMfgDomain>
    if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0 then Return.
        
    /* ======================== */
    /* Set ReturnStatus = OK    */
    /* ======================== */
    if oiReturnStatus = -98
    then assign oiReturnStatus = 0.