Description
Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.
Parameters
oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bbankpayformat.p)
<ANCESTOR-CODE>
<Q-4 run PayFormatTypeByType (Start) in BPaymentFormat >
assign vcPAYFORMATPAYTYPES = {&PAYFORMATPAYTYPES}
vcPAYFORMATPAYMODULES = {&PAYFORMATMODULES}
vcPAYFORMATPAYINSTRUMENT = {&PAYFORMATPAYINSTRUMENTS}.
for each tBankPayFormat:
if vlDataLoadKeepPrevious and
can-find (tAlreadyCalculatedRecords where
tAlreadyCalculatedRecords.tcTableName = "BankPayFormat" and
tAlreadyCalculatedRecords.tc_Rowid = tBankPayFormat.tc_Rowid)
then next.
<Q-2 run PayFormatTypeByType (all) (Read) (NoCache)
(input tBankPayFormat.PayFormatTypeCode, (PayFormatTypeCode)
output dataset tqPayFormatTypeByType) in BPaymentFormat >
for first tqPayFormatTypeByType no-lock:
assign tBankPayFormat.tcPayFormatTypeModule = tqPayFormatTypeByType.tcPayFormatTypeModule
tBankPayFormat.tcPayFormatTypePayType = tqPayFormatTypeByType.tcPayFormatTypePayType
tBankPayFormat.tcPayFormatTypePayInstrument = tqPayFormatTypeByType.tcPayFormatTypePayInstrument.
end.
/* Get translation for payment module */
assign tBankPayFormat.tcPayFormatTypeModuleTr = "?":U.
do viCounter = num-entries(vcPAYFORMATPAYMODULES, chr(2)) to 1 by -2:
if entry(viCounter, vcPAYFORMATPAYMODULES, chr(2)) = tBankPayFormat.tcPayFormatTypeModule
then do:
assign tBankPayFormat.tcPayFormatTypeModuleTr = entry(viCounter - 1, vcPAYFORMATPAYMODULES, chr(2)) no-error.
leave.
end.
end.
/* Get translation for payment instrument */
assign tBankPayFormat.tcPayFormatTypePayInstTr = "?":U.
do viCounter = num-entries(vcPAYFORMATPAYINSTRUMENT, chr(2)) to 1 by -2:
if entry(viCounter, vcPAYFORMATPAYINSTRUMENT, chr(2)) = tBankPayFormat.tcPayFormatTypePayInstrument
then do:
assign tBankPayFormat.tcPayFormatTypePayInstTr = entry(viCounter - 1, vcPAYFORMATPAYINSTRUMENT, chr(2)) no-error.
leave.
end.
end.
/* Get translation for payment type */
assign tBankPayFormat.tcPayFormatTypePayTypeTr = "?":U.
do viCounter = num-entries(vcPAYFORMATPAYTYPES, chr(2)) to 1 by -2:
if entry(viCounter, vcPAYFORMATPAYTYPES, chr(2)) = tBankPayFormat.tcPayFormatTypePayType
then do:
assign tBankPayFormat.tcPayFormatTypePayTypeTr = entry(viCounter - 1, vcPAYFORMATPAYTYPES, chr(2)) no-error.
leave.
end.
end.
assign tBankPayFormat.tlBankPayFormatIsReferenced = <M-3 GetBankPayFormatIsReferenced
(input tBankPayFormat.BankPayFormat_ID (iiBankPayFormatId),
output viFcReturnSuper (oiReturnStatus)) in BBankPayFormat>.
end.
<Q-5 run PayFormatTypeByType (Stop) in BPaymentFormat >