In this article I’d like to present a solution how to implement a global class where all internal exceptions (exceptions raised by private methods only ⇒ always catched within the class itself) will be handled with its local exception class. Continue reading
In this article I’d like to present different possible approaches on accessing data and working with it dynamically. Continue reading
Java Robot can be very usefull tool emulating e.g. pressing a key on your keyboard. Sometimes this can be difficult especially for non-standard characters like ‘asterisk’. Therefore I developed following piece of code which translates given string into separated chars, converts them to ASCII and Java Robot types them using ALT+ASCII_KEY Continue reading
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
Adapter design pattern provides unique INTERFACE to the outside world for different functionality encapsulated in separate implementations. Continue reading
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
In software engineering, the singleton pattern is a design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. The concept is sometimes generalized to systems that operate more efficiently when only one object exists, or that restrict the instantiation to a certain number of objects. The term comes from the mathematical concept of a singleton. Continue reading
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
Due to fact that BAPI structures uses different field names than standard SAP tables I used to apply a trick I’m going to present in this article – map BAPI fileds to SAP fields in a Z-table and fill BAPI structures dynamically during runtime Continue reading