<?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: Binary addition on ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-addition-on-abap/m-p/7747015#M1582327</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;amazing! I don't pretend to understand all of this &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; but it is enough for me to have it modified to fit my code.  thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2011 02:18:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-04-13T02:18:56Z</dc:date>
    <item>
      <title>Binary addition on ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-addition-on-abap/m-p/7747013#M1582325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a way to simulate binary addition on abap: example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;000&lt;/P&gt;&lt;P&gt;001&lt;/P&gt;&lt;P&gt;010&lt;/P&gt;&lt;P&gt;011&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so if i add 1, then the next value is 101.  the lenght would also vary from 2 to 8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex. 2&lt;/P&gt;&lt;P&gt;00&lt;/P&gt;&lt;P&gt;01&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would need this for mass uploading the release statuses for PO. i would use this as an internal table to finaly map it on T16FK (Release statuses)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 05:34:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-addition-on-abap/m-p/7747013#M1582325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-07T05:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Binary addition on ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-addition-on-abap/m-p/7747014#M1582326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello c z,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See Code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards, &lt;/P&gt;&lt;P&gt;Rae Ellen Woytowiez&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

 REPORT  zbinary_addition.

DATA:  offset TYPE i,
       power TYPE i.

DATA:  inc TYPE i.

DATA:  help_base10 TYPE i,
       answer_binary(8) TYPE n,
       temp_power TYPE i.

DATA:  wa_t16fk TYPE t16fk.

START-OF-SELECTION.

  inc = 1.

  WHILE inc &amp;lt;= 255.
*
* Convert decimal number to binary.
    answer_binary = '000000000'.

    offset = 0.
    power = 7.
    temp_power = 2 ** power.

    help_base10 = inc.
    WHILE help_base10 &amp;gt; 0.
      IF help_base10 &amp;gt;= temp_power.
        answer_binary+offset(1) = '1'.
        help_base10 = help_base10 - temp_power.
      ENDIF.
      IF help_base10 &amp;gt; 0.
        power = power - 1.
        offset = offset + 1.
        temp_power = 2 ** power.
      ENDIF.
    ENDWHILE.


    wa_t16fk-FRGA1 = answer_binary(1).
    wa_t16fk-FRGA2 = answer_binary+1(1).
    wa_t16fk-FRGA3 = answer_binary+2(1).
    wa_t16fk-FRGA4 = answer_binary+3(1).
    wa_t16fk-FRGA5 = answer_binary+4(1).
    wa_t16fk-FRGA6 = answer_binary+5(1).
    wa_t16fk-FRGA7 = answer_binary+6(1).
    wa_t16fk-FRGA8 = answer_binary+7(1).


    inc = inc + 1.
  ENDWHILE.



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rae Ellen Woytowiez on Apr 8, 2011 4:53 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rae Ellen Woytowiez on Apr 8, 2011 4:55 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 21:13:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-addition-on-abap/m-p/7747014#M1582326</guid>
      <dc:creator>former_member182010</dc:creator>
      <dc:date>2011-04-07T21:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Binary addition on ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-addition-on-abap/m-p/7747015#M1582327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;amazing! I don't pretend to understand all of this &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; but it is enough for me to have it modified to fit my code.  thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 02:18:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-addition-on-abap/m-p/7747015#M1582327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-13T02:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Binary addition on ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-addition-on-abap/m-p/7747016#M1582328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 12:01:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-addition-on-abap/m-p/7747016#M1582328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-30T12:01:53Z</dc:date>
    </item>
  </channel>
</rss>

