<?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>topic Re: Calculating hash total in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249860#M486171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Anji!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I am relatively new in ABAP so I do not know what do I need to include and how to include it to access CONVERSION_EXIT_ALPHA_OUTPUT and CONVERSION_EXIT_ALPHA_INPUT ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help! &lt;SUP&gt;_&lt;/SUP&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 May 2007 05:46:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-12T05:46:14Z</dc:date>
    <item>
      <title>Calculating hash total</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249857#M486168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am required to produced a CSV file and the last record should have a "hash total" which works like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, we have 3 records:&lt;/P&gt;&lt;P&gt;Record_1: 100.02&lt;/P&gt;&lt;P&gt;Record_2: 101.01&lt;/P&gt;&lt;P&gt;Record_3: 200.15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The hash total would be calculated like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  10002 + 10101 + 20015 = 40118&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The hash total is 40118 which should be outputted as: "000000000040118"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already tried saving the numbers into a TYPE N variable but it rounds off the decimals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be greatly appreciated! Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 May 2007 05:04:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249857#M486168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-12T05:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating hash total</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249858#M486169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Create a dataelement with type C, and domain with conversion exit(ALPHA) with required length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this reference as calculated hash value.and passthis value to converion_exit_alpha_ input.you will get the leading zeros and value will not be rounded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 May 2007 05:29:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249858#M486169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-12T05:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating hash total</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249859#M486170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;decalare a varaible&lt;/P&gt;&lt;P&gt;data: v_num (10) type c.&lt;/P&gt;&lt;P&gt;first calculate the sum.&lt;/P&gt;&lt;P&gt;and move that sum to this field v_num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use the conversion  fun modules&lt;/P&gt;&lt;P&gt;CONVERSION_EXIT_ALPHA_OUTPUT&lt;/P&gt;&lt;P&gt;CONVERSION_EXIT_ALPHA_INPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass the same number as input and output you will get the output as '0000040118'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 May 2007 05:38:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249859#M486170</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-12T05:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating hash total</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249860#M486171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Anji!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I am relatively new in ABAP so I do not know what do I need to include and how to include it to access CONVERSION_EXIT_ALPHA_OUTPUT and CONVERSION_EXIT_ALPHA_INPUT ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help! &lt;SUP&gt;_&lt;/SUP&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 May 2007 05:46:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249860#M486171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-12T05:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating hash total</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249861#M486172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
data : begin of itab occurs 0,
       val(10),
       end of itab.
data : total(15).
itab-val = '100.02'.
append itab.
itab-val = '101.01'.
append itab.

itab-val = '200.15'.
append itab.

loop at itab.
replace all occurrences of '.' in itab-val with ''.
condense itab-val.
total = total + itab-val.
*modify itab.
endloop.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    INPUT         = total
 IMPORTING
   OUTPUT        = total
          .

          write : / total.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 May 2007 06:10:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249861#M486172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-12T06:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating hash total</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249862#M486173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried another method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  hash_total = amt_total.
  REPLACE '.' WITH '' INTO hash_total.
  CONDENSE hash_total NO-GAPS.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where has_total is type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It also produces the same output I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which you think is better or more efficient? Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 May 2007 06:26:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249862#M486173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-12T06:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating hash total</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249863#M486174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in my reply i used the addition between two characters field but if you can avoid it then it will be better .. i think you can use your method it will be good enough...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 May 2007 08:02:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249863#M486174</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-12T08:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating hash total</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249864#M486175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for the attention! &lt;SUP&gt;_&lt;/SUP&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 09:20:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-hash-total/m-p/2249864#M486175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T09:20:26Z</dc:date>
    </item>
  </channel>
</rss>

