project QadFinancials > class BBankAccountFormat > method ValidateComponent

Description

Write here all tests on database update (new / modify / delete) that cannot be coded with a validation mask.
The type of update can be found in tc_status (N/C/D).
If you find incorrect data, you must write an entry in tFcMessages (using SetMessage) and set the return status of this method to either +1 or -1.
Return status +1 = data will still be accepted.
Return status -1 = data will not be accepted.
This method is run from SetPublicTables, before transferring the received data into the class temp-tables.


Parameters


oiReturnStatusoutputinteger


Internal usage


unused


program code (program/bbankaccountformat.p)

assign vclist = "":U .
for each t_sBankAccFormat :
   assign vilength = 0 .
   
   for each t_sBankAccFormatSect
        where t_sBankAccFormat.BankAccFormat_ID = t_sBankAccFormatSect.BankAccFormat_ID :
       assign vilength = vilength + t_sBankAccFormatSect.BankAccFormatSectLength .
    end.
   if vilength > 40
   then assign vclist = vclist + "  " +  t_sBankAccFormat.BankAccFormatCode .
end.
 
if vclist <> ""
then do :
   
   <M-52 run SetMessage
      (input  #T-24'A bank account number of more than 40 characters long cannot not be stored when running on Oracle database':255(517615701)T-24# (icMessage), 
       input  ? (icArguments), 
       input  't_sBankaccFormat.BankAccFormatCode' (icFieldName), 
       input  vclist (icFieldValue), 
       input  'W' (icType), 
       input  3 (iiSeverity), 
       input  ? (icRowid), 
       input  'qadfin-898287':U (icFcMsgNumber), 
       input  ? (icFcExplanation), 
       input  ? (icFcIdentification), 
       input  ? (icFcContext), 
       output viFcReturnSuper (oiReturnStatus)) in BBankAccountFormat>
   
  
       assign oiReturnStatus = 1 .
end.  
<ANCESTOR-CODE>