cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Coded humor

Lukas_Weigelt
Active Contributor
0 Likes
14,304

Found this sarcastic bit of coding while debuggin today, made my day:

CL_WDR_CLIENT_ABSTRACT_HTTP
HANDLE_REQUEST

cl_wdr_client_ssr=>todo_cleanup( 'Evil hack because of missing support in RR_APPLICATION' )."#EC NOTEXT

method TODO_CLEANUP.
  " REASON
  if 1 = 1.
  endif.
endmethod.

There must be more of this kind. Contribute! For the good of the world!

cheers, Lukas

View Entire Topic
matt
Active Contributor
0 Likes

Not sure whether to laugh or cry over this one: Function module WB_TREE_SELECT_CLASS

*   >>>>>>>>>>>>>>>>>>>*   are there interfaces including the current interface
*   ("Umfassende Interfaces")?
    data: l_ifinfo type ref to cl_oo_if_relations,
          l_ifname type seoclass-clsname,
          l_comprising_interfaces type seor_comprisings_r.
    clear l_comprising_interfaces.
      l_ifname = class.

      data: wa_vseocompri type vseocompri.
      select *   from vseocompri
                into corresponding fields of wa_vseocompri
                where refclsname = l_ifname
*                AND version = '0'  "  '0': inactive, '1': active
           .
        if sy-subrc = '0'.
          append wa_vseocompri to l_comprising_interfaces.
        endif.
      endselect.

**      this is the official API to get the including interfaces, but it
**      delivers strange results and I don't understand the logics behind:
*      CREATE OBJECT l_ifinfo
*        EXPORTING
*              clsname = l_ifname
*              w_references = seox_true
*              w_implementings = seox_true
*              w_comprisings = seox_true
*              w_subclasses = seox_true
*        EXCEPTIONS
*              not_existing = 1
*              is_class = 2
*              OTHERS = 3
*        .
*      IF sy-subrc = 0.
*        l_comprising_interfaces = l_ifinfo->comprised_by .
*      ENDIF.

1) Let's not use the API because I don't understand it

2) Sy-subrc check within the SELECT... ENDSELECT

3) SELECT... ENDSELECT with append, instead of INTO TABLE

Who's writing SAP code nowadays?

RafkeMagic
Active Contributor
0 Likes

I guess that has been corrected... the above is nowhere to be found in our systems

matt
Active Contributor
0 Likes

This is on a 7.3 SP 9 system.  That whole section of coding doesn't exist in 7.01.

Lukas_Weigelt
Active Contributor
0 Likes

That makes things even more spooky... at the other hand, this way it seems that this thread will always have some fresh supply of posts and won't have to rely on remnants of "BACK IN MY DAYS.." 😆

RafkeMagic
Active Contributor
0 Likes

I checked on a 7.31 SP6 system... doesn't exist there either.

matt
Active Contributor
0 Likes

But is a 7.31SP6 later or earlier than a 7.30SP9 system... perhaps it's on its way in! But it would be nice if it were fixed.

john_studdert
Participant
0 Likes

They're equivalent SP levels according to SAP note 1653343 oddly enough, but I don't know the respective release dates.

Loving this thread as I was a programmer once upon a time myself (outside of the SAP space entirely) and always enjoyed these little Easter eggs. When I started in the SAP world I had the impression you'd never see similar stuff in ABAP code as they took themselves far too seriously 🙂