Skip to Content
author's profile photo Michelle Crapo

Naming Standards. Does your company have them?

This one has been brought up often and Jelena's blog Are Your ABAP Guidelines Misguided? - sort of links into it I'm curious. Who uses naming standards, why?

I'll start...

We really don't. I use lv_ in enhancements. Simply because I don't want to use a variable that is already being used. So I'd be interested to hear if you have them.

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


  • Apr 28 at 03:45 PM

    Every single day I have a meeting with my company's lead developer, and we agree about everything: guidelines, naming convention, which shirt to wear...

    I plan to expand that meeting to every developer in my company, but I'm still trying to develop another personality.
    Jokes aside, No. I've had enough naming standards in my whole career to know they suck. Ok, not to know, but to believe they do.

    My goal is to be able to tell with a single sight what my programs do. So in them I use descriptive names, without any prefixes. For objects, I do the typical ZCL_ ZPP_ things, but just common sense.

    I always have in my browser the github for clean ABAP (though I don't read it from a long time) to be able I keep those things on mind.

    • Apr 28 at 05:10 PM

      :) I'm rolling on the floor laughing. Which shirt? I just assumed you were sleeping at work so it's the same shirt every day. Rinse out in the sink and you are ready to go.

      Interesting - the first person to reply doesn't have them either. I have had them in the past.

      • Apr 29 at 07:24 AM

        Yeah, sometimes I am sleeping at work, but just because I'm too tired after breakfast or lunch.

        I joined my company on the premise I'll decide how developments will be done, so I decide if we have naming conventions or so. It's easy been the only developer in the house, but if we'll grow enough and get a new nerd, I'll keep deciding about it.

        I've been working in too many places where they had a "best practices" or "programming guidelines" documents, and those documents were just idiotic naming convention à la hungarian. Nothing about best practices, nor guidelines, just "you will name this object this way, and all your variables will begin with..." crap.

        And every time I had to fix any program made following those, I became crazy, because the conventions were lost in the POP (parchment oriented programming), and variables like lt_vbap were global workareas for a LIPS structure, for example.

        Now I try to go full OOP, and I spend more time refactoring (my own code) than adding lines.

        It's funnier, it's smarter and it saves me time while I need to fix/modify code.

        And let's be honest, when you say "I do refactoring" people around you begins to think you are cool (probably because they do not know what does it mean).

  • Apr 30 at 11:53 AM

    Well, we have naming standards in our guidelines but basically the only ones we enforce are how programs should be named. That naming convention for example contains an "L" at a specific place in the program's name and signifies that the program only provides some list output and doesn't do any updates or reading from / writing to the file server. The "L" is therefore an indicator that no data will be changed during the program's execution. Program's flouting that rule need to be renamed.

    We also still have guidelines based on Hungarian notations but they are neither strict nor are they enforced. The only strong suggestion we have for changes in existing programs is to follow what has been used in the past (if that can even be discerned!).

    I'm trying to wean myself from using Hungarian notations but it's not all that easy if you've been using them "for ages"!



    • Apr 30 at 01:09 PM

      Program name conventions that's interesting. Instead of the area (ZOTC_*). We simply require you put all the code in the package ZOTC. If it is something special ZOTC - ZSALESCONTRACT - ZSD_SC are all package and the rest are sub-packages. It is very arbitrary. Just like naming our programs depended on the person's own understanding. Where do you put a class that is used in several different places. For me, I put it in a package ZGEN. But it could be argued that it is a class for something in sales or even to keep things together when a package is creating and all the development is going there.

      Do we enforce it? Of course not. ;) That wouldn't be any fun.

      Totally agree with you on the Hungarian notations. For my personal programs, a lot of the time I do use them. They are just habit. But I think that's OK. It's a part of my "style". When it is in an enhancement it's saved me a couple of times.

      • May 03 at 06:57 AM

        If the hungarian saved you in enhancements, may be because you use "table" naming variables, like lt_lips... If you change your mindset and begin to use names like deliveries, you will have no need to be saved by hungarians.
        (I have nothing against hungarian people, I'm sure they are decent people... except for the guy who invented that notation)

        • May 03 at 11:46 AM

          Agreed. If I had named them something like deliveries I should have been fine.

          But it is a hard habit to change. It is getting easier with CDS views - I am now trying to name things as they are. No more EKKO-EBELN but instead PurchaseContract. With that - I have to do the same thing in my program to make it flow correctly. So things are slowly getting easier for me. Because it is a minor change - I haven't forced myself to do it.

          Since your comment made me wonder who did invent that notation. I did a quick search. I did find a blog that Ralf Wenzel wrote back in 2015. It's interesting to read the comments.

          • May 03 at 01:25 PM

            I've just finished to read it... I almost laughed at

            Hey, we’re Software Developers! We are the one, who permanently have to question the things we do. Yesterday, we did procedural software development, today our whole world is object oriented.

            Let's be honest: most of ABAPers are not developers, but crocodiles. The mammal known as ABAPosaurus Rex is comfortable with things like TABLES, OCCURS and WITH HEADER LINEs and they think that things like OOP, refactoring or just "thinking" are just weird things nerds do to make their work harder.

            It's curious how a mammal can have a dinosaur name and a reptile attitude...

            I wrote about crocodiles a couple of times talking about work... first one in a personal blog I don't have anymore, and in a LinkedIn article...

            (please mods, remove if it seems self-promotion, I'm not trying to find a new job nor to sell anything)

  • May 08 at 12:20 AM

    I have been working in the design and build of SAP Applications and I have successfully completed many SAP projects. Contrary to popular belief, each project had different naming standards. Some use module name, type of Object at the beginning of Data Dictionary Objects and some at the last. Some use ls while others use wa for local work areas. Keeping track of all these is a cumbersome task.

    So things get tougher for me and I am sure the feeling is universal.

    Another problem comes when we use abbreviation to avoid typing a long name. Other programmers reading our code will not be that familiar with these abbreviations. Names should be informative but sometimes a very long name also will not be able to convey what it is supposed to do. What shall be done now?

    • 6 days ago

      That's an interesting thought - abbreviations that mean nothing to you. I've been there. Read some and thought really - what is this and then had to do a bit more work. Honestly I do use abbreviations. However, how many naming standards cover company wide abbreviations? Usually it LT_, GT_, etc. The start of your name. So that wouldn't have helped me.

      Yes, I ran into that issue when working as a consultant - completely forgot about it. Some companies used different naming conventions. It was hard to get used to the first couple of days. I ended up doing a lot of search/replace in my code.

  • 6 days ago

    We have some.. but it's in my eyes most of it is a relict of old times and only for those important which are long time developers.

    Of course, some sort of naming is necessary to give products a namespace. but everything else is more or less just a border, because you want to have borders...

    Me personally would have guidelines, which won't have more than 3 pages... everything longer is still some of those documents, nobody really remember.

    But to answer the question, yes, ours is a little longer :-)

    • 6 days ago

      They always get too long for me. Interesting another that does have naming conventions. I like it. Have you found that they have helped?

  • 4 days ago

    We have one development standard.

    Do no harm

    • 4 days ago

      Mmmmm.... What happens when they inevitably do cause harm? I have a picture of you taking a road trip to go hunt them down. Now once you track them down... I never saw the baseball bat in your trunk.

      • 4 days ago

        I have a picture of you taking a road trip to go hunt them down

        There's only five of us, and we know where each other lives, so that keeps us in line.

        I do remember at one PM meeting years ago, explaining that we'd found what was causing an issue and who had caused it. The culprit was taken out...

        <curtain closes, gunshot off-stage>

        Scene 2.

        DEVLEAD - We need another developer.

  • Add a comment
    10|10000 characters needed characters exceeded