<?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 Hexa decimal data type . in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381978#M811977</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone tell me exactly where to use and how to use Hexadecimal  data type ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Feb 2008 05:53:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-15T05:53:04Z</dc:date>
    <item>
      <title>Hexa decimal data type .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381978#M811977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone tell me exactly where to use and how to use Hexadecimal  data type ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 05:53:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381978#M811977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T05:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hexa decimal data type .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381979#M811978</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;  Hexadecimal Type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The non-numeric type - X - always interprets individual bytes in memory. One byte is represented by a two-digit hexadecimal display. The fields with this type are called hexadecimal fields. In hexadecimal fields, you can process single bits. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Predefined Elementary ABAP Types with Variable Length: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These predefined elementary data types are used to specify the types of individual fields whose lengths are not fixed until runtime. &lt;/P&gt;&lt;P&gt;  There are two predefined ABAP data types with variable length that are generically known as strings:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STRING for character strings:&lt;/P&gt;&lt;P&gt;A string is a sequence of characters with variable length. A string can contain any number of alphanumeric characters. The length of a string is the number of characters multiplied by the length required for the internal representation of a single character. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XSTRING for byte strings&lt;/P&gt;&lt;P&gt;A byte string is a hexadecimal type with variable length. It can contain any number of bytes. The length of a byte .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it is useful.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sreelakshmi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 06:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381979#M811978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T06:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hexa decimal data type .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381980#M811979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just create any report and attach this code to it&lt;/P&gt;&lt;P&gt;you might have to some corrections in it&lt;/P&gt;&lt;P&gt;just see to it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: itab_aux LIKE SOLI OCCURS 0 WITH HEADER LINE.
DATA: itab LIKE solix OCCURS 0 WITH HEADER LINE.
DATA: itab_tmp LIKE solix OCCURS 0 WITH HEADER LINE.

CLEAR itab_aux.

REFRESH itab_aux.

CONCATENATE 'Hello' 'How R' 'u!' INTO itab_aux-line separated by space.

APPEND itab_aux.
CALL FUNCTION 'SO_SOLITAB_TO_SOLIXTAB'
EXPORTING
ip_solitab = itab_aux[]
IMPORTING
ep_solixtab = itab_tmp[].

clear itab.
loop at itab_tmp.
itab-line = itab_tmp-line.
append itab.
endloop.

