If you ever need to get a super class or all (global) sub-classes of a given ABAP (global) class, you can use the following approach Continue reading
Tag Archives: OO ABAP
ABAP – Very simple ALV
It’s quite common request to show lines of an internal table in form of ALV popup – e.g. some custom log messages after a program execution. Continue reading
ABAP – Working with dynamicallly accessed data
In this article I’d like to present different possible approaches on accessing data and working with it dynamically. Continue reading
Design Patterns in ABAP – Observer
Observer design pattern can be easily demonstrated on a chat service where you have a server and several clients (observers). Once a client sends a message, server receives it and RAISES an EVENT (eg NEW_MESSAGE_RECEIVED) which is OBSERVED by all connected clients (observers) and such message is subsequently displayed in message dialog on all clients. Continue reading
Design Patterns in ABAP – Adapter
Adapter design pattern provides unique INTERFACE to the outside world for different functionality encapsulated in separate implementations. Continue reading
Design Patterns in ABAP – Factory Method
Factory Method design pattern provides unique interface to object instantiation. The decision on which object is to be instantiated is hidden from the outside world in the code. Using this approach different objects can be instantiated dynamically. Continue reading
ABAP – Multiple implementations of a “Single implementation only BAdI”
It is a problem when you need to have multiple implementations of a BAdI which does not implicitly allow multiple implementations by its definition. How to bypass this limitation? Continue reading
ABAP – Convert numbers on input and output
I’m affraid there might be a standard function module already available to achieve the same what I’m going to write myself, but I believe it is good to know that the number format can be different when different user settings is used in SAP.
If you forget about this during your development you might start fighting serious problems in the future.
Therefore I’ve written two short code snippets for numbers conversion for INPUT (save to database) and OUTPUT (display to the user) Continue reading
ABAP – How to declare a variable dynamically
In case you need to create a variable dynamically during runtime with different type, length or precision, you can use the following piece of code to achieve the same – the variable is created dynamically based on given type, length and number of decimals. Continue reading