project QadFinancials > class BMfgExchangeRate > method MaintainData


Parameters


tCopyExchangeRateinputtemp-table
itValidDateFrominputdateSince exr_startdate is part of MFG/PRO's business key, and this value can be modified it is necessary to pass in the original value in order to lookup MFG/PRO's record.
icModifiedRowIDinputcharacter
icExchangeRateTypeCodeinputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BExchangeRate.AdditionalUpdates


program code (program1/bmfgexchangerate.p)

assign 
    vtInitialValidDateFrom = itValidDateFrom
    vcInitialExchangeRateTypeCode = icExchangeRateTypeCode
    vcModifiedRowID = icModifiedRowID.
    /* ====================================================== */
    /* Set the return status to unexpected system error (-98) */
    /* ====================================================== */
    assign oiReturnStatus = -98.
    
    /* =============================================================================================== */
    /* 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 BMfgExchangeRate>
    if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0 then Return.
    <M-1 run ProcessMaintainData (output viFcReturnSuper (oiReturnStatus)) in BMfgExchangeRate>
    if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0 then Return.
    <M-3 run ProcessMaintainDataSave (output viFcReturnSuper (oiReturnStatus)) in BMfgExchangeRate>
    if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0 then Return.
        
    /* ======================== */
    /* Set ReturnStatus = OK    */
    /* ======================== */
    if oiReturnStatus = -98
    then assign oiReturnStatus = 0.