Description
Controls the process of loading data from the qaddb database into the business component. This method is part of the Generic MFG/PRO update infrastrcuture.
Parameters
icMfgDomain | input | character | The MFG/PRO Domain currently being processed. Required when extracting information from MFG/PRO for a table that belons to a domain. |
icMfgTableName | input | character | Name 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. |
icFinancialTableName | input | character | Name of the current financials table being processed, used to determine which logic to execute. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program/bmfgemployee.p)
<ANCESTOR-CODE>
oiReturnStatus = -98.
vcKeys = vcMfgDomain + chr(2) + tMfgEmployee.EmployeeCode.
<M-1 run DataLoad (input '' (icRowids),
input vcKeys (icPkeys),
input '' (icObjectIds),
input '' (icFreeform),
input true (ilKeepPrevious),
output viFcReturnSuper (oiReturnStatus)) in BMfgEmployee>
if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then return.
find first temp_mstr where
temp_mstr.emp_domain = vcMfgDomain and
temp_mstr.emp_addr = tMfgEmployee.EmployeeCode no-error.
if not available temp_mstr then do:
assign vcMessageText = trim(substitute(#T-2'Cannot find the static record for the replication based on the key &1.':255(45624)t-2#, tMfgEmployee.EmployeeCode))
oiReturnStatus = -3.
<M-3 run SetMessage (input vcMessageText (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QadFin-5072':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BMfgEmployee>
return.
end. /* if not available temp_mstr */
vcWhereClause = 'where emp_domain = ':U + <M-6 EnQuote (input vcMfgDomain (icToQuote)) in BMfgEmployee> +
' and emp_addr = ':U + <M-7 EnQuote (input tMfgEmployee.EmployeeCode (icToQuote)) in BMfgEmployee>.
temp-table temp_mstr:default-buffer-handle:find-first(vcWhereClause) no-error.
if error-status:error then do:
assign vcMessageText = trim(substitute(#T-5'Cannot find the dynamic record for the replication based on following key: &1':255(45741)t-5#, tMfgEmployee.EmployeeCode))
oiReturnStatus = -3.
<M-4 run SetMessage (input vcMessageText (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QadFin-5073':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BMfgEmployee>
return.
end. /* if error-status:error then do */
if oiReturnStatus = -98 then
assign oiReturnStatus = 0.