ABAP log

August 31, 2007

SAP SDN? Thanks, just looking…

Filed under: ABAP, SAP, SDN — abaplog @ 8:07 pm

I did never participate in user forums at SAP SDN. Maybe it’s just this feeling of bad treatment of us ABAPers by SAP that lives inside of me since late nineties. (If you don’t get what I mean: SAP doesn’t provide any viable technical documentation about the system, except for ABAP language itself and some other less important pieces). They overtook (or just attracted, with no migration?) so many participants that we old farts living at places like Sapfans could probably be jealous: the number of topic and replies they get per a single day is what we get probably in a week. There has been a lot of critique that the point and reward system is attracting all kind lazy and greedy, leaving knowledgeable folks in the shade. And now I read this topic, being pointed by a Sapfans fellow.

Where this whole thing is heading to? This doesn’t even deserve an RTFM kind of response. The topic of spoonfeeding is completely dead at other places but SDN seems to be welcoming all this. Forget about the fact that about a half of responses are totally wrong! Looks like nothing can be more encouraging to volunteer for help than that pure good feeling after, anything else just ruins the best ideas.

You mean, help me? Mmmmm… No thanks, just looking!

August 29, 2007

The best ABAP short dump.

Filed under: ABAP, SAP — abaplog @ 7:25 pm

We all love ST22. I have seen many funny messages there. And this one, well… it’s a tribute to SAP short dumps. See for yourself and have fun.

Note: The image can be resized by your browser and be hardly readable. Clicking the mouse over it helps to get the original size.

August 15, 2007

Reading a comma delimited file in ABAP (aka CSV file).

Filed under: ABAP, SAP — abaplog @ 8:51 pm

Download functions of SAP allow you to write data into a file on the presentation server in many different formats. However, reading files (uploading) is very limited. A common question asked on forums is how to upload a comma delimited file. This format, also known as CSV, is used by many programs including MS Excel. For example, you may want to save an Excel spreadsheet into CSV file and then upload it into SAP. Unfortunately, there is no function that can help you.

Few years ago I had to extend an ABAP program with a capability to read CSV files. I wrote a very simple parser that can read files with any delimiter, not only comma. (It actually has to be a printable character, control characters will most likely not work). The delimiter can be set as a constant in the body of the parser form. It can be easily changed to be a form parameter. The code of the parser can be downloaded here. NOTE: use “view source” function of your browser – there are field symbols that are interpreted as HTML tags (I’ll have to fix that…)

If you find any problems that have to be fixed, please send your suggestions (the best would be some working code), as a comment on this article.

Blog at WordPress.com.