To_b or not To_b? The boolean question.

Please can anyone tell me why there is there not a real-deal, you-beaudy,  true-dinkum boolean false (or true for that matter) in ABAP?

For years we have put up with character booleans that really are not booleans at all. If we wanted to have a boolean we compared a result to the character ‘X’. This is because the checkbox and radio button concepts from the screen definition of ABAP reports translated a completed checkbox as an ‘X’.

So we have things like:

if p_test = 'X'.

or if we get a little more sophisticated we use a constant c_x. Some of use are slightly more sophisticated still and use ABAP_TRUE from the type group ABAP.

Which is all fine and dandy but it still means that there is no real boolean in ABAP.

So you can’t say:

If true

because true doesnt exist as a keyword in ABAP.

And you can’t even say

If abap_true

because abap_true is just another disguise for ‘X’.

Not that this is a really big deal but it would be nice to think that one day as the language changes that we would get a real boolean as a basic type in ABAP.


Technorati Tags:  , ,


1 Response to “To_b or not To_b? The boolean question.”

  1. 1 abapgallery Thursday, 2 August 2007 at 5:45

    yea… no boolean, and no “function” ..

    how nice if we can do this in ABAP:
    IF IsItTrue(parameter1,parameter2).


Comments are currently closed.

%d bloggers like this: