Wednesday, 22 February 2012

Oracle Purchasing Encumbrance Accounting Concepts

PURPOSE
-------

To assist viewers of this document in verifying the common setup steps, and to
provide usage guidelines, related to this topic.  Please consider all steps or
guidelines mentioned below prior to logging an iTAR with support.

For R12 Encumbrance Accounting process please refer to the following
Notes:

Note 429105.1 - Impact of R12 Design in PO Accounting

Note 558421.1 -  How To Diagnose Issues With Create Accounting Process For
Procure To Pay Cycle In R12





SCOPE & APPLICATION
-------------------

This document is intended for all users, consultants and support analysts of
the Oracle Purchasing application.  Anyone reviewing this document should have
a basic understanding of SQL*Plus and have a firm understanding of accounting
principles.  This note is intended for 10.7 to release 11i encumbrance
accounting principles, for R12 please refer to the above notes.



PURCHASING ENCUMBRANCE ACCOUNTING CONCEPTS AND PROCESS MODEL
------------------------------------------------------------


Introduction
------------
Encumbrance accounting is a form of budgetary control within Oracle Applications
which allows a company to allocate funding for specific accounts.  There is a
funds checking feature integral to encumbrance accounting which checks for funds
availability on those accounts and can either prevent (absolute), warn
(advisory) or ignore (none) funding availability (dependent on how each account
is defined in GL) for the specific transaction (requisition or purchase order)
that is currently being performed.



Basic Process
-------------

The basic process flow for encumbrance accounting activity related to Oracle
Purchasing typically is as follows:

1. Create a requisition.
2. Approve and reserve funds for the requisition.
3. AutoCreate requisition onto a purchase order.
4. Approve and reserve PO (which automatically reverses the requisition funds
   reservation)
5. Receive against the purchase order (either period-end or online accruals)
   and the funds are reversed for the amount received and entered against the
   charge account.

Funds reversal also occur when documents are cancelled or finally closed.
Requisitions, when autocreated onto a purchase order, have their funds reversed
either when the PO is approved and reserved or when the requisition line(s)
are rejected or returned.




Basic Encumbrance Process Flow
------------------------------

                ______________
                |            |
         _______| Purchasing |_______
PO/REQ   |      |            |      | Receipt
Reserve  |      --------------      | Accrual
         |                          |
  _______|__________        ________|_________
  | Table          |        | Table          |
  |  GL_BC_PACKETS |        |  GL_INTERFACE  |
  |                |        |                |
  ------------------        ------------------
         |                          |
  _______|__________        ________|_________
  | Process        |        | Process        |
  |GLSWPR "Sweeper"|        |  GL_INTERFACE  |
  |Create Journals |        |Journal Import  |
  ------------------        ------------------
         |    __________________    |
         |____| Table          |____|
              |  GL_JE_LINES   |
              |    ____________|______
              |____| Table           |
                   |  GL_JE_HEADERS  |
                   |                 |
                   |_________________|
                       |
               ________|_________     
               | Process        |
               |    GLPMAI      |
               | Journal Post   |
               |________________|                       
                       

    Figure 1 - Purchasing Encumbrance Process Flow

As you can see from Figure 1, the transactional flow has funds reservation
being performed through the GL_BC_PACKETS table when reserving funds for
purchasing documents, and through the GL_INTERFACE table for receipt accruals
(whether they be On Receipt or at Period End).  The funds checker process
takes place whenever funds reservation and/or adjustment is made.

After transactions have taken place in Purchasing, it will become necessary to
run the Create Journals program in GL.  This program essentially sweeps
through the GL_BC_PACKETS table and creates journals for the entries as entered.
Most customers set this process up to run several times a day (dependent on the
volume of transactions) as a report set, but it can also be ran manually.


Transactional Effects On Table Data
-----------------------------------
Various document types and their associated transactions have different effects
upon the various tables and their corresponding data.  As indicated in Figure 1,
purchasing document actions populate the GL_BC_PACKETS table.  By examining the
GL_BC_PACKETS table, we can make a determination of the data associated with the
corresponding document by utilizing the following columns:

REFERENCE1         :  Document type (PO/REQ)
REFERENCE2         :  Document header id
REFERENCE3         :  Document distribution id
REFERENCE4         :  Document number that you see on the document itself
ACCOUNTED_DR       :  Debits
ACCOUNTED_CR       :  Credits




