ABAP Helicopter Review

I know nothing about ABAP, except that it has an OO side, and I would like to have some helicopter view of this before I start looking at it in detail. I know that I can find all this by studying it, but, as I said, for a start I like to know what I'm dealing with.

  • Is it compiled (always)?
  • Typestem: Is it Printed Strongly? Does it use type inference?
  • Inheritance: single / mulched, interface structures?
  • Collections: Does it have a collection other than arrays? Does he have common collections? Does this use List comprehension?
  • How about (con / contra / in) variance in arrays, return types, parameters, overrides?
  • Any Exceptionhandling Method?
  • Any design in design supported by a contract?
  • Anything wonderful, like other famous languages?
  • ...

Any general information about the characteristics in principle would be welcome!

+48
sap abap
Jan 26 '10 at 8:52
source share
2 answers

Is it compiled (always)?

ABAP is "compiled" as byte code (called "load" for historical reasons), which is then executed by a virtual machine inside the kernel. You can compare this with Java, with one big difference: The load is not machine dependent, but optimized for the type of target machine. This means that in a system landscape with several different types of application servers, you may have several pre-compiled loads for a single program. Not that you have ever seen this - the entire compilation process is processed automatically.

Typestem: Is it Printed Strongly? Does it use type inference?

Strongly typed system of general types from above. Please note that a complete data dictionary, which is integrated into the language, is very convenient.

Inheritance: single / multiple, interface-like structures?

Single inheritance. Interfaces are supported, including composite interfaces and renaming of implementation components (two IF_FOO and IF_BAR interfaces can define the BAZ method, and a class that implements both interfaces will have two methods: IF_FOO ~ BAZ and IF_BAR ~ BAZ).

Collections: Does it have a collection other than arrays? Does he have common collections? Does this use List comprehension?

What you know as an “array” in other programming languages ​​does not actually exist in ABAP — instead, you usually use what are called “internal tables”. Think of structured memory tables as a database. There are some ideas for collection classes distributed through various modules, but the canonical way to do this is to use internal tables - to define the so-called type of type table, which either represent references to instances or structures containing such a link.

How about (con / contra / in) variance in arrays, return types, parameters, overrides?

Arrays: see above. Overriding: You cannot change the signature of a method when implementing an interface method or overriding superclass methods. As for the parameters - it depends on whether you are transmitting data (or links to data) or links to objects. In general, a promotion can occur implicitly while you must explicitly perform downcasting.

Any exception handling?

Yes. More than one path - again for historical reasons (backward compatibility). Class-based exceptions are supported.

Any design in design by contract?

No, of which I know.

Anything wonderful, like other famous languages?

Many things. You might want to check http://www.volker-wegert.de/en/node/17 and http://www.volker-wegert.de/en/node/21 for signs of bias :-)

+73
Jan 26 '10 at 9:24
source share

I will try to provide some things that the previous answer does not have, skipping what they mentioned:

Is it compiled (always)?
Well, the interface for the programmer says “Activate”, not compile, but that's because it is built into version control. When you activate something, it compiles it and makes the source and binary versions the “active” version. If someone tries to start a source that is not compiled, it will be automatically compiled as it starts.

Typestem: Is it Printed Strongly?
I guess, yes. ABAP is like a weird transition between Pascal and COBOL. There are "Field Symbols" that look like pointers. There are also general types. (And general field pointers). One of the coolest things is that there is no difference between ABAP types and database types. Any table you make will automatically become a type of structure. That is, ABAP integrates with the database in such a way that there are practically no other languages. You can also write SQL, which is actually part of ABAP, and not just as a string, as in other languages.

Inheritance: single / mulched, interface structures?
There are interface structures, I usually do not use them. If you made many reusable classes, they would be a good idea, however.

Collections: Does it have a collection other than arrays? Does he have common collections? Does this use List comprehension?
Better, it has “Internal Tables”, which are basically a type of dynamic array. They can be declared from almost any type, including in a data dictionary. They can be encoded, sorted, etc. There are several types, including hashed and sorted options.

Any exception handling
Both types of OOP and non-OOP.

Anything wonderful, like other famous languages?
As another poster said, a lot. This is very good for any database operation and reuse of complex data structures and types. This, of course, is a cross-database and cross-platform (OS and processor). It has a very good version control and transport system. The entire SAP system has very good multilingual support. You can get simple screens with appropriate headers and selection fields automatically, which means you can make fewer programs and work harder. You do not need to match database types and language types, etc.
Things are less than good at:
1. Numbers are usually stored as ASCII, which makes it less fast for math in many applications.
2. Most data structures are very normalized, which means that your data can spread over 50 tables. Star queries are very common. Built-in functions for data extraction (for example, logical databases) are your friend in these cases.
3. SAP tried to be everything for everyone, so there are many configuration options, etc., And sometimes the function does not do what you expected from it, based on past behavior.
4. ABAP is sometimes very verbose. Try using the template button on something simple, such as GUI_DOWNLOAD.
5.SAP was very ambitious with what they took over, and thus, in the early stages, faced with limitations of hardware, operating systems, and RDBM systems. So they have old kludges to handle this, which is not very pretty. (Pool tables, cluster tables, etc.)
6. When you activate a program, it does not perform a full compatibility check with the function modules used. There are situations when something is activated without problems, but then it crashes at runtime, even in cases where it could be caught at compile time.

+22
Feb 08 '10 at 13:49
source share



All Articles