Description
This empty method allows to do additional updates on class temp-tables after records were received (and validated) from outside, using method SetPublicTables.
You can start instances of other business classes to do those updates.
Parameters
oiReturnStatus | output | integer | |
Internal usage
QadFinancials
program code (program/bmfglocation.p)
/* ================================================================================= */
/* Execute additional updates for location detail */
/* ================================================================================= */
<ANCESTOR-CODE>
if valid-handle(vhBMfgLocDetailHandleBMfgLoc)
then assign vhBMfgLocationDetBMfgLocInst = vhBMfgLocDetailHandleBMfgLoc
viBMfgLocationDetBMfgLocID = viBMfgLocDetailIDBMfgLoc.
else if viBMfgLocDetailIDBMfgLoc <> ? and
viBMfgLocDetailIDBMfgLoc <> 0
then do:
assign vlBMfgLocDetOpenFrmLoc = true
viBMfgLocationDetBMfgLocID = viBMfgLocDetailIDBMfgLoc.
/*open instance*/
<I-6 {bFcOpenInstance
&CLASS = "BMfgLocationDet"}>
end.
else do:
/*start and open*/
<I-7 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "yes"
&CLASS = "BMfgLocationDet"}>
assign vlBMfgLocDetStartFrmLoc = true
vlBMfgLocDetOpenFrmLoc = true.
end.
assign viExternalReturnStatus= 0.
/*Call update quantity of Location Detail component*/
for each tLocationDetInfo:
<M-10 run UpdateQuantity
(input tLocationDetInfo.tcSite (icSite),
input tLocationDetInfo.tcLocation (icLocation),
input tLocationDetInfo.tcPart (icPart),
input tLocationDetInfo.tcLotSerial (icLotSerial),
input tLocationDetInfo.tcLotReference (icLotReference),
input tLocationDetInfo.ttExpirationDate (icExpirationDate),
input tLocationDetInfo.tcTransactionType (icTransactionType),
input tLocationDetInfo.ttEffectiveDate (itEffectiveDate),
input tLocationDetInfo.tdQuantity (idQuantity),
output viFcReturnSuper (oiReturnStatus)) in BMfgLocationDet>
if viFcReturnSuper <> 0 then assign viExternalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then leave.
end.
/* Validate component */
if vlBMfgLocDetStartFrmLoc and
viExternalReturnStatus >= 0
then do:
<M-11 run ValidateBCAndAdditionalUpdates
(output viFcReturnSuper (oiReturnStatus)) in BMfgLocationDet>
if viFcReturnSuper <> 0 then assign viExternalReturnStatus = viFcReturnSuper.
end.
/* Close Location Detail component */
if vlBMfgLocDetOpenFrmLoc
then do:
<I-8 {bFcCloseInstance
&CLASS = "BMfgLocationDet"}>
end.
/* Handle error from external component */
if viExternalReturnStatus <> 0
then do:
assign oiReturnStatus = viExternalReturnStatus.
if oiReturnStatus < 0
then do:
<M-12 run StopExternalInstances
(output viFcReturnSuper (oiReturnStatus)) in BMfgLocation>
return.
end.
end.
/* return */
if oiReturnStatus = -98 then assign oiReturnStatus = 0.