Tuesday, March 24, 2009

ABAP search source code functionality

It would be helpful sometimes to look up in e.g. standard SAP codes how some functionality is programmed or how particular Function Module is called etc. This is not an easy in SAP system but there are few possibilities how to achieve it. First of all there is a old report called RSRSCAN1 (ABAP/4 Find String in Program Source Code) provided by SAP since 1995. Since SAP Basis Component was replaced by WAS (around year 2001) this report is obsolete due to its performance problems. Report is not compatible with Unicode enabled version of SAP systems as well. 

SAP suggests to use functionality of “Find in source code” available in TA SE38 – ABAP Workbench. Here you can specify range of objects which you want to search in – same as in old report RSRSCAN1. This functionality is quite nice; the only disadvantage is that you cannot run it on background as RSRSCAN1. Therefore consider amount of objects you want to search since runtime can be very long and your SAP session can easily dump by exceeding timeout.

The 3rd option that you have is Repository Info System – TA SE83. This is not useful in case you want to search in source code; you can only search for report name, report creator, time/date of creation, program type, status, application etc.

So here it is another opportunity for ABAP open source initiatives. SDN people where are you? :-)

- update 01/09/2014 -
2nd part of this blog can be found here.


Anonymous said...

Just one word: TREX

If it is configured properly, it can be used for index based source code search.

I used it at SAP, it was working very for some internal systems.

We used it e.g. to find * TODO and like comments :)

Martin Maruskin said...

Hi Anonymous, very good point, I appreciate it. My concern within TREX is that it is not so popular within customers. In post of cases TREX is not available/installed. Anyway thanks,

Martin said...

Hi sapper! I have been working on a custom ABAP source search using a connector and search library (and using Ruby in this case). It's not the perfect solution, but maybe you want to check it out: http://martinceronio.net/?p=133