Entering content frameSingle Bit Processing in Hexadecimal Fields Locate the document in its SAP Library structure

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 ‘00’ to ‘FF’.

This graphic is explained in the accompanying text

The illustration shows how a byte in a sequence with the decimal value 181 is represented in hex. The first four bits have the decimal value 11, the second four bits have the decimal value 5. This leads to the hexadecimal value ‘B5’ - 11x16+5 = 181.

ABAP contains statements that allow you to read and set the individual bits in a type X field. 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 efficiently.

Setting and Reading Bits

Bit Operations

Set Operations Using Bit Sequences




Leaving content frame