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

Coded humor

Lukas_Weigelt
Active Contributor
0 Likes
14,308

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
Former Member
0 Likes

I forgot which program it was where i copied this piece of comment, but it made me laugh!


*&---------------------------------------------------------------------*
*& Report  ZPSD_INTERFACE_GAS_003
*&
*&---------------------------------------------------------------------*
*###################################################################*
*#-----------------------------------------------------------------#*
*#      |\\/\\//\|        -----------------------------------      #*
*#      |        |       /  Report:                          \     #*
*#      |  (*) (*)      /   ZPSD_INTERFACE_GAS_003            \    #*
*#      |       __)    /    Version:   1.0 (2011-06-21)        \   #*
*#     (C    _____\   /     generated on 20110621 150151        \  #*
*#       \  (__(   --{-------------------------------------------} #*
*#       |    /       \     By:                                 /  #*
*#       /====\        \    INFDVH                             /   #*
*#      /     o\        \   Dwang - adresgegevens wijzigen    /    #*
*#     /       o\        \          vanuit planon            /     #*
*#    /         o\        \                                 /      #*
*#   /           o\        --------------------------------        #*
*#-----------------------------------------------------------------#*
*###################################################################*

Regards,

Dirk.

Former Member
0 Likes

&----


*& Report YISU_DEV_CLEAR_ALL

*&

&----


  • Pointy haired boss let me down

  • I H8 me JOB

RAISE NO_NEED_TO_WORK.

Lukas_Weigelt
Active Contributor
0 Likes

Both no standard reports, still funny though

"DEV_CLEAR_ALL" sounds dangerous... lol

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes

Hey Guys,

I found this "gem" in the famous PNPCE LDB

* *********************************************************************
* Type-Pool for DYNAMIC SELECTIONS
* *********************************************************************
* must be declared here (not in TOP-Include) because we need it for
* select-options (pnpdynse & pnpdynsr); declaration in TOP-Include
* would be too late! - don't know why...

If SAP doesn't know "why" who does?

Cheers,

Suhas

Former Member
0 Likes

You don't know what a TOP include is? Shame on you!

Lukas_Weigelt
Active Contributor
0 Likes

FITV_FMP

METHOD onevent_mca_change .
  DATA lo_controller_api TYPE REF TO if_wd_view_controller.
  lo_controller_api = wd_this->wd_get_api( ).

