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
oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bmfgcreditterms.p)
<ANCESTOR-CODE>
for each t_sct_mstr
where t_sct_mstr.tc_Status = "D":U:
if vlCreditTermsDetailQStarted <> true then do:
<Q-7 run CreditTermsDetailByDomainCode (Start) in BMfgCreditTermsDetail >
assign vlCreditTermsDetailQStarted = true.
end.
<Q-1 run CreditTermsDetailByDomainCode (all) (Read) (NoCache) (input t_sct_mstr.ct_domain, (Domain)
input '', (PaymentConditionCode)
input t_sct_mstr.ct_code, (StagedPaymentConditionCode)
output dataset tqCreditTermsDetailByDomainCode) in BMfgCreditTermsDetail >
for first tqCreditTermsDetailByDomainCode:
assign oiReturnStatus = -1
vcMessage = #T-5'The system cannot delete. Terms code used as dating code on terms code $1.':200(50175)t-5#.
<M-6 run SetMessage (input vcMessage (icMessage),
input tqCreditTermsDetailByDomainCode.tcctd_code (icArguments),
input 'ct_mstr.ct_code':U (icFieldName),
input t_sct_mstr.ct_code (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input t_sct_mstr.tc_Rowid (icRowid),
input 'QadFin-5428':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BMfgCreditTerms>
end.
end.
if vlCreditTermsDetailQStarted = true then do:
<Q-4 run CreditTermsDetailByDomainCode (Stop) in BMfgCreditTermsDetail >
end.