project QadFinancials > class BMfgProject > 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/bmfgproject.p)

<ANCESTOR-CODE>

assign 
    oiReturnStatus = -98.
if available tpj_mstr then do:
    /* Set the Active flag & Completion date in MFG/PRO */
    if tCopyProject.ProjectSystemStatus = {&PROJECTSYSTEMSTATUS-OPEN} then
        assign 
            tpj_mstr.pj_active = true
            tpj_mstr.pj_comp = ?.
    else if tCopyProject.ProjectSystemStatus = {&PROJECTSYSTEMSTATUS-INITIAL} then
        assign
            tpj_mstr.pj_active = false.
    else
        assign 
            tpj_mstr.pj_active = false
            tpj_mstr.pj_comp = today.
 
end. /* if available tpj_mstr */

if oiReturnStatus = -98
       then assign oiReturnStatus = 0.
       
<M-2 run ReplicateDomainDescription
         (input  icFinancialTableName (icFinancialTableName), 
          input  ihFinancialDataBuffer (ihFinancialDataBuffer), 
          input  icMfgDomain (icMfgDomain), 
          output vcTranslatedDescription (ocTranslatedText), 
          output viFcReturnSuper (oiReturnStatus)) in BMfgProject>

assign oiReturnStatus = viFcReturnSuper.