"
Supported by

ABAP, the lobotomizer

João studies Computer Science at his College where he learns Java, polymorphism, encapsulation and a lot of other programming techniques and best practices. When he graduates, he decides to join a company to work in SAP. At the introduction training which his new company offers, the first thing he learns is how to make a program in ABAP. Here’s how they teach it:

“Go to transaction SE38, create program ZJOAO and then create includes ZJOAO_TOP, ZJOAO_FRM and ZJOAO_SEL. You declare all variables in _TOP, the selection screen you put in _SEL and all the FORMS must go into _FRM. Then write START-OF-SELECTION and under that put all the SELECTs and finally write END-OF-SELECTION and there you show the results in an ALV. It’s that simple. Welcome to ABAP.”

Finally João is ready to start working in a real customer. Once he’s there, he realises that, indeed, almost all programs have a _TOP, a _SEL and a _FORM and start with START-OF-SELECTION. Although he is intrigued because only some have END-OF-SELECTION.

One month later João is already quite at ease with SE38. By now he barely recalls what he learned in college. One year later he’s become a trusted programmer, delivering serious and complex work. His programs have thousands of lines, divided into multiple FORMs with hundreds of lines each (which he dutifully writes in the _FRM). His forms don’t use parameters because it would be foolish to keep passing the variables from one FORM to the other when they are already accessible by all since they’re declared in the _TOP include anyway. And thus, the _TOP include of his programs has several pages and dozens of variables.

And then one day someone tells him about encapsulation and he says:

“What? You mean reusable Function Modules in SE37? Yeah, I could make some, but I’m quite sure that no one will ever use these things again so it’s not worth it.”

And then one day someone tells him about ABAP OO and transaction SE24 and he says:

“Oh, classes? I know, I know, but firmly believe classes in ABAP are bad because they take much longer to make, it’s a lot of extra work and much worse to debug and in this client I would never have time for that. And besides I don’t see any advantage in using them.”

So he carries on, adding more and more lines to his beloved _FRM and _TOP includes.

And then one day someone tells him about Software Design Patterns and João says:

“Man! I had to learn UML in College and I hated it. It’s useless. No one uses it in real life. And besides, those are classes and in SAP I don’t think classes make any sense.”

And then one day someone tells him about the virtues of SOLID and he says:

“Hum… that looks interesting. I wish I had the time to learn it. But not for SAP because ABAP is different and that doesn’t apply to the way we program in ABAP.”

And then one day someone tells him about ATC (ABAP Test Cockpit) and he says:

“What’s that? I tried running it on the program I made and the list of errors was so long and useless that I didn’t have the patience to look into it. Anyway my program is working fine.”

And off he goes, back to his SE38, filling his includes, oblivious of vulnerabilities, naming conventions, semantic flaws, uncaught exceptions, unreachable code, etc.

And then one day someone tells him about TDD (Test Driven Development) and ABAP Units and he becomes confused and says:

“Test what? I already saw those ABAP Units somewhere in SE80 but never really cared to understand what they are. Anyway, I usually ask a functional person for some test data to do my tests and then, if it works, I just tell them it’s ready and let them do most of the tests.”

And then one day someone tells him that Shared Objects are a great way to cache data across processes and he says:

“Cache? When I need to cache something I usually create a table ZRESULTS and INSERT all the cached data into that table and then SELECT from it whenever I need it. It’s fast and it works. And then I make a program that deletes the cache once per month. No one ever complained.”

And then one day someone tells him about SAP Package Concept and the advantages of using Package Interfaces and he says:

“Packages? If it’s FI I put it in package ZFI, if it’s SD it goes into package ZSD and all MM stuff goes into package ZMM. This way I never get it wrong.”

And then one day someone tells him about ADT (ABAP Development Tools) and Eclipse and he says:

“I used Eclipse in College. But that was for Java. I don’t see any advantage in using it for ABAP. That’s silly.”

And then one day someone tells him about abapGitm an open source project which lets you use the wonderful git with ABAP, and he says:

“But I can already make versions in ABAP! And besides, when I need to store versions of my programs or copy them to another system I use NOTEPAD.EXE and it never failed me.”

And because, in the SAP world, customers almost never care about the quality of their code, don’t have to comply with coding industry standards, rarely enforce any kind of quality control (and when they do, it’s done by someone who thinks like João), 10 years later João is still proudly chained to his SE38, creating _TOP, _FRM and _SEL includes.

And then one day someone asks him what he does for a living. And he says:

“I am a Computer Engineer.”

Não he’s not.

10 comentários a “ABAP, the lobotomizer”

  1. Ruthiel Diz:

    Eh pah… Obrigado!

    Temos diversas discussões do género no nosso grupo de trabalho e, infelizmente, penso que havemos de as ter por muitos anos ainda.

    Enquanto não olharmos para o ABAP de uma forma diferente, organizada, estruturada e aplicarmos todas as ferramentas que temos ao nosso dispor para usá-la de uma forma eficiente havemos sempre de encontrar imensos “Joõezinhos”.

    Por outro lado, em defesa do João (que sou eu ainda…), apesar de estar certo que ele consegue abrir horizontes sozinho recorrendo à grande quantidade de material de a SAP disponibiliza entre outras muitas coisas (OOP pode-se aprender em muitas linguagens conhecidas), é muito difícil chegar e querer ser diferente sem nenhuma base e nenhum apoio, apoio esse que não é indispensável, mas de extrema importância na minha opinião.

    Parabéns pela análise certeira.

  2. Pedro Correia Diz:

    Acho que é consequência da aversão à aprendizagem no geral. Em qualquer área tecnológica deve—se estar disponível para aprender coisas novas. E essa mentalidade afugenta os que acham que já aprenderam tudo o que há para aprender

  3. Nuno Godinho Diz:

    Somos todos um pouco João :-) O objectivo é tentar ir sendo cada vez menos.

  4. Nuno Morais Diz:

    O Pessoal ainda não percebeu que isto não e só 0 e 1.

  5. Erick Carvalho Diz:

    Melhor parte: “Até que alguém lhe pergunta a profissão: Sou Engenheiro Informático.”

    Muito bom! kkkkkkkkk

  6. Nuno Godinho Diz:

    Eh eh eh olá Erick :-)

  7. António Portugal Diz:

    Alguém conhece uma forma standard de comparar de uma só vez, o código de uma classe entre ambientes, por exemplo entre DEV e PRD, sem ter de o fazer secção a secção, método a método, na administração de versões?
    E sabem de alguma ferramenta/programa standard para fazer o download e upload de uma classe global de uma só vez? Existem programas Z na net, mas muitas vezes não é possível disponibiliza-los em determinadas máquinas, não funcionam para todas as versões, etc.
    E colocar uma classe completa numa ordem de transporte, de uma forma simples?
    Alguém já se deparou com essa necessidade e pode partilhar a solução?
    Obrigado,

  8. Norton Senna Diz:

    Parabéns pelo Post. Tive a sorte de encontrar, durante minha vida profissional, pessoas que me fizeram pensar fora da caixa, a lutar contra a mediocridade.
    Publicações como essa mudam as mentes das pessoas.

  9. Nuno Godinho Diz:

    Obrigado Norton! É gratificante ouvir isso.

  10. Nuno Godinho Diz:

    Olá António,

    Um amigo meu desenvolveu algo que permite comparar objectos entre ambientes. Se quiseres envio-te por email.

    Em relação a ferramentas para copiar objectos completos existe a antiga SapLink de que o Abapinho falou há alguns anos atrás:
    https://abapinho.com/2012/12/saplink/

    E existe o extraordinário abapGit sobre o qual pretendo escrever em breve:
    https://github.com/larshp/abapGit

Deixe um comentário


About Abapinho
Abapinho runs on WordPress
Articles (RSS) e Comments (RSS).