------------------------------------
Requisitions
------------------------------------

When a requisition is approved and reserved, there are entries inserted into
the GL_BC_PACKETS table:

1) Approve and reserve a single line requisition #1673 for $1.50.
   Examining the GL_BC_PACKETS table as follows:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from   gl_bc_packets
        where  reference1 = 'REQ'
        and    reference4 = 1673;
       

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         1673          REQ             1.5               0

The above shows a corresponding debit for the funds reservation associated with
requisition 1673.

The accounting transactions that take place for the approval and funds
reservation for the above requisition are as indicated in the below table:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   Req Reserve             1.5                            1.5

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit

2a) Cancel the above requisition #1673 through the Requisition Summary form,
utilizing the Special -> Control Action function:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from   gl_bc_packets
        where  reference1 = 'REQ'
        and    reference4 = 1673;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         1673          REQ             1.5               0
         1673          REQ            -1.5               0

The above shows the requisition approval and funds reservation, and the
corresponding transaction when cancelled as a negative debit.

The accounting transactions that take place for the above requisition canceling
are as indicated in the below table:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   Req Cancel             -1.5                           -1.5

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit

2b) Now, instead of canceling the above requisition, we proceed with finally
closing it through the Requisition Summary form, utilizing the Special ->
Control function.  Here is the resulting SQL:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from   gl_bc_packets
        where  reference1 = 'REQ'
        and    reference4 = 1673;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
        1673          REQ              1.5               0
        1673          REQ                0             1.5

The above shows the requisition approval and funds reservation, and the
corresponding transaction when finally closed as a positive credit.

The accounting transactions that take place for the above requisition after it
has been Finally Closed are indicated below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   Req Final Close                      1.5      1.5

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit

2c) Now instead of canceling or finally closing the above requisition, we
proceed with returning the above requisition #1673 to the preparer, using the
AutoCreate form, under the Special -> Return function:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from   gl_bc_packets
        and    reference4 = 1673;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         1673          REQ             1.5               0
         1673          REQ               0             1.5

The above shows the requisition approval and funds reservation, and the
corresponding transaction when returned as a positive credit, essentially
offsetting the debit that was entered when the requisition was created.

The accounting transactions that take place for the above requisition being
returned are indicated below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   Req Return                           1.5      1.5

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit


2d) Now instead of canceling, finally closing or returning the requisition, we
proceed with AutoCreating the document through the AutoCreate form (which
creates purchase order #8717 in the process) and we proceed with approving and
reserving the PO:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from   gl_bc_packets
        where  reference4 = 1673;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         1673          REQ             1.5               0
         1673          REQ               0             1.5

The above shows the funds reversal of the requisition when autocreated onto a
PO and the PO is reserved and approved.  Then we can look at PO #8717 and see
the corresponding funds reservation:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 8717;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         8717           PO             1.5               0

The above shows the corresponding transaction when the purchase order was
approved and reserved and it appears as a positive debit.

The accounting transactions that take place for the above requisition approval,
funds reservation, and reversal when AutoCreated onto a purchase order are as
follows:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   Req Reserve             1.5                            1.5
   PO Reserve              1.5                            1.5
   Req Unreserved                       1.5      1.5

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit




------------------------------------
Purchase Orders
------------------------------------

When a purchase order is approved and reserved there are entries entered into
the GL_BC_PACKETS table:

1) Approve and reserve a standard purchase order #1959 for $1.50.  Examining
the GL_BC_PACKETS table as follows:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1959;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
        1959            PO             1.5               0

The above shows a corresponding debit associated with the funds reservation
for purchase order 1959.

The accounting transactions that take place for the above purchase order
approval and funds reservation are indicated below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   PO Reserve              1.5                            1.5

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit

2)  Approve a single line blanket purchase agreement #1959 for $1.50.
Examining the GL_BC_PACKETS table as follows:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1959;

   No rows selected

The above shows that there are no associated fund reservations with a blanket
purchase agreement.

Now create and reserve and approve a Release against the above blanket purchase
agreement #1959:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1959;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         1959           PO             1.5               0

The above transaction indicates that a blanket PO in itself will not create a
funds reservation, but the corresponding release reservation does.

