Supported by


will never have
the NOT operator.

Before 7.4 we had to do this, for example:

IF a = abap_false.
  b = abap_true.
  b = abap_false.

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.

Um comentário a “NOT”

  1. Ruthiel Diz:

    Uso frequantemente essas built-in functions!

    São maravilhosas! Poupam imensas linhas código!

Deixe um comentário

About Abapinho
Abapinho runs on WordPress
Articles (RSS) e Comments (RSS).