ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Character String and Byte String Processing → Expressions and Functions for Byte String Processing → Byte String Functions
Bit function
This example demonstrates how bit-set
works.
Other versions: 7.31 | 7.40 | 7.54
Source Code
DATA(number) = 1.
cl_demo_input=>request( CHANGING field = number ).
IF abs( number ) <= 200.
cl_demo_output=>display( CONV xstring( bit-set( number ) ) ).
ELSE.
cl_demo_output=>display(
'Number in Example must not exceed 200' ).
ENDIF.
Description
The output of the program shows how bits are set in a specified place in hexadecimal form.