The accounting transactions that take place for the above blanket purchase
release approval and funds reservation are below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   Release Reserve         1.5                            1.5

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit

3)  Approve a single line contract purchase agreement #1959 for $10.  Examining
the GL_BC_PACKETS table as follows:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1959;

   No rows selected

The above shows that there are no associated fund reservations with a contract
purchase agreement.

Now create and approve a standard purchase order #1962 for $1, referencing the
above-noted contract purchase agreement in the Reference Documents alternate
region at the line level of the standard PO:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1962;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         1962           PO               1               0

The accounting transactions that take place for the above purchase order
approval and reservation are below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   PO Reserve                1                              1

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit

Canceling the standard PO referenced against the contract PO yields the
following results:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1962;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         1962           PO               1               0
         1962           PO              -1               0

The above shows the corresponding transaction when cancelled as a negative
debit.

The accounting transactions that take place for the above purchase order
cancellation are below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   PO Reserve               -1                             -1

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit


Instead of Canceling, we now Finally Close the standard PO referenced against
the contract PO; the following results would occur:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1962;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
        1962            PO               1               0
        1962            PO               0               1

The above shows the standard PO reservation and the corresponding transaction
when the standard purchase order referenced against the contract purchase order
is finally closed.

The accounting transactions that take place for the above purchase order
cancellation are below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   PO Reserve                             1        1

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit

4) Approve a planned purchase order #1959 for $10.  Examining the GL_BC_PACKETS
table as follows:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1959;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
        1959            PO              10               0

The above shows an associated funds reservation with a planned purchase order.

The accounting transactions that take place for the above planned purchase order
approval and funds reservation are below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   PO Reserve               10                             10

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit

Now create and approve a scheduled release for $2 against the planned PO:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1959;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         1959           PO              10               0
         1959           PO               2               0
         1959           PO               0               2

The accounting transactions that take place for the above planned purchase order
approval and funds reservation, and release reservation are below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   PO Reserve               10                             10
   Release Reserve           2            2        2        2

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit

The release reservation provides offsetting entries, thus nullifying any
encumbrances created by the release as the planned purchase order encumbered
funds.

Canceling the scheduled release against the planned PO yields the following
results:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1959;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         1959           PO              10               0
         1959           PO               2               0
         1959           PO               0               2
         1959           PO              -2               0
         1959           PO               0              -2

The above query results show the reversal of funding associated with the release
being cancelled.

The accounting transactions that take place for the above planned purchase order
release cancellation are below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   PO Reserve               10                             10
   Release Reserve           2            2        2        2
   Release Cancel           -2           -2       -2       -2

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit

Finally Closing the scheduled release against the planned purchase order yields
the following results:

   SQL> select reference4, reference1, accounted_dr, accounted_cr
        from gl_bc_packets
        where reference4 = 1959;

   REFERENCE4   REFERENCE1    ACCOUNTED_DR    ACCOUNTED_CR
   ----------   ----------    ------------    ------------
         1959           PO              10               0
         1959           PO               2               0
         1959           PO               0               2
         1959           PO               2               0
         1959           PO               0               2

The above query result shows the reduction of encumbrance funding by adding a
credit associated with the release being Finally Closed.
   - The $10 is the Planned PO fund reservation
   - The $2 debit and credit rows are the nullifying rows when the release is
     created (no need to reserve funds as the planned PO already did that)
   - The last $2 row is a final close action; since it is not a cancel but
     rather a final close, the $2 credit is what hits the expense account.

The accounting transactions that take place for the above planned purchase order
scheduled release being Finally Closed are below:

   Document         Expense Dr   Expense Cr   RFE Dr   RFE Cr
   ---------------  ----------   ----------   ------   ------
   PO Reserve               10                             10
   Release Reserve           2            2        2        2
   Release FINAL                          2        2
   CLOSED

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit



------------------------------------
Receiving
------------------------------------

Receiving transactions utilize the GL_INTERFACE table and the GL program
Journal Import is then run to import the records into the GL_JE_HEADERS and
GL_JE_LINES tables.  Whether the receiving accrual takes place online (accrue
upon receipt) or at period-end, the accounting transactions will be the same.

