Supported by
Supported by Inetum

NOT

images/thumbnail.jpg - Thumbnail

No, ABAP will never have the NOT operator.

Before 7.4 we had to do this, for example:

IF a = abap_false.
  b = abap_true.
ELSE.
  b = abap_false.
ENDIF.

Then came 7.4 and we were able to start improvising:

b = COND #( WHEN a = abap_false THEN abap_true ELSE abap_false ).

But even this is too far fetched for such a simple need.

Nevertheless, the boolean function XSDBOOL can help us get a little closer to the ideal NOT:

b = XSDBOOL( a = abap_false ).

This is the best I could find. If you know of a better way, please let me know.

Greetings from Abapinho.