CALL FUNCTION 'SO_SOLIXTAB_TO_SOLITAB'
EXPORTING
ip_solixtab = itab[]
IMPORTING
EP_SOLITAB = itab_aux[]
.
loop at itab_aux.
write itab_aux-line.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sumesh Nair on Feb 15, 2008 11:42 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 06:11:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381980#M811979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T06:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hexa decimal data type .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381981#M811980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hexadecimal Type&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The remaining non-numeric type - X - always interprets individual bytes in memory. One byte is represented by a two-digit hexadecimal display. The fields with this type are called hexadecimal fields. In hexadecimal fields, you can process single bits. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this for &lt;STRONG&gt;Single Bit Processing in Hexadecimal Fields&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/b6/e7d716f46711d195200000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/b6/e7d716f46711d195200000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Predefined Elementary ABAP Types with Variable Length&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These predefined elementary data types are used to specify the types of individual fields whose lengths are not fixed until runtime. There are two predefined ABAP data types with variable length that are generically known as strings:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STRING for character strings&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;A string is a sequence of characters with variable length. A string can contain any number of alphanumeric characters. The length of a string is the number of characters multiplied by the length required for the internal representation of a single character. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;XSTRING for byte strings&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;A byte string is a hexadecimal type with variable length. It can contain any number of bytes. The length of a byte string is the same as the number of bytes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create a string as a data object, only a string header is created statically. This contains administrative information. The actual data objects are created and modified dynamically at runtime by operational statements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The initial value of a string is the empty string with length 0. A structure that contains a string is handled like a deep structure. This means that there are no conversion rules for structures that contain strings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 06:16:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381981#M811980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T06:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Hexa decimal data type .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381982#M811981</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;&lt;STRONG&gt;Hexadecimal Type&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The non-numeric type - X - always interprets individual bytes in memory. One byte is represented by a two-digit hexadecimal display. The fields with this type are called hexadecimal fields. In hexadecimal fields, you can process single bits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a hexadecimal field (type X), you can process the individual bits. ABAP interprets the contents of hex fields byte by byte. A hexadecimal field with length n is n bytes long, and has a display length in ABAP of 2xn. The decimal values 0 - 255 are represented in hexadecimal by the characters &amp;#145;00&amp;#146; to &amp;#145;FF&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP contains statements that allow you to read and set the individual bits in a type X field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are also special logical operators that you can use to compare bit sequences. Bit sequence processing allows you to process complex conditions and set operations more&lt;/P&gt;&lt;P&gt;efficiently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a hexadecimal field (type X), you can set or read individual bits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Setting Bits&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To set an individual bit, use the statement&lt;/P&gt;&lt;P&gt;SET BIT &amp;lt;n&amp;gt; OF &amp;lt;f&amp;gt; [TO &amp;lt;b&amp;gt;].&lt;/P&gt;&lt;P&gt;This statement sets the bit at position &amp;lt;n&amp;gt; of field &amp;lt;f&amp;gt; to 1 (or to the value of field &amp;lt;b&amp;gt;). The system must be able to interpret field &amp;lt;n&amp;gt; as a positive integer. The field &amp;lt;f&amp;gt; must have data&lt;/P&gt;&lt;P&gt;type X. The field &amp;lt;b&amp;gt; must contain the value 0 or 1. If the bit is set, SY-SUBRC is set to 0. If &amp;lt;n&amp;gt; is greater than the length of &amp;lt;f&amp;gt;, SY-SUBRC is unequal to zero. If &amp;lt;n&amp;gt; or &amp;lt;b&amp;gt; contain invalid values, a runtime error occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;DATA HEX(3) TYPE X.&lt;/P&gt;&lt;P&gt;SET BIT: 09 OF HEX TO 1,&lt;/P&gt;&lt;P&gt;10 OF HEX TO 0,&lt;/P&gt;&lt;P&gt;11 OF HEX TO 1,&lt;/P&gt;&lt;P&gt;12 OF HEX TO 1,&lt;/P&gt;&lt;P&gt;13 OF HEX TO 0,&lt;/P&gt;&lt;P&gt;14 OF HEX TO 1,&lt;/P&gt;&lt;P&gt;15 OF HEX TO 0,&lt;/P&gt;&lt;P&gt;16 OF HEX TO 1.&lt;/P&gt;&lt;P&gt;WRITE HEX.&lt;/P&gt;&lt;P&gt;The bits of the second byte in the three-character hexadecimal field HEX are set to &amp;#145;10110101&amp;#146;, and the list output is as follows:&lt;/P&gt;&lt;P&gt;00B500&lt;/P&gt;&lt;P&gt;The decimal value of the second byte is 181.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reading Bits&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To read an individual bit, use the statement&lt;/P&gt;&lt;P&gt;GET BIT &amp;lt;n&amp;gt; OF &amp;lt;f&amp;gt; INTO &amp;lt;b&amp;gt;.&lt;/P&gt;&lt;P&gt;This statement reads the bit at position &amp;lt;n&amp;gt; of field &amp;lt;f&amp;gt; into field &amp;lt;b&amp;gt;. The system must be able to interpret field &amp;lt;n&amp;gt; as a positive integer. The field &amp;lt;f&amp;gt; must have data type X. If the bit is read, SY-SUBRC is set to 0. If &amp;lt;n&amp;gt; is greater than the length of &amp;lt;f&amp;gt;, SY-SUBRC is unequal to zero and &amp;lt;b&amp;gt; is set to zero. If &amp;lt;n&amp;gt; contains an invalid value, a runtime error occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: HEX(1) TYPE X VALUE 'B5',&lt;/P&gt;&lt;P&gt;B(1) TYPE N.&lt;/P&gt;&lt;P&gt;DO 8 TIMES.&lt;/P&gt;&lt;P&gt;GET BIT SY-INDEX OF HEX INTO B.&lt;/P&gt;&lt;P&gt;WRITE B NO-GAP.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, the eight buts of the single-character hexadecimal field HEX (value &amp;#145;B5&amp;#146;) are read and displayed as follows:&lt;/P&gt;&lt;P&gt;10110101&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 06:37:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hexa-decimal-data-type/m-p/3381982#M811981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T06:37:19Z</dc:date>
    </item>
  </channel>
</rss>