Receipt accruals process reduces the encumbrance by the amount received and
charges the expense account.  Transactions from Oracle Purchasing are created
to reduce the encumbrance and loaded into the GL_INTERFACE table.  The journal
import process will generate the encumbrance journal.  The on-line funds
availability inquiry and reports will reflect the encumbrance amount until
these journal entries have been posted.

It is recommended, however, that when running the GL Journal Import program,
that you do not run import with Summary Journals enabled.  Purchasing provides
detailed transaction source data to the general ledger, but GL currently does
not use this data when Summary Journals are used.  Summary Journals prevent any
drill-down capability to what specific source the journals have been created
from, and by using detail journals the data that Oracle Purchasing provides GL
can be accessed in the GL_JE_LINES table.

The following columns in the GL_INTERFACE table can be used to track purchasing
source information:

REFERENCE21        :  Type of document
REFERENCE22        :  DOC_HEADER_ID (po_header_id)
REFERENCE23        :  DOC_DISTRIBUTION_ID
REFERENCE24        :  Document number

The following columns in GL_JE_LINES table can be used to
track purchasing source information:

REFERENCE1         :  Document type (PO/REQ)
REFERENCE2         :  Document header id
REFERENCE3         :  Document distribution id
REFERENCE4         :  Document number that you see on the document itself
ACCOUNTED_DR       :  Debits
ACCOUNTED_CR       :  Credits

The accounting transactions that take place for receiving (either online or
period end) against a $10 encumbered purchase order are indicated in the table
below:

    -------------------------------------------------
   |Doc    |Exp  | Exp | RFE | RFE | Rec | Rec | Rec |
   |       |Dr   | Cr  | Dr  | Cr  | Dr  |AccDr|AccCr|
   |-------|-----|-----|-----|-----|-----|-----|-----|
   |PO     |     |     |     |     |     |     |     |
   |Reserve| 10  |     |     | 10  |     |     |     |
   |       |     |     |     |     |     |     |     |
   |-------|-----|-----|-----|-----|-----|-----|-----|
   |Receipt|     |     |     |     |     |     |     |
   |Accrual|     | 10  | 10  |     |     |     |     |
   |Enc Rel|     |     |     |     |     |     |     |
   |-------|-----|-----|-----|-----|-----|-----|-----|
   |Exp    |     |     |     |     |     |     |     |
   |Account| 10  |     |     |     |     |     | 10  |
   |Charge |     |     |     |     |     |     |     |
    -------------------------------------------------

   Note:  RFE - Reserve For Encumbrance, Dr - Debit,
          Cr - Credit, Exp - Expense, Acc - Accrual,
          Rec - Receipt, Rel - Relief, Enc - Encumbrance 



------------------------------------
Account Payables
------------------------------------
The scope of this document is related to Purchasing transactions, but
information associated with Accounts Payables is included here:

- There are no transactions made for invoices when matched to an encumbered
  purchase order, as the purchase order reservation has already performed this
  function;
- Unmatched invoices create the same entries as a reserved purchase order into
  the GL_BC_PACKETS table;
- These AP unmatched invoice transactions are entered into GL via the Create
  Journals program.

The AP to GL Post program yields transactions as indicated in the table below:

    --------------------------------------------------------
   |Doc    |Exp  | Exp | RFE | RFE | AP  | AP | Cash | Cash |
   |       |Dr   | Cr  | Dr  | Cr  | Dr  | Cr | Dr   | Cr   |
   |-------|-----|-----|-----|-----|-----|------------------|
   |AP/GL  |     |     |     |     |     |    |      |      |
   |Enc    |     | 10  | 10  |     |     |    |      |      |
   |Relief |     |     |     |     |     |    |      |      |
   |-------|-----|-----|-----|-----|-----|------------------|
   |AP/GL  |     |     |     |     |     |    |      |      |
   |Exp    | 10  |     |     |     |     | 10 |      |      |
   |Acct   |     |     |     |     |     |    |      |      |
   |-------|-----|-----|-----|-----|-----|------------------|
   |AP/GL  |     |     |     |     |     |    |      |      |
   |Payment|     |     |     |     |  10 |    |      |  10  |
   |       |     |     |     |     |     |    |      |      |
    --------------------------------------------------------

   Note:  RFE - Reserve For Encumbrance, Dr - debit, Cr - credit