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: , , , , ,

Advertisements

6 Responses to “CRM and Le Tour”


  1. 1 Nithin Wednesday, 18 July 2007 at 21:23

    Amazingly the BP screen is full of Joels frame, Joels BUPA MAP…..Who is this Joel

  2. 2 Dennis Howlett Friday, 20 July 2007 at 6:19

    Thomas – for those of us not used to reading code – what on earth does it mean? Otherwise, congrats on a SA winning a stage. Makes the heart sing.

  3. 3 nigeljames Friday, 20 July 2007 at 9:19

    Dennis – This is probably too much information for you but here goes.

    Let’s break down the statement:
    if cl_crm_ic_services=>greglemondmemorial = space.

    This is an ‘if’ statement meaning we are going to make a decision here. They often look like this:
    if
    do something.
    else.
    do anthother thing.
    endif.

    The example above is just the if line where the condition is:
    cl_crm_ic_services=>greglemondmemorial = space.
    We are asking if something is equal to space.
    ‘Space’ in SAP speak is a reserved word meaning a blank variable.
    So we are going to do something if some variable is blank. That variable is cl_crm_ic_services=>greglemondmemorial. This is a class or object (cl_crm_ic_services ) and a property or attribute ( greglemondmemorial ) of the class. The funny => means that it is a static attribute. Static means that you don’t have to create an object to get at the property – it is always available.
    So this means we are asking if a variable that hasn’t been changed is still blank (its initial condition).

    Did this help?
    My question is: Why? and why choose the name greglemondmemorial? It is not really following any meaningful variable naming conventions.

  4. 4 Tim Thursday, 26 July 2007 at 13:49

    It is weird. A bored programmer not tidying up their code I guess.

    I have often used

    if 1 = 2.

    If I don’t want the code to be used, but want it to be available as active code. The only real reason I would want that is for a message to be found when using a where used if it is called dynamically.

    Can’t think why you might use the reverse though.

  5. 5 bbm Friday, 27 July 2007 at 8:41

    Maybe just a marker that can be easily remembered to search for later, or to add a break-point to without remembering exactly where it is.


  1. 1 Well done Robbie Hunter « Vendorprisey Trackback on Thursday, 19 July 2007 at 19:13
Comments are currently closed.




%d bloggers like this: