There is an impressive dialog in scene 4 of Bertold Brecht’s Drama “Life of Galileo” where the court scholars refuse to use Galileo’s telescope as it is useless to observe things that cannot exist because they would contradict Aristoteles and the Absolute Truth of the Church (“… if your tube shows something that cannot exist it must be a rather unreliable tube.“).
I experienced such a Jesuitical sophistry last week with a customer message.
Java Gui and Happines
At our companies plants we have many machine tools controlled by Linux systems. As we work highly cost optimized we use these systems and also the SAP Java Gui for the required SAP QM transactions. To better support the colleagues I use the Java Gui too for most of my SAP work, finding bugs and helping to improve it.
So since I have been using the Java Gui on Linux with the Solution Manager for the past seven years I seldom had problems.
OK, the SolMan graphics don’t work, but you get a polite message about this. Sometimes the html display of the DSWP transaction is messed up, but after some service packs it works again.
Sometimes while coding I am sad that the new ABAP editor is not ported as Java Bean (why not?) and I am angry about the missing graphical screenpainter. Sometimes I shake my head because the SOLMAN_WORKCENTER’s login dialog is broken (which would be very easy to fix …), but it works great when opened directly in firefox. Almost all other transactions such as SOLAR01, SOLAR02, STWB_2, and so on, work well.
Dumps are Not Nice
During some tests last week with SOLAR02 “Test Cases” tab I tried to upload a file as a Test Document and suddenly I faced a dump. I opened the post mortem debugger, looked at the coding and understood the problem.
In method CL_SA_DOC_CONT -> IF_SA_DOC_CONT~UPLOAD_DOCUMENT there is at line 186 ff. (ST SP 25) following code which tries to separate the path from the filename:
Here we have a misunderstanding of the SPLIT commands.
It does not behave like a search expression that would be false (or RC > 0) if the search item is not found. Instead if the separator is not found it will copy the whole character string into the destination table.
So the destination table will always have at minimum one row and the expression “if not l_pathix > 0” will always be false, so that the “split at ‘/'” will never be executed, with the sad consequence that in the following code:
l_length_path will finally be 0 and the “write” statement will overwrite l_path_data with spaces, so that the following method will throw the uncaught exception DIRECTORY_SET_CURRENT_FAILED ==> dump.
A simple and transparent case, wouldn’t you say? So did I and opened a customer message with a nice screen shot of the post mortem debugger with all important variables visible and a clear explanation.
A Dump That Cannot Exist!
The first level support was impressed and passed it directly to the development support (wow!). And here it comes:
your analysis is completely correct.
As you have slashes and not the Windows backslashes in your file paths,
we suppose that you use SAP GUI for Java.
However, transaction solar02 and Solution Manager in general is not
released for the Java GUI, as you can see in transaction
The problem now is that a correction would be fairly simple for the
upload method, but as we do not know what else is necessary to enable
this GUI, we will only provide a correction in the context of a general
Java GUI enablement.
After having recovered a bit from the shock I answered that I spent a lot of time to present the bug on a silver tablet and that a correction refusal would not be very polite, that the coding relies heavily on peculiarities of MS Windows which might change in the future, that I never asked to activate the little nice check box for the Java Gui in SE93 and finally that a bug is a bug is a bug and should always be fixed.
The dismal answer (“Solution provided” with a link to SAP note 10):
Dear Mr. Escher,
first of all I would like to thank you very much for your elaborated
analysis. Basically you are right, that this piece of code is not 100%
But: Considering the assumptions where this code is supposed to be
executed (e.g. running within SAP GUI for Windows only) it has been
working correctly, as far as we know, and the potential bug is not
actually a bug in this environment.
Anyway, in general I fully agree that code should be as clean as
possible, and we discussed it again. We came to the conclusion that in
this particular case we would not change the code in the proposed way.
Let me briefly try to explain why:
We simply do not know how far our transactions actually work in a non
Windows environment. So we do not think that it is useful to change one
detail without being able to assure that everything else works fine in
the non-supported environment, where we definitely have known
This would not be serious from our side, in my opinion, and not really
I understand if you do not accept our answer, but cannot provide a more
satisfying answer for you.
With kind regards,
Development SAP Solution Manager
Here we have another example that SAP is a very rich company.
Instead of replacing the few lines of code with lines as they can be found in the same method (line 53: if l_test_directory cs ‘\’. l_separator = ‘\’. else. l_separator = ‘/’. endif.), which would have been done by one person in some minutes, they preferred to verbosely dispute about not doing it!
How many people were involved in the discussion about these 5 lines of code?
Imagine you have a car and one day you discover that the cigarette lighter causes a short circuit if you use it. You bring it to the garage to have it fixed, but the automobile mechanic refuses to do his job and fix it, pointing to a “no smoking allowed” sign inside the car. Then he makes a speech that it would not be serious from his side and not really helpful to repair a cigarette lighter in a car that has a smoking ban.
What would Scott Adams‘s humoristic genius make out of this grotesque?
OK, then let’s begin with the Copernican revolution and ask for Java Gui support for the Solution Manager! May be then we will have this little bug fixed 🙂