* Note: No influence on focus :(
*  "Refresh view
*  wd_this->fire_refresh_plg( ).

;(

Lukas_Weigelt
Active Contributor
0 Likes
method _If_Wdr_Internal_Api~get_Assist_Instance.
*===============================================
  data:
    cref_Ctlr  type ref to object.
  field-symbols:
    <wd_Assist>   type data.

  cref_Ctlr = f_Ctlr_Inst->Component->get_Delegate( ).

  " !!! THIS DEPENDS ON THE GENERATION TEMPLATES !!!
  " nice and breezy and yuk a little bit of horroshow
  assign cref_Ctlr->('F_ASSIST') to <wd_Assist>.
  if ( <wd_Assist> is assigned and <wd_Assist> is bound ).
    Result = <wd_Assist>.
  endif.
endmethod.
Lukas_Weigelt
Active Contributor
0 Likes
lri_Tom_0->ADD_CHILD( lri_Tom_10 ).

  CL_WD_GRID_LAYOUT=>new_grid_layout(
    Container = lri_Tom_0
    cell_padding = `0`
    cell_spacing = `0`
    col_count = `1`
    stretched_horizontally = Abap_True
    stretched_vertically = Abap_False
  ).


* uff we are thru
  Result = lri_Tom_0.
endmethod.

Relieving words of a developer after coding about 2k lines of generic context/UI-Elements in WD4A.

Former Member
0 Likes

I dont remember where I took this from, I know I was doing some work for DSD, but here is the screenshoot I took:

http://a2.sphotos.ak.fbcdn.net/hphotos-ak-ash2/38810_423746673317_551018317_4889825_6644883_n.jpg

Former Member
0 Likes

Was it in a "global" user exit?

Cheers,

Julius

Lukas_Weigelt
Active Contributor
0 Likes

More tragic than funny:

PTRA_UTIL_EXPENSE_REPORT_NEW

* 'R' (Lesen) wird aus historischen Gründen benutzt, da es in der TRIP
* (Reiseantrag) genauso ist...
    l_authc = 'R'.

Translation: " Used for historical reasons, since the same is done in TRIP (Travel Request) ... "

Former Member
0 Likes

Guest.

Edited by: A. Povitz on Feb 7, 2012 11:35 PM

Lukas_Weigelt
Active Contributor
0 Likes

'bout time I found another one:

Thanks @ whoever coded this. Made my day

MP56TITS.

FORM its_ping USING p_return  TYPE i.
  STATICS:
    l_service(10)    TYPE c,
    l_dynnr          TYPE sydynnr.
  DATA:
    l_context_length TYPE i VALUE 0,
    BEGIN OF l_value_table OCCURS 1,
      fieldname(30)    TYPE c,
      fieldindex(8)    TYPE n,
      fieldcont(255)   TYPE c,
    END OF l_value_table.

  IF l_dynnr IS INITIAL.
    l_dynnr = sy-dynnr.
  ELSE.
    IF l_dynnr = sy-dynnr    AND
       l_service NE 'HAMLET' AND
       l_service NE 'JULIA'.
      CLEAR l_service.
    ENDIF.
  ENDIF.
  IF l_service IS INITIAL.
* Get the value from ITS
    CALL FUNCTION 'ITS_PING'
      EXCEPTIONS
        its_not_available = 1.
    IF sy-subrc = 0.
* There is an ITS
      field-get 'PTK_SEIN_ODER_NICHT_SEIN' 1
                l_value_table l_context_length.
      LOOP AT l_value_table.
        l_service = l_value_table-fieldname.
      ENDLOOP.
      IF l_service = 'HAMLET'.
* The ITS executes the templatebased PR05
      ELSEIF l_service = 'MACBETH'.
* The ITS executes the templatebased TP03 WML
      ELSE.
* The ITS executes _NOT_ the templatebased PR05
        l_service = 'ROMEO'.
      ENDIF.
    ELSE.
* There is no ITS involved
      l_service = 'JULIA'.
    ENDIF.
  ENDIF.
* Return the value
  CASE l_service.
    WHEN 'HAMLET'.
* PR05 on ITS via template
      p_return = 2.
    WHEN 'MACBETH'.
* TP03 on ITS via WML template
      p_return = 4.
    WHEN 'ROMEO'.
* Something else is on the ITS processing this coding
      p_return = 3.
    WHEN 'JULIA'.
* Boring normal GUI calls this coding
      p_return = 1.
    WHEN OTHERS.
* It isn't detected till now what kind of frontend this routine calls
      p_return = 0.
  ENDCASE.
ENDFORM.

ThomasZloch
Active Contributor
0 Likes

The name of this include is quite funny, too!

Thomas

kesavadas_thekkillath
Active Contributor
0 Likes

Hi Thomas,

Thanks for pointing it out 😜 ... I enjoyed it

Kesav

Lukas_Weigelt
Active Contributor
0 Likes

IF sy-subrc >= 2.
* Wenn wir unsere eigenen Bausteine nicht richtig aufrufen können,
* dann haben wir einen Dump verdient.
     MESSAGE ID sy-msgid TYPE 'X' NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
   ENDIF.
*741i-

   IF sy-subrc = 0.

Haha . This is what keeps me motivated while debugging several dozens of levels into the callstack.

"If we aren't able to call our very own Modules the right way, then we deserve a dump". God bless you, whoever you are

LSZA0F34

Lukas_Weigelt
Active Contributor
0 Likes

bump.

ThomasZloch
Active Contributor
0 Likes

Isn't this one quite common? You start with a return code 0 ("assuming OK"), and further down change it to <> 0 based on circumstances. I also see this in user exits for FI validations, you assume TRUE until you reach a FALSE condition, or vice versa.

Don't want to drag you down though


Thomas

Lukas_Weigelt
Active Contributor
0 Likes

Yes it's quite common. Either doing that or doing it the other way around as you said. Still the comment "assume everything is ok" IMHO makes it kinda funny, because why would anyone comment this approach at all? It's like starting with ret_value = 8, and commenting it with "assume everything will go horribly wrong"

ThomasZloch
Active Contributor
0 Likes

At my current client there is one developer who loves leaving funny comments along the lines of your second version, example from a method setting icons based on return codes: (sorry, available in German only)

* --- wir sind schon blau ... ähm rot - schlimmer geht's nimmer

...

* --- wir sind eben erst rot geworden oder schon gelb gewesen

*     schlimmer geht's auch hier nimmer

...

* --- vielleicht waren wir vorher was anderes außer rot oder gelb

*     werden aber jetzt gelb

...

* --- na ja hier ist's dann nur noch schön oder farblos

Always a good laugh, and I keep finding more...

Thomas

Steffi_Warnecke
Active Contributor
0 Likes

Well, at least it's not boring. *g* Comments like this never come up, when I stare at code. Sadly. But now I'm kind of fixed on the idea to look through some older abap programs to see, if I can find stuff like that in there, too.

As long as there is nothing in there like "Fingers crossed" or "This works... most of the time."

ThomasZloch
Active Contributor
0 Likes

Good luck, Mrs. Alertcorner!

Former Member
0 Likes

I love these threads but they hurt to be honest, because we create applications which are licensed. That means we cannot add such "Call Helmut on extention 1234 if it does not work" or "Druf geschiss, da Sau hat 'ne dump verdient im echt" etc handling in the code, despite it being very tempting as my humour regularly gets me into trouble on SCN!

SAP and customer developers have it good...  😉

Cheers,

Julius

Steffi_Warnecke
Active Contributor
0 Likes

What? Mrs. Alertcorner?!


Call Helmut on extention 1234 if it does not work

Ahahaha! This would get me into coding more, I swear.

Since I just do little stuff, I could get away with comments like that. ^^ We have a lot of helpful little apps just for us admins, so there would be room for fun like this (as long as it's still helpful).

And when I look at the easter eggs one can find in software from well known vendors, I don't think all developers of licensed stuff thinks like you, Julius. *g*

ThomasZloch
Active Contributor
0 Likes

It's nothing, just my silly self translating surnames, ask Mr. Abrechnungschinken.

Grüßle

Thomas

Steffi_Warnecke
Active Contributor
0 Likes

Ah! I would have understood Warningedge better, I guess. So you were the one with "Abrechnungsschinken?" I loved that one. ^^

ThomasZloch
Active Contributor
0 Likes

Well, I did not want to repeat "warn", so looking for a different word. Regarding the Schinken, I just looked it up, it was who came up with it.

Thomas

P.S. great thread, boy were we bored back then

Steffi_Warnecke
Active Contributor
0 Likes
Well, I did not want to repeat "warn", so looking for a different word. 

The mighty thesaurus has hid again! I think "Alertcorner" is definitly easier to say as "Warningedge". And it looks cooler, too.

That thread... wow!

rainer_hbenthal
Active Contributor
0 Likes

Well, you must be really bored looking this up

rosenberg_eitan
Active Contributor
0 Likes

Hi,

I think I will "Alert Moderator"........

Regards

Former Member
0 Likes

wijzigen sounds like "witzig" (meaning funny) - a secret hint?