Exploring auto journals: the “V_” formula

3 minute read time.

Time to go on another adventure exploring the automatic journals. A few months ago our travels brought us to Exploring auto journals: the descriptions.  Today our adventure leads us to the auto journals and the “V_” formula. Before I proceed, as I mentioned in the previous blog, it is better to do our exploring in the test environment. It is too easy to accidentally click Save and alter our auto journal.

Our journey starts in Automatic journals (GESGAU) under Setup, Financials, Accounting interface. We will venture into the PRINC (Master Payment Journal) Entry Code. Let’s click Lines to look at the details.

We will select Line number 20 BnkBP(cpte WAICURACC1). The Control account isn’t selected and Accounting code and Index is blank for this line so we venture to the Formulas tab to see how the account number is derived.

Once there, we find the formula for the accounts is “V_ACCMIS.” What does that formula mean?

The “V_” in the formula points us to the Automatic journal variables (GESGVG) found under Setup, Financials, Accounting interface.

There is quick way to get to the Automatic journal variables screen. We’ll go to the Account Legal line in the grid. Click the Actions icon on the formula line and select Variables (1) which will bring you directly to the Automatic journal variables.

Here we have the variable definition. There is a nice explanation of what the variable does in the Description block. But, before we go to Local menu 2649, how do we know what the values are for CPY, LEDTYP and ACCMISTYP?

Back at the Formulas tab, click Parameters (2) and the Parameter values screen will be revealed.

We get the CPY (company) code from the PAYMENTH table entry for the transaction.

The LEDTYP is 1.  To verify that LEDTYP 1 is the legal ledger, start at Account core model from the Organizational structure, Companies entry. We’ll use Company NA10 and its Account Core model is NA1.


The Account core model (GESGCM) is located under Setup, Organizational structure.  We can verify that the Legal General ledger type is “1.”


Now to the Local Menu (TXT) 2649 under Development, Data and Parameters Tables

Does the menu look familiar?

The menu ties back to the Miscellaneous tab in the Chart of accounts (GESCOA) function found under Setup, Organizational structure. We can see what account will be selected based on the value for line 16.

The Auto journal variables can also be used in the calculation of amounts. We’ll look at a simple formula for Code PRINC Line 43 this time.


Here are details for the Variable code CONVERT.  This code “Converts an amount to a currency used as parameter.”

Then we go to the Parameters of variables which displays where the process grabs the necessary values for calculation.

Has this piqued your interest to explore more about Automatic journals? Then, check out these classes offered by Sage University:

  • X3 - Sage X3 - A deep dive into Auto Journals - In this course, you will learn the structure of and how to configure and use Auto Journals. We'll discuss best practice tips for customizing to your needs, including using accounting codes. Also covered, are the most commonly used auto journals that you may consider implementing for your organization.
  • X3 - Sage X3 - Expert Workshop: Automatic Journals - Attend this expert learning session to gain an understanding of how to perform automatic journal adjustment or changes safely in Sage X3. You will also learn about possible adjustments you can make any development knowledge.

I hope this information helps you as you explore the automatic journals.

Take care my X3 friends. Stay safe!