‎2012 Feb 02 10:54 AM
I am trying to change hard coded values from multiple source codes with respective constant names. Is there a tool to find and replace them according to a rules table. I wouldn't mind even if this tool was not in SAP (eg. Eclipse).
Thank you in advance,
Michalis.
‎2012 Feb 02 3:46 PM
I don't think this can be fully automated, you need a human brain to decide for example whether 'MWST' is to be replaced by a constant or just a harmless column heading abbreviation.
If you know what literals to look for, you can use program RS_ABAP_SOURCE_SCAN to quickly find related code snippets across packages.
Thomas
‎2012 Feb 02 9:10 PM
Dear Thomas,
thank you for your prompt response.
My idea was (and is) that since the ABAP compiler is embedded in Netweaver, it would be smart to get the compiler functionality together with regular expressions declaration in order to do what unix like systems do for years, replace strings with other strings. The program you suggest is well known for finding literals (substrings) in source, but when it does you never know what is the role of the literal on the source code line (in the particular code statement).
Of course I agree with you regarding the term refactoring, that a human eye is needed, if I was to do real source code pattern recognition and replacement, but my driving need is more simple and way far from that (at least for now).
Please keep me posted in case you have any news on the subject.