2006 Dec 12 5:24 AM
Can we use XOR in ABAP. Say, IF wa_itab-status XOR wa_itab1-status. If we can't use it then what is the alternative.
2006 Dec 12 5:30 AM
You can perform XOR only on bit-operands. It is not supported for logical operators. U need to use general rule for XOR as logical expressions in ABAP statements.
A XOR B = ((A OR B) AND NOT(A AND B)) In ur case,
A = wa_lt_op_exist-status EQ 'PDST' and
B = wa_lt_op_pos-status EQ 'PDST'.
For this part IF wa_itab-status EQ 'PDST' XOR wa_ltab1-status EQ 'PDST'
just replace the following part in ur report
IF ((wa_ltab-status EQ 'PDST' OR wa_ltab1-status EQ 'PDST')
AND (NOT(wa_ltab-status EQ 'PDST' AND wa_ltab1-status EQ 'PDST')))
2006 Dec 12 5:30 AM
You can perform XOR only on bit-operands. It is not supported for logical operators. U need to use general rule for XOR as logical expressions in ABAP statements.
A XOR B = ((A OR B) AND NOT(A AND B)) In ur case,
A = wa_lt_op_exist-status EQ 'PDST' and
B = wa_lt_op_pos-status EQ 'PDST'.
For this part IF wa_itab-status EQ 'PDST' XOR wa_ltab1-status EQ 'PDST'
just replace the following part in ur report
IF ((wa_ltab-status EQ 'PDST' OR wa_ltab1-status EQ 'PDST')
AND (NOT(wa_ltab-status EQ 'PDST' AND wa_ltab1-status EQ 'PDST')))