on ‎2016 Aug 01 7:25 AM
Hi experts,
I have created a Journal.lgf with script shown below:
//To close net income in income statement to current net income in retained earnings section
*XDIM_MEMBERSET VERSION = ACTUAL
*XDIM_MEMBERSET TRANSTYPE <> INC
*XDIM_MEMBERSET GROUPS = %GROUPS_SET%
*XDIM_MEMBERSET COMPANY = %COMPANY_SET%
*XDIM_MEMBERSET TPARTNER = %TPARTNER_SET%
*XDIM_MEMBERSET TIME = %TIME_SET%
*WHEN ACCOUNT
*IS BAS(NET_INCOME) //base-members of the account NET_INCOME
*REC(FACTOR=1,ACCOUNT="CURR_NI",TRANSTYPE="INC")
*ENDWHEN
Purpose: for every income statement account posted via journal entry in BPC, create an adjustment to the CURR_NI account (a Retained Earnings account in the balance sheet) for the same amount.
Basically, if the account is a base member of the NET_INCOME account (examples of these are account 6900010002 and EQTYNI_SHARE_ASS, as shown below), a record should be created in the CURR_NI account with AUDITTRAIL (TRANSTYPE in our case) INC.
ACCOUNT DIM relevant members are displayed below:
| ID | DESCRIPTION | ACCTYPE | H1 |
|---|---|---|---|
| 6900010002 | Dividend Income | INC | NET_INCOME |
| EQTYNI_SHARE_ASS | Share in Net Income of Associate | INC | NET_INCOME |
| NET_INCOME | Net Income | INC | |
| CURR_NI | Current Income | LEQ | UNAPP_RET |
| UNAPP_RET | Unappropriated Retained Earnings | LEQ |
The testing went as follows:
1. Posted the first journal below:
Expected result is that, a CURR_NI account of 791,143.71 should be created since the account 6900010002 passed the WHEN/IS condition.
2. Checked the created records of the posted journal in the backend cube:
Logic script seems to be working as expected. The correct records has been written.
However, when another journal is to be posted, it seems to overwrite the CURR_NI account.
3. Posted the second journal below:
Expected result is that, a CURR_NI account of -43,392.37 should be created since the account EQTYNI_SHARE_ASS passed the WHEN/IS condition.
Total CURR_NI should now be 791,143.71 (from journal 1) and -43,392.37 (from journal 2)
4. Checked the backend cube for the created records:
The CURR_NI total is now -43,392.37.
It seems like the Journal.lgf does not APPEND the created records, instead, it OVERWRITES the previous record.
I am under the impression that the BPC Journal.lgf is executed every time a journal is posted. Therefore, previous records created by the journal and the journal.lgf should not be taken into account by another journal posted subsequently. However, that is not the case in the example above. Since the two income statement accounts will create records in the same data intersection (account CURR_NI), the system overwrites the data of the first record created with the latest data.
The BPC Journal per se works fine and appends the journal entries correctly. The issue is with the logic script which creates the CURR_NI account in an overwrite behavior.
The question is, how do I make the logic script behave as that of the BPC Journals (i.e. append records)? Any ideas?
System SP is displayed below:
Thanks in advance.
Regards,
Jen
Request clarification before answering.
In journal you post delta value that is applied to the existing value. The journal.lgf is working not with the value in journal record but with the resulting value in the cube. Hope it's clear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
Using your example, the system behaves this way:
1. Post journal in Income account 123 for 100 USD.
2. Journal.lgf runs and records CURR_NI account 100 USD.
3. Post another journal in Income account 456 for 10 USD.
4. Journal.lgf run and records CURR_NI account -90 USD.
Now the totals are:
1. Income Accounts = 110.
2. CURR_NI = 10.
Your example is the ideal scenario and how I would want my script to work. Any ideas on how to achieve this given my script above? Thanks!
You can't scope journal entry, you can only scope the result after journal entry is applied to the cube. I have already explained you the logic. And I do not understand what do you want to achieve.
If you want to copy base members under some parent to some account then you have to copy everything each time you change any base member.
| User | Count |
|---|---|
| 17 | |
| 11 | |
| 9 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.