<?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: How to sorting the data in for...next function in Financial Management Q&amp;A</title>
    <link>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560336#M13850</link>
    <description>&lt;P&gt;Please provide a full script, and post it as a text, not as picture. I don't see definition of variables.&lt;/P&gt;
  &lt;P&gt;Also please explain the required calculation logic.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Dec 2017 07:26:12 GMT</pubDate>
    <dc:creator>former_member186338</dc:creator>
    <dc:date>2017-12-27T07:26:12Z</dc:date>
    <item>
      <title>How to sorting the data in for...next function</title>
      <link>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaq-p/560335</link>
      <description>&lt;P&gt;Hi expert,&lt;/P&gt;
  &lt;P&gt;I use "For...Next" function in case of divested entity in logic script and identify 3 variables in script which is retrieved from entity property dimension. Set of data that is used in script came from Entity Dimension as table below: &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/98123-capture1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;and the below is script&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/98124-script.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I expect that script should be run each set of data separately but in fact script will be sorted each property first then run script so the data that I get, it will show as below:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/98126-capture2.png" /&gt;&lt;/P&gt;
  &lt;P&gt;You can find that Entity B is disposed in year 2017 in first table but when I check the result, it is work like disposed in year 2015 while Entity D should be disposed in year 2015 but it work like disposed in year 2017. &lt;/P&gt;
  &lt;P&gt;My question is:&lt;/P&gt;
  &lt;P&gt;1.) Can I use For...Next function in this case? If not, can I use any function, please recommend me, I will be appreciated too much.&lt;/P&gt;
  &lt;P&gt;2.) If yes in the first question, please correct me that should I revise script or add something else for making script work correctly&lt;/P&gt;
  &lt;P&gt;Thanks in advance for your help and Happy New Year everyone.&lt;/P&gt;
  &lt;P&gt;Bam&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 07:04:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaq-p/560335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-12-27T07:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to sorting the data in for...next function</title>
      <link>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560336#M13850</link>
      <description>&lt;P&gt;Please provide a full script, and post it as a text, not as picture. I don't see definition of variables.&lt;/P&gt;
  &lt;P&gt;Also please explain the required calculation logic.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 07:26:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560336#M13850</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2017-12-27T07:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to sorting the data in for...next function</title>
      <link>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560337#M13851</link>
      <description>&lt;P&gt;Just performed simple test in UJKT with ENVIRONMENTSHELL copy:&lt;/P&gt;
  &lt;P&gt;ENTITY dimension:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/100038-disp.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Script:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;*SELECT(%ENS%,[ID],ENTITY,[DISPOSAL]=Y)
*XDIM_MEMBERSET ENTITY=%ENS%
*SELECT(%TIDS%,[DATE_CHANGE],ENTITY,[DISPOSAL]=Y)
*SELECT(%YS%,[YEAR_CHANGE],ENTITY,[DISPOSAL]=Y)
*FOR %EN%=%ENS% AND %TID%=%TIDS% AND %Y%=%YS%
*XDIM_MEMBERSET ENTITY=%EN%
*XDIM_FILTER TIME = [TIME].properties("TIMEID") = "%TID%"
*XDIM_FILTER TIME = [TIME].properties("YEAR") = "%Y%"
*NEXT&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;UJKT result:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;LGX:

*XDIM_MEMBERSET ENTITY=BR,CA,DE,FR
*XDIM_MEMBERSET ENTITY=BR
*XDIM_FILTER TIME = [TIME].properties("TIMEID") = "20140800"
*XDIM_FILTER TIME = [TIME].properties("YEAR") = "2014"
*XDIM_MEMBERSET ENTITY=CA
*XDIM_FILTER TIME = [TIME].properties("TIMEID") = "20151200"
*XDIM_FILTER TIME = [TIME].properties("YEAR") = "2015"
*XDIM_MEMBERSET ENTITY=DE
*XDIM_FILTER TIME = [TIME].properties("TIMEID") = "20161000"
*XDIM_FILTER TIME = [TIME].properties("YEAR") = "2016"
*XDIM_MEMBERSET ENTITY=FR
*XDIM_FILTER TIME = [TIME].properties("TIMEID") = "20171000"
*XDIM_FILTER TIME = [TIME].properties("YEAR") = "2017"&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Looks correct!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 09:14:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560337#M13851</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2017-12-27T09:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to sorting the data in for...next function</title>
      <link>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560338#M13852</link>
      <description>&lt;P&gt;Happy New Year Vadim,&lt;/P&gt;
  &lt;P&gt;Thanks a lot for your answer...First I will try to revise my script as your suggestion and let you know about the result.&lt;/P&gt;
  &lt;P&gt; Bam&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jan 2018 05:03:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560338#M13852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-01-01T05:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to sorting the data in for...next function</title>
      <link>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560339#M13853</link>
      <description>&lt;P&gt;My sample script demonstrates a correct order of id’s and properties in for/next loop.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jan 2018 09:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560339#M13853</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-01-01T09:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to sorting the data in for...next function</title>
      <link>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560340#M13854</link>
      <description>&lt;P&gt;Hi Vadim, &lt;/P&gt;
  &lt;P&gt;I tried to reorder select function as your comment and it works properly.&lt;/P&gt;
  &lt;P&gt;Thanks &lt;/P&gt;
  &lt;P&gt;Bam&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 08:31:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/how-to-sorting-the-data-in-for-next-function/qaa-p/560340#M13854</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-13T08:31:05Z</dc:date>
    </item>
  </channel>
</rss>

