project QadFinancials > class PMFGPeriodicCosting > method TransferPCCostAdjustment


Parameters


tPCCostAdjustmentinputtemp-table
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BMassLayerTransfer.ApiExecuteLayerTransferV01


program code (program1/pmfgperiodiccosting.p)

if oiReturnStatus = 0 
then assign oiReturnStatus = -98.

assign  vhIn    = ?
        vhInOut = dataset tPCCostAdjustment:handle
        vhOut   = ?.
        
/* Call the service */         
<M-49 run CallService
   (input  vcDefaultMfgProgram (icProgramName), 
    input  'TransferPCCostAdjustment':U (icMethodName), 
    input  vhIn (izInput), 
    input-output vhInOut (bzInputOutput), 
    input-output vhOut (bzOutput), 
    input  ? (icAsyncHandler), 
    output viFcReturnSuper (oiReturnStatus)) in PMFGPeriodicCosting>
        

if viFcReturnSuper <> 0
then do:
    assign oiReturnStatus = viFcReturnSuper.
    if oiReturnStatus = -1
    then do:    
        Find tFcMessages where 
             tFcMessages.tcFcType      <> "W":U       and 
             tFcMessages.tcFcType      <> "":U        and 
             tFcMessages.tcFcType      <> ?           and 
             tFcMessages.tcFcMsgNumber  = "BLF-435":U and 
             (tFcMessages.tcFcContext   matches "*QRA-38*":U or
              tFcMessages.tcFcContext   matches "*1562*")
             no-error.
        if available tFcMessages
        then do:
            assign oiReturnStatus = 0.
            Delete tFcMessages.
        end.
    end.
end.   
else do:
    /* process the temp-table */
    for first tPCCostAdjustment where
              tPCCostAdjustment.tiERSStatus <> -98:
    
        assign oiReturnStatus = -1.
    
    end.  /* for first ... */ 
end.

if oiReturnStatus = -98 
then assign oiReturnStatus = 0.
   
delete object vhInOut.