Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Michael_Keller
Active Contributor
What output technology of a SAP ERP system exists now for more than 30 years? And has been repeatedly declared obsolete, antiquated and outdated? Right, I'm talking about SAPscript - the great-grandfather among the output technologies 🙂

Again and again I see SAPscript forms in the modules "Materials Management" and "Sales and Distribution" which are in use for a long time. Perhaps they will be in use for the next 10 years because they do what they should do: A proper preparation of business information to print, send by mail and so on.

At least that's what they do most of the time. From time to time there are problems and this blog is about a little experience I made and that I want to share with you.

To simplify the maintenance of SAPscript forms, I have written the Open Source tool "SAPscript forms breakdown helper". You can use it at design time to have a better understanding of the form. Advantages such as indentation, emphasis and so on make it easy to understand SAPscript instructions. Here is a little example:



It becomes difficult if you have a problem that can only be recognized at runtime. I had such a problem recently.

In a purchase order form, the delivery address sometimes corresponded to the address of the vendor instead of the address of the "real" recipient. The form was heavily adapted whereas the print program was standard.

Using the SAPscript debugger (see note 19104), I was able to identify the error in the CONSGNEE window. There was an individual determination of the delivery address by using the PERFORM statement with some values of SADR structure.

It was surprising that this logic worked in most test cases. Only in some cases not. After some analysis, it turned out that the structure SADR is used several times by the print program in different contexts. Therefore the structure contains different values at different times.

If the form is always processed the same way, that would be ok. Unfortunately, that's not the case. As far as I remember, there is a note about the processing order of a form. But I couldn't find this note anymore 😞

The solution will probably be the return to the standard at this point. After reviewing the via PERFORM called form in ABAP, the individual address determination mimics logic that is now provided by the addition ADDRESSNUMBER of the SAPscript command ADDRESS. We will see.

What I learned from this little story? First of all: The behavior of the SAPscript debugger is hard to understand. Then of course: Do not rely blindly on the content of variables whose use has not been well proofed 😉

 

Have a good time and thanks for reading

Michael

 
8 Comments
Labels in this area