Buried in the deepest layers of your Web Application Server and thought – and hoped! – forgotten by mankind lie unspeakable terrors.
Eons ago, they roamed the Earth as gods, but now they sleep and dream. These are the Old Ones, of whom the crazy Arab Abdul Al’Hazred wrote:
- That is not dead, which may eternal lie
- Yet with strange eons, even Death may die.
I have been a scholar for most of my life, and my musings have led me to research many dark secrets of SAP technologies. But now – with my latest studies of the Necronomicon, the legendary black book written by said crazy Arab – I must have stirred something. Whatever has brought me to the attention of the Old Ones, they are onto me, and soon my days will be over.
But before they find me, I want to pass onto you the secrets at which I have had the briefest glimps, just quick enough to keep most of my sanity yet long enough to loose all hope and faith in the Universe being a place for humankind.
The Bizarre World of TRMAC
Eons ago SAP decided to create new special purpose commands especially for HR programming. Of course these commands have been useful, but fortunately SAP stopped otherwise we wouldnt ABAP as general purpose programming language but different special languages for HR, FI, CO and nowadays XI, Records Management and so on. So lets look how it works and have a look at the transparent table TRMAC:
Its interesting to see how quite common ABAP commands have been realized using these macros. But please be aware that this is a look back into time: I think some of these commands have been integrated into ABAP kernel.
Now we use transaction sm30 to create new command BREAKME that sets a breakpoint if the program has been started transaction se38:
Please be careful when you reproduce the results: Sometimes I had to do a new logon after changes in TRMAC – and please start numbering the commands with 000.
Of course macro programming is an inferior programming technique:
- We cant debug them,
- we dont have type checking,
- we get trouble if the ABAP language group creates a new command with the same name,
- we can surprising results if another application creates a new TRMAC macro or a standard macro with the same name.
But macro programming is fun and separates ABAP wannabes from experts. I think during the ABAP month in SDN we should take the chance and enrich ABAP with some really useless and perhaps frightening commands, think about a GOTO statement, an ALTER command or entries like in good old Cobol? Or do you want to write an Add On to the new ABAP editor for TRMAC macros? Do we need a SAPlink plugin for TRMAC? I would love to read blogs with sophisticated, inspiring and weird solutions.