project QadFinancials > class BAPMatching > method GetAPMatchingPostingVoucherByTcRowid

Description

GetAPMatchingPostingVoucherByTcRowid: This method will return the postingvoucher for a certain APM based on it tcRowid


Parameters


icAPMatchingTcRowidinputcharactertc_rowid of the tAPMatching for which you want to know the matching-voucher
oiAPMatchingPostingVoucheroutputintegerAPMatchingPostingVoucher: Matching-Voucher of the tAPMatching record
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program7/bapmatching.p)

/* ================== */
/* Exception handling */
/* ================== */
assign oiReturnStatus      = -98
       viLocalReturnStatus = 0.
       
RETURNVOUCHERBLOCK : DO :
   
    /* ============================================= */
    /* Find the header record and return its voucher */
    /* ============================================= */
    Find tAPMatching where 
         tAPMatching.tc_Rowid = icAPMatchingTcRowid
         no-lock no-error.
    if not available tAPMatching
    then do :
       assign viLocalReturnStatus = -3
              vcMsgAPMatching = trim(substitute(#T-2'Internal error: Unable to find the Matching record based upon its rowid (&1).':255(733750250)T-2#,icAPMatchingTcRowid)).
       <M-1 run SetMessage
          (input  vcMsgAPMatching (icMessage), 
           input  '':U (icArguments), 
           input  '':U (icFieldName), 
           input  '':U (icFieldValue), 
           input  'E':U (icType), 
           input  3 (iiSeverity), 
           input  '':U (icRowid), 
           input  'QadFin-9747':U (icFcMsgNumber), 
           input  '':U (icFcExplanation), 
           input  '':U (icFcIdentification), 
           input  '':U (icFcContext), 
           output viFcReturnSuper (oiReturnStatus)) in BAPMatching>
        Leave RETURNVOUCHERBLOCK.
    end. /* if not available tAPMatching */
    assign oiAPMatchingPostingVoucher = tAPMatching.tiPostingVoucher.
        
END. /* RETURNVOUCHERBLOCK */

/* ================== */
/* Exception handling */
/* ================== */
assign oiReturnStatus = viLocalReturnStatus.