avatar image

Share your "ABAP gore"

There is a sub on Reddit called Techsupport gore where people share pictures and stories of some horrific things they see done with technology.

I've been looking at some old programs lately and see lots of stuff that would qualify as "ABAP gore". :) So I thought it might be therapeutic and educational to post some examples on SCN (examples to follow in the comments).

* Please Login or Register to Comment on or Follow discussions.


  • Apr 23, 2018 at 05:50 PM

    "Oh well, I hope these comments compensate for my non-descriptive variable names":

    scn.jpg (17.7 kB)
    • Apr 25, 2018 at 02:14 PM
      Looks like you kind of gave up at "Printer speed" and especially "Speed type".

      And I just love how - out of nowhere - there is "v_brand". Did someone else add that one? :D

      • Apr 25, 2018 at 02:34 PM

        LOL. I thought so too but it seems to be from the same version. It looks as if the person doing this was either under influence or had some health problem and were sort of going in and out of conscious state. They misspelled "processor" in the 2nd line, then copy-pasted "printer speed" then suddenly woke up: "huh? what just happened? where am I? v_b... BRAND! BRAND!".

        Also "speed type" reminded me of Spaceballs: "ludicrous speed". Good times. :)

        • Apr 25, 2018 at 03:49 PM

          I didn't even catch the double "Printer speed" comment! Now we will never know, what "v_prsb" is used for. ;(

        • May 03, 2018 at 12:05 PM

          Yeah, that's why not to trust comments :-)

    • Apr 30, 2018 at 08:13 PM

      The Zodiac killer strikes again!

      I'm wondering if they meant "monitor" instead of "screen" but then forgot the word. Or, considering this is written around 2000, maybe they thought end of days is coming or something.

      scn.jpg (20.0 kB)
  • Apr 23, 2018 at 05:53 PM

    For the bonus points: these are not actually used anywhere in the program but even before they were commented out they were used exactly one time.

    scn2.jpg (18.5 kB)
    • Apr 24, 2018 at 10:08 AM

      Actually, I can relate to this: rules say "never use a literal, always use a constant instead".

      For long years, in nearly every report, I (and I think others as well) define

      gc_x type c value 'X'.

      ...until at some point, I realizes I could now just use abap_true instead.

      • Apr 24, 2018 at 03:05 PM

        That rule makes sense only if the constant is named properly. E.g. just the other day I had to look up VBFA with J (=delivery) document type. So I created c_delivery constant. Even though I used it once, this made the code more clear, I believe.

        Also I take your gc_x and raise you gc_space. Apparently no one have heard about the space variable either. :)

    • May 01, 2018 at 10:17 AM

      This is a classic, I've seen it so often in previous engagements. It was often the result of blind adherence to programming standards, where either or both of these conditions existed:

      - the programming standards weren't good enough to explain when and when not to use which rules

      - the adherence was applied with a complete lack of common sense

      What was worse was that in some cases the constants like this had been edited, so you ended up with something like this (see arrow)!

        c_10(2) value '10',
        c_20(2) value '25',      <---- !
        c_30(2) value '30',
  • Apr 24, 2018 at 08:16 AM

    Why use the correct company code in FBL3N BTE? Just read the first thing you find (and i do not want to speak about how it has been written)

    no-bukrs.png (16.5 kB)
    • Apr 24, 2018 at 03:08 PM

      Haha, who cares about the company code!

      I also love SELECT from language specific table but without specifying a language. Sure, it works fine when you have just one language in the system but then the big bosses decide to open an outfit in Mexico and suddenly a customer in Ohio gets an invoice with Spanish descriptions. :)

      • Apr 26, 2018 at 07:01 AM

        Oh, sadly i already fixed those, but i found in the same BTE those kind of checks.

    • May 03, 2018 at 12:13 PM

      I have seen variants like this. Why read random first, when you can read random last :D ;-(

      SELECT * FROM knb1 into wa_knb1 WHERE kunnr = i_kunnr.
      IF sy-subrc = 0.
        "do something with wa_knb1...
      • May 03, 2018 at 12:17 PM

        Well, when i was young, blonde, rebel and handsome, i found a code like this from the collegue who should to unveil me the mysteries of ABAP

        SELECT * FROM <table> WHERE <condition>.
        CHECK sy-subrc = 0.
        <do stuff>
        • May 03, 2018 at 01:36 PM

          You can never be to sure about the subrc :)

  • Apr 24, 2018 at 08:18 AM

    And one of my fav, same BTE

    if.png (10.3 kB)
  • Apr 28, 2018 at 06:49 AM

    Doubtless many have seen countless of these:

    IF sy-subrc <> 0. 


    CATCH cx_root.
    • Apr 30, 2018 at 02:33 PM

      Not even "todo", just "Implement suitable error handling..." or whatever text comes when you use the Pattern button.

      • Apr 30, 2018 at 04:24 PM

        Dunno, to me an old todo is worse. A "todo" comment means someone has engaged brain and decided this is a valid gap. Many a bug has been traced to one of these.

  • Apr 28, 2018 at 06:51 AM

    One of my all-time favourites:

    METHOD return_sy_datum.
      data: lv_date type sy-datum. 
      lv_date = sy-datum. 
      rv_date = lv_date. 
  • Apr 30, 2018 at 02:38 PM

    ABAP equivalent of "Honey, the cat threw up again! I'll just put a paper towel here. Gotta run, bye-e!" :)

    scn.jpg (24.3 kB)
    • May 03, 2018 at 12:21 PM

      Oh no, the "we don't have Materials in this format" is a clear hint of a nice practice of COPY-AND-PASTE a code from another customer's system and then... forget!

      Like a test on a company code not even in the system...

  • May 02, 2018 at 09:24 AM

    A "simple" method named "START_OF_SELECTION" with just 366 rows of code and thise structure.
    The method is defined in a Global Class, used in just one report, report which is used to create the selection screen and pass to this class the select options.
    Someone needs to learn how to use OOP and to structure code....

    Oh, wait!
    It's the same person, our consultants' technical reference, saying that "Code's quality is matter of opinion, there is no strict rule" when i started to reject their code (Sadly i'm finding these monsters here and there)

    why-me.png (10.7 kB)
    • May 02, 2018 at 08:36 PM

      They must have gone to the same ABAP school as our former consultants. :( Some kind of a nested IF addiction is sweeping the nation. I don't have the screenshots anymore but used to see up to 10 nested IFs in some places. How would you even read your own code? That's what I don't understand...

      Gotta love massive CLEAR list too. This is just a tip of the iceberg, there are 8 of those "prodsets", takes full screen on my laptop:

      scn.jpg (21.2 kB)
    • May 25, 2018 at 11:48 AM

      "It's the same person, our consultants' technical reference, saying that "Code's quality is matter of opinion, there is no strict rule" when i started to reject their code (Sadly i'm finding these monsters here and there)"

      Of course it's a matter of opinion. And I'm of the opinion that if you don't fix it, that the carpark is awfully dark. It would be awful if an accident were to happen.

  • May 02, 2018 at 12:17 PM

    We are at the 14th! level of nested structure in a more than 1000 lines long SD user-exit. This coding passage repeated around 5 times. By the way, not a single line of comment.

    And they asked to fix the problem quickly... :D

    exit.jpg (109.4 kB)
    • May 02, 2018 at 01:10 PM

      We share the pain!
      (perfect meme follows)

      2018-05-02.png (343.4 kB)
    • May 02, 2018 at 08:49 PM

      Could be one of those cases when a functional spec is translated into code quite literally. Once we had a consultant write a user exit and the spec had several steps like "check this condition... if so, do X". All those steps were performed with the entries in an internal table (the spec did not go into the implementation details). But instead of using a LOOP, the consultant literally put a bunch of READ... IF... there.

      P.S. Wait, are they actually updating document flow (VBFA) in that user exit? 8-[ ]

  • May 03, 2018 at 12:31 PM

    Space catalog anyone?

    screen.png (26.6 kB)
    • May 03, 2018 at 02:32 PM

      Reminds me of colleagues that use "space" instead of "tab" in Word to structure texts. *shudders*

    • May 03, 2018 at 03:37 PM

      Yep, again same ABAP school as our former consultants. I suspect there is a copy of an ALV report that just gets passed from one consultant to another since 2000 and they all feel this is bees knees.

  • May 07, 2018 at 08:07 PM

    Declare a dozen of useless variables but then write into an sy-... one? Well, it's there, so might as well use it, why not:

    scn.jpg (16.0 kB)
  • May 07, 2018 at 08:10 PM

    From the "mildly infuriating" department. :)

    scn.jpg (23.3 kB)
  • May 10, 2018 at 10:09 AM

    Not sure whether it qualifies as 'ABAP gore' but here it goes.

    A functional consultant asked me to check a custom-made report as it didn't work as supposed: a dozen radion buttons on the selection screen didn't give the expected result.

    Turned out not one single radio button was processed in the report!!!

    In the end i had to rewrite the report. :(

    • May 14, 2018 at 06:33 PM

      Classic! Haha! :) Have to admit I've been guilty of writing all the code for the buttons but then forgetting to actually call it. :) This was caught in QA though, fortunately.

  • May 15, 2018 at 04:03 PM

    Wondering if this was written on a dare to use every possible way of variable declaration (pre-7.4) in one structure. Readability be damned.

    scn.jpg (14.5 kB)
    • May 16, 2018 at 08:31 AM

      but it does give a summary of the field declaration... so at least the name of the internal table is well chosen :)

  • May 16, 2018 at 09:21 AM

    I don't even want to talk of the code itself.

    capture.png (28.6 kB)
    • May 16, 2018 at 12:05 PM

      Pretty Printer... such mistery tool.

      • May 16, 2018 at 12:12 PM

        And so new...

      • May 25, 2018 at 11:51 AM

        I instructed a developer who changed a small part of something I'd written that since I'd made the program nicely formatted, it was matter of courtesy that he should do the same.

        The car park is awfully dark....

  • May 18, 2018 at 08:01 AM

    Me: Dear consultant-that-i-pay-too-much, i cannot see the required OSS Note installed on our system.

    C-T-I-P-T-M : Oh the note has just manual operations, so i applied them without installing the note: should i install the note and mark as done?

    Me: have you any other idea than that to keep track of which note is installed in our system otherwise?

    C-T-I-P-T-M : i installed the note

  • May 23, 2018 at 08:07 PM

    Can you help me? I don't understand why i'm getting a dump.

      IF e_cabecera-persl IS NOT INITIAL.
        t_detalle-persl = e_cabecera-persl.
        MODIFY t_detalle TRANSPORTING persl
         WHERE persl IS INITIAL
            OR persl IS NOT INITIAL.
  • May 25, 2018 at 11:52 AM

    This discussion is not good for my blood pressure...

  • May 25, 2018 at 04:41 PM

    Warning: this one may be dangerous for people with heart conditions. :)

    Let me set the stage for you here. I'm looking at a 20k line program. The author defined variable L_RC (type I) in a routine (a SY-SUBRCesque flag). They are then calling multiple other subroutines with USING l_rc and are actually changing l_rc (same name everywhere too) in those subroutines.

    This is the second hour of me going down the rabbit hole and I haven't hit the bottom yet. It is already 4 or 5 subroutines down and keeps going. If I don't make it out alive - it was nice knowing y'all!

    scn.jpg (41.3 kB)
    • Jun 12, 2018 at 09:38 AM

      Well those 'class', 'method' and 'exception' thingies are way too modern anyway :-P

  • Jun 01, 2018 at 04:04 PM

    "Constants defined, boss!"

    scn.jpg (19.3 kB)
  • Jun 08, 2018 at 07:10 AM

    Arrghh ... This is the first thing i see here in the morning! Pure evil this! :D

  • Jun 12, 2018 at 07:02 PM

    "No idea what I'm doing here but one of these should do the trick, I guess."

    scn.jpg (12.3 kB)
    • Jun 15, 2018 at 03:07 PM

      To be sure to be sure!.

      And just in case it doesn't work I'll add a comment so people know what I want, what I really really want.

  • Jun 15, 2018 at 06:32 AM

    Not Optimal

    endselect.jpg (37.6 kB)
  • Jun 16, 2018 at 04:42 AM

    You know how you shouldn't use INCLUDEs for modularisation. And you shouldn't use Macros?

    Just found an include that's included in multiple methods in multiple classes, which contains 3 complex macros. And in most of the methods where the include is included don't even use the macros.

  • Jun 18, 2018 at 09:12 AM

    Fine example of comments telling lies. Message 366 does start with the word "warning" I will grant you that. I also like the variable that has SH for ship-to and AG for customer in it. A fine mix of English and German abbreivations.

  • Jun 28, 2018 at 02:24 PM

    At first, every line is narrated in the comments:

    But then out of the blue stuff like this starts and there is not a single comment, no documentation and no explanation of what's the significance of those values:

    Face palm.

    scn.jpg (34.9 kB)
    scn1.jpg (35.5 kB)
  • Jul 03, 2018 at 01:25 PM

    Please, focus on WA_SSOZ: is it just me seeing a little problem with a possible endless loop?

    Performances are another issue but, well, in this case it's the last of the problem

    And i wonder if RANGE_DATA will work this way.... something i doubt.

    1.png (28.9 kB)
    2.png (19.5 kB)
    • Jul 03, 2018 at 04:20 PM

      Suddenly, this makes me feel a bit better about our system. :) Yikes!

  • Jul 03, 2018 at 01:27 PM

    Not happy about the previous post,in 8 lines find the 2 monster errors

    image.png (19.2 kB)
    image.png (19.2 kB)
    • Jul 03, 2018 at 04:17 PM

      That just doesn't make any sense... "Oh, I didn't find the company address, so lemme just grab a random one" ?

      Someone had too much wine with lunch, I think. :)

      • Jul 04, 2018 at 06:31 AM

        And notice that P_BUKRS is a select option so, even if i find a company address, it's one over N!

        • Jul 04, 2018 at 09:06 AM

          Well, at least it is a valid address for someone ;-)

          That point must have been for sure in the specifications....

  • Jul 10, 2018 at 02:54 PM

    "Since I assigned 0 above..... Do not check Return". Ugh.

    scn.jpg (20.5 kB)
    • Aug 28, 2018 at 01:15 PM

      The irony is that the commentary is more typing than a simple if sy-subrc ... l_apc = 0.

  • Jul 11, 2018 at 06:23 PM

    Forget about the fact that we are still using SAPScript in 2018 but there are 3 pages of this stuff for what looks like half of the alphabet:

    scn.jpg (44.8 kB)
    • Jul 12, 2018 at 07:04 AM

      Just a note: SAP doesn't provide smartforms for everything.

      Last example i worked on is the cheques' print and, in my 731, i have only sapscript

      • Jul 23, 2018 at 07:21 PM

        Yes, you're right. SAP loves to yell at us to use new tech but then they just don't offer it. :) FI module is notoriously underserved by Smart Forms or PDFs. Finding SAPScripts in SD is quite surprising though


  • Jul 30, 2018 at 01:09 PM

    OK, this isn't exactly 'ABAP gore' but it's too danged good not to share.

    I'm system debugging this morning, and oh dear lord, YAWN, but then I see this:

    Blessings upon the person who wrote it. REALLY MEAN IT.

    • Jul 30, 2018 at 03:18 PM

      So what was your next step? (Just in case you are still able to tell us...:))

      • Jul 30, 2018 at 03:23 PM

        I was so excited about the comment, I forgot to keep stepping and the debugger timed out. Read into that what you will :-)

  • Aug 02, 2018 at 11:53 AM

    I saw a short dump (TIME_OUT) in production and found this wonderful code.

    There are forty one such blocks looping over GT_TABLE2 looking for one record. GT_TABLE and GT_TABLE2 both have 50,000 records. Both are STANDARD tables. Why in the world is it timing out?

    I also think it is best practice to use names like GT_TABLE for your internal tables, just to make it obvious what sort of data the table contains. The upper/lower case formatting is pretty good as well.

  • Aug 08, 2018 at 10:22 AM

    I'm sharing this piece of code (found in LVEDBF4R due to a recent dump it caused with an incoming IDOC) not because it's typical "ABAP gore" but out of frustration regarding the back-and-forth I'm currently having via an OSS-message to possibly get it fixed by SAP (they want to close my message because the issue is no longer reproducible as we already corrected the IDOC causing it):

    *- proof the length of the order number -------------------------------*
       condense e1edk02-belnr.
       if e1edk02-belnr+10(1) ne space.
        xvbak-vbeln = '0000000000'.
     *- Auftragsnummer -----------------------------------------------------*
     *- order number -------------------------------------------------------*
                  INPUT   =  E1EDK02-BELNR
                  OUTPUT  =  XVBAK-VBELN
                  OTHERS  = 1.

    Unless I'm missing something - always a possibility - this should be quite easy to fix, shouldn't it, to actually work in more cases than the current rather limited one?

    The problematic content of field E1EDK02-BELNR was something like this "08.08.2018 some more text" when the conversion exit dumped.

    Update: shortly after posting this here, my OSS-message was forwarded to the development team. :-)

  • Aug 15, 2018 at 03:18 AM

    I like comments ...

    Found in SAP standard code, explaining how they work out what tz database values match a given Netweaver (SU01 style) timezone, prior to transfer to success factors.

    Unfortunately the code underneath, while very clean and not deserving of being mentioned here, doesn't cope well with Australian time zones. Then again, sometimes neither do I.

  • Aug 30, 2018 at 08:30 PM

    ABAP cover of Lady Gaga's Bad romance. "Rah rah ah-ah-ah!" :)

    scn.jpg (18.3 kB)
  • Sep 07, 2018 at 06:37 PM

    Going through an old program and finding this type of stuff in multiple (!) places:

    Why, oh why...

    scn.jpg (13.5 kB)
    • Dec 17, 2018 at 01:06 PM


      It shows that you have given some thought to your code logic. (supposedly), however, that breaks the 'put the most taken condition first' rule, and sits along side the 'mention all cases' rule (see thought.....) for increasing your line count per month.....


  • Oct 15, 2018 at 05:19 PM

    FM does have the exception defined with the name OTHER. FM code has just a few lines (if you don't count 2 pages of useless comments :) ) and never raises any exceptions whatsoever.


    Wondering if Extended Check did not exist in 2000 yet...

    scn.jpg (36.0 kB)
  • Oct 15, 2018 at 07:13 PM

    I love trying to change code that has been copied from a query and then changed. And don't miss my addition of the "order type"

    qery.jpg (51.3 kB)
  • Oct 16, 2018 at 08:44 AM

    If you really want to lose the will to live, have a look at standard SAP INCLUDE program RVDIREKT...

    • Oct 16, 2018 at 11:52 AM

      Jesus Christ almighty..... (ಠ_ಠ)

      It's over. You win, Paul...


    • Oct 16, 2018 at 02:34 PM

      wow... just wow.

      This thing is all over the place.You'll see c_obj_type_salesorder LIKE swotobjid-objtype VALUE 'BUS2032', but also bus_2032(7) VALUE 'BUS2032'

    • Oct 16, 2018 at 04:32 PM

      Okay, I went to look at that include. I stopped reading on line 54.

  • Oct 16, 2018 at 02:18 PM

    Hmm, is it not no or should it be yes? And what happens if it's a maybe? Questions upon questions...

    This definition within the same program is also quite interesting.

    • Oct 16, 2018 at 04:12 PM

      My understanding is that a lot of programmers write


      rather than


      beacuse that was the way you were forced to code it before version 4.0 of SAP in 1998.

      Another possibility is that they do this because they like to sound like Yoda.

      • Oct 16, 2018 at 06:35 PM

        IF NOT SOMETHING IS INITIAL style is driving me nuts. Especially if it's

        IF NOT sy-subrc IS INITIAL.
        <do stuff>
        <do other stuff>

        Well, if you use both then just start with a positive condition.

        P.S. I do not understand the way this website formats the code...

        • Oct 16, 2018 at 07:51 PM

          The only way to paste code is: first press code button then insert code in the gray line.

      • Dec 07, 2018 at 04:43 PM

        Paul, IF NOT was how I learned it back in the Dark Ages and it has taken me a while to wean myself from that habit.

        I have seen IF NOT <field> IS INITIAL [do stuff] ELSE [do other stuff] used to comply with coding standards that dictate the most common occurrence be the first leg of the conditional for performance reasons.

        Sadly, those organizations didn't mind SELECT * (but, it is in the SAP class materials.........)

        plus ça change, plus c'est la même chose

  • Dec 07, 2018 at 03:25 PM

    Just when I thought I saw everything, I came across a program where the author added space before every comma and dot. Why oh why...

    scn.jpg (38.7 kB)
    scn2.jpg (9.7 kB)
    • Dec 07, 2018 at 03:32 PM

      Perhaps they were being paid by the keystroke???

      • Dec 07, 2018 at 03:57 PM

        Quite possible. Or could be a weak attempt at a "trademark". "We are Wet Bandits!" (c) Home Alone. :)

    • Dec 07, 2018 at 04:41 PM

      "Space Oddity"

  • Dec 13, 2018 at 03:54 PM


    scn.png (10.4 kB)
    • Dec 16, 2018 at 09:13 AM

      I share your pain, who was that rude person who spoilt 912?!??!

      • Dec 17, 2018 at 10:35 AM

        That's not what I was sobbing about - it is the constant names.......

        • Dec 21, 2018 at 04:02 PM

          I got that. It was a joke, perhaps a bit too oblique ;-)

  • Dec 13, 2018 at 04:40 PM

    The ****** who edited one of my programs, but couldn't be bothered to pretty print it. Most discourteous.

  • Dec 17, 2018 at 01:11 PM

    Here is all the gore you could ever want (and it's all SAP related)......

    As an example.... an extract:

    *... send a cute message while the sand glass is running. 
    *... The user should not die of boredom when response times are bad. 


    • Dec 17, 2018 at 07:22 PM

      funny, funny stuff ! I especially love the function module exception 'crap_input' and "RAISING s***_happened".

      thanks for sharing !

  • Dec 26, 2018 at 02:55 PM





    ififififiififif.jpg (121.6 kB)
  • Jan 14 at 06:08 AM

    I checked the old programs and found this :)

    abapgore.jpg (8.1 kB)
  • Jan 14 at 08:59 PM

    [Voice of an HGTV show host] Important comment is spray-painted to breath new life into the old ABAP command. And asterisks in an empty line add pizazz to the otherwise boring report. :)

    scn.jpg (16.1 kB)
  • Jan 17 at 07:47 AM

    7.50 program developed in the last 3 months.

      PERFORM checks.
    FORM checks.
    ...more then 4000 lines later.
    • Jan 18 at 07:09 PM

      Hm, it's odd they missed a chance to create lcl_checks with one 4000 line method main() and then claim "ABAP OOP experience" on the resume. :)

      • Jan 20 at 09:09 AM

        Oh, that can be done, because the program uses an ALV and has some local event handlers... sadly defined in the wrong place of the Function Module...

      • Jan 23 at 01:27 PM

        Shhhht... i saw that, i totally saw that and I still have nightmares.

  • Feb 08 at 04:24 PM

    ABAP rant. :) Funny thing: this is most likely written by a person who hasn't learned anything new since 1980s, judging by his own code.

    scn.jpg (38.8 kB)
  • Feb 08 at 07:46 PM

    "...aaaand once again for the cheap seats!" :) It's already cleared but just to be completely sure let's put spaces there. (Internal table with header line, of course.)

    scn.jpg (32.5 kB)
    • Feb 11 at 01:52 PM

      Jelena, it is either the "braces and belt" programming method or the "just in case the computer didn't hear me the first time........." coding paradigm. :)

      (Or the American tourist overseas who just says the same thing again only slower when the non-English speaker doesn't understand.)

      • Feb 11 at 04:44 PM

        Or you forgot the English man abroad speaking to the non-english speaker------ he thinks the louder you shout the easier it is to understand.....

        btw... BELT AND BRACES...... you understand ????? I SAID BELT AND BRACES NOT BRACES AND BELT!!!! :-)

  • Feb 25 at 01:46 PM

    The programmer failed choosing his profession - should be a storyteller instead

    selection.jpg (123.6 kB)
    • Feb 25 at 04:56 PM

      Hm, not sure I'd like to read a story of this writer, either... – just imagine all the explicit hints to what details of the story are relevant ("hey, don't overlook them!")..:)

    • Feb 25 at 05:46 PM

      Some major checkbox addiction there. :)

      • Mar 22 at 02:49 PM

        Especially considering the middle bit. Translation of

        "von den folgenden Funktionen n u r e i n e: ..."

        "from the following functions o n l y o n e: 1 or 2 or 3"

        I hear there are them newfangly things called radiobuttons...

        • Mar 22 at 05:31 PM

          Yep, that dialog must have been designed long before broadcast was established in Germany:)

          I also like those hints "Ohne Anklicken geht nichts !""Without checking [the box] nothing will happen !"

          Guess it would be quite funny to test the overall behaviour (unless one has to support that application, apparently...).

  • Mar 04 at 01:00 PM

    Here is my one for today.

    • Mar 04 at 07:42 PM

      And I bet later in the code there is MESSAGE Z1(999) WITH lv_symsgv and in SE91 the message is maintained as "& & & &". :)

      • Mar 05 at 07:01 AM

        Funny you should say that....

        • Mar 05 at 08:50 AM

          So I have to assume Jelena wrote that err knows that code? :)

          • Mar 05 at 03:06 PM

            Well, I've seen very similar things in SAP systems I worked with. I bet the origins of all such code can be traced back to a single source. Someone must have started it and others just copied. It's like a virus. :)

            • Mar 05 at 04:18 PM

              I wouldn't be surprised to discover the origin in some obscure "Best Practice" lost in the mists of past ages and secretly passed from consultant to consultant, like an elitist rite to capture the customers' souls!

  • Mar 22 at 06:36 AM

    Found by Bärbel Winkler


    if sy-msgid is not initial and sy-msgno is not initial.
       message id sy-msgid type 'E' number sy-msgno
             with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
             raising badi_execution_failure.
       message e653(tk) raising badi_execution_failure.

    '000' is a valid SY-MSGNO. '000' = INITIAL.


  • Apr 11 at 09:11 PM

    This is the first time I'm seeing such warning. Quite amazing EC actually checks for this specifically. I guess it happens more frequently than I want to believe. :)

    scn.jpg (51.7 kB)
  • 4 days ago

    Here is a lovely combination of hard coding and fragility. The GCR_SHOW_PRICE is filled from a customising table, and the third entry in that table is value N000.

    So if someone changes the customising they have no idea the program will break.

    And if the read fails, I presume the VBKD-ZTERM will be blanked out.

    Also if you wanted to change the payment term to something other than N000 then the name of the routine would be even more nonsensical than it is at the moment.

    • 4 days ago

      I read/imagined the name of the attachment/pic with the voice of Darth Vader... so thanks for that. :D

  • 4 days ago

    Not pure coding, but I just lost the few hair still covered my head hearing a collegue's answer when I kindly suggested he should start using OOP and organizing code instead of just throwing it down for 2000 rows.

    Oh, now it's important it works, then i'll fix and organize it...
    • 3 days ago

      No time to do it right, but plenty of time to go back and change it later - gotta love it. And how do we explain this new transport after it had been through test and delivery?

      Of course your colleague is keeping track of all these items to go back and correct.

      Or not - which is FAR more likely, of course.

  • Add comment
    10|10000 characters needed characters exceeded

Skip to Content