We have been working with the Utility Classes since there conception in 2003. They contain a collection of useful functionality which SAP either do not provide or provides in a non-user friendly style. These classes build upon the standard SAP language and provide features in a re-usable and simple way.
The classes (of which there are over 20) have many uses, they can be used for file handling FTP, field conversions etc, and all use the new exception handling concept implemented in SAP basis 6.20. Taking the file handling class as an example. How many times have you written a program which reads/writes a file to the application server. This invariably involves you having to use the ABAP dataset statement and pass each line to the file at a time, handling exceptions along the way. And what happens the next time you need this function, you most likely re-code a new version changing the error handling and messaging as you go.
With the file class you can upload a file from the application server with two method calls, a total of six lines of code. This incorporates both exception and success message handling. And on top of this provides one point of contact if the code needs to be modified to accommodate any sap enhancements.
The classes are independent of the operating system they are installed on. The coding uses external commands, logical file paths & names to keep application server interaction consistent.
The solution also incorporates a number of example programs which can be used as a basis for training purposes.
- Includes the following class functionality:
- File & directory handling on both the PC and server
- Background job message logging and cancelling
- Data conversions e.g. CSV
- E-mailing with or without attachments
- Handling of e-mail recipients and groups
- Calling external commands
- FTP access
- HTML conversions
- List conversions for printing
- Handling of logical file paths and filenames
- Runtime message handling for classes
- Spreadsheet handling, both embedded into the SAPGUI and standalone
- Conversion of XML to XHTML additionally using XSLT