‎2010 Oct 18 4:32 PM
Hello,
How to do XOR command between 2 numbers in SAP. The formula is NUM1 XOR NUM2 (where NUM1 and NUM2 are binary expressions since an XOR is a bit command).. Is there any FM available?
I saw a command BIT-XOR but it only works for HEX characters.
Thanks,
AP
‎2010 Oct 18 6:15 PM
Hi,
You should use BIT-XOR. See:
data: w_xx(10) type x,
w_x1(10) type x,
w_x2(10) type x,
w_ii type i,
w_i1 type i,
w_i2 type i.
w_i1 = 12345.
w_i2 = 67890.
w_x1 = w_i1.
w_x2 = w_i2.
w_xx = w_x1 BIT-XOR w_x2.
w_ii = w_xx.
write w_ii.Best regards,
Leandro Mengue
‎2010 Oct 18 6:15 PM
Hi,
You should use BIT-XOR. See:
data: w_xx(10) type x,
w_x1(10) type x,
w_x2(10) type x,
w_ii type i,
w_i1 type i,
w_i2 type i.
w_i1 = 12345.
w_i2 = 67890.
w_x1 = w_i1.
w_x2 = w_i2.
w_xx = w_x1 BIT-XOR w_x2.
w_ii = w_xx.
write w_ii.Best regards,
Leandro Mengue