project QadFinancials > class BMfgDomain > method UpdateMfgData

Description

Controls the processing of any update logic that is required when performing a create/modfiy operation on an MFG/PRO business component.
KEEP THE ANCESTOR TAG IN THE DESCENDANTS TO AVOID SCOPING PROBLEMS ON THE RECORD-AVAILABILITY
This method is the place holder for nay update ligic and complex mapping from the financials table to MFG/PRO.


Parameters


icMfgTableNameinputcharacterName of the MFG/PRO table name that is currently being processed. This is used to determine which logic to execute within the method in the cases where one business component maps to multiple tables in MFG/PRO.
icFinancialTableNameinputcharacterName of the Financial table name that is currently being processed. This is used to determine which logic to execute within the method in the cases where one business component has multiple tables that map to MFG/PRO.
ihFinancialDataBufferinputhandle
ihMfgDataBufferinputhandle
icMfgDomaininputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program/bmfgdomain.p)

<ANCESTOR-CODE>

/* Update the Domain Name & Search Name from the DomainProperty table into the dom_mstr table */

find tCopyDomainProperty where tCopyDomainProperty.Domain_ID = tCopyDomains.Domain_ID no-error.

if available tCopyDomainProperty 
then assign tdom_mstr.dom_name          = tCopyDomainProperty.DomainPropertyName
            tdom_mstr.dom_sname         = tCopyDomainProperty.DomainPropertySearchName
            tdom_mstr.dom_data_cpg      = tCopyDomainProperty.DomainPropertyCodePage
            tdom_mstr.dom_expt_lst      = tCopyDomainProperty.DomainPropertyExceptList
            tdom_mstr.dom_tzdb          = tCopyDomains.DomainTimeZone
            /* Only take the status from the DomainProperty if it hasn't already been set from the Domains
             * It could be possible that the Domains record has not been modified & has a "" status
             * but it could be the other way around, and the Domains has been changed, but not the DomainProperty
             * This caters for both cases...
            */
            tdom_mstr.tc_Status         = tCopyDomainProperty.tc_Status
            when tdom_mstr.tc_Status = "":U.
/* else  MTDXXX Need to raise an error condition here? Is this a data integrity error? */