Archive for July, 2007

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.

Please?

Technorati Tags:  , ,

CRM and Le Tour

Two very unrelated subjects, I would have thought.

Yet here in the depths of SAP CRM there is the following line of code:

if cl_crm_ic_services=>greglemondmemorial = space.

Not quite sure why this is here. There is no else statement and nothing changes the value of the static attribute greglemondmemorial. They may as well have written ‘if 1 = 1’ or removed the if statement completely.

But it is finding this like this in SAP that makes your day interesting. So three cheers to Greg Lemond, three time winner of the tour.

For the curious this line of code is in the file abap_contextAreaPage.htm, which is in the crm_ic BSP application. The system at hand is a 4.0 system and I am not sure if this has been removed in later versions.

Technorati Tags: , , , , ,