project QadFinancials > class PAvatax > method GetAvataxConfig


Parameters


tAvaConfigDetailsoutputtemp-table
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method Session.ApplicationLogin


program code (program1/pavatax.p)

if oiReturnStatus = 0 then
    assign oiReturnStatus = -98.

assign vhIn = ?
       vhOut = dataset tAvaConfigDetails:handle
       vhInOut = ?.
  
Create Dataset vhIn in widget-pool "non-persistent".
Create Dataset vhInOut in widget-pool "non-persistent".

vhIn:name = "PAvatax-in".
vhInOut:name = "PAvatax-inout".

<M-47 run CallService
   (input  '':U (icProgramName), 
    input  'GetAvataxConfig':U (icMethodName), 
    input  vhIn by-reference (izInput), 
    input-output vhInOut by-reference (bzInputOutput), 
    input-output vhOut by-reference (bzOutput), 
    input  ? (icAsyncHandler), 
    output viFcReturnSuper (oiReturnStatus)) in PAvatax>
         
/* ============================================================================================================================ */
/* If the the call did not return anything then this can be caused by the fact that the program on mfgpro-side was not found or */
/* that something else major went wrong. In this case the return-status will be zero so we will capture this here ourselves     */
/* ============================================================================================================================ */
/* If the program on mfgpro-side was not found then the output temp-table will be empty, the error will be -1 and then there    */
/* will be a single tFcMessage error-record with tcMsgNumber = 'BLF-435' :                                                      */
/* If so, then set the output-version params to eb3.SP5 and set act as if no error occured (delete tFcMessage as well).         */
/* ============================================================================================================================ */
if viFcReturnSuper = -1 and 
   not can-find (first tAvaConfigDetails) 
then do :     
    Find tFcMessages where 
         tFcMessages.tcFcType      <> "W":U       and 
         tFcMessages.tcFcType      <> "":U        and 
         tFcMessages.tcFcType      <> ?           and 
         tFcMessages.tcFcMsgNumber  = "BLF-435":U 
         no-error.
    If available tFcMessages 
    Then do :
        If not can-find (first btFcMessages where 
                               btFcMessages.tcFcType <> "W":U and 
                               btFcMessages.tcFcType <> "":U  and 
                               btFcMessages.tcFcType <> ?     and 
                               rowid(btFcMessages)   <> rowid(tFcMessages))
        Then do :
            assign viFcReturnSuper  = 0.                 
            Delete tFcMessages.
        End. /* If not can-find (first tFcMessages where  */
    End. /* If available tFcMessages  */
End. /* If viFcReturnSuper = -1 and */
/* ============================== */
/* Error-handling for CallService */
/* ============================== */     
    
if viFcReturnSuper <> 0 then 
    assign oiReturnStatus = viFcReturnSuper.

if oiReturnStatus = -98 then
    assign oiReturnStatus = 0.

delete object vhIn.
delete object vhInOut.