project QadFinancials > class BPeriod > method ValPeriod

validation procedure

Description

Validates Period field.
The GL period must be below 99.


Parameters


icTargetFieldinputcharacterValue of the field to validate.
icTargetFieldNameinputcharacterName of the field to validate. Use the database field name or public data item name.
Example : 'Order.Order-Num'.
icRowidinputcharacterContents of field tc_Rowid, if the target field is a field of a component temp-table.
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
validation on tPeriod.PeriodPeriod


program code (program4/bperiod.p)

if integer(icTargetField) > 99
    then do:
        assign vcMessage      = trim(substitute(#T-2'The GL period must be between &1 and &2.':255(3055)T-2#,"01":U,"99":U))
               oiReturnStatus = -1.
        <M-1 run SetMessage (input  vcMessage (icMessage),
                     input  '':U (icArguments),
                     input  icTargetFieldName (icFieldName),
                     input  icTargetField (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  icRowid (icRowid),
                     input  'QADFIN-182':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BPeriod>
        
    end.