Documentation >
MAC-PAC Technical Library >
Financial >
Inventory Accounting >
Programs >
Inventory Journal Entry Generation - Purpose >
Inventory Journal Entry Generation - Calculations
Inventory Journal Entry Generation - Calculations
IA110E
A. Housekeeping
1. See the Common Processing Routines - Housekeeping section of this manual for a general discussion of this subroutine. Processing specific to this program is described below.
2. A parameter list is set up to receive parameters passed from the Inventory Accounting Period-End Close program (IA050E).
3. Key lists are defined for each file retrieved by the program.
4. Work fields are defined and program constants are initialized.
5. The following information is retrieved from the Reference file (REFERP).
a. For a demand or final post, category 460 (IA period parameters) is retrieved and updated with the program name.
b. The default Company Name is retrieved from the entity name record (Reference File category 002). If this record is not found, a default message is printed on the exception report, and processing continues.
c. The date format record (Reference File category 049) is retrieved. If this record is not found, a message is sent to the system operator, the date format defaults to MMDDYY, and processing continues.
d. Planning, reference, nonstandard, and non-stocked Part Type Codes are retrieved from the part type codes record (Reference File category 405). If this record is not found, a message is sent to the system operator and the program terminates.
e. Order/receipt and inventory balance/movement quantity decimal positions are retrieved from the field decimal precision record (Reference File category 446). If this record is not found, a message is sent to the system operator and the program terminates.
f. Shop Floor installed flag is retrieved from application installed record (Reference File category 012). If this record is not found, a message is sent to the system operator and the program terminates.
g. The system options record (Reference File category 133) is retrieved to determine whether the processing environment is single or multi-currency.
6. The following information is retrieved from the Reference file and loaded into arrays. If any record is not found, a message is sent to the system operator, and the program terminates.
a. Accrued Payables Code, Adjustment Code, Product Class Code, and Purchase Price Variance Flag are retrieved from the Inventory Accounting system defaults record (Reference File category 421).
b. Journal entry codes and descriptions are retrieved from the journal entry description record (Reference File category 459).
7. Company/Warehouse Codes, General Ledger Location, Costing Option Flag, and Plant data are retrieved from the Warehouse Description file (IC170M) and loaded into arrays. If any record is not found, a warning message is sent to the system operator and the program terminates.
B. Mainline
1. Standard cost changes and accounting code changes are processed in COST mode.
a. Part master records with standard cost changes and/or accounting code changes are processed first. The part master logical (DE100L50) is read sequentially until end of file. For each record read, the following processing is performed (subroutine PRCPRT):
(1) The part is flagged if it is configuration costed.
(2) The previous period WIP accounting code is saved.
(3) If the part is not configuration costed, the accounting cost fields (material, labor, overhead, and acquisition) are rolled over to the previous period accounting cost fields.
(4) For all parts except reference parts, the part master fields are checked to determine if an accounting code change occurred. If the saved accounting code (PMASCC) does not equal the previous inventory accounting code (AMPACC) and if the previous inventory accounting code is not blank, an accounting code change occurred.
(5) For non-configuration costed parts, the part master fields are checked to determine if a standard cost change occurred. If the accounting standard unit cost - total (PMASCT) does not equal the previous period accounting cost (AMPFTC), a standard cost change has occurred.
(6) If the part processed is a non-standard part, standard cost changes does not occur. If the part is a non-stocked part, accounting code and standard cost changes do not occur.
(7) If an accounting code change occurred and the part is not configuration costed, the part's warehouse balance records are processed (subroutine PRCWB). After all the warehouse balance records are processed, if the program is processing a trial run, the part is written to the accounting code change workfile (IA110CP) to ensure that it is not processed again when warehouse balance standard cost changes are processed.
(8) If an accounting code change occurred and the part is configuration costed, the part's configuration code records are processed (subroutine PCFCHG). After all the configuration code records are processed, if the program is processing a trial run, the part is written to the accounting code change workfile (IA110CP) to ensure that it is not processed again when configuration code standard cost changes are processed.
(9) If an accounting code change did not occur but a standard cost change occurred, the part's warehouse balance record in the manufacturing warehouse is retrieved. The part's inventory account is retrieved from category 452. The standard cost variance is then calculated (subroutine STDVAR) and the standard cost change journal entry is created (subroutine STDCJE).
(10)In a demand or final post run, the part master record is updated if the part is not a reference part.
b. Warehouse balance records with standard cost changes are processed. The warehouse balance logical (IC140L13) is read sequentially until end of file. For each record read, the following processing is performed (subroutine PRCWB):
(1) In a trial run, the program chains to the accounting code change workfile (IA110CP) to determine if the part's standard cost changes have been processed. If the part exists on the file, its standard cost changes have already been processed. Processing continues if the part does not exist on the workfile, or if processing a post run.
(2) (Subroutine WHSBRK) When a warehouse break occurs, the warehouse type, costing option, and GL location are retrieved for the company/warehouse on the warehouse balance file. Then company/location information are retrieved, if the current company/location is different from the saved company/loc.
(a) The base currency is retrieved from category 002.
(b) The company/location's period end date is retrieved. Category 023 is accessed to retrieve the current accounting period, and category 013 is accessed to retrieve the ending date for the period. If a cutoff date is passed to this program, the cutoff date is compared to the period end date. The lesser of the 2 dates is used as the period end date.
(c) The Inventory Accounting system defaults are retrieved from category 421. These are the accrued payable code, product class, adjustment code, and purchase price variance flag.
(d) If inventory transactions are being processed, the default shipment adjustment code is retrieved from category 412. The adjustment code's inventory addition and reduction flags are retrieved from category 432.
(3) (Subroutine PNBRK) The part master record is retrieved if the current part is different from the saved part. The part's inventory account is retrieved from category 452. The part is flagged if it is configuration costed.
(4) If the part is not configuration costed, the standard cost variance is calculated (subroutine STDVAR) and the standard cost change journal entry is created (subroutine STDCJE). If an accounting code change occurred, the accounting code change journal entry is created (subroutine ACDEJE).
(5) For a standard distribution company/warehouse, the accounting standard unit cost (WBASUC) is rolled over into the previous period end standard unit cost (WBPSUC). Also, the accounting acquisition cost (WBAACQ) is rolled over into the previous period end acquisition cost (WBPACQ).
(6) In a demand or final post run, the warehouse balance record is updated.
c. Configuration code records with standard cost changes are processed. The configuration code logical (EC140ML4) is read sequentially until end of file. For each record read, the following processing is performed (subroutine PCFCHG):
(1) In a trial run, the program chains to the accounting code change workfile (IA110CP) to determine if the part's standard cost changes have been processed. If the part exists on the file, its standard cost changes have already been processed. Processing continues if the part does not exist on the workfile, or if processing a post run.
(2) Retrieve warehouse and GL location information if the current company/warehouse is different from the saved company/warehouse (subroutine WHSBRK). Retrieve part information if the current part or plant is different from the saved part or plant (subroutine PNBRK).
(3) The accounting cost fields (material, labor, overhead, and acquisition) are rolled over to the previous period accounting cost fields.
(4) If the accounting standard unit cost - total (CCASCT) does not equal the previous period accounting cost (CCPFTC), a standard cost change has occurred. The standard cost variance is then calculated (subroutine STDVAR) and the standard cost change journal entry is created (subroutine STDCJE). If an accounting code change occurred, the accounting code change journal entry is created (subroutine ACDEJE).
(5) In a demand or final post run, the configuration code record is updated.
d. Standard cost change and accounting code change journal entries are generated as follows:
(1) Standard cost variance if first calculated (subroutine STDVAR):
(a) For the manufacturing warehouse, if a standard cost change occurred, the standard cost change adjustment (SCCADJ) is calculated as the cost change amount (accounting cost PMASCT minus previous period accounting cost AMPFTC) times the previous period on-hand quantity - accounting (WBPOHA).
(b) For a distribution warehouse, if a standard cost change occurred, the standard cost change adjustment (SCCADJ) is calculated as the cost change amount (accounting cost WBASUC minus previous period accounting cost WBPSUC) times the previous period on-hand quantity - accounting (WBPOHA).
(c) For configuration costed parts, if a standard cost change occurred, the standard cost change adjustment (SCCADJ) is calculated as the cost change amount (accounting cost CCASCT minus previous period accounting cost CCPFTC) times the previous period on-hand quantity - accounting (CCPOHA).
(2) The standard cost change journal entry is created if a standard cost change occurred (subroutine STDCJE):
(a) The inventory journal entry for standard cost changes is created. The inventory account retrieved from category 452 is credited or debited by the standard cost change adjustment (SCCADJ). If the account number is not found, the journal entry is created using the suspense account number, and a warning message is printed.
(b) The standard cost change/classified parts journal entry is created. The standard cost change account is retrieved from category 452. If the account number is not found, the journal entry is created using the suspense account number, and a warning message is printed. The account is credited or debited by the standard cost change adjustment.
(3) The accounting code change journal entry is created if an accounting code change occurred (subroutine ACDEJE):
(a) The accounting code change amount (ACCAMT) is calculated. For nonstandard parts and moving average costed warehouses, this is equal to the previous period part value (WBPVAA). For the manufacturing company/warehouse, this is calculated as the previous period on-hand quantity (WBPOHA) times the saved part master previous period cost (SVPCST). For standard distribution company/warehouses, this is calculated as the previous period on-hand quantity (WBPOHA) times the warehouse balance previous period standard unit cost (WBPSUC).
(b) The inventory journal entry for the previous accounting code is created. The inventory account for the previous accounting code is retrieved from category 452. It is credited by the accounting code change amount (ACCAMT). If the account number is not found, the journal entry is created using the suspense account number and a warning message is printed.
(c) The inventory journal entry for the new accounting code is created. The inventory account for the accounting code is retrieved from category 452. It is debited by the accounting code change amount (ACCAMT). If the account number is not found, the journal entry is created using the suspense account number and a warning message is printed.
(d) If the part master accounting standard unit cost - total (PMASCT) is zero for a manufacturing warehouse balance record, a warning message is written. If the warehouse balance accounting standard unit cost (WBASUC) is zero for a standard distribution warehouse balance record, a warning message is written. If the configuration code accounting standard unit cost - total (CCASCT) is zero for a configuration code record, a warning message is written.
2. Inventory transactions are processed in INVTY mode. The inventory control audit trail file (IA110AL) is read sequentially until end of file. For each record read, the following processing is performed:
a. The warehouse balance record is retrieved for the part and company/warehouse on the file, if the current part or company/warehouse is different from the saved part or company/warehouse (subroutine WHSBRK). The part master record is retrieved if the current part or plant is different from the saved part or plant (subroutine PNBRK).
b. The cost elements array is loaded if the part is not configuration costed. For purchased parts in a manufacturing warehouse, the part costs file (DE105M) is read. For parts in a distribution warehouse, the warehouse costs file (IC145M) is read. Only non-acquisition costs are loaded in the array.
c. If the part is configuration costed, the configuration code associated with the lot on the audit trail record is determined from the configuration assignment master file (EC170M). The configuration costs are retrieved from the configuration code file (EC140M).
d. Journal entries are created according to the transaction type on the audit trail record (subroutine GENJE):
(1) Only transactions within the current accounting period are processed. If the transaction date (CZTDT) is greater than the period end date for the company/location, the audit trail record is not processed. If the audit trail record is for a sales order shipment/return, the transaction is processed if the transaction date (CZTDT) falls within the selling or sourcing period end date.
(2) Purchase order receipts journal entries are created for non-phantom purchase orders and invoiced transfer orders; transaction code = D20 (subroutine POJE).
a. The Purchase Order Receipt Part Amount is calculated.
(1) For transactions from a standard company/warehouse and for a standard part, the Purchase Order Receipt Part Amount (POAMT) is calculated as the Transaction Order Quantity (NORDQY) times the Transaction Unit Cost at Receipt (CRCPUC).
(2) For transactions from moving average costed company/warehouses, for a nonstandard part, for a reference part, or for a non-stocked part, the Purchase Order Receipt Part Amount (POAMT) is calculated as the Transaction Order Quantity (NORDQY) times the Purchase Order Unit Cost (CPOUCT).
b. Except for transactions for nonstandard parts, moving average costed company/warehouses, and reference parts it is determined if a standard cost change has occurred.
(1) For transactions from the manufacturing company/warehouse, a standard cost change occurred if the Transaction Acquisition Cost at Receipt (CRCACQ) does not equal the Part Master Accounting Acquisition Cost (PMAACQ). If a standard cost change has occurred, the Standard Cost Change Adjustment (SCCADJ) is calculated as the change in the Standard Cost (Transaction Acquisition Cost at Receipt (CRCACQ) minus Part Master Accounting Acquisition Cost (PMAACQ)) times the Transaction Order Quantity (NORDQY).
(2) For transactions from standard distribution company/warehouses, a standard cost change has occurred if the Transaction Acquisition Cost at Receipt (CRCACQ) does not equal the Warehouse Accounting Acquisition Cost (WBAACQ). If a standard cost change has occurred, the Standard Cost Change Adjustment (SCCADJ) is calculated as the change in the Standard Cost (Transaction Acquisition Cost at Receipt (CRCACQ) minus Warehouse Balance Accounting Acquisition Cost (WBAACQ)) times the Transaction Order Quantity (NORDQY).
(3) For configuration costed transactions, a standard cost change occurred if the Transaction Acquisition Cost at receipt (CRCACQ) does not equal the Configuration Code Accounting Acquisition Cost (CCAACQ). If a standard costs change has occurred, the Standard Cost Change Adjustment (SCCADJ) is calculated as the change in the Standard Cost (Transaction Acquisition Cost at Receipt (CRCACQ) minus the Configuration Code Accounting Acquisition Cost (CCAACQ)) times the Transaction Order Quantity (NORDQY).
c. Except for transactions for nonstandard parts, reference parts and moving average costed company/warehouses, it is determined if a purchase price variance has occurred when the purchase price variance option applies (PPVAR = Y).
(1) A purchase price variance has occurred if the Purchase Order Acquisition Cost (CPOUCT) does not equal the Transaction Acquisition Cost at Receipt (CRCACQ). If a purchase price variance has occurred, the Purchase Price Variance Adjustment (PPVADJ) is calculated as the Purchase Price Variance Amount (Purchase Order Unit Cost (CPOUCT) minus Transaction Acquisition Cost at Receipt (CRCACQ)) times the Transaction Order Quantity (NORDQY).
(2) If the Purchase Order Unit Cost equals zero, a warning message is printed. However, purchase order receipt journal entries are still generated.
d. Purchase order receipts journal entries are generated.
(1) If a purchase price variance has occurred, purchase price variance journal entries are created.
(a) The Purchase Price Variance Account Number is retrieved from the process account number assignment record (Reference File category 451). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) If the Purchase Price (CPOUT) was greater than the Standard Price (CRCPUT) at the time of the receipt, then the account is debited by the calculated Purchase Price Variance Amount (PPVADJ). Otherwise, the account is credited.
(c) A non-reversal with receipt adjustment codes O (over-shipment) or R (rejected), or a reversal with receipt adjustment codes other than O and R will have the opposite effect.
(2) If a standard cost change has occurred, standard cost change journal entries are created.
(a) 'The Standard Cost Change PO Receipts Account Number is retrieved from the inventory account number assignment record (Reference File category 452). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) If the Standard Cost at the time of the receipt (CRCPUC) is greater than the current Standard Cost (PMASCT, WBASUC, or CCASCT), then the account is debited by the calculated Standard Cost Change Adjustment (SCCADJ). Otherwise, the account is credited.
(c) A non-reversal with receipt adjustment codes O (over-shipment) or R (rejected), or a reversal with receipt adjustment codes other than O and R will have the opposite effect.
(3) An inventory journal entry is created for warehouse or transfer order shipments (CZTYPE = W or T), non-reference items, and reference part expenses. If the order is a direct shipment, a direct ship inventory journal entry is created. A journal entry is created for reference items.
(a) The Account Number is retrieved from the inventory or direct ship inventory account number assignment record (Reference File category 452). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) The account is debited by the Purchase Order Receipt Part Value at the Current Standard Cost.
(c) The Transaction Order Quantity (CZORDQ) is added to the Warehouse Balance Transaction Quantity (WBQTY) or to the configuration code transaction quantity (CCQTY) for configuration costed parts since this transaction increases inventory.
(d) For moving average costed transactions, the journal entry Debit/Credit Amount (CDCAMT) is added to the Warehouse Balance Transaction Value (WBVAL).
(e) A warning message is written if the accounting cost is zero for all transactions except those in a moving average warehouse. A non-reversal with receipt adjustment codes O (over-shipment) or R (rejected), or a reversal with receipt adjustment codes other than O and R will have the opposite effect.
(4) The accrued purchase receipt journal entry is created.
(a) The Accrued Purchase Receipt Account Number is retrieved from the process account number assignment record (Reference File category 451). If the Account Number is found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) The account is credited by the Purchase Order Receipt Amount (POAMT).
(c) A non-reversal with receipt adjustment codes O (over-shipment) or R (rejected), or a reversal with receipt adjustment codes other than O and R will have the opposite effect.
(5) The non-acquisition cost journal entries are created for each non-acquisition cost element on the array PCE for non-configuration costed parts.
(a) The Non-Acquisition Cost account number is retrieved from the process account number assignment record (Reference File category 451). If the account number is not found, the journal entry is created using the suspense account number and a warning message is printed.
(b) The account is credited by the part cost accounting amount from the array PCA times the order quantity.
(c) A non-reversal with receipt adjustment codes O (over-shipment) or R (rejected), or a reversal with receipt adjustment codes other than O or R will have the opposite effect.
(6) If processing a record for a transfer order receipt (CZTYPE = T),r the in-transit inventory journal entry is created.
(a) The In-Transit Account Number is retrieved from the intercompany account number assignment record (Reference File category 453) for the sourcing and receiving warehouse combination. If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) The Transfer Order Receipt Value (TORAMT) is calculated as the Transaction Order Quantity (NORDQY) times the Purchase Order Unit Cost (CPOUCT).
(c) The Account is credited by the Calculated Transfer Order Receipt Value (TORAMT).
(7) If processing a record for a transfer order receipt (CZTYPE = T), the accrued transfers journal entry is created.
(a) The Accrued Transfers Account Number is retrieved from the intercompany account number assignment record (Reference File category 453) for the sourcing and receiving warehouse combination. If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) The Transfer Order Receipt Value (TORAMT) is calculated as the Transaction Order Quantity (NORDQY) times the Purchase Order Unit Cost (CPOUCT).
(c) The account is debited by the calculated Transfer Order Receipt Value (TORAMT).
(3) Manufacturing order receipt journal entries are created for transactions with transaction code = E30 (subroutine MOJE).
a. The Parent Receipt Value (MOAMT) is calculated as the Transaction Order Quantity (NORDQY) times the Accounting Standard Unit Cost--Total (PMASCT or CCASCT for configuration costed parts).
b. The work-in-process journal entry is created.
(1) The Account Number is retrieved from the process account number assignment record (Reference File category 451) using the saved WIP accounting code. If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(2) The account is debited by the calculated Parent Receipt Value (MOAMT).
(3) A reversal (CZRVCD = R) will have the opposite effect.
c. The inventory journal entry is created.
(1) The Account Number is retrieved from the inventory account number assignment record (Reference File category 452). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(2) The account is debited by the calculated Parent Receipt Value (MOAMT).
(3) The Transaction Order Quantity (CZORDQ) is added to the Warehouse Balance Transaction Quantity (WBQTY) or the configuration code transaction quantity (CCQTY) for configuration costed parts since this transaction increases inventory.
(4) A reversal (CZRVCD = R) will have the opposite effect.
(5) For standard costed transactions, a warning message is written if the current Standard Cost (PMASCT or CCASCT for configuration costed parts) is zero.
(4) Component issue journal entries are created for transactions with transaction code = E35 or E37 (subroutine C1JE).
a. The Component Issue Value (CIAMT) is calculated as the Transaction Quantity (CZTQTY) times the Accounting Standard Unit Cost--Total (PMASCT or CCASCT for configuration costed parts).
b. The work-in-process journal entry is created.
(1) The Account Number is retrieved from the process account number assignment record (Reference File category 451) using the saved WIP accounting code for the parent part. If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(2) If the Transaction Usage Code (CZUSCD) is equal to C (Consumed), the account is debited by the calculated cost of component issue (CIAMT). If the Transaction Usage Code (CZUSCD) is equal to P (Produced), the account is credited by the calculated cost of component issue (CIAMT).
(3) A reversal (CZRVCD = R) will have the opposite effect.
c. The inventory journal entry is created.
(1) The Account Number is retrieved from the inventory account number assignment record (Reference File category 452). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(2) If the Transaction Usage Code (CZUSCD) is equal to 'C' (Consumed), the account is credited by the calculated cost of component issue (CIAMT). If the Transaction Usage Code (CZUSCD) is equal to 'P' (Produced), the account is debited by the calculated cost of component issue (CIAMT).
(3) If the usage code is consumed, the Transaction Order Quantity (CZORDQ) is subtracted from the Warehouse Balance Transaction Quantity (WBQTY) or the configuration code transaction quantity (CCQTY) for configuration costed parts since the transaction reduces inventory. If the usage code is produced, the Transaction Order Quantity (CZORDQ) is added to the Warehouse Balance Transaction Quantity (WBQTY) or the configuration code transaction quantity (CCQTY) for configuration costed parts since the transaction increases inventory.
(4) A reversal (CZRVCD = R) will have the opposite effect.
(5) For standard costed transactions, a warning message is written if the current Standard Cost (PMASCT or CCASCT for configuration costed parts) is zero.
(5). Stock transfer "to" journal entries are created for transactions with transaction code = D30 only if the transfer did not occur within the same company/warehouse (subrouting TOJE). Note that these journal entries are only created if the transfer order shipment was not invoiced or for regular stock transfer transactions.
a. Except for transactions for nonstandard parts and moving average costed company/warehouses, it is determined if a transfer price variance has occurred.
(1) For transactions from the manufacturing company/warehouse, a transfer price variance has occurred if the Transaction Unit Cost (CTRNUC) for the "from" warehouse does not equal the Part Master Accounting Acquisition Cost (PMAACQ) for the "to" warehouse. If a transfer price variance has occurred, the Transfer Price Variance Amount (TPVAMT) is calculated as the Transaction Unit Cost (CTRNUC) for the "from" warehouse minus the Warehouse Balance Accounting Acquisition Cost (PMAACQ), times the Transaction Quantity-- SKU (CAINVC).
(2) For transactions from standard distribution company/warehouses, a transfer price variance has occurred if the Transaction Unit Cost (CTRNUC) for the "from" warehouse does not equal the Warehouse Balance Accounting Acquisition Cost (WBAACQ) for the "to" warehouse. If a transfer price variance has occurred, the Transfer Price Variance Amount (TPVAMT) is calculated as the Transaction Unit Cost (CTRNUC) for the "from" warehouse minus the Warehouse Balance Accounting Acquisition Cost (WBAACQ), times the Transaction Quantity--SKU (CAINVC).
(3) For configuration costed transactions, a transfer price variance has occurred if the Transaction Unit Cost (CTRNUC) for the From Warehouse does not equal the Configuration Code Accounting Acquisition Cost (CCAACQ) for the To Warehouse. If a transfer price variance has occurred, the Transfer Price Variance Amount (TPVAMT) is calculated as the Transaction Unit Cost (CTRNUC) for the From Warehouse minus the Configuration Code Accounting Acquisition Cost (CCAACQ), times the Transaction Quantity - SKU (CZINVC).
b. The Transfer Amount (TOAMT) for stock transfers "to" is calculated as the Transaction Quantity--SKU (CZINVC) times the Transaction Unit Cost (CTRNUC) for the "from" warehouse.
c. The stock transfer "to" journal entries are generated.
(1) The inventory journal entry is created.
(a) The Account Number is retrieved from the inventory account number assignment record (Reference File category 452). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) The account is debited by the stock transfer "to" Part Value at the current Standard Cost for the "to" warehouse (TOTAMT minus TPVADJ).
(c) The Transaction Quantity--SKU (CZINVC) is added to the Warehouse Balance Transaction Quantity (WBQTY) since inventory is increased.
(d) For moving average costed transactions, the journal entry Debit/Credit Amount (CDCAMT) is added to the Warehouse Balance Transaction Value (WBVAL).
(e) A reversal (CZRVCD = R) will have the opposite effect.
(f) For standard costed transactions, a warning message is written if the current Standard Cost (PMASCT, WBASUC, or CCASCT for configuration costed parts) is zero.
(2) If the stock transfer is not within the same company and location, an intercompany payable journal entry is created.
(a) The Account Number is retrieved from the intercompany account number assignment record (Reference File category 453). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) The account is credited by the calculated Transfer Amount (TOTAMT).
(c) A reversal (CZRVCD = R) will have the opposite effect.
(3) If a transfer price variance has occurred, transfer price variance journal entries are created.
(a) The Account Number is retrieved from the inventory account number assignment record (Reference File category 453). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) If the Transfer Unit Cost (CTRCUC) is greater than the current Acquisition Cost (PMAACQ, WBAACQ, or CCASCT for configuration costed parts), the account is debited by the calculated Transfer Amount Adjustment (PPVADJ).
(c) If the Transfer Unit Cost (CTRCUC) is less than the current Acquisition Cost (PMAACQ, WBAACQ, or CCASCT for configuration costed parts), the account is credited by the calculated Transfer Price Variance Adjustment (TPVADJ).
(d) A reversal (CZRVCD = R) will have the opposite effect.
(6) Stock transfer "from" journal entries are generated for transactions with transaction code = D31 only if the transfer did not occur within the same company/warehouse (subroutine FROMJE). Note that these journal entries are only created if the transfer order shipment was not invoiced or for regular stock transfer transactions
a. Except for transactions for nonstandard parts and moving average costed company/warehouses, it is determined if a standard cost change has occurred.
(1) For transactions from the manufacturing company/warehouse, a transfer price variance has occurred if the Transaction Unit Cost (CTRNUC) for the "from" warehouse does not equal the Part Master Accounting Standard Unit Cost--Total (PMASCT) for the "from" warehouse. If a transfer price variance has occurred, the Sending Company Price Variance Adjustment Amount (SCCADJ) is calculated as the Cost Change Amount (PMASCT minus CTRNUC) times the Transaction Quantity--SKU (CZINVC).
(2) For transactions from standard distribution company/warehouses, a transfer price variance has occurred if the Transaction Unit Cost (CTRNUC) for the "from" warehouse does not equal the Warehouse Balance Accounting Standard Unit Cost (WBASUC) for the "from" warehouse. If a transfer price variance has occurred, the Sending Company Price Variance Adjustment Amount (SCCADJ) is calculated as the Standard Cost Change Amount (the Warehouse Balance Accounting Standard Unit Cost (WBASUC) minus the Transaction Unit Cost (CTRNUC) for the "from" warehouse) times the Transaction Quantity--SKU (CZINVC).
(3) For configuration costed transactions, a transfer price variance has occurred if the Transaction Unit Cost (CTRNUC) for the From Warehouse does not equal the Configuration Code Accounting Standard Unit Cost - Total (CCASCT) for the From Warehouse. If transfer price variance has occurred, the Sending Company Price Variance Adjustment Amount (SCCADJ) is calculated as the Standard Cost Change Amount (the Configuration Code Accounting Standard Unit Cost (CCASCT) minus the Transaction Unit Cost (CTRNUC) for the From Warehouse) times the Transaction Quantity - SKU (CZINVC).
b. The Transfer Amount (TOAMT) for stock transfers "from" is calculated as the Transaction Quantity--SKU (CZINVC) times the Transaction Unit Cost (CTRNUC) for the "from" warehouse.
c. Stock transfer "from" journal entries are generated.
(1) The inventory journal entry is created.
(a) The Account Number is retrieved from the inventory account number assignment record (Reference File category 452). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) The account is credited by the stock transfer "from" part value Current Standard Cost (FRAMT minus SCCADJ) for the "from" warehouse.
(c) The Transaction Quantity--SKU (CZINVC) is subtracted from the Warehouse Balance Transaction Quantity (WBQTY) since this transaction reduces inventory.
(d) For moving average costed transactions, the journal entry Debit/Credit Amount (CDCAMT) is subtracted from the Warehouse Balance Transaction Value (WBVAL).
(e) A reversal (CZRVCD = R) will have the opposite effect.
(f) For standard costed transactions, a warning message is written if the current Standard Cost (PMASCT, WBASUC, or CCASCT for configuration costed parts) is zero.
(2) If the stock transfer is not between the same company and location, an intercompany receivable journal entry is created.
(a) The Account Number is retrieved from the intercompany account number assignment record (Reference File category 453). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) The account is credited by the calculated Transfer Amount (FRAMT).
(c) A reversal (CZRVCD = R) will have the opposite effect.
(3) If a transfer price variance has occurred, transfer price variance journal entries are created.
(a) The Account Number is retrieved from the inventory account number assignment record (Reference File category 453). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) If the current Standard Cost (PMASCT, WBASUC, or CCASCT for configuration costed parts) is greater than the Transfer Unit Cost (CTRNUC), the account is debited by the calculated Sending Company Price Variance Adjustment Amount (SCCADJ).
(c) If the current Standard Cost (PMASCT, WBASUC, or CCASCT for configuration costed parts) is less than the Transfer Unit Cost (CTRNUC), the account is credited by the calculated Sending Company Price Variance Adjustment Amount (SCCADJ).
(d) A reversal (CZRVCD = R) will have the opposite effect.
(4) If the stock transfer is not between the same company and location, a non-acquisition cost journal entry is created for each non-acquisition cost on the array PCE.
(a) The account number is retrieved from the inventory account number assignment record (Reference File category 453). If the account number is not found, the journal entry is created using the suspense account number and a warning message is printed.
(b) The account is credited by the part cost accounting amount (PCACST or CWACST from the array PCA) times the order quantity.
(c) A reversal (CZRVCD = R) will have the opposite effect.
(7) Inventory adjustment journal entries are created for transactions with transaction code = D15 or D50 (subroutine ADJJE).
a. The Adjustment Amount is calculated.
(1) For transactions from a moving average costed company/warehouse, the Adjustment Amount (CADJDV) from the audit trail record is used when creating journal entries.
(2) For transactions from the manufacturing company/warehouse, the Adjustment Amount (ADJAMT) is calculated as the Transaction Quantity--SKU (CZINVC) times the Part Master Accounting Standard Unit Cost--Total (PMASCT).
(3) For transactions from standard distribution companies and warehouses, the Adjustment Amount (ADJAMT) is calculated as the Transaction Quantity--SKU (CZINVC) times the Warehouse Balance Accounting Standard Unit Cost (WBASUC).
(4) For configuration costed transactions, the Adjustment Amount (ADJAMT) is calculated as the Transaction Quantity - SKU (CZINVC) times the Configuration Code Accounting Standard Unit Cost (CCASCT).
b. Inventory adjustment journal entries are generated only if the Adjustment Code (CZSRA) is found on the adjustment code record (Reference File category 432) and the adjustment is either an inventory addition or reduction.
(1) Inventory journal entries are generated.
(a) The Account Number is retrieved from the inventory account number assignment record (Reference File category 452). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) For inventory addition transactions, the account is debited by the Adjustment Amount (ADJAMT or CADJDV).
(c) The Transaction Quantity--SKU (CZINVC) is added to the Warehouse Balance Transaction Quantity (WBQTY) since this transaction increases inventory.
(d) For moving average costed transactions, the journal entry Debit/Credit Amount (CDCAMT) is subtracted from the Warehouse Balance Transaction Value (WBVAL).
(e) For inventory reduction transactions, the account is credited by the Adjustment Amount (ADJAMT or CADJDV).
(f) The Transaction Quantity--SKU (CZINVC) is subtracted from the Warehouse Balance Transaction Quantity (WBQTY) since this transaction decreases inventory.
(g) For moving average costed transactions, the journal entry Debit/Credit Amount (CDCAMT) is subtracted from the Warehouse Balance Transaction Value (WBVAL).
(h) A reversal (CZRVCD = R) will have the opposite effect.
(i) For standard costed transactions, a warning message is written if the current Standard Cost (PMASCT, WBASUC, or CCASCT for configuration costed parts) is zero.
(2) The adjustment expense journal entry is created.
(a) The Account Number is retrieved from the inventory account number assignment record (Reference File category 452). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) For inventory addition transactions, the account is credited by the Adjustment Amount (ADJAMT or CADJDV).
(c) For inventory reduction transactions, the account is debited by the Adjustment Amount (ADJAMT or CADJDV).
(d) A reversal (CZRVCD = R) will have the opposite effect.
(8). Sales order shipment/return and invoiced transfer order shipment journal entries are created for transactions with transaction code = S15 only if the Adjustment Code (CZSRA) is found on the adjustment code record (Reference File category 432) and the adjustment is either an inventory addition or reduction (subroutine SOJE).
a. The Shipment Amount is calculated.
(1) For reference part transactions, the Shipment Amount (COAMT) equals the Transaction Unit Cost (CUNCS) only if the Transaction Required Quantity (CZRQTY) equals zero. Otherwise, the Shipment Amount (COAMT) is calculated as the Transaction Required Quantity (MCZRQTY) times the Transaction Unit Cost (CUNCS).
(2) For nonstandard part transactions, the Shipment Amount (COAMT) is calculated as the Transaction Required Quantity (CZRQTY) times the Transaction Unit Cost (CUNCS).
(3) For transactions from the manufacturing company/warehouse, the Shipment Amount (COAMT) is calculated as the Transaction Required Quantity (CZRQTY) times the Part Master Accounting Standard Unit Cost--Total (PMASCT).
(4) For transactions from a standard distribution company/warehouse, the Shipment Amount (COAMT) is calculated as the Transaction Required Quantity (CZRQTY) times the Warehouse Balance Accounting Standard Unit Cost (WBASUC).
(5) For configuration code transactions, the Shipment Amount (COAMT) is calculated as the Transaction Required Quantity (CZRQTY) times the Configuration Code Accounting Standard Unit Cost (CCASCT).
b. If the sourcing company/location is different than the selling company/location, and the processing environment is multi-currency, the base currency of each location is retrieved from Reference File category 002 (Entity Name). If the base currencies are not the same, the exchange rate is retrieved from the Currency Master file (CF240M), and the selling amount is converted to the sourcing currency.
c. Sales order shipment/return journal entries are created.
(1) The cost of goods sold journal entry is created.
(a) The Account Number is retrieved from the adjustment codes record (Reference File category 432). If this record is not found, the Account Number is retrieved from the inventory account number assignment record (Reference File category 452), using the default Product Class and Adjustment Code. If neither account number is found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) For inventory addition transactions, the account is credited by the Shipment Amount (COAMT).
(c) For inventory reduction transactions, the account is debited by the Shipment Amount (COAMT).
(d) A reversal (CZRVCD = R) will have the opposite effect.
(2) For sales orders shipped from a warehouse, an intercompany payable account journal entry is created if the goods were not sourced from the selling warehouse. This journal entry will not apply to invoiced transfer order shipments since all goods are sourced and sold by the same warehouse.
(a) The Account Number is retrieved from the intercompany account number assignment record (Reference File category 453). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) For inventory addition transactions, the account is credited by the Shipment Amount (COAMT).
(c) For inventory reduction transactions, the account is debited by the Shipment Amount (COAMT).
(d) A reversal (CZRVCD = R) will have the opposite effect.
(3) If the transaction is for a reference part, reference part expense journal entries are created.
(a) The Account Number is retrieved from the inventory account number assignment record (Reference File category 452). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) For inventory addition transactions, the account is credited by the Shipment Amount (COAMT).
(c) For inventory reduction transaction, the account is debited by the Shipment Amount (COAMT).
(d) A reversal (CZRVCD = R) will have the opposite effect.
(4) If the transaction is not for a reference part, an inventory journal entry is created.
(a) The Account Number is retrieved from the inventory account number assignment record (Reference File category 452). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) For an inventory addition transaction, the account is debited by the Shipment Amount (COAMT).
(c) The Transaction Required Quantity (CZRQTY) is added to the Warehouse Balance Transaction Quantity (WBQTY) since this transaction increased inventory.
(d) For a moving average costed transaction, the journal entry Debit/Credit Amount (CDCAMT) is added to the Warehouse Balance Transaction Value (WBVAL).
(e) For an inventory reduction transaction, the account is credited by the Shipment Amount (COAMT).
(f) The Transaction Required Quantity (CZRQTY) is subtracted from the Warehouse Balance Transaction Quantity (WBQTY) since this transaction reduced inventory.
(g) For moving average costed transactions, the journal entry Debit/Credit Amount (CDCAMT) is subtracted from the Warehouse Balance Transaction Value (WBVAL).
(h) A reversal (CZRVCD = R) will have the opposite effect.
(i) For standard costed transactions, a warning message is written if the current Standard Cost (PMASCT, WBASUC, or CCASCT for configuration costed parts) is zero.
(5) For sales orders shipped from a warehouse, an intercompany receivable journal entry is created if the goods were not sourced from the selling company/warehouse. This journal entry will not apply to invoiced transfer order shipments since all goods are sourced and sold by the same warehouse.
(a) The Account Number is retrieved from the intercompany account number assignment record (Reference File category 453). If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) For inventory addition transactions, the account is debited by the Shipment Amount (COAMT).
(c) For inventory reduction transactions, the account is credited by the Shipment Amount (COAMT).
(d) A reversal (CZRVCD = R) will have the opposite effect.
(6) If processing a record for a transfer order shipment (CZTYPE = T), create the in-transit inventory journal entry for the receiving company/location.
(a) The Account Number is retrieved from the in-transit inventory account number assignment record (Reference File category 453) for the sourcing and receiving warehouse combination. If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) The Transfer Order Shipment Value (TOSAMT) is calculated as the Transaction Order Quantity (NORDQY) times the Shipment Unit Cost in the Receiving Warehouse Currency (CZUNCR)
(c) The account is debited by the calculated Transfer Order Shipment Value (TOSAMT).
(7) If processing a record for a transfer order shipment (CZTYPE = T), create the accrued transfer journal entry for the receiving company/location.
(a) The Account Number is retrieved from the accrued transfer account number assignment record (Reference File category 453) for the sourcing and receiving warehouse combination. If the Account Number is not found, the journal entry is created using the Suspense Account Number and a warning message is printed.
(b) The Transfer Order Shipment Value (TOSAMT) is calculated as the Transaction Order Quantity (NORDQY) times the Shipment Unit Cost in the Receiving Warehouse Currency (CZUNCR)
(c) The account is credited by the calculated Transfer Order Shipment Value (TOSAMT).
(9) Phantom purchase order receipt journal entries are created for transactions with a transaction code of 'D22' (subroutine PHTJE). Phantom purchase order receipts are processed only if shop floor is installed (for MRP parts) or JIT time recording is installed (for JIT parts).
(a) The purchase order release record (PO180M3) is retrieved to determine the manufacturing order and operation numbers.
(b) The labor requirements record (IC125ML2) is retrieved to determine the workcenter number, for an MRP part. If the part is a JIT part, the workcenter number is already on the audit trail record.
(c) The workcenter record (ME100M) and the miscellaneous cost header file (ME160M1) are retrieved to determine the miscellaneous cost and rate code. If the miscellaneous cost record does not exist, miscellaneous costs are set to zero.
(d) For workcenters with variable miscellaneous costs (MHRCA = L, M, O, C or blank), the standard cost, receipt amount, and purchase price variance are calculated:
· The standard cost amount is calculated as the quantity received times the accounting miscellaneous cost (MHMSCA). If the purchase price variance will not be calculated, this amount is the receipt amount (RCTAMT).
· If purchase price variance will be calculated, the receipt amount (RCTAMT) is calculated as the purchase order unit cost (CPOUCT) times the quantity received.
· The purchase price variance (VARAMT) is the difference between the standard cost and the receipt amount.
(e) Workcenters with fixed miscellaneous costs (MHRCA = X, Y, or Z) are processed only once regardless of the number of receipt transactions that are entered. The standard cost, receipt amount, and purchase price variance are calculated if the receipt is not a reversal and no receipts have been previously processed against the order, or if the receipt is a reversal, the total quantity received has been driven to zero, and the fixed amount has not previously been reversed out.
· The standard cost amount is equal to the accounting miscellaneous cost (MHMSCA). If purchase price variance will not be calculated, this amount is the receipt amount (RCTAMT).
· If purchase price variance will be calculated, the receipt amount (RCTAMT) is equal to the purchase order unit cost (CPOUCT).
· The purchase price variance (VARAMT) is the difference between the standard cost and the receipt amount.
(f) If the purchase price variance is not zero, a purchase price variance journal entry is created:
· The purchase price variance account number is retrieved from category 451. If the account number is not found, the journal entry is created using the suspense account number and a warning message is printed.
· If the standard cost is greater than the receipt amount, the account is debited by the purchase price variance amount (VARAMT). Otherwise, the account is credited.
· A reversal (CZRVCD = R), an overshipment, or a reject will have the opposite effect.
· If the accounting miscellaneous cost (MHMSCA) is zero, a warning message is written.
(g) The accrued purchase receipt journal entry is created:
· The accrued purchase receipt account number is retrieved from category 451. If the account number is not found, the journal entry is created using the suspense account number and a warning message is printed.
· The account is credited by the receipt amount (RCTAMT). A reversal (CZRVCD = R), an overshipment, or a reject will have the opposite effect.
(h) The accrued miscellaneous cost journal entry is created:
· The accrued miscellaneous cost account number is retrieved from category 451. If the account number is not found, the journal entry is created using the suspense account number and a warning message is printed.
· The account is debited by the standard miscellaneous cost (STDAMT). A reversal (CZRVCD = R), an overshipment, or a reject will have the opposite effect.
(i) If the workcenter has a fixed miscellaneous cost, the activity release code (PDACCD) on PO180M3 is set on, or if the transaction is a reversal, the activity release code is cleared, and the file is updated in a demand or final post run. This ensures that the purchase order receipt for fixed miscellaneous workcenters is processed only once.
e. In a demand or final post and no critical errors occurred, the processed audit trail record is updated. The inventory accounting processing flag (IAFLG) is updated to show a post run was executed. The period posted (IAPER) and year posted (IAYRP) are also updated to show when the transaction was posted.
f. The next audit trail record is read from IA110AL. If the part/company/warehouse read is different from the saved part/company/warehouse, or if it is the end of the file, the warehouse balance file is updated in a demand or final post run if the part is not configuration costed. If the part is configuration costed, the configuration code file is updated in a demand or final post run.
(1) On the warehouse balance file, the previous period ending on-hand quantity - accounting (WBPOHA) is updated by the warehouse balance transaction quantity (WBQTY) to reflect inventory activity during the current accounting period.
(2) For warehouse balance records from a moving average costed warehouse and for non-standard parts, the previous period part value - accounting (WBPVAA) is updated by the warehouse balance transaction value (WBVAL) to reflect inventory activity during the current accounting period.
(3) On the configuration code file, the previous period ending on-hand quantity - accounting (CCPOHA) is updated by the configuration code transaction quantity (CCQTY) to reflect inventory activity during the current accounting period.
3. Before the program ends, the IA period end parameters category 460 is retrieved, and the program name on the category is blanked out. This indicates that the program completed successfully.