<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Journal.lgf script overwrites previous records in Financial Management Q&amp;A</title>
    <link>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841313#M216348</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vadim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using your example, the system behaves this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Post journal in Income account 123 for 100 USD.&lt;/P&gt;&lt;P&gt;2. Journal.lgf runs and records CURR_NI account 100 USD.&lt;/P&gt;&lt;P&gt;3. Post another journal in Income account 456 for 10 USD.&lt;/P&gt;&lt;P&gt;4. Journal.lgf run and records CURR_NI account -90 USD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the totals are:&lt;/P&gt;&lt;P&gt;1. Income Accounts = 110.&lt;/P&gt;&lt;P&gt;2. CURR_NI = 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Aug 2016 00:56:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-08-02T00:56:09Z</dc:date>
    <item>
      <title>Journal.lgf script overwrites previous records</title>
      <link>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaq-p/11841310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a Journal.lgf with script shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//To close net income in income statement to current net income in retained earnings section&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*XDIM_MEMBERSET VERSION = ACTUAL&lt;/P&gt;&lt;P&gt;*XDIM_MEMBERSET TRANSTYPE &amp;lt;&amp;gt; INC&lt;/P&gt;&lt;P&gt;*XDIM_MEMBERSET GROUPS = %GROUPS_SET%&lt;/P&gt;&lt;P&gt;*XDIM_MEMBERSET COMPANY = %COMPANY_SET%&lt;/P&gt;&lt;P&gt;*XDIM_MEMBERSET TPARTNER = %TPARTNER_SET%&lt;/P&gt;&lt;P&gt;*XDIM_MEMBERSET TIME = %TIME_SET%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*WHEN ACCOUNT&lt;/P&gt;&lt;P&gt;*IS BAS(NET_INCOME) //base-members of the account NET_INCOME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*REC(FACTOR=1,ACCOUNT="CURR_NI",TRANSTYPE="INC")&lt;/P&gt;&lt;P&gt;*ENDWHEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Basically, if the account is a base member of the NET_INCOME account (examples of these are account 6900010002 and &lt;SPAN style="font-size: 13.3333px;"&gt;EQTYNI_SHARE_ASS&lt;/SPAN&gt;, as shown below), a record should be created in the CURR_NI account with AUDITTRAIL (TRANSTYPE in our case) INC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACCOUNT DIM relevant members are displayed below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;DESCRIPTION&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ACCTYPE&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;H1&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6900010002&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Dividend Income&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;INC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NET_INCOME&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;EQTYNI_SHARE_ASS&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Share in Net Income of Associate&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;INC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;NET_INCOME&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;NET_INCOME&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Net Income&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;INC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;CURR_NI&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Current Income &lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;LEQ&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;UNAPP_RET&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;UNAPP_RET&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Unappropriated Retained Earnings&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;LEQ&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The testing went as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Posted the first journal below:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1006061" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Expected result is that, a CURR_NI account of 791,143.71 should be created since the account 6900010002 passed the WHEN/IS condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Checked the created records of the posted journal in the backend cube:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1006062" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Logic script seems to be working as expected. The correct records has been written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when another journal is to be posted, it seems to overwrite the CURR_NI account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Posted the second journal below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1006063" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Total CURR_NI should now be &lt;SPAN style="font-size: 13.3333px;"&gt;791,143.71 (from journal 1) and -&lt;SPAN style="font-size: 13.3333px;"&gt;43,392.37 (from journal 2)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;4. Checked the backend cube for the created records:&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1006064" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The CURR_NI total is now -43,392.37.&lt;/P&gt;&lt;P&gt;It seems like the Journal.lgf does not APPEND the created records, instead, it OVERWRITES the previous record. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is, how do I make the logic script behave as that of the BPC Journals (i.e. append records)? Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System SP is displayed below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1006065" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 06:25:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaq-p/11841310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-08-01T06:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Journal.lgf script overwrites previous records</title>
      <link>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841311#M216346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 09:30:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841311#M216346</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2016-08-01T09:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Journal.lgf script overwrites previous records</title>
      <link>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841312#M216347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have 100 at some interception in the cube.&lt;/P&gt;&lt;P&gt;Then you post journal with 10 to this intersection. The result will be 110.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And 110 will be used for calculations in journal.lgf or default.lgf.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 09:54:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841312#M216347</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2016-08-01T09:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Journal.lgf script overwrites previous records</title>
      <link>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841313#M216348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vadim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using your example, the system behaves this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Post journal in Income account 123 for 100 USD.&lt;/P&gt;&lt;P&gt;2. Journal.lgf runs and records CURR_NI account 100 USD.&lt;/P&gt;&lt;P&gt;3. Post another journal in Income account 456 for 10 USD.&lt;/P&gt;&lt;P&gt;4. Journal.lgf run and records CURR_NI account -90 USD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the totals are:&lt;/P&gt;&lt;P&gt;1. Income Accounts = 110.&lt;/P&gt;&lt;P&gt;2. CURR_NI = 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2016 00:56:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841313#M216348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-08-02T00:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Journal.lgf script overwrites previous records</title>
      <link>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841314#M216349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Script logic ALWAYS override destination.&lt;/P&gt;&lt;P&gt;4. Journal.lgf run and records 10 USD! Overwriting 100 USD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your scope ACCOUNT to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*XDIM_MEMBERSET ACCOUNT=BAS(NET_INCOME)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&amp;nbsp; each run all accounts will be written to destination...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2016 08:43:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841314#M216349</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2016-08-02T08:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Journal.lgf script overwrites previous records</title>
      <link>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841315#M216350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to scope the records in such a way that only the contents of a particular journal entry will be posted? For example, if the user enters Account 6900010002 and posts the journal, the Journal.lgf scope will only include that one record and not the other contents of the cube?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2016 09:08:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841315#M216350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-08-02T09:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Journal.lgf script overwrites previous records</title>
      <link>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841316#M216351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2016 11:10:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/journal-lgf-script-overwrites-previous-records/qaa-p/11841316#M216351</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2016-08-02T11:10:42Z</dc:date>
    </item>
  </channel>
</rss>

