Monday, January 13, 2014

ABAP2XLS

Whenever you have the urge to export an Excel File from ABAP Data i can only recommend to use a Package like ABAP2XLS. They do a really great job and a lot of work is prebuild and even auto recognized on the data structures you provide.

Check it out at:
http://ivanfemia.github.io/abap2xlsx/

Its a little tricky to get into it, but totally worth the time if you have more than a plain .csv/excel you want to export.


Use Domains

I recently helped a co worker who tried to solve a problem with a WebDynpro filter. She coded the filter by hand and was wondering why the filtered values where not met. The answer was pretty simple. The column used a primitive data type and the filter she programmed used value, text pairs. She thought it would filter on the text as well as the value, which it did not. Why this is a classic beginner mistake which happended to me a lot as well in the beginning, the real lesson here ist to use proper datatypes with domains. They then have the same text value pairs. You do not even need to programm your filter, cause it can bge configured, and localisation is for free as well.
It always appears faster to use primitive data types at first, but i can assure you, the bigger the project is, the more changes will come in later. Having build proper datatypes at that point saves you a lot more time than you will invest in the beginning.
I do also hat to have one data type for one single component of a structure which is really only used once in the programm still it pays of.
While this may come naturally to programmers who only lived in SAP/ABAP their whole life, lateral entires from other programming languages are having a harder time to understand the benefit behind this super redundancy, since they are normally drilled to use standard components.