on 2011 May 19 1:23 PM
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
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.