1. ... TO g
The nth bit (from the left, starting at 1) of field f is set to
n must be positive, and either have type I or be convertible into this type. The value of n must not exceed the length (in bits) of f.
f must have type X . It can be of any length up to the maximum permitted for data type X.
SY-SUBRC <> 0:
The value of n was greater than the length in bits of f.
You can use the ... TO g addition to determine the value to which the bit should be set. g must have the value 1 or 0.
DATA F(2) TYPE X. SET BIT 1 OF F. WRITE F.
GET BIT, Bit operations