Description
Controls the process of creating a new row in the MFG/PRO data temp table and assigning the MFG/PRO OID to the buffer. If the table belongs to a domain then that value is also assigned in this procedure.
KEEP THE ANCESTOR TAG IN THE DESCENDANTS TO AVOID SCOPING PROBLEMS ON THE RECORD-AVAILABILITY
Parameters
icMfgDomain | input | character | Controls the process of creating a new row in the MFG/PRO data temp table and assigning the MFG/PRO OID to the buffer. |
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/bmfgenduser.p)
<ANCESTOR-CODE>
assign oiReturnStatus = -98.
/*
* Create a record in the objects temp table.
*/
<M-1 run AddDetailLine (input icMfgTableName (icTable),
input '' (icParentRowid),
output viFcReturnSuper (oiReturnStatus)) in BMfgEndUser>
if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then return.
/*
* Ensure that the buffer handle points to the same row as the
* row we have just created in the tac_mstr temp table.
*/
/*
* Assign the Domain to the MFG/PRO table as this business
* component belongs to a domained table in MFG/PRO.
*/
<Q-2 run ServiceControlByDomain (all) (Read) (NoCache)
(input icMfgDomain, (DomainCode)
output dataset tqServiceControlByDomain) in BMfgServiceControl >
find first tqServiceControlByDomain no-lock no-error.
<Q-3 run CustomerByDomainAddress (all) (Read) (NoCache)
(input icMfgDomain, (DomainCode)
input tDebtorEndUser.tcDebtorCode, (Address)
output dataset tqCustomerByDomainAddress) in BMfgCustomer >
find first tqCustomerByDomainAddress no-lock no-error.
assign
teu_mstr.eu_domain = icMfgDomain
teu_mstr.eu_trv_um = if available tqServiceControlByDomain
then tqServiceControlByDomain.tcsvc_trvl_um
else ''
/* The default value of PO Required field should come from the related customer */
teu_mstr.eu_po_reqd = if available tqCustomerByDomainAddress
then tqCustomerByDomainAddress.tlcm_po_reqd
else no.
temp-table teu_mstr:default-buffer-handle:find-by-rowid(rowid(teu_mstr)).
if oiReturnStatus = -98
then assign oiReturnStatus = 0.