fixed ledger

Since ledgers are now split into fixed and statistical ledgers, this means that fixed ledgers can be updated independently of the configuration settings.

This has the following effects:

- Each application that has a fixed ledger, must call up FI-SL as a tool to update the ledger(s). This means that this application must be defined in TRWPR and it only calls up GLX if GLX should also update the ledger.

- The application must also transfer additional information on the ledger as well as the document so that the ledger can be updated without configuration information. The additional information needed is described below.

- Each application then has a fixed function module that updates the appropriate ledger. This function module is not generated. To prevent a duplicate code form being created, the function module consists of many (small) includes that can be partly used for all function modules. Each FM (Name: SAPLGINx) contains an include LGINxF80 that controls the field movement from the sender table to the fixed ledger table. All fields are filled in this table except for HSL and KSL. The respective applicataion is responsible for this include. The values of the fixed and user-defined field movements have been included here (as a suggestion), but they should be reviewed. In particular, the fields document number, reference document number, document type and reference document type are to be taken into account.
Document types B (Accounting) or K (Controlling) shhould be used as the document type provided the original document number is accessed. If the application assigns its own document number, it should be assigned document type A.

Example:

The document type is required first of all to make the document
number unique and secondly to know where to find the original
document when displaying the document.
Document Document Nr. Reference Doc.Nr. ->Doc.Type Refer.Doc.Type
FI original none B -
FI separate original A B
CO original none K -
CO separate original A K
RW-Bel separate original A W


To fill the table, all sender tables are available in this include together with the current ledger table entry.

In addition, all values required for determining the currency are recorded in the include. Since this is standard information, however, they should usually be correct.

If line items are written for fixed ledgers, a document number must exist for each document.

The ledger information table must contain a record for each document header and ledger.

It it is also important that no field movements are accessed for fixed ledgers. This means that different field movements cannot be assigned to a fixed ledger unless you have different sender tables (for example: CO document and RW document).

You should also make sure that no field movements are accessed for fixed ledgers.

In priciple one call is sufficient at update in order to update the fixed ledgers because no errors should occur. There are, nevertheless, two reasons why an error could occur:
- when the balance is carried forward during the fixed account determination
- when currency is translated
This is why the respective function modules have a CHECK_ONLY flag. If this indicator is set, almost all the editing will be performed, but no information is stored. This means that if this flag is set, the function module can be called up at the time of document posting. In this case, however, a temporary document number is required. The Message Handler is supported with the version CHECK_ONLY. An exporting pararmeter is also returned, if an error is found (E_ERROR_FOUND).

Rather than always having to perform the entire check, these are two other function modules, which you can alternatively call up.

G_CHECK_SAVOR

This function module checks if a balance carry forward is necessary for current ledger entry. This means that the function module does not check if the SAVOR functions, but only returns the information as to whether or not a balance carry forward is to be performed. Depending upon this information, the direct posting function module can be called up.

G_CHECK_CURRENCY_CONVERSION

This function module only checks if the ledger currencies can be translated from the local currencies of the document, that is, if an entry exists in table CURR. It does not, however, check if the transaction currency is also the same as a ledger currency.

Fixed ledgers and distributed systems

With distributed systems , the FI-SL applications must be called up in the system in which the summary records or line items are to be written for the update. This means that the GLX update module for fixed ledgers does not distribute itself. This would not work because the document number assignment should take place in the system in which the update also takes place.

Ledger table contents:

Ledger

Here, you have to specify the fixed ledger. FI-SL does not validate it. If there are several ledgers to be updated, at least one record in the ledger table must be transfered for each ledger.

DOCNR

Document number. If several documents are transferred at the same time,one record in the ledger table is to be transferred per document and ledger. The document number must correspond with the document number of the document.

DOCNR for BKPF/BSEG, COBK/COEP and COBK/COEJA

GLX_DOCNR in the RW document. This means that the GLX_DOCNR must also be filled if no line items are written. In this case, it can then be an internal consecutive number (1,2...).

ORIGDOCNR

Document number with which the fixed ledger line items are to be updated. This field must be filled when line items are to be written. With the RW document, the number will be the same as the GLX_DOCNR.

BUKRS

Company code of the document(s).

The company code must not be filled for CO-documents, since the fixed ledgers require the same processing for all of the document company codes (that is, for this KOKRS).
This is why local currencies cannot be transferred for CO-documents, since they are dependent on the company code. The local currency LCURR is only needed for the balance carry forward. For CO-documents, however, a balance carry forward is not carried out.

RCOMP

Global Flag

The global company is only required when a global company ledger is to be updated. It is only necessary for KONS. Accordingly, the X-flag for'Global' is required for a global company table.

TC LC GC Qu AQ

X-flags whose currencies and quantities should be updated in the ledger. These entries should be constant for fixed ledgers, although the flag for the group currency in FI can be dependent on the company code. These flags indicate only, if the corresponding currency fields and quantities are to be updated. You should take into account that many RM-activities transfer a quantity, but this quantity is not to be updated in the ledger.

D/C-flag X-flag, which determines, if a debit/credit indicator is to be set in the ledger.

LI-flag

X-flag, which determines, whether line items are to be written for the document and the ledger.

Table

LI-tab

Table and line item table in which the ledger is defined. If a line item table does not exist (GLT0 and GLT3 only have one structure), you need to leave the second field blank. In priciple, the tables only need to be delivered when several ledgers are to be updated in various tables. Fiscal year.

POPER

Fiscal year and period with which the ledger is to be updated. If a fixed ledger has a different variant than the original document, the application can call up the FMG_PERIOD_GET with the posting date and the variant. It receives both values.

OFFSET

RPMAX

Both values are determined by FI-SL using G_MAX_PERIOD_AND_OFFSET_GET.

FLDGR

The highest field group in the summary record (constant for all fixed ledgers: 016)

RRCTY

Record type (0=Actual, 1=Plan)

CURT1 CURT2

Currency types for the first and second currency. They should also be known for fixed ledgers. Normally 10 and 80 or 10 and 30; for global ledgers 60 instead of 10. If a currency is not stored, that currency type must not be set.

Third currency (Ledger currency)

If known, it should be delivered directly. FI-SL can determine this currency, in order to do this, however, a T881-entry must exist provided that CURT2 = 80:

SELMODIF

Optional ledger flag

Selection grouping code is only necessary for ledger selection. If you want to use ledger selection, enter a K in the optional ledger flag.
However, ledger selection is not supported for fixed ledgers, so that both fields must not normally be filled.

PERIV

Fiscal year variant. The fiscal year variant is required for the balance carry forward and the average balance ledger and should thus always be defined.

Balance carried forward

X-flag, defining that ledger balance carry forward is required.

VTRHJ

Highest fiscal year carried forward. You can find this information in T882 and/or T882C.

Chart of accounts

You can determine the chart of accounts in T001.

Second currency (Local currency)

The local currency is required in the balance carry forward for profit and loss accounts. It is summarized in the local currency.

The following are function modules for fixed ledgers:

Application Program name Function module

FI SAPLGIN0 G_FI_UPDATE

CO-PCA SAPLGIN1 G_PCA_FROM_CO_ACTUAL_UPDATE

G_PCA_FROM_CO_PLAN_UPDATE

G_PCA_FROM_RWIN_UPDATE

FI-LC SAPLGIN3 G_FI_UPDATE

FI-RCL SAPLGIN4 G_ALD_FROM_CO_ACTUAL_UPDATE

G_ALD_FROM_COFIS_UPDATE