<?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: Rounding and Offsetting to different Datasource/ AuditID. in Financial Management Q&amp;A</title>
    <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586739#M15320</link>
    <description>&lt;P&gt;P.S. And I don’t understand the idea to copy the same statement with obvious errors in each post!&lt;/P&gt;
  &lt;P&gt;Even missing “%” is not corrected here ... %VALUE%%1: -VALUE%%1 &amp;lt; 0. ....&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Aug 2018 08:17:14 GMT</pubDate>
    <dc:creator>former_member186338</dc:creator>
    <dc:date>2018-08-22T08:17:14Z</dc:date>
    <item>
      <title>Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaq-p/586717</link>
      <description>&lt;P&gt;Hi Experts&lt;/P&gt;
  &lt;P&gt;Is there a way to calculate the difference between the actual vs. round amounts and book to a different AUDITID/Datasource? &lt;/P&gt;
  &lt;P&gt;Goal is to retain original amounts and only book a rounding amount by account. &lt;/P&gt;
  &lt;P&gt;For example: Simple AUDITID hierarchy =&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;TOT_AUDITID&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt; ADJ_RND&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;TOT_INPUT&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt; INPUT2&lt;/P&gt;
  &lt;P&gt; INPUT&lt;/P&gt;
  &lt;P&gt;The sum of TOT_INPUT= 123.45. Rounded (0) should be 123. So we record the -.45 to ADJ_RND to result in 123.&lt;/P&gt;
  &lt;P&gt;I then wan to record an .45 to another account.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Is the best way to address via the BADI writeback? &lt;/P&gt;
  &lt;P&gt;Or can this be done with script logic?&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Saw the custom BADI for rounding values but don’t think it’s relevant for this business case. &lt;/P&gt;
  &lt;P&gt;Seems like it records to the same value. Also can’t find the transport that it references.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Further saw the links below but don’t understand the math.round function referenced.&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/questions/75279/mathround-for-rounding-in-rec-experssion-question.html" target="test_blank"&gt;https://answers.sap.com/questions/75279/mathround-for-rounding-in-rec-experssion-question.html&lt;/A&gt; &lt;/P&gt;
  &lt;P&gt;&lt;A href="https://blogs.sap.com/2012/10/08/inline-rounding-in-rec-expression/" target="test_blank"&gt;https://blogs.sap.com/2012/10/08/inline-rounding-in-rec-expression/&lt;/A&gt; &lt;/P&gt;
  &lt;P&gt;We are using BPC NW 10.1 SP11 with BW 7.4 SP16 &lt;/P&gt;
  &lt;P&gt; Thanks in advance.&lt;/P&gt;
  &lt;P&gt; Eyal&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 14:53:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaq-p/586717</guid>
      <dc:creator>Eyal_Feiler</dc:creator>
      <dc:date>2018-05-09T14:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586718#M15299</link>
      <description>&lt;P&gt;Please read my blog: &lt;A href="https://blogs.sap.com/2012/10/08/inline-rounding-in-rec-expression/" target="test_blank"&gt;https://blogs.sap.com/2012/10/08/inline-rounding-in-rec-expression/&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;In the resent BPC versions it's possible to loop parent members in WHEN/ENDWHEN script logic.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 19:33:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586718#M15299</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-05-09T19:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586719#M15300</link>
      <description>&lt;P&gt;Thanks Vadim,&lt;/P&gt;
  &lt;P&gt;I created a script with REC(EXPRESSION=%VALUE%%1,[DIMENSIONS...]) and am in the process of building and testing. Looks like what I needed.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Eyal&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 18:09:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586719#M15300</guid>
      <dc:creator>Eyal_Feiler</dc:creator>
      <dc:date>2018-05-17T18:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586720#M15301</link>
      <description>&lt;P&gt;I am unable to understand syntax of script logic in your post... what do you mean???&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 18:37:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586720#M15301</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-05-17T18:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586721#M15302</link>
      <description>&lt;P&gt;Hi Vadim,&lt;/P&gt;
  &lt;P&gt;Thanks for the helpful link. &lt;/P&gt;
  &lt;P&gt;I tried using the logic below to obtain the desired results - round down if &amp;lt;.5 or calc difference from 1 if &amp;gt;=.5 &lt;/P&gt;
  &lt;P&gt;Option 1: If .4&amp;lt;.5 (yes) than .4&lt;/P&gt;
  &lt;P&gt;Option 2 if .7 &amp;lt;.5 (no) than 1-.7=.3&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE%%1 &amp;lt; 0.5 ? %VALUE% : -1+ %VALUE%%1,AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;I receive an error in UJKT and BPC - unknown or unimplemented keyword *REC(Expression(%VALUE%%1 &amp;lt; 0.5 ? %VALUE% : -1+ %VALUE%%1,AUDITID=AD_RND1).&lt;/P&gt;
  &lt;P&gt;Using BPC 10.1 NW SP11. I do have an old global setting for K2_CALC_ENGINE=JS, if that is still relevant.&lt;/P&gt;
  &lt;P&gt;Is the conditional syntax correct? &lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Eyal&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 15:36:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586721#M15302</guid>
      <dc:creator>Eyal_Feiler</dc:creator>
      <dc:date>2018-06-19T15:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586722#M15303</link>
      <description>&lt;P&gt;Not sure that %1 is supported. For JS (JavaScript) calculation engine you can use rounding functions like in my blog!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 17:17:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586722#M15303</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-06-19T17:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586723#M15304</link>
      <description>&lt;P&gt;Hi Vadim,&lt;/P&gt;
  &lt;P&gt;Thanks for your response.&lt;/P&gt;
  &lt;P&gt;The script logic successfully executes a one part “if” such as below.&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=%VALUE%%1 &amp;lt; 0.5 ? %VALUE% :-1+ %VALUE%%1,AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;However, I am trying to use 2 conditions to calculate the decimals in column 2 below. Goal is to book the rounding amount in another AuditID.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;123.45 -.45&lt;/P&gt;
  &lt;P&gt;(123.45) .45&lt;/P&gt;
  &lt;P&gt;123.75 .25&lt;/P&gt;
  &lt;P&gt;(123.75) -.25&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Here is the testing script. The DM is returning an error &lt;/P&gt;
  &lt;P&gt;RUN_LOGIC:LINE 30 syntax error: " missing : in conditional expression" &lt;/P&gt;
  &lt;P&gt; line 30 is the *END row – used it to view the script more easily.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Each piece works so something is not right with the syntax. Any ideas?&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;*XDIM_MEMBERSET ENTITY = 1010&lt;/P&gt;
  &lt;P&gt;*XDIM_MEMBERSET CURRENCY = USD&lt;/P&gt;
  &lt;P&gt;*XDIM_MEMBERSET SCOPE = S_NONE&lt;/P&gt;
  &lt;P&gt;*XDIM_MEMBERSET CATEGORY = ACTUAL&lt;/P&gt;
  &lt;P&gt;*XDIM_MEMBERSET AUDITID = AD_RND1&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;*WHEN SCOPE&lt;/P&gt;
  &lt;P&gt; *IS S_NONE // replace&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;*BEGIN&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION= %VALUE% &amp;gt;0 ? &lt;/P&gt;
  &lt;P&gt;%VALUE%%1 &amp;lt; 0.5 ? -%VALUE%%1,AUDITID=AD_RND1 : 1- %VALUE%%1,AUDITID=AD_RND1:&lt;/P&gt;
  &lt;P&gt;%VALUE%%1 &amp;lt; 0.5 ? -%VALUE%%1,AUDITID=AD_RND1 : -1+ %VALUE%%1,AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;*END&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt;Eyal&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 18:17:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586723#M15304</guid>
      <dc:creator>Eyal_Feiler</dc:creator>
      <dc:date>2018-06-20T18:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586724#M15305</link>
      <description>&lt;P&gt;Sorry, but %1 is related to ABAP calculation engone, not to Javascript. For Javascript use Javascript function!&lt;/P&gt;
  &lt;P&gt;Use Math.round&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 18:37:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586724#M15305</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-06-20T18:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586725#M15306</link>
      <description>&lt;P&gt;Hi Vadim,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;I did more testing logic will work but now there’s a syntax problem with trying to define the AUDITID to record the result. &lt;/P&gt;
  &lt;P&gt;If I want to book the rounding to a separate AUDITID then a simple script like (1) below will work but if I place the AUDITID on both sides of the condition (2) then I get an error “missing : in conditional expression”.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;(1) *REC(EXPRESSION=%VALUE%%1 &amp;lt; 0.5 ? -%VALUE%%1 : 1- %VALUE%%1,AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;(2) *REC(EXPRESSION=%VALUE%%1 &amp;lt; 0.5 ? -%VALUE%%1,&lt;STRONG&gt;AUDITID=AD_RND1&lt;/STRONG&gt; : 1- %VALUE%%1,AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;Result: “missing : in conditional expression”.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;I tried using the example you reference below and adapted it to my scenario – script (3).&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://archive.sap.com/discussions/message/16921487#16921487"&gt;https://archive.sap.com/discussions/message/16921487#16921487&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;(3) &lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5 )? %VALUE%%1 : 1- %VALUE%%1):0)&lt;/P&gt;
  &lt;P&gt; *REC(EXPRESSION=(%VALUE%&amp;lt;0)?((%VALUE%%1 &amp;lt; 0.5) ? %VALUE%%1 : -1+ %VALUE%%1):0)&lt;/P&gt;
  &lt;P&gt;This worked but of course it updates the same AUDITID.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;So in (4) and other variations, I tested with adding the AUDITID=AD_RND1 in all and then some of the places. &lt;/P&gt;
  &lt;P&gt;Each time I get an error including the one below. Based on (1) the logic would be that you can insert an AUDITID only in the second condition which I tried but didn’t work…&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;(4) &lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5 )? %VALUE%%1,AUDITID=AD_RND1 : 1- %VALUE%%1,AUDITID=AD_RND1):0)&lt;BR /&gt; *REC(EXPRESSION=(%VALUE%&amp;lt;0)?((%VALUE%%1 &amp;lt; 0.5) ? %VALUE%%1,AUDITID=AD_RND1 : -1+ %VALUE%%1):0)&lt;/P&gt;
  &lt;P&gt;WITHOUT BEGIN END&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Result: missing : in conditional expression&lt;/P&gt;
  &lt;P&gt;(5) &lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5 )? %VALUE%%1 : 1- %VALUE%%1,AUDITID=AD_RND1):0)&lt;BR /&gt; *REC(EXPRESSION=(%VALUE%&amp;lt;0)?((%VALUE%%1 &amp;lt; 0.5) ? %VALUE%%1: -1+ %VALUE%%1,AUDITID=AD_RND1):0)&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Result: &lt;/P&gt;
  &lt;P&gt;UJK_VALIDATION_EXCEPTION:Member "AD_RND1):0" not exist&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;What do you suggest? Is it possible to select AUDITID? (Also tried with”” or ‘’ doesn’t work)&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;I can do this differently but each time I need to use a condition at some point that specifies more/less than the amount to book to a separate AUDITID.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Thanks in advance&lt;/P&gt;
  &lt;P&gt;Eyal&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 15:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586725#M15306</guid>
      <dc:creator>Eyal_Feiler</dc:creator>
      <dc:date>2018-08-15T15:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586726#M15307</link>
      <description>&lt;P&gt;Sorry, but you are using absolutely incorrect syntax of ternary operator. I have provided hundred of samples in my answers, is it so hard to compare? Destination dimension can’t be included inside ternary operator!!!!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 20:54:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586726#M15307</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-08-15T20:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586727#M15308</link>
      <description>&lt;P&gt;Hi Vadim, &lt;/P&gt;
  &lt;P&gt;Thanks for clarification. &lt;/P&gt;
  &lt;P&gt; Is there another way to perform the greater than less than with a key figure?&lt;/P&gt;
  &lt;P&gt;As I wrote in my initial description, we need to post to another AUDITID. &lt;/P&gt;
  &lt;P&gt; If this is not possible than we will have to look into the ABAP route. &lt;/P&gt;
  &lt;P&gt;Regards, &lt;/P&gt;
  &lt;P&gt;Eyal&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 06:36:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586727#M15308</guid>
      <dc:creator>Eyal_Feiler</dc:creator>
      <dc:date>2018-08-16T06:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586728#M15309</link>
      <description>&lt;P&gt;You have to use multiple REC statements with tests for conditions. If condition is true then write to required audittrail. If not - do nothing - for example write destination value to destination. Do you understand the idea?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 06:59:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586728#M15309</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-08-16T06:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586729#M15310</link>
      <description>&lt;P&gt;P.S. do you understand the syntax error you have?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 07:01:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586729#M15310</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-08-16T07:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586730#M15311</link>
      <description>&lt;P&gt;HI Vadim,&lt;/P&gt;
  &lt;P&gt;Thanks.&lt;/P&gt;
  &lt;P&gt;I see the syntax based on the other ternary postings including (&lt;A href="https://archive.sap.com/discussions/thread/3866675"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;A href="https://archive.sap.com/discussions/thread/3866675" target="test_blank"&gt;https://archive.sap.com/discussions/thread/3866675&lt;/A&gt;) .&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;I have 4 scripts that I tested that run separately (as an example for testing).&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5 )? -%VALUE%%1:0):0, AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;gt; 0.5 )? 1- %VALUE%%1:0):0,AUDITID=AD_RND2)&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE%&amp;lt;0)?((%VALUE%%1 &amp;lt; 0.5) ? %VALUE%%1 :0):0,AUDITID=AD_RND3)&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5 )? %VALUE%%1:0):0, AUDITID=INPUT3)&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Now trying to put together in nested condition because I want them all to write to same AUDITID – if I use above then each later script records 0 on the above row’s selection.&lt;/P&gt;
  &lt;P&gt;Will continue to test - and post.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Eyal&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 11:09:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586730#M15311</guid>
      <dc:creator>Eyal_Feiler</dc:creator>
      <dc:date>2018-08-16T11:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586731#M15312</link>
      <description>&lt;P&gt;Hi Vadim,&lt;/P&gt;
  &lt;P&gt;Ok we are closer.&lt;/P&gt;
  &lt;P&gt;If I run the following, it works as expected. Result are correct.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt; *REC(EXPRESSION=(%VALUE% &lt;STRONG&gt;&amp;gt;&lt;/STRONG&gt;0)?((%VALUE%%1 &amp;lt; 0.5 )? -%VALUE%%1:0):0, AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE% &lt;STRONG&gt;&amp;gt;&lt;/STRONG&gt;0)?((%VALUE%%1 &amp;gt;= 0.5 )? 1- %VALUE%%1:0):0,AUDITID=AD_RND2)&lt;BR /&gt; *REC(EXPRESSION=(%VALUE%&lt;STRONG&gt;&amp;lt;&lt;/STRONG&gt;0)?((%VALUE%%1 &amp;lt;=&lt;STRONG&gt;-&lt;/STRONG&gt; 0.5) ? -1-%VALUE%%1 :0):0,AUDITID=AD_RND3)&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE% &amp;lt;0)?((%VALUE%%1 &amp;gt; -0.5 )? -%VALUE%%1:0):0, AUDITID=INPUT3)&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;======================================================================================&lt;/P&gt;
  &lt;P&gt;To record the result in the same AUDITID and to keep each row’s results I setup the script as follows in keeping with the syntax of a single Ternary:&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION= (%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5) ? -%VALUE%%1 : 1- %VALUE%%1 : (VALUE%%1 &amp;lt; -0.5 ?&lt;STRONG&gt; &lt;/STRONG&gt;-%VALUE%%1 : -1- %VALUE%%1,AUDITID=AD_RND1) &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Test result: ANSWER: UJK_VALIDATION_EXCEPTION:LINE 9 syntax error: " missing ) in parenthetical" &lt;/P&gt;
  &lt;P&gt;======================================================================================&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Modified -added bold close parenthesis and the false option before the AUDITID= to close the parenthetical and :0 at end,. But this doesn’t work either.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION= (%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5) ? -%VALUE%%1 : 1- %VALUE%%1) : (VALUE%%1 &amp;lt; -0.5 ? -%VALUE%%1 : -1- %VALUE%%1&lt;STRONG&gt;)&lt;/STRONG&gt;:&lt;STRONG&gt;0,&lt;/STRONG&gt;AUDITID=AD_RND1) &lt;/P&gt;
  &lt;P&gt;Syntax error&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;======================================================================================&lt;/P&gt;
  &lt;P&gt;This works (reference)&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;*REC(EXPRESSION=(%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5 )? %VALUE%%1:0):0, AUDITID=AD_RND1)&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;======================================================================================&lt;/P&gt;
  &lt;P&gt;So what is missing? &lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Eyal&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 13:23:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586731#M15312</guid>
      <dc:creator>Eyal_Feiler</dc:creator>
      <dc:date>2018-08-16T13:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586732#M15313</link>
      <description>&lt;P&gt;Incorrect number of closing brackets. Sorry, please be accurate.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 13:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586732#M15313</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-08-16T13:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586733#M15314</link>
      <description>&lt;P&gt;Hi Vadim,&lt;/P&gt;
  &lt;P&gt;I re-compared to the working template and tested this many many times with different variations and still can’t find the missing closing brackets. &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;The syntax of the Ternary below matches the working sample under it – with each section bracketed accordingly.&lt;/P&gt;
  &lt;P&gt;Why is it not working? I am out of testing time…. Can you identify the missing closed bracket please?&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;These are 2 samples – they both correspond to the working template – second with added inner brackets to isolate the conditions.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION= (%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5) ? -%VALUE%%1 : 1- %VALUE%%1: VALUE%%1 &amp;lt; -0.5 ? -%VALUE%%1) : -1- %VALUE%%1,AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;UJK_VALIDATION_EXCEPTION:LINE 10 syntax error: " missing ) in parenthetical"&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION= (%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5) ? -%VALUE%%1 : 1- %VALUE%%1: &lt;STRONG&gt;((&lt;/STRONG&gt;VALUE%%1 &amp;lt; -0.5) ? -%VALUE%%1&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;: -1- %VALUE%%1,AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;UJK_VALIDATION_EXCEPTION:LINE 10 syntax error: " missing ) in parenthetical"&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;WORKING SAMPLE&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION=(%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5 )? %VALUE%%1:0):0, AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;T&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/200410-ternary.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Thanks&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Eyal&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 14:21:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586733#M15314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-08-21T14:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586734#M15315</link>
      <description>&lt;P&gt;I will try to check it later todat (not on the mobile phone)&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 14:48:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586734#M15315</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-08-21T14:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586735#M15316</link>
      <description>&lt;P&gt;The following syntax:&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION= (%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5) ? -%VALUE%%1 : 1- %VALUE%%1 : (VALUE%%1 &amp;lt; -0.5 ?-%VALUE%%1 : -1- %VALUE%%1,AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;Will result in:&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION= &lt;/P&gt;
  &lt;P&gt;(%VALUE% &amp;gt;0)?&lt;/P&gt;
  &lt;P&gt;(&lt;/P&gt;
  &lt;P&gt;(%VALUE%%1 &amp;lt; 0.5) ?&lt;/P&gt;
  &lt;P&gt; -%VALUE%%1 &lt;/P&gt;
  &lt;P&gt;: &lt;/P&gt;
  &lt;P&gt;1- %VALUE%%1 &lt;/P&gt;
  &lt;P&gt;: - what do you mean by “:”??? And extra errors later...&lt;/P&gt;
  &lt;P&gt;(VALUE%%1 &amp;lt; -0.5 ?-%VALUE%%1 : -1- %VALUE%%1,AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;Can you explain the required logic in words, because I can’t understand it looking on the incorrect scripts?&lt;/P&gt;
  &lt;P&gt;Something like:&lt;/P&gt;
  &lt;P&gt;If value &amp;gt; 0 &lt;/P&gt;
  &lt;P&gt;Then ...&lt;/P&gt;
  &lt;P&gt;Else...&lt;/P&gt;
  &lt;P&gt;...&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 17:04:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586735#M15316</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-08-21T17:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding and Offsetting to different Datasource/ AuditID.</title>
      <link>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586736#M15317</link>
      <description>&lt;P&gt;Second statement:&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION= (%VALUE% &amp;gt;0)?((%VALUE%%1 &amp;lt; 0.5) ? -%VALUE%%1 : 1- %VALUE%%1) : (VALUE%%1 &amp;lt; -0.5 ? -%VALUE%%1 : -1- %VALUE%%1&lt;STRONG&gt;)&lt;/STRONG&gt;:&lt;STRONG&gt;0,&lt;/STRONG&gt;AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;Result:&lt;/P&gt;
  &lt;P&gt;*REC(EXPRESSION= &lt;/P&gt;
  &lt;P&gt;(%VALUE% &amp;gt;0)?&lt;/P&gt;
  &lt;P&gt;(&lt;/P&gt;
  &lt;P&gt;(%VALUE%%1 &amp;lt; 0.5) ? &lt;/P&gt;
  &lt;P&gt;-%VALUE%%1 &lt;/P&gt;
  &lt;P&gt;: &lt;/P&gt;
  &lt;P&gt;1- %VALUE%%1&lt;/P&gt;
  &lt;P&gt;)&lt;/P&gt;
  &lt;P&gt; : &lt;/P&gt;
  &lt;P&gt;(&lt;/P&gt;
  &lt;P&gt;“Missing (%”VALUE%%1 &amp;lt; -0.5”missing)” ?&lt;/P&gt;
  &lt;P&gt; -%VALUE%%1 &lt;/P&gt;
  &lt;P&gt;: &lt;/P&gt;
  &lt;P&gt;-1- %VALUE%%1&lt;/P&gt;
  &lt;P&gt;)&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;: - not related to anything...&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;0,&lt;/STRONG&gt;AUDITID=AD_RND1)&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 17:30:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/financial-management-q-a/rounding-and-offsetting-to-different-datasource-auditid/qaa-p/586736#M15317</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2018-08-21T17:30:53Z</dc:date>
    </item>
  </channel>
</rss>

