Monday, September 1, 2014

ABAP search source code functionality – part II

Very long time ago; I blogged about possibility of how to search within source code of ABAP reports. That was in year 2009 you can find that blog post here - ABAP search source code functionality. Meanwhile there are changes that occurred within field of source code searching.

First and foremost the ABAP report RSRSCAN1 which is most known as tool to do the searching is not supposed to be used anymore. Well this was the case also in 2009 but that time at least the RSRSCAN1 didn’t dump with error: READ_REPORT_LINE_TOO_LONG. However this is not the only change that happened. As suggested in the RSRSCAN1 we shall use TA SE38-> Utilities -> Find in source code function. This one has an disadvantage that while you choose this function it generates list of object that will be search. The list is prepared as per input that is in field “Program” in TA SE38. As most of us initially we would leave the “Program” field blank in order to search all the ABAP reports then this list is never generated and subsequently we would never get to dialog box which is need for adding of search criteria. Of course this is pretty reasonable and it makes no sense to search within all the ABAPs in the system. Usually we would need ot have search range in mind before searching. But all in all this means that searching within SE38 also do not work.

Another possibility is other standard ABAO report which is RS_ABAP_SOURCE_SCAN. As per its current version (last change on 13.01.2012) available in SAP NetWeaver 731 it actually works while it is schedule for run as background job. Nevertheless as per SAP Note 1968886 - RSRSCAN1 is no longer supported even the RS_ABAP_SOURCE_SCAN became obsolete and in within SAP Basis 74 it is removed.


Other possibilities: There are many possibilities of how to search in ABAP source code outside an SAP. Here I mean that an external tool is accessing ABAP’s repository sitting in SAP’s application server. These are usually the tools used by security companies which do the scanning of the code for exploring the code vulnerabilities. If you want to use such an approach have look into the blog series of Martin Ceronio: part 1, part 2, part 3.

No comments: