Posting Edit Code 'M' in Inventory, Sales, and Procurement

Purpose of Document

Goal

The purpose of this document is to explain as-of behavior of posting edit code 'M, Machine-generated transactions only' in Inventory, Sales, and Procurement. The confusion may come in perceiving the words "machine-generated transactions only". Is the automatic account returned based on the settings in DMAAI considered 'machine-generated'?

Table of Contents

Data Dictionary Definition

Note that this document shall not deal with other posting edit code because it is not the scope of this document.

Possibly, this document explains the question Why P4310 with line type SC (Stock Inventory & G/L Account; which has Inventory Interface 'C') ends in error when account number from DMAAI is set 'M'? But inventory transaction does not issue any error?

Error Detail

Error Posting Edit Code Does Not Allow Entry
CAUSE:
The posting edit code does not allow transactions to be posted to this
account.

RESOLUTION:
Blank - all postings are allowed.
'N' - the Account or Business Unit does not allow posting.
'B' - only budgets may be entered for an account.
'S' or 'L' - a subledger and type must be entered for all transactions.
'X' - a subledger and type are not allowed for any transactions.
'I' - the account is inactive, posting is not allowed.
'K' - the final budget is "Locked" or frozen and budget changes must
be entered using journal entries.
'U' - units are required for all transactions.
'M' - only machine generated transactions are allowed for this account.
The posting edit code is defined for business units in the Business Unit Master
file (F0006) using Single Business Unit Revisions or Job Master Setup. The
posting edit is defined for accounts in the Account Master file (F0901)
using G/L Account Structure programs and Job Cost Basic/Speed Budget Setup.
ER Details:
Form P4310_W4310A
Control Id 1
Control Title Grid
Event Row is Exit & Changed - Asynch
Line No 1049
BSFN Details:
Source File b0000108.c
Source Line 176
Error ID 0069
BSFN DSTR Item 47

Solution

Setup

Account Master

The last column PE (F0901.PEC) is the Posting Edit Code which is set with the value 'M' and database cache is reset.

Business Unit Object Account Subsidiary Account Description Company P E
M30 1411 Inventory 00200 M


DMAAI

The settings below is common for many organization to account for the same asset regardless the origin of transaction.

Product DMMAAI Target Account
Inventory 4122 M30.1411
Sales 4240 M30.1411
Procurement 4310 M30.1411


Considerations

Currently the way it offset a certain transaction between Distribution and Financial are different from each other. For instance, distribution writes Inventory / COGS to balance the amount. On the other hand AR/AP/GA writes one side transaction and offsetting/balancing account is written through R09801 (G/L Post) based on AAI (Automatic Accounting Instructions).

Definition in AR/AP

JD Edwards EnterpriseOne Applications Accounts Payable Implementation Guide
16 Verifying Data Integrity for Accounts Payable
16.6 Correcting Out-Of-Balance Conditions
16.6.3 Invalid Journal Entry Was Posted to an AP Account
Excerpt:
You might receive an error message stating that an invalid journal entry was posted. This error might occur when you run the A/P Orig Doc to G/L by Batch or the A/P To G/L Integrity By Offset Account report. Typically, the AP control offset account (posting edit code = M) includes only machine-generated entries with a document type of AE (automatic entry). The presence of a manually entered document in this account, such as a journal entry, can cause a balancing problem.

Reference in Distribution

Below bugs are some of examples for the subject matter,

<Bug 10652736> : POSTING EDIT CODE M - SAR: 1140363
<Bug 10672398> : ALLOW POSTING EDIT CODE OF "M" - SAR: 2039558

Excerpt:

Posting edit code 'M'-Machine Generated Transactions Only is intended to provide an edit such that only automatic entries created by the system for which the post program creates offsets are allowed to these accounts. The inventory transaction programs do not make automatic entries for which the post program creates offsets. Inventory AAI's should not be setup to write to accounts with posting edit code of 'M'. Sales Update and Voucher Match have the ability to create this type of automatic entry.



Why the Inventory Transaction, Sales, and Procurement yield different outcome?

A. Differences


a. Purchase Order: B0000108.cAllowMachineGeneratedPEC = B0000098.cAllowMachineGeneratedPEC = XT4312Z2.cAllowMachineGeneratedPEC = '0' Hard Coded
b. Inventory Transaction: B0000108.cAllowMachineGeneratedPEC = B0900049.cAllowMachineGeneratedPEC = XT4111Z1.cBypassMEditFlag = '1' Hard Coded

