Description
Method used to control the update processing of the financial information into the MFG/PRO database. This method must be implemented when utilizing the generic update infrastructure.
THIS MEANS THIS METHOD NEEDS TOP BE OVERRIDDEN IN THE DESCENDANT CLASS, NOT JUST EXTENDED
Parameters
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program1/bmfgenduser.p)
/*
* Build a comma delimited list of all the buffer handles for the MFG/PRO
* temp tables that need to be processed by the following process<type>ToMfg
* call. Ensure that the buffers are in the list in the sequence in which
* they need to be processed.
*/
assign
oiReturnStatus = -98
vcMfgBufferHandles = string(temp-table teu_mstr:handle:default-buffer-handle).
/*
* Execute the generic processing method that controls processing all
* of the shared set records and all domains linked to the shared set.
*
* If more than one financial table needs to be processed as part of this
* transaction then multiple calls to the process<type>ToMfg method can
* be made.
*/
/* If an business relation doesn't exist start and open it - otherwise just open the existing isntance */
if viBBusinessRelationMfgEndUserID = 0 or
viBBusinessRelationMfgEndUserID = ?
then do:
<I-4 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "true"
&CLASS = "BBusinessRelation"}>
assign vlStartedBusinessRelInstance = true.
end.
else do:
<I-5 {bFcOpenInstance
&CLASS = "BBusinessRelation"}>
end.
<M-8 run ProcessSharedSetToMfg (input temp-table tDebtorEndUser:default-buffer-handle (ihFinancialDataBuffer),
input vcMfgBufferHandles (icMfgBufferHandleList),
output viFcReturnSuper (oiReturnStatus)) in BMfgEndUser>
if viFcReturnSuper <> 0
then assign oiReturnStatus = viFcReturnSuper.
/* If we started the business relation instance then we need to stop it - otherwise just close it */
if vlStartedBusinessRelInstance
then do:
<I-6 {bFcCloseAndStopInstance
&CLASS = "BBusinessRelation"}>
end.
else do:
<I-7 {bFcCloseInstance
&CLASS = "BBusinessRelation"}>
end.
if oiReturnStatus < 0 and oiReturnStatus <> -98
then return.
/*
* Return success (0)
*/
if oiReturnStatus = -98
then assign oiReturnStatus = 0.