validation procedure
Parameters
iiTargetField | input | integer | Value of the business field to validate. |
icTargetFieldCode | input | character | |
icTargetFieldName | input | character | Name of the business field to validate. |
icRowid | input | character | Contents of field tc_Rowid, if the target field is a field of a component temp-table. |
ilActive | input | logical | |
icRequiredExpenseCodeType | input | character | |
icRequiredExpenseCodeTypeTR | input | character | |
icExpenseCodeType | input | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bexpenseglmatrix.p)
/* ================================================= */
/* Check if the ID refers to an active component */
/* Check if the Type of the expense-code is correct */
/* ================================================= */
if ilActive <> true
then do :
assign vcMessage = trim(substitute(#T-4'The expense code &1/&2 is not active. Select an active expense code.':255(1893)t-4#,icTargetFieldCode,string(iiTargetField)))
oiReturnStatus = -1.
<M-2 run SetMessage (input vcMessage (icMessage),
input '':U (icArguments),
input icTargetFieldName (icFieldName),
input string(iiTargetField) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input icRowid (icRowid),
input 'QADFIN-1581':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BExpenseGLMatrix>
end. /* if ilActive <> true */
if icRequiredExpenseCodeType <> icExpenseCodeType
then do :
assign vcMessage = trim(substitute(#T-5'The expense code &1/&2 should be of type &3.':255(1894)t-5#,icTargetFieldCode,string(iiTargetField),icRequiredExpenseCodeTypeTR))
oiReturnStatus = -1.
<M-3 run SetMessage (input vcMessage (icMessage),
input '':U (icArguments),
input icTargetFieldName (icFieldName),
input string(iiTargetField) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input icRowid (icRowid),
input 'QADFIN-1582':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BExpenseGLMatrix>
end. /* if icRequiredExpenseCodeType <> icExpenseCodeType */