B. History


- Enabler: <Bug 10832267> : M PEC ERROR ON CURR ENVIRON - SAR: 6979643
- Implementation of inventory interface 'C' for Line Type "SC" through <Bug 12481000> : STOCKED FINANCIAL COMMITMENTS - SAR: 4987527

C. Implementation

The <Bug 10832267> has disturbed the definition of Machine Generated Entry and Automatic Entry (it should not allow to use it).

Conclusion:

We may conclude Machine Generated Account as below,


<Internal_Only>

************* F4311EditLine *************
ID IXTF4311Z2_EditLineGLPostEditCode()
{
*** Break In Code ***

if ( ( lpDS->cInventoryInterface == _J('A')) ||
(lpDS->cInventoryInterface == _J('B')) ||
(lpDS->cInventoryInterface == _J('C')) ||/*4987527 - Financial Commitments Enhancement*/
((lpDS->cInventoryInterface == _J('D')) &&
(MathZeroTest(&lpDS->mnProjectNumber))))
{
if (dsGetLineTypeConstantsParms->cGLInterface == _J('Y') )/* SAR 5398118 */
{
*** Break In Code ***
dsValidatePostEditCodeParms.cAllowMachineGeneratedPEC = _J('0');
idFunctionCallReturn = jdeCallObject(_J("ValidatePostEditCode"),
...);
*** Break in Code ***
************* PostEditCodeEdit called by "ValidatePostEditCode"*************
#define POST_TO_SUBLEDGER_REQUIRED _J('S')
#define SUBLEDGER_REQ_POST_TO_BLANK _J('L')
#define SUBLEDGER_NOT_ALLOWED _J('X')
#define REQUIRES_UNITS _J('U')
#define INACTIVE_ACCOUNT _J('I')
#define NONPOSTING_ACCOUNT _J('N')
#define MACHINE_GENERATED_ONLY _J('M') /* doseo - M PEC */
#define REQUIRES_BUDGET_LEDGER _J('B')

#define BUDGET_LEDGER_B _J('B')
#define BUDGET_LEDGER_J _J('J')
#define BUDGET_LEDGER_K _J('K')
#define BUDGET_LEDGER_L _J('L')
#define BUDGET_LEDGER_M _J('M')
#define BUDGET_LEDGER_N _J('N')
#define BUDGET_LEDGER_O _J('O')
#define BUDGET_LEDGER_U _J('U')

JDEBFRTN (ID) JDEBFWINAPI PostEditCodeEdit ()
{
*** Break In Code ***
/**************************************************************************
* A Post Edit Code of 'M' should only allow posting to this account
* if it is a machine generated transaction.
**************************************************************************/
if ((lpDS->cPostingEditCode == MACHINE_GENERATED_ONLY) &&
(lpDS->cAllowMachineGeneratedPEC != _J('1')))
{
jdeSetGBRError(lpBhvrCom, lpVoid, IDERRcPostingEditCode_1, _J("0069"));
lpDS->cPostedEditCodeError =_J('1');
return ER_ERROR;
}
*** Break In Code ***

************* F4111EditLine *************
/* BUG 13369245 [https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=13369245] - When called from P31113, cCheckPostingEditCode will not be set, hence, check
* if the account number has been passed in to F4111EditLine and then set cCheckPostingEditCode */
if ((nTransaction == 11) && (!IsStringBlank((JCHAR *) lpDS->szAccountNumber)))
{
cCheckPostingEditCode = _J('1');
}

/*BypassEEditFlag = " " if called from P4112, For not allowing Account transaction with PEC='M'*/
MathNumericToInt (&lpDS->mnTransactionProcessType,(LPINT) &nTransaction);
/* Begin SAR - 6979643 - Bivash - Check transaction type to verify if it has been called
* from inventory issue or not also check if expense account has been manually entered */
/* BUG 13369245 [https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=13369245] - Added the condition to also check manual entry of account when called
* from P31113/P31114/P31115 */
/* if ( nTransaction == 1 && (cCheckPostingEditCode == _J('1')))*/
if (( nTransaction == 1 || nTransaction == 11) && (cCheckPostingEditCode == _J('1')))
{
dsF0911FS.cBypassMEditFlag = _J(' ');
}
else
{
dsF0911FS.cBypassMEditFlag = _J('1');
}
************* Break In Code *************</Internal_Only>

>