Edward,
Check the WorkCenter messages for the user running R31802.
Is there an error message something like below?
---------------------------------------------------------------------------------
"4956.IGT does not exist in the Account Master file (F0901). NOTE: If you get this error message on a discount amount, it is indicating that the account numbers set up in the Automatic Accounting Instructions are invalid. The AAI records being validated against are PKD/PKL for Accounts Payable and RKD for Accounts Receivable. If business unit is not defined in the AAI accounts, the program will use the business unit from the voucher/invoice. If the error message is on adjustment reason in cash receipts, the same holds true about the AAI account number being invalid for the adjustment reason entered. If you get this error message on a job being closed, it is indicating that the AAI account JCPB (Prior Year End Balance in Closed Jobs), JCR (Job Revenue),or JCC (Job Costs) is not set up"
--------------------------------------------------------------------------------
If yes then your problem may be due to Work Orders with no Itms in their parts list or which have a text/Non-stock item as the only entry in the Parts List.
The problem is due to a BUG in the Edit Line section DO event.
Bug is that code is using MCU (Branch/Plant) from last F3111 row read. If WO has no Parts List (or a Text/Non-Stock Item) AND R31802 has not yet processed any WOs w/Parts List before the current WO then the value of the Component Branch MCU used to construct the G/L acct with is NULL or Blank (Null Business Unit = Bad Thing).
The Fix we implemented was to set the Component Branch MCU value = to the Work Order Header's "Charge To" MCU if value is NULL or Blank.
The below code was inserted at the top of the DO event to correct this:
// -----------------------------------------------------------------
// 08/31/2001 - L. Jones, Wagstaff, Set Currency Decimals to fix Rounding problem
// 01/11/2002 - L. Jones, Wagstaff, Correct Problem with Null Branch/MCU
// 05/10/2002 - L. Jones, Wagstaff, Correct Problem with Blank Branch/MCU
If VA rpt_szComponentBranch_CMCU is equal to <Null> Or VA rpt_szComponentBranch_CMCU is equal to <Blank>
VA rpt_szComponentBranch_CMCU = VA rpt_szChargeToCC_MCU
End If
// -----------------------------------------------------------------
Hope this fixes your problem.
Cheers,