Unbalanced Journal Legal! Finding the balance using the GTEST

3 minute read time.

One of the most common errors that you may encounter, when posting a transaction in Sage X3, is the Unbalanced Journal Legal. The source of this error can be narrowed down to the setup on the automatic journal or accounting codes, but how do we identify where we need to check? This may seem daunting, but help is at hand, use the GTEST command to guide your investigation into the setup.

The GTEST command can be used to help identify unbalanced journals. While it may not correct the out of balance, it will show you the journal entry that the system is attempting to create during the posting. This will highlight the amounts being debited and credited to the different accounts, allowing you to determine where the out of balance is occurring.

 

So how do we use the GTEST command?

Start by launching the function and processing the required information needed for the transaction but stop just before you select create or save. Next, open the calculator, located under Diagnosis on the right menu or by selecting the show more options ellipsis. 

Once the calculator screen appears, in the calculation box, enter the command sigma(GTEST=99, 1, 0) and press Enter. This will return a 0 in the result box, indicating the command has been activated, you can now close out from the Calculator by clicking the X.

Next, select create or the save button in the function. This will now show you the journal that the system is trying to create when the Unbalanced Journal Legal error is encountered.

In our example, the user was trying to create an issue for a fixed asset, if you look at the first screenshot from the sigma GTEST, the account on line 3 is empty, however if we scroll across to the debit column, there is a value on this line, causing the unbalance error.

In the following screen shot, under the description column, you are told which line on the automatic journal you will need to check the formulas. In this case that will be Net Value Fixed Asset Sold.

After you have finished reviewing the journal validation screen and before continuing to the automatic journal, you should deactivate the GTEST. To do this go back into the calculator and type sigma(GTEST=0,-1,0), then press enter, again returning another zero value.

 

Now onto the automatic journal, in this example, as you are attempting to complete a fixed assets sales disposal, you can search for this description in the automatic journal function (GESGAU). This can be found under Parameters > Financials > Accounting Interfaces > Automatic journals. After you have selected the correct automatic journal, FXISS in this case, click on lines from the right menu. You can now locate the Net value fixed assets sold line from the left list and read through the conditions on the accounting code lines to determine which index value will need to be modified on the accounting code to balance the journal.

In our example, looking at the accounting codes, only line 1 has a condition of legislation not equal to Portuguese and Russian, both of legislations are not relevant to our business case. You can therefore assume that the index of 10 will probably be missing an account on this line of the fixed assets accounting code. Note, to identify which accounting code you will need to modify, refer back to the initial fixed asset selected and check the accounting code (under characteristics section). In this example that will be GBITHARD, as can be seen in the following screen shot.

Once you know which accounting code you need to modify go to Accounting Codes (GESCAC). This can be found under Parameters > Financials > Accounting interface > Accounting codes. Select the correct Fixed Assets accounting code from the left list, then using the previously determined index number, go to line 10 and add the relevant account in the general column for this line.

Finally, save the changes and test to see if you encounter the unbalanced journal error when processing your transaction once more.

 

If you still receive the unbalanced journal error or a new error, please raise a case with your